diff --git a/_submodules/TypeScript b/_submodules/TypeScript
index 1ee9e0d9a2..1112daead7 160000
--- a/_submodules/TypeScript
+++ b/_submodules/TypeScript
@@ -1 +1 @@
-Subproject commit 1ee9e0d9a24b629da3a8cae2748616af1dc8fc0c
+Subproject commit 1112daead7b7610e21fa5b5da4696e2d92e89385
diff --git a/internal/tsoptions/tsconfigparsing_test.go b/internal/tsoptions/tsconfigparsing_test.go
index 4f57b5068f..46ab705f5f 100644
--- a/internal/tsoptions/tsconfigparsing_test.go
+++ b/internal/tsoptions/tsconfigparsing_test.go
@@ -1149,6 +1149,7 @@ func TestParseSrcCompiler(t *testing.T) {
"transformers/classThis.ts",
"transformers/declarations.ts",
"transformers/destructuring.ts",
+ "transformers/es2015.ts",
"transformers/es2016.ts",
"transformers/es2017.ts",
"transformers/es2018.ts",
@@ -1157,6 +1158,7 @@ func TestParseSrcCompiler(t *testing.T) {
"transformers/es2021.ts",
"transformers/esDecorators.ts",
"transformers/esnext.ts",
+ "transformers/generators.ts",
"transformers/jsx.ts",
"transformers/legacyDecorators.ts",
"transformers/namedEvaluation.ts",
diff --git a/testdata/baselines/reference/submodule/compiler/2dArrays.js.diff b/testdata/baselines/reference/submodule/compiler/2dArrays.js.diff
index 8a6e307a17..dcc6d6204f 100644
--- a/testdata/baselines/reference/submodule/compiler/2dArrays.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/2dArrays.js.diff
@@ -1,14 +1,35 @@
--- old.2dArrays.js
+++ new.2dArrays.js
-@@= skipped -20, +20 lines =@@
- class Cell {
+@@= skipped -17, +17 lines =@@
}
- class Ship {
+
+ //// [2dArrays.js]
+-var Cell = /** @class */ (function () {
+- function Cell() {
+- }
+- return Cell;
+-}());
+-var Ship = /** @class */ (function () {
+- function Ship() {
+- }
+- return Ship;
+-}());
+-var Board = /** @class */ (function () {
+- function Board() {
+- }
+- Board.prototype.allShipsSunk = function () {
++class Cell {
++}
++class Ship {
+ isSunk;
- }
- class Board {
++}
++class Board {
+ ships;
+ cells;
- allShipsSunk() {
++ allShipsSunk() {
return this.ships.every(function (val) { return val.isSunk; });
- }
\ No newline at end of file
+- };
+- return Board;
+-}());
++ }
++}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/APISample_Watch.js.diff b/testdata/baselines/reference/submodule/compiler/APISample_Watch.js.diff
index 499c77d7d5..3ae3cf29a1 100644
--- a/testdata/baselines/reference/submodule/compiler/APISample_Watch.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/APISample_Watch.js.diff
@@ -11,7 +11,40 @@
- */
Object.defineProperty(exports, "__esModule", { value: true });
-var ts = require("typescript");
+-var formatHost = {
+- getCanonicalFileName: function (path) { return path; },
+const ts = require("typescript");
- const formatHost = {
- getCanonicalFileName: path => path,
- getCurrentDirectory: ts.sys.getCurrentDirectory,
\ No newline at end of file
++const formatHost = {
++ getCanonicalFileName: path => path,
+ getCurrentDirectory: ts.sys.getCurrentDirectory,
+- getNewLine: function () { return ts.sys.newLine; },
++ getNewLine: () => ts.sys.newLine,
+ };
+ function watchMain() {
+- var configPath = ts.findConfigFile(/*searchPath*/ "./", ts.sys.fileExists, "tsconfig.json");
++ const configPath = ts.findConfigFile(/*searchPath*/ "./", ts.sys.fileExists, "tsconfig.json");
+ if (!configPath) {
+ throw new Error("Could not find a valid 'tsconfig.json'.");
+ }
+@@= skipped -27, +22 lines =@@
+ // Between `createEmitAndSemanticDiagnosticsBuilderProgram` and `createSemanticDiagnosticsBuilderProgram`, the only difference is emit.
+ // For pure type-checking scenarios, or when another tool/process handles emit, using `createSemanticDiagnosticsBuilderProgram` may be more desirable.
+ // Note that there is another overload for `createWatchCompilerHost` that takes a set of root files.
+- var host = ts.createWatchCompilerHost(configPath, {}, ts.sys, ts.createSemanticDiagnosticsBuilderProgram, reportDiagnostic, reportWatchStatusChanged);
++ const host = ts.createWatchCompilerHost(configPath, {}, ts.sys, ts.createSemanticDiagnosticsBuilderProgram, reportDiagnostic, reportWatchStatusChanged);
+ // You can technically override any given hook on the host, though you probably don't need to.
+ // Note that we're assuming `origCreateProgram` and `origPostProgramCreate` doesn't use `this` at all.
+- var origCreateProgram = host.createProgram;
+- host.createProgram = function (rootNames, options, host, oldProgram) {
++ const origCreateProgram = host.createProgram;
++ host.createProgram = (rootNames, options, host, oldProgram) => {
+ console.log("** We're about to create the program! **");
+ return origCreateProgram(rootNames, options, host, oldProgram);
+ };
+- var origPostProgramCreate = host.afterProgramCreate;
+- host.afterProgramCreate = function (program) {
++ const origPostProgramCreate = host.afterProgramCreate;
++ host.afterProgramCreate = program => {
+ console.log("** We finished making the program! **");
+ origPostProgramCreate(program);
+ };
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/APISample_WatchWithDefaults.js.diff b/testdata/baselines/reference/submodule/compiler/APISample_WatchWithDefaults.js.diff
index 495001bf42..a660d377a9 100644
--- a/testdata/baselines/reference/submodule/compiler/APISample_WatchWithDefaults.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/APISample_WatchWithDefaults.js.diff
@@ -12,5 +12,30 @@
-var ts = require("typescript");
+const ts = require("typescript");
function watchMain() {
- const configPath = ts.findConfigFile(/*searchPath*/ "./", ts.sys.fileExists, "tsconfig.json");
- if (!configPath) {
\ No newline at end of file
+- var configPath = ts.findConfigFile(/*searchPath*/ "./", ts.sys.fileExists, "tsconfig.json");
++ const configPath = ts.findConfigFile(/*searchPath*/ "./", ts.sys.fileExists, "tsconfig.json");
+ if (!configPath) {
+ throw new Error("Could not find a valid 'tsconfig.json'.");
+ }
+@@= skipped -21, +17 lines =@@
+ // Between `createEmitAndSemanticDiagnosticsBuilderProgram` and `createSemanticDiagnosticsBuilderProgram`, the only difference is emit.
+ // For pure type-checking scenarios, or when another tool/process handles emit, using `createSemanticDiagnosticsBuilderProgram` may be more desirable.
+ // Note that there is another overload for `createWatchCompilerHost` that takes a set of root files.
+- var host = ts.createWatchCompilerHost(configPath, {}, ts.sys);
++ const host = ts.createWatchCompilerHost(configPath, {}, ts.sys);
+ // You can technically override any given hook on the host, though you probably don't need to.
+ // Note that we're assuming `origCreateProgram` and `origPostProgramCreate` doesn't use `this` at all.
+- var origCreateProgram = host.createProgram;
+- host.createProgram = function (rootNames, options, host, oldProgram) {
++ const origCreateProgram = host.createProgram;
++ host.createProgram = (rootNames, options, host, oldProgram) => {
+ console.log("** We're about to create the program! **");
+ return origCreateProgram(rootNames, options, host, oldProgram);
+ };
+- var origPostProgramCreate = host.afterProgramCreate;
+- host.afterProgramCreate = function (program) {
++ const origPostProgramCreate = host.afterProgramCreate;
++ host.afterProgramCreate = program => {
+ console.log("** We finished making the program! **");
+ origPostProgramCreate(program);
+ };
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/APISample_WatchWithOwnWatchHost.js.diff b/testdata/baselines/reference/submodule/compiler/APISample_WatchWithOwnWatchHost.js.diff
index 25d0f11df7..4c4e70a980 100644
--- a/testdata/baselines/reference/submodule/compiler/APISample_WatchWithOwnWatchHost.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/APISample_WatchWithOwnWatchHost.js.diff
@@ -13,4 +13,40 @@
+const ts = require("typescript");
function watchMain() {
// get list of files and compiler options somehow
- const files = [];
\ No newline at end of file
+- var files = [];
+- var options = {};
+- var host = {
++ const files = [];
++ const options = {};
++ const host = {
+ rootFiles: files,
+- options: options,
+- useCaseSensitiveFileNames: function () { return ts.sys.useCaseSensitiveFileNames; },
+- getNewLine: function () { return ts.sys.newLine; },
++ options,
++ useCaseSensitiveFileNames: () => ts.sys.useCaseSensitiveFileNames,
++ getNewLine: () => ts.sys.newLine,
+ getCurrentDirectory: ts.sys.getCurrentDirectory,
+- getDefaultLibFileName: function (options) { return ts.getDefaultLibFilePath(options); },
++ getDefaultLibFileName: options => ts.getDefaultLibFilePath(options),
+ fileExists: ts.sys.fileExists,
+ readFile: ts.sys.readFile,
+ directoryExists: ts.sys.directoryExists,
+@@= skipped -29, +25 lines =@@
+ };
+ // You can technically override any given hook on the host, though you probably don't need to.
+ // Note that we're assuming `origCreateProgram` and `origPostProgramCreate` doesn't use `this` at all.
+- var origCreateProgram = host.createProgram;
+- host.createProgram = function (rootNames, options, host, oldProgram) {
++ const origCreateProgram = host.createProgram;
++ host.createProgram = (rootNames, options, host, oldProgram) => {
+ console.log("** We're about to create the program! **");
+ return origCreateProgram(rootNames, options, host, oldProgram);
+ };
+- var origPostProgramCreate = host.afterProgramCreate;
+- host.afterProgramCreate = function (program) {
++ const origPostProgramCreate = host.afterProgramCreate;
++ host.afterProgramCreate = program => {
+ console.log("** We finished making the program! **");
+ origPostProgramCreate(program);
+ };
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/APISample_compile.js.diff b/testdata/baselines/reference/submodule/compiler/APISample_compile.js.diff
index b2e0459c6f..bccc6d1948 100644
--- a/testdata/baselines/reference/submodule/compiler/APISample_compile.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/APISample_compile.js.diff
@@ -15,4 +15,23 @@
+const ts = require("typescript");
function compile(fileNames, options) {
var program = ts.createProgram(fileNames, options);
- var emitResult = program.emit();
\ No newline at end of file
+ var emitResult = program.emit();
+ var allDiagnostics = ts.getPreEmitDiagnostics(program);
+- allDiagnostics.forEach(function (diagnostic) {
++ allDiagnostics.forEach(diagnostic => {
+ var message = ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n');
+ if (!diagnostic.file) {
+ console.log(message);
+ return;
+ }
+- var _a = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start), line = _a.line, character = _a.character;
+- console.log("".concat(diagnostic.file.fileName, " (").concat(line + 1, ",").concat(character + 1, "): ").concat(message));
++ var { line, character } = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start);
++ console.log(`${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}`);
+ });
+ var exitCode = emitResult.emitSkipped ? 1 : 0;
+- console.log("Process exiting with code '".concat(exitCode, "'."));
++ console.log(`Process exiting with code '${exitCode}'.`);
+ process.exit(exitCode);
+ }
+ compile(process.argv.slice(2), {
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/APISample_jsdoc.js.diff b/testdata/baselines/reference/submodule/compiler/APISample_jsdoc.js.diff
index 939a10fa62..f05d85b5d2 100644
--- a/testdata/baselines/reference/submodule/compiler/APISample_jsdoc.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/APISample_jsdoc.js.diff
@@ -15,4 +15,93 @@
+const ts = require("typescript");
// excerpted from https://github.com/YousefED/typescript-json-schema
// (converted from a method and modified; for example, `this: any` to compensate, among other changes)
- function parseCommentsIntoDefinition(symbol, definition, otherAnnotations) {
\ No newline at end of file
+ function parseCommentsIntoDefinition(symbol, definition, otherAnnotations) {
+- var _this = this;
+ if (!symbol) {
+ return;
+ }
+ // the comments for a symbol
+- var comments = symbol.getDocumentationComment(undefined);
++ let comments = symbol.getDocumentationComment(undefined);
+ if (comments.length) {
+- definition.description = comments.map(function (comment) { return comment.kind === "lineBreak" ? comment.text : comment.text.trim().replace(/\r\n/g, "\n"); }).join("");
++ definition.description = comments.map(comment => comment.kind === "lineBreak" ? comment.text : comment.text.trim().replace(/\r\n/g, "\n")).join("");
+ }
+ // jsdocs are separate from comments
+- var jsdocs = symbol.getJsDocTags(this.checker);
+- jsdocs.forEach(function (doc) {
++ const jsdocs = symbol.getJsDocTags(this.checker);
++ jsdocs.forEach(doc => {
+ // if we have @TJS-... annotations, we have to parse them
+- var name = doc.name, text = doc.text;
+- if (_this.userValidationKeywords[name]) {
+- definition[name] = _this.parseValue(text);
++ const { name, text } = doc;
++ if (this.userValidationKeywords[name]) {
++ definition[name] = this.parseValue(text);
+ }
+ else {
+ // special annotations
+@@= skipped -35, +28 lines =@@
+ });
+ }
+ function getAnnotations(node) {
+- var _this = this;
+- var symbol = node.symbol;
++ const symbol = node.symbol;
+ if (!symbol) {
+ return undefined;
+ }
+- var jsDocTags = symbol.getJsDocTags(this.checker);
++ const jsDocTags = symbol.getJsDocTags(this.checker);
+ if (!jsDocTags || !jsDocTags.length) {
+ return undefined;
+ }
+- var annotations = jsDocTags.reduce(function (result, jsDocTag) {
+- var value = _this.parseJsDocTag(jsDocTag);
++ const annotations = jsDocTags.reduce((result, jsDocTag) => {
++ const value = this.parseJsDocTag(jsDocTag);
+ if (value !== undefined) {
+ result[jsDocTag.name] = value;
+ }
+@@= skipped -24, +23 lines =@@
+ return ts.getJSDocParameterTags(node);
+ }
+ if (node.kind === ts.SyntaxKind.FunctionDeclaration) {
+- var func = node;
++ const func = node;
+ if (ts.hasJSDocParameterTags(func)) {
+- var flat = [];
+- for (var _i = 0, _a = func.parameters.map(ts.getJSDocParameterTags); _i < _a.length; _i++) {
+- var tags = _a[_i];
++ const flat = [];
++ for (const tags of func.parameters.map(ts.getJSDocParameterTags)) {
+ if (tags)
+- flat.push.apply(flat, tags);
++ flat.push(...tags);
+ }
+ return flat;
+ }
+@@= skipped -16, +15 lines =@@
+ if (node.kind === ts.SyntaxKind.FunctionDeclaration) {
+ return ts.getJSDocReturnType(node);
+ }
+- var type = ts.getJSDocType(node);
++ let type = ts.getJSDocType(node);
+ if (type && type.kind === ts.SyntaxKind.FunctionType) {
+ return type.type;
+ }
+@@= skipped -9, +9 lines =@@
+ ts.getJSDocTags(node);
+ }
+ function getSomeOtherTags(node) {
+- var tags = [];
++ const tags = [];
+ tags.push(ts.getJSDocAugmentsTag(node));
+ tags.push(ts.getJSDocClassTag(node));
+ tags.push(ts.getJSDocReturnTag(node));
+- var type = ts.getJSDocTypeTag(node);
++ const type = ts.getJSDocTypeTag(node);
+ if (type) {
+ tags.push(type);
+ }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/APISample_linter.js.diff b/testdata/baselines/reference/submodule/compiler/APISample_linter.js.diff
index 2f9b2b9e1f..15181385dc 100644
--- a/testdata/baselines/reference/submodule/compiler/APISample_linter.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/APISample_linter.js.diff
@@ -15,4 +15,42 @@
+const ts = require("typescript");
function delint(sourceFile) {
delintNode(sourceFile);
- function delintNode(node) {
\ No newline at end of file
+ function delintNode(node) {
+@@= skipped -21, +16 lines =@@
+ }
+ break;
+ case ts.SyntaxKind.IfStatement:
+- var ifStatement = node;
++ let ifStatement = node;
+ if (ifStatement.thenStatement.kind !== ts.SyntaxKind.Block) {
+ report(ifStatement.thenStatement, "An if statement's contents should be wrapped in a block body.");
+ }
+@@= skipped -11, +11 lines =@@
+ }
+ break;
+ case ts.SyntaxKind.BinaryExpression:
+- var op = node.operatorToken.kind;
++ let op = node.operatorToken.kind;
+ if (op === ts.SyntaxKind.EqualsEqualsToken || op == ts.SyntaxKind.ExclamationEqualsToken) {
+ report(node, "Use '===' and '!=='.");
+ }
+@@= skipped -9, +9 lines =@@
+ ts.forEachChild(node, delintNode);
+ }
+ function report(node, message) {
+- var _a = sourceFile.getLineAndCharacterOfPosition(node.getStart()), line = _a.line, character = _a.character;
+- console.log("".concat(sourceFile.fileName, " (").concat(line + 1, ",").concat(character + 1, "): ").concat(message));
++ let { line, character } = sourceFile.getLineAndCharacterOfPosition(node.getStart());
++ console.log(`${sourceFile.fileName} (${line + 1},${character + 1}): ${message}`);
+ }
+ }
+-var fileNames = process.argv.slice(2);
+-fileNames.forEach(function (fileName) {
++const fileNames = process.argv.slice(2);
++fileNames.forEach(fileName => {
+ // Parse a file
+- var sourceFile = ts.createSourceFile(fileName, readFileSync(fileName).toString(), ts.ScriptTarget.ES2015, /*setParentNodes */ true);
++ let sourceFile = ts.createSourceFile(fileName, readFileSync(fileName).toString(), ts.ScriptTarget.ES2015, /*setParentNodes */ true);
+ // delint it
+ delint(sourceFile);
+ });
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/APISample_parseConfig.js.diff b/testdata/baselines/reference/submodule/compiler/APISample_parseConfig.js.diff
index aa2225246a..738bf87273 100644
--- a/testdata/baselines/reference/submodule/compiler/APISample_parseConfig.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/APISample_parseConfig.js.diff
@@ -15,4 +15,26 @@
+const ts = require("typescript");
function printError(error) {
if (!error) {
- return;
\ No newline at end of file
+ return;
+ }
+- console.log("".concat(error.file && error.file.fileName, ": ").concat(error.messageText));
++ console.log(`${error.file && error.file.fileName}: ${error.messageText}`);
+ }
+ function createProgram(rootFiles, compilerOptionsJson) {
+- var _a = ts.parseConfigFileTextToJson("tsconfig.json", compilerOptionsJson), config = _a.config, error = _a.error;
++ const { config, error } = ts.parseConfigFileTextToJson("tsconfig.json", compilerOptionsJson);
+ if (error) {
+ printError(error);
+ return undefined;
+ }
+- var basePath = process.cwd();
+- var settings = ts.convertCompilerOptionsFromJson(config.config["compilerOptions"], basePath);
++ const basePath = process.cwd();
++ const settings = ts.convertCompilerOptionsFromJson(config.config["compilerOptions"], basePath);
+ if (!settings.options) {
+- for (var _i = 0, _b = settings.errors; _i < _b.length; _i++) {
+- var err = _b[_i];
++ for (const err of settings.errors) {
+ printError(err);
+ }
+ return undefined;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/APISample_transform.js.diff b/testdata/baselines/reference/submodule/compiler/APISample_transform.js.diff
index 62ddcd3067..b04d42edd3 100644
--- a/testdata/baselines/reference/submodule/compiler/APISample_transform.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/APISample_transform.js.diff
@@ -11,7 +11,9 @@
- */
Object.defineProperty(exports, "__esModule", { value: true });
-var ts = require("typescript");
+-var source = "let x: string = 'string'";
+-var result = ts.transpile(source, { module: ts.ModuleKind.CommonJS });
+const ts = require("typescript");
- const source = "let x: string = 'string'";
- let result = ts.transpile(source, { module: ts.ModuleKind.CommonJS });
++const source = "let x: string = 'string'";
++let result = ts.transpile(source, { module: ts.ModuleKind.CommonJS });
console.log(JSON.stringify(result));
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/APISample_watcher.js.diff b/testdata/baselines/reference/submodule/compiler/APISample_watcher.js.diff
index 7872ebf267..6f4eaad397 100644
--- a/testdata/baselines/reference/submodule/compiler/APISample_watcher.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/APISample_watcher.js.diff
@@ -13,5 +13,98 @@
-var ts = require("typescript");
+const ts = require("typescript");
function watch(rootFileNames, options) {
- const files = {};
- // initialize the list of files
\ No newline at end of file
+- var files = {};
++ const files = {};
+ // initialize the list of files
+- rootFileNames.forEach(function (fileName) {
++ rootFileNames.forEach(fileName => {
+ 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(); },
+- getScriptSnapshot: function (fileName) {
++ const servicesHost = {
++ getScriptFileNames: () => rootFileNames,
++ getScriptVersion: (fileName) => files[fileName] && files[fileName].version.toString(),
++ getScriptSnapshot: (fileName) => {
+ if (!fs.existsSync(fileName)) {
+ return undefined;
+ }
+ return ts.ScriptSnapshot.fromString(fs.readFileSync(fileName).toString());
+ },
+- getCurrentDirectory: function () { return process.cwd(); },
+- getCompilationSettings: function () { return options; },
+- getDefaultLibFileName: function (options) { return ts.getDefaultLibFilePath(options); },
+- fileExists: function (fileName) { return fs.existsSync(fileName); },
+- readFile: function (fileName) { return fs.readFileSync(fileName); },
++ getCurrentDirectory: () => process.cwd(),
++ getCompilationSettings: () => options,
++ getDefaultLibFileName: (options) => ts.getDefaultLibFilePath(options),
++ fileExists: fileName => fs.existsSync(fileName),
++ readFile: fileName => fs.readFileSync(fileName),
+ };
+ // Create the language service files
+- var services = ts.createLanguageService(servicesHost, ts.createDocumentRegistry());
++ const services = ts.createLanguageService(servicesHost, ts.createDocumentRegistry());
+ // Now let's watch the files
+- rootFileNames.forEach(function (fileName) {
++ rootFileNames.forEach(fileName => {
+ // 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 }, (curr, prev) => {
+ // Check timestamp
+ if (+curr.mtime <= +prev.mtime) {
+ return;
+@@= skipped -48, +43 lines =@@
+ });
+ });
+ function emitFile(fileName) {
+- var output = services.getEmitOutput(fileName);
++ let output = services.getEmitOutput(fileName);
+ if (!output.emitSkipped) {
+- console.log("Emitting ".concat(fileName));
++ console.log(`Emitting ${fileName}`);
+ }
+ else {
+- console.log("Emitting ".concat(fileName, " failed"));
++ console.log(`Emitting ${fileName} failed`);
+ logErrors(fileName);
+ }
+- output.outputFiles.forEach(function (o) {
++ output.outputFiles.forEach(o => {
+ fs.writeFileSync(o.name, o.text, "utf8");
+ });
+ }
+ function logErrors(fileName) {
+- var allDiagnostics = services.getCompilerOptionsDiagnostics()
++ let allDiagnostics = services.getCompilerOptionsDiagnostics()
+ .concat(services.getSyntacticDiagnostics(fileName))
+ .concat(services.getSemanticDiagnostics(fileName));
+- allDiagnostics.forEach(function (diagnostic) {
+- var message = ts.flattenDiagnosticMessageText(diagnostic.messageText, "\n");
++ allDiagnostics.forEach(diagnostic => {
++ let message = ts.flattenDiagnosticMessageText(diagnostic.messageText, "\n");
+ if (diagnostic.file) {
+- var _a = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start), line = _a.line, character = _a.character;
+- console.log(" Error ".concat(diagnostic.file.fileName, " (").concat(line + 1, ",").concat(character + 1, "): ").concat(message));
++ let { line, character } = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start);
++ console.log(` Error ${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}`);
+ }
+ else {
+- console.log(" Error: ".concat(message));
++ console.log(` Error: ${message}`);
+ }
+ });
+ }
+ }
+ // 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"; });
++const currentDirectoryFiles = fs.readdirSync(process.cwd()).
++ filter(fileName => fileName.length >= 3 && fileName.substr(fileName.length - 3, 3) === ".ts");
+ // Start the watcher
+ watch(currentDirectoryFiles, { module: ts.ModuleKind.CommonJS });
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/ArrowFunctionExpression1.js.diff b/testdata/baselines/reference/submodule/compiler/ArrowFunctionExpression1.js.diff
new file mode 100644
index 0000000000..f71ea7995e
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/ArrowFunctionExpression1.js.diff
@@ -0,0 +1,8 @@
+--- old.ArrowFunctionExpression1.js
++++ new.ArrowFunctionExpression1.js
+@@= skipped -3, +3 lines =@@
+ var v = (public x: string) => { };
+
+ //// [ArrowFunctionExpression1.js]
+-var v = function (x) { };
++var v = (x) => { };
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/ClassDeclaration10.js.diff b/testdata/baselines/reference/submodule/compiler/ClassDeclaration10.js.diff
new file mode 100644
index 0000000000..9bea73cca6
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/ClassDeclaration10.js.diff
@@ -0,0 +1,13 @@
+--- old.ClassDeclaration10.js
++++ new.ClassDeclaration10.js
+@@= skipped -6, +6 lines =@@
+ }
+
+ //// [ClassDeclaration10.js]
+-var C = /** @class */ (function () {
+- function C() {
+- }
+- return C;
+-}());
++class C {
++}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/ClassDeclaration11.js.diff b/testdata/baselines/reference/submodule/compiler/ClassDeclaration11.js.diff
new file mode 100644
index 0000000000..4cac66fea3
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/ClassDeclaration11.js.diff
@@ -0,0 +1,15 @@
+--- old.ClassDeclaration11.js
++++ new.ClassDeclaration11.js
+@@= skipped -6, +6 lines =@@
+ }
+
+ //// [ClassDeclaration11.js]
+-var C = /** @class */ (function () {
+- function C() {
+- }
+- C.prototype.foo = function () { };
+- return C;
+-}());
++class C {
++ foo() { }
++}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/ClassDeclaration13.js.diff b/testdata/baselines/reference/submodule/compiler/ClassDeclaration13.js.diff
new file mode 100644
index 0000000000..a1ad1bc5d0
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/ClassDeclaration13.js.diff
@@ -0,0 +1,15 @@
+--- old.ClassDeclaration13.js
++++ new.ClassDeclaration13.js
+@@= skipped -6, +6 lines =@@
+ }
+
+ //// [ClassDeclaration13.js]
+-var C = /** @class */ (function () {
+- function C() {
+- }
+- C.prototype.bar = function () { };
+- return C;
+-}());
++class C {
++ bar() { }
++}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/ClassDeclaration14.js.diff b/testdata/baselines/reference/submodule/compiler/ClassDeclaration14.js.diff
new file mode 100644
index 0000000000..a1c3be512b
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/ClassDeclaration14.js.diff
@@ -0,0 +1,13 @@
+--- old.ClassDeclaration14.js
++++ new.ClassDeclaration14.js
+@@= skipped -6, +6 lines =@@
+ }
+
+ //// [ClassDeclaration14.js]
+-var C = /** @class */ (function () {
+- function C() {
+- }
+- return C;
+-}());
++class C {
++}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/ClassDeclaration15.js.diff b/testdata/baselines/reference/submodule/compiler/ClassDeclaration15.js.diff
new file mode 100644
index 0000000000..d73f6e6276
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/ClassDeclaration15.js.diff
@@ -0,0 +1,14 @@
+--- old.ClassDeclaration15.js
++++ new.ClassDeclaration15.js
+@@= skipped -6, +6 lines =@@
+ }
+
+ //// [ClassDeclaration15.js]
+-var C = /** @class */ (function () {
+- function C() {
+- }
+- return C;
+-}());
++class C {
++ constructor() { }
++}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/ClassDeclaration21.js.diff b/testdata/baselines/reference/submodule/compiler/ClassDeclaration21.js.diff
new file mode 100644
index 0000000000..976f5eb8c2
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/ClassDeclaration21.js.diff
@@ -0,0 +1,15 @@
+--- old.ClassDeclaration21.js
++++ new.ClassDeclaration21.js
+@@= skipped -6, +6 lines =@@
+ }
+
+ //// [ClassDeclaration21.js]
+-var C = /** @class */ (function () {
+- function C() {
+- }
+- C.prototype[1] = function () { };
+- return C;
+-}());
++class C {
++ 1() { }
++}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/ClassDeclaration22.js.diff b/testdata/baselines/reference/submodule/compiler/ClassDeclaration22.js.diff
new file mode 100644
index 0000000000..87198caf25
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/ClassDeclaration22.js.diff
@@ -0,0 +1,15 @@
+--- old.ClassDeclaration22.js
++++ new.ClassDeclaration22.js
+@@= skipped -6, +6 lines =@@
+ }
+
+ //// [ClassDeclaration22.js]
+-var C = /** @class */ (function () {
+- function C() {
+- }
+- C.prototype["bar"] = function () { };
+- return C;
+-}());
++class C {
++ "bar"() { }
++}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/ClassDeclaration24.js.diff b/testdata/baselines/reference/submodule/compiler/ClassDeclaration24.js.diff
new file mode 100644
index 0000000000..311e44d60c
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/ClassDeclaration24.js.diff
@@ -0,0 +1,13 @@
+--- old.ClassDeclaration24.js
++++ new.ClassDeclaration24.js
+@@= skipped -4, +4 lines =@@
+ }
+
+ //// [ClassDeclaration24.js]
+-var any = /** @class */ (function () {
+- function any() {
+- }
+- return any;
+-}());
++class any {
++}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/ClassDeclaration25.js.diff b/testdata/baselines/reference/submodule/compiler/ClassDeclaration25.js.diff
new file mode 100644
index 0000000000..fd412b8ffb
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/ClassDeclaration25.js.diff
@@ -0,0 +1,13 @@
+--- old.ClassDeclaration25.js
++++ new.ClassDeclaration25.js
+@@= skipped -11, +11 lines =@@
+
+
+ //// [ClassDeclaration25.js]
+-var List = /** @class */ (function () {
+- function List() {
+- }
+- return List;
+-}());
++class List {
++}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/ClassDeclaration26.js.diff b/testdata/baselines/reference/submodule/compiler/ClassDeclaration26.js.diff
index b1edb6a682..eae54067d4 100644
--- a/testdata/baselines/reference/submodule/compiler/ClassDeclaration26.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/ClassDeclaration26.js.diff
@@ -1,14 +1,19 @@
--- old.ClassDeclaration26.js
+++ new.ClassDeclaration26.js
-@@= skipped -8, +8 lines =@@
+@@= skipped -7, +7 lines =@@
+ }
//// [ClassDeclaration26.js]
- class C {
-- constructor() {
+-var C = /** @class */ (function () {
+- function C() {
- this.foo = 10;
- }
+- return C;
+-}());
++class C {
+ var;
+ export foo = 10;
- }
++}
var constructor;
- () => { };
\ No newline at end of file
+-(function () { });
++() => { };
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/ClassDeclaration8.js.diff b/testdata/baselines/reference/submodule/compiler/ClassDeclaration8.js.diff
new file mode 100644
index 0000000000..0b5b245e62
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/ClassDeclaration8.js.diff
@@ -0,0 +1,13 @@
+--- old.ClassDeclaration8.js
++++ new.ClassDeclaration8.js
+@@= skipped -5, +5 lines =@@
+ }
+
+ //// [ClassDeclaration8.js]
+-var C = /** @class */ (function () {
+- function C() {
+- }
+- return C;
+-}());
++class C {
++}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/ClassDeclaration9.js.diff b/testdata/baselines/reference/submodule/compiler/ClassDeclaration9.js.diff
new file mode 100644
index 0000000000..1d9437767c
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/ClassDeclaration9.js.diff
@@ -0,0 +1,13 @@
+--- old.ClassDeclaration9.js
++++ new.ClassDeclaration9.js
+@@= skipped -5, +5 lines =@@
+ }
+
+ //// [ClassDeclaration9.js]
+-var C = /** @class */ (function () {
+- function C() {
+- }
+- return C;
+-}());
++class C {
++}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/ClassDeclarationWithInvalidConstOnPropertyDeclaration.js.diff b/testdata/baselines/reference/submodule/compiler/ClassDeclarationWithInvalidConstOnPropertyDeclaration.js.diff
index 8998fe2750..ae8712b765 100644
--- a/testdata/baselines/reference/submodule/compiler/ClassDeclarationWithInvalidConstOnPropertyDeclaration.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/ClassDeclarationWithInvalidConstOnPropertyDeclaration.js.diff
@@ -4,12 +4,12 @@
}
//// [ClassDeclarationWithInvalidConstOnPropertyDeclaration.js]
--let AtomicNumbers = (() => {
-- class AtomicNumbers {
+-var AtomicNumbers = /** @class */ (function () {
+- function AtomicNumbers() {
- }
- AtomicNumbers.H = 1;
- return AtomicNumbers;
--})();
+-}());
+class AtomicNumbers {
+ static H = 1;
+}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/ClassDeclarationWithInvalidConstOnPropertyDeclaration2.js.diff b/testdata/baselines/reference/submodule/compiler/ClassDeclarationWithInvalidConstOnPropertyDeclaration2.js.diff
index 6f45402f14..efb60fa4f2 100644
--- a/testdata/baselines/reference/submodule/compiler/ClassDeclarationWithInvalidConstOnPropertyDeclaration2.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/ClassDeclarationWithInvalidConstOnPropertyDeclaration2.js.diff
@@ -1,12 +1,16 @@
--- old.ClassDeclarationWithInvalidConstOnPropertyDeclaration2.js
+++ new.ClassDeclarationWithInvalidConstOnPropertyDeclaration2.js
-@@= skipped -7, +7 lines =@@
+@@= skipped -6, +6 lines =@@
+ }
//// [ClassDeclarationWithInvalidConstOnPropertyDeclaration2.js]
- class C {
-- constructor() {
+-var C = /** @class */ (function () {
+- function C() {
- this.x = 10;
- }
+- return C;
+-}());
++class C {
+ const;
+ x = 10;
- }
\ No newline at end of file
++}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/ExportAssignment7.js.diff b/testdata/baselines/reference/submodule/compiler/ExportAssignment7.js.diff
new file mode 100644
index 0000000000..e386d2cbf7
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/ExportAssignment7.js.diff
@@ -0,0 +1,14 @@
+--- old.ExportAssignment7.js
++++ new.ExportAssignment7.js
+@@= skipped -8, +8 lines =@@
+ //// [ExportAssignment7.js]
+ "use strict";
+ exports.C = void 0;
+-var C = /** @class */ (function () {
+- function C() {
+- }
+- return C;
+-}());
++class C {
++}
+ module.exports = B;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/ExportAssignment8.js.diff b/testdata/baselines/reference/submodule/compiler/ExportAssignment8.js.diff
new file mode 100644
index 0000000000..9baa222f15
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/ExportAssignment8.js.diff
@@ -0,0 +1,14 @@
+--- old.ExportAssignment8.js
++++ new.ExportAssignment8.js
+@@= skipped -8, +8 lines =@@
+ //// [ExportAssignment8.js]
+ "use strict";
+ exports.C = void 0;
+-var C = /** @class */ (function () {
+- function C() {
+- }
+- return C;
+-}());
++class C {
++}
+ module.exports = B;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/FunctionDeclaration7.errors.txt b/testdata/baselines/reference/submodule/compiler/FunctionDeclaration7.errors.txt
index 9f4446f361..e22c882cac 100644
--- a/testdata/baselines/reference/submodule/compiler/FunctionDeclaration7.errors.txt
+++ b/testdata/baselines/reference/submodule/compiler/FunctionDeclaration7.errors.txt
@@ -2,7 +2,7 @@ FunctionDeclaration7.ts(2,13): error TS2391: Function implementation is missing
==== FunctionDeclaration7.ts (1 errors) ====
- module M {
+ namespace M {
function foo();
~~~
!!! error TS2391: Function implementation is missing or not immediately following the declaration.
diff --git a/testdata/baselines/reference/submodule/compiler/FunctionDeclaration7.js b/testdata/baselines/reference/submodule/compiler/FunctionDeclaration7.js
index 5d4aabcb4c..4990bf8f4b 100644
--- a/testdata/baselines/reference/submodule/compiler/FunctionDeclaration7.js
+++ b/testdata/baselines/reference/submodule/compiler/FunctionDeclaration7.js
@@ -1,7 +1,7 @@
//// [tests/cases/compiler/FunctionDeclaration7.ts] ////
//// [FunctionDeclaration7.ts]
-module M {
+namespace M {
function foo();
}
diff --git a/testdata/baselines/reference/submodule/compiler/FunctionDeclaration7.symbols b/testdata/baselines/reference/submodule/compiler/FunctionDeclaration7.symbols
index a651b0cf91..995bbce277 100644
--- a/testdata/baselines/reference/submodule/compiler/FunctionDeclaration7.symbols
+++ b/testdata/baselines/reference/submodule/compiler/FunctionDeclaration7.symbols
@@ -1,9 +1,9 @@
//// [tests/cases/compiler/FunctionDeclaration7.ts] ////
=== FunctionDeclaration7.ts ===
-module M {
+namespace M {
>M : Symbol(M, Decl(FunctionDeclaration7.ts, 0, 0))
function foo();
->foo : Symbol(foo, Decl(FunctionDeclaration7.ts, 0, 10))
+>foo : Symbol(foo, Decl(FunctionDeclaration7.ts, 0, 13))
}
diff --git a/testdata/baselines/reference/submodule/compiler/FunctionDeclaration7.types b/testdata/baselines/reference/submodule/compiler/FunctionDeclaration7.types
index 2c1487af19..e5e3310697 100644
--- a/testdata/baselines/reference/submodule/compiler/FunctionDeclaration7.types
+++ b/testdata/baselines/reference/submodule/compiler/FunctionDeclaration7.types
@@ -1,7 +1,7 @@
//// [tests/cases/compiler/FunctionDeclaration7.ts] ////
=== FunctionDeclaration7.ts ===
-module M {
+namespace M {
>M : typeof M
function foo();
diff --git a/testdata/baselines/reference/submodule/compiler/MemberAccessorDeclaration15.js.diff b/testdata/baselines/reference/submodule/compiler/MemberAccessorDeclaration15.js.diff
new file mode 100644
index 0000000000..1c8fd70654
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/MemberAccessorDeclaration15.js.diff
@@ -0,0 +1,19 @@
+--- old.MemberAccessorDeclaration15.js
++++ new.MemberAccessorDeclaration15.js
+@@= skipped -5, +5 lines =@@
+ }
+
+ //// [MemberAccessorDeclaration15.js]
+-var C = /** @class */ (function () {
+- function C() {
+- }
+- Object.defineProperty(C.prototype, "Foo", {
+- set: function (a) { },
+- enumerable: false,
+- configurable: true
+- });
+- return C;
+-}());
++class C {
++ set Foo(a) { }
++}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/ParameterList6.js.diff b/testdata/baselines/reference/submodule/compiler/ParameterList6.js.diff
new file mode 100644
index 0000000000..1dc4362b87
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/ParameterList6.js.diff
@@ -0,0 +1,14 @@
+--- old.ParameterList6.js
++++ new.ParameterList6.js
+@@= skipped -6, +6 lines =@@
+ }
+
+ //// [ParameterList6.js]
+-var C = /** @class */ (function () {
+- function C(C) {
++class C {
++ constructor(C) {
+ }
+- return C;
+-}());
++}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/ParameterList7.js.diff b/testdata/baselines/reference/submodule/compiler/ParameterList7.js.diff
index 03676ba7b7..b6419982ea 100644
--- a/testdata/baselines/reference/submodule/compiler/ParameterList7.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/ParameterList7.js.diff
@@ -1,10 +1,16 @@
--- old.ParameterList7.js
+++ new.ParameterList7.js
-@@= skipped -8, +8 lines =@@
+@@= skipped -7, +7 lines =@@
+ }
//// [ParameterList7.js]
- class C1 {
+-var C1 = /** @class */ (function () {
+- function C1(p3) {
++class C1 {
+ p3;
- constructor(p3) {
++ constructor(p3) {
this.p3 = p3;
- } // OK
\ No newline at end of file
+ } // OK
+- return C1;
+-}());
++}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/abstractClassInLocalScope.js.diff b/testdata/baselines/reference/submodule/compiler/abstractClassInLocalScope.js.diff
new file mode 100644
index 0000000000..6dd3a54bd1
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/abstractClassInLocalScope.js.diff
@@ -0,0 +1,42 @@
+--- old.abstractClassInLocalScope.js
++++ new.abstractClassInLocalScope.js
+@@= skipped -9, +9 lines =@@
+
+
+ //// [abstractClassInLocalScope.js]
+-var __extends = (this && this.__extends) || (function () {
+- var extendStatics = function (d, b) {
+- extendStatics = Object.setPrototypeOf ||
+- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+- return extendStatics(d, b);
+- };
+- return function (d, b) {
+- if (typeof b !== "function" && b !== null)
+- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+- extendStatics(d, b);
+- function __() { this.constructor = d; }
+- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+- };
+-})();
+-(function () {
+- var A = /** @class */ (function () {
+- function A() {
+- }
+- return A;
+- }());
+- var B = /** @class */ (function (_super) {
+- __extends(B, _super);
+- function B() {
+- return _super !== null && _super.apply(this, arguments) || this;
+- }
+- return B;
+- }(A));
++(() => {
++ class A {
++ }
++ class B extends A {
++ }
+ new B();
+ return A;
+ })();
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/abstractClassInLocalScopeIsAbstract.js.diff b/testdata/baselines/reference/submodule/compiler/abstractClassInLocalScopeIsAbstract.js.diff
new file mode 100644
index 0000000000..e25160ef00
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/abstractClassInLocalScopeIsAbstract.js.diff
@@ -0,0 +1,42 @@
+--- old.abstractClassInLocalScopeIsAbstract.js
++++ new.abstractClassInLocalScopeIsAbstract.js
+@@= skipped -9, +9 lines =@@
+
+
+ //// [abstractClassInLocalScopeIsAbstract.js]
+-var __extends = (this && this.__extends) || (function () {
+- var extendStatics = function (d, b) {
+- extendStatics = Object.setPrototypeOf ||
+- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+- return extendStatics(d, b);
+- };
+- return function (d, b) {
+- if (typeof b !== "function" && b !== null)
+- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+- extendStatics(d, b);
+- function __() { this.constructor = d; }
+- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+- };
+-})();
+-(function () {
+- var A = /** @class */ (function () {
+- function A() {
+- }
+- return A;
+- }());
+- var B = /** @class */ (function (_super) {
+- __extends(B, _super);
+- function B() {
+- return _super !== null && _super.apply(this, arguments) || this;
+- }
+- return B;
+- }(A));
++(() => {
++ class A {
++ }
++ class B extends A {
++ }
+ new A();
+ new B();
+ })();
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/abstractClassUnionInstantiation.js.diff b/testdata/baselines/reference/submodule/compiler/abstractClassUnionInstantiation.js.diff
index 079c343a8f..5a7d190b56 100644
--- a/testdata/baselines/reference/submodule/compiler/abstractClassUnionInstantiation.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/abstractClassUnionInstantiation.js.diff
@@ -1,13 +1,47 @@
--- old.abstractClassUnionInstantiation.js
+++ new.abstractClassUnionInstantiation.js
-@@= skipped -28, +28 lines =@@
- class ConcreteB {
- }
- class AbstractA {
+@@= skipped -23, +23 lines =@@
+ [AbstractA, AbstractB].map(cls => new cls()); // should error
+
+ //// [abstractClassUnionInstantiation.js]
+-var ConcreteA = /** @class */ (function () {
+- function ConcreteA() {
+- }
+- return ConcreteA;
+-}());
+-var ConcreteB = /** @class */ (function () {
+- function ConcreteB() {
+- }
+- return ConcreteB;
+-}());
+-var AbstractA = /** @class */ (function () {
+- function AbstractA() {
+- }
+- return AbstractA;
+-}());
+-var AbstractB = /** @class */ (function () {
+- function AbstractB() {
+- }
+- return AbstractB;
+-}());
++class ConcreteA {
++}
++class ConcreteB {
++}
++class AbstractA {
+ a;
- }
- class AbstractB {
++}
++class AbstractB {
+ b;
- }
++}
new cls1(); // should error
- new cls2(); // should error
\ No newline at end of file
+ new cls2(); // should error
+ new cls3(); // should work
+-[ConcreteA, AbstractA, AbstractB].map(function (cls) { return new cls(); }); // should error
+-[AbstractA, AbstractB, ConcreteA].map(function (cls) { return new cls(); }); // should error
+-[ConcreteA, ConcreteB].map(function (cls) { return new cls(); }); // should work
+-[AbstractA, AbstractB].map(function (cls) { return new cls(); }); // should error
++[ConcreteA, AbstractA, AbstractB].map(cls => new cls()); // should error
++[AbstractA, AbstractB, ConcreteA].map(cls => new cls()); // should error
++[ConcreteA, ConcreteB].map(cls => new cls()); // should work
++[AbstractA, AbstractB].map(cls => new cls()); // should error
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/abstractPropertyBasics.js.diff b/testdata/baselines/reference/submodule/compiler/abstractPropertyBasics.js.diff
index d87f347912..7430945b40 100644
--- a/testdata/baselines/reference/submodule/compiler/abstractPropertyBasics.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/abstractPropertyBasics.js.diff
@@ -1,23 +1,56 @@
--- old.abstractPropertyBasics.js
+++ new.abstractPropertyBasics.js
-@@= skipped -24, +24 lines =@@
+@@= skipped -23, +23 lines =@@
+ }
//// [abstractPropertyBasics.js]
- class B {
+-var __extends = (this && this.__extends) || (function () {
+- var extendStatics = function (d, b) {
+- extendStatics = Object.setPrototypeOf ||
+- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+- return extendStatics(d, b);
+- };
+- return function (d, b) {
+- if (typeof b !== "function" && b !== null)
+- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+- extendStatics(d, b);
+- function __() { this.constructor = d; }
+- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+- };
+-})();
+-var B = /** @class */ (function () {
+- function B() {
+- }
+- return B;
+-}());
+-var C = /** @class */ (function (_super) {
+- __extends(C, _super);
+- function C() {
+- var _this = _super !== null && _super.apply(this, arguments) || this;
+- _this.raw = "edge";
+- _this.ro = "readonly please";
+- return _this;
+- }
+- Object.defineProperty(C.prototype, "prop", {
+- get: function () { return "foo"; },
+- set: function (v) { },
+- enumerable: false,
+- configurable: true
+- });
+- C.prototype.m = function () { };
+- return C;
+-}(B));
++class B {
+ prop;
+ raw;
+ ro;
- }
- class C extends B {
-- constructor() {
-- super(...arguments);
-- this.raw = "edge";
-- this.ro = "readonly please";
-- }
- get prop() { return "foo"; }
- set prop(v) { }
++}
++class C extends B {
++ get prop() { return "foo"; }
++ set prop(v) { }
+ raw = "edge";
+ ro = "readonly please";
+ readonlyProp; // don't have to give a value, in fact
- m() { }
- }
\ No newline at end of file
++ m() { }
++}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/abstractPropertyInConstructor.js.diff b/testdata/baselines/reference/submodule/compiler/abstractPropertyInConstructor.js.diff
index 16fbbd728c..8c5a253797 100644
--- a/testdata/baselines/reference/submodule/compiler/abstractPropertyInConstructor.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/abstractPropertyInConstructor.js.diff
@@ -1,62 +1,151 @@
--- old.abstractPropertyInConstructor.js
+++ new.abstractPropertyInConstructor.js
-@@= skipped -97, +97 lines =@@
+@@= skipped -95, +95 lines =@@
+
+
//// [abstractPropertyInConstructor.js]
- class AbstractClass {
- constructor(str, other) {
+-var __extends = (this && this.__extends) || (function () {
+- var extendStatics = function (d, b) {
+- extendStatics = Object.setPrototypeOf ||
+- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+- return extendStatics(d, b);
+- };
+- return function (d, b) {
+- if (typeof b !== "function" && b !== null)
+- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+- extendStatics(d, b);
+- function __() { this.constructor = d; }
+- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+- };
+-})();
+-var AbstractClass = /** @class */ (function () {
+- function AbstractClass(str, other) {
+- var _this = this;
- this.other = this.prop;
-- this.fn = () => this.prop;
+- this.fn = function () { return _this.prop; };
++class AbstractClass {
++ constructor(str, other) {
this.method(parseInt(str));
- let val = this.prop.toLowerCase();
+- var val = this.prop.toLowerCase();
++ let val = this.prop.toLowerCase();
if (!str) {
-@@= skipped -15, +13 lines =@@
+ this.prop = "Hello World";
+ }
+ this.cb(str);
+ // OK, reference is inside function
+- var innerFunction = function () {
+- return _this.prop;
++ const innerFunction = () => {
++ return this.prop;
+ };
// OK, references are to another instance
other.cb(other.prop);
}
+- AbstractClass.prototype.method2 = function () {
+ prop;
+ cb;
+ other = this.prop;
+ fn = () => this.prop;
- method2() {
++ method2() {
this.prop = this.prop + "!";
- }
- }
- class DerivedAbstractClass extends AbstractClass {
+- };
+- return AbstractClass;
+-}());
+-var DerivedAbstractClass = /** @class */ (function (_super) {
+- __extends(DerivedAbstractClass, _super);
+- function DerivedAbstractClass(str, other, yetAnother) {
+- var _this = _super.call(this, str, other) || this;
+- _this.cb = function (s) { };
++ }
++}
++class DerivedAbstractClass extends AbstractClass {
+ cb = (s) => { };
- constructor(str, other, yetAnother) {
- super(str, other);
-- this.cb = (s) => { };
++ constructor(str, other, yetAnother) {
++ super(str, other);
// there is no implementation of 'prop' in any base class
- this.cb(this.prop.toLowerCase());
- this.method(1);
-@@= skipped -17, +21 lines =@@
- }
- }
- class Implementation extends DerivedAbstractClass {
+- _this.cb(_this.prop.toLowerCase());
+- _this.method(1);
++ this.cb(this.prop.toLowerCase());
++ this.method(1);
+ // OK, references are to another instance
+ other.cb(other.prop);
+ yetAnother.cb(yetAnother.prop);
+- return _this;
+- }
+- return DerivedAbstractClass;
+-}(AbstractClass));
+-var Implementation = /** @class */ (function (_super) {
+- __extends(Implementation, _super);
+- function Implementation(str, other, yetAnother) {
+- var _this = _super.call(this, str, other, yetAnother) || this;
+- _this.prop = "";
+- _this.cb = function (s) { };
+- _this.cb(_this.prop);
+- return _this;
+- }
+- Implementation.prototype.method = function (n) {
++ }
++}
++class Implementation extends DerivedAbstractClass {
+ prop = "";
+ cb = (s) => { };
- constructor(str, other, yetAnother) {
- super(str, other, yetAnother);
-- this.prop = "";
-- this.cb = (s) => { };
- this.cb(this.prop);
- }
- method(n) {
-@@= skipped -19, +19 lines =@@
++ constructor(str, other, yetAnother) {
++ super(str, other, yetAnother);
++ this.cb(this.prop);
++ }
++ method(n) {
+ this.cb(this.prop + n);
+- };
+- return Implementation;
+-}(DerivedAbstractClass));
+-var User = /** @class */ (function () {
+- function User(a) {
++ }
++}
++class User {
++ constructor(a) {
+ a.prop;
+ a.cb("hi");
+ a.method(12);
+ a.method2();
}
- }
- class C1 {
+- return User;
+-}());
+-var C1 = /** @class */ (function () {
+- function C1() {
+- var _a;
+- var self = this; // ok
+- var _b = this, x = _b.x, y1 = _b.y; // error
+- (_a = this, x = _a.x, y1 = _a.y, y1 = _a["y"]); // error
+- }
+- return C1;
+-}());
+-var C2 = /** @class */ (function () {
+- function C2() {
+- var _a;
+- var self = this; // ok
+- var _b = this, x = _b.x, y1 = _b.y; // ok
+- (_a = this, x = _a.x, y1 = _a.y, y1 = _a["y"]); // ok
+- }
+- return C2;
+-}());
++}
++class C1 {
+ x;
+ y;
- constructor() {
- let self = this; // ok
- let { x, y: y1 } = this; // error
-@@= skipped -7, +9 lines =@@
- }
- }
- class C2 {
++ constructor() {
++ let self = this; // ok
++ let { x, y: y1 } = this; // error
++ ({ x, y: y1, "y": y1 } = this); // error
++ }
++}
++class C2 {
+ x;
+ y;
- constructor() {
- let self = this; // ok
- let { x, y: y1 } = this; // ok
\ No newline at end of file
++ constructor() {
++ let self = this; // ok
++ let { x, y: y1 } = this; // ok
++ ({ x, y: y1, "y": y1 } = this); // ok
++ }
++}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/abstractPropertyNegative.js.diff b/testdata/baselines/reference/submodule/compiler/abstractPropertyNegative.js.diff
index d8883c1c17..4c72ce40d9 100644
--- a/testdata/baselines/reference/submodule/compiler/abstractPropertyNegative.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/abstractPropertyNegative.js.diff
@@ -1,44 +1,125 @@
--- old.abstractPropertyNegative.js
+++ new.abstractPropertyNegative.js
-@@= skipped -46, +46 lines =@@
+@@= skipped -45, +45 lines =@@
+
//// [abstractPropertyNegative.js]
- class B {
+-var __extends = (this && this.__extends) || (function () {
+- var extendStatics = function (d, b) {
+- extendStatics = Object.setPrototypeOf ||
+- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+- return extendStatics(d, b);
+- };
+- return function (d, b) {
+- if (typeof b !== "function" && b !== null)
+- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+- extendStatics(d, b);
+- function __() { this.constructor = d; }
+- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+- };
+-})();
+-var B = /** @class */ (function () {
+- function B() {
+- }
+- return B;
+-}());
+-var C = /** @class */ (function (_super) {
+- __extends(C, _super);
+- function C() {
+- var _this = _super !== null && _super.apply(this, arguments) || this;
+- _this.ro = "readonly please";
+- return _this;
+- }
+- Object.defineProperty(C.prototype, "concreteWithNoBody", {
+- get: function () { },
+- enumerable: false,
+- configurable: true
+- });
+- return C;
+-}(B));
+-var c = new C();
++class B {
+ prop;
+ ro;
- }
- class C extends B {
-- constructor() {
-- super(...arguments);
-- this.ro = "readonly please";
-- }
-- get concreteWithNoBody() { }
++}
++class C extends B {
+ ro = "readonly please";
+ notAllowed;
- }
- let c = new C();
++}
++let c = new C();
c.ro = "error: lhs of assignment can't be readonly";
- class WrongTypeProperty {
-+ num;
- }
- class WrongTypePropertyImpl extends WrongTypeProperty {
-- constructor() {
-- super(...arguments);
-- this.num = "nope, wrong";
+-var WrongTypeProperty = /** @class */ (function () {
+- function WrongTypeProperty() {
- }
-+ num = "nope, wrong";
- }
- class WrongTypeAccessor {
- }
-@@= skipped -24, +21 lines =@@
- get num() { return "nope, wrong"; }
- }
- class WrongTypeAccessorImpl2 extends WrongTypeAccessor {
-- constructor() {
-- super(...arguments);
-- this.num = "nope, wrong";
+- return WrongTypeProperty;
+-}());
+-var WrongTypePropertyImpl = /** @class */ (function (_super) {
+- __extends(WrongTypePropertyImpl, _super);
+- function WrongTypePropertyImpl() {
+- var _this = _super !== null && _super.apply(this, arguments) || this;
+- _this.num = "nope, wrong";
+- return _this;
- }
+- return WrongTypePropertyImpl;
+-}(WrongTypeProperty));
+-var WrongTypeAccessor = /** @class */ (function () {
+- function WrongTypeAccessor() {
+- }
+- return WrongTypeAccessor;
+-}());
+-var WrongTypeAccessorImpl = /** @class */ (function (_super) {
+- __extends(WrongTypeAccessorImpl, _super);
+- function WrongTypeAccessorImpl() {
+- return _super !== null && _super.apply(this, arguments) || this;
+- }
+- Object.defineProperty(WrongTypeAccessorImpl.prototype, "num", {
+- get: function () { return "nope, wrong"; },
+- enumerable: false,
+- configurable: true
+- });
+- return WrongTypeAccessorImpl;
+-}(WrongTypeAccessor));
+-var WrongTypeAccessorImpl2 = /** @class */ (function (_super) {
+- __extends(WrongTypeAccessorImpl2, _super);
+- function WrongTypeAccessorImpl2() {
+- var _this = _super !== null && _super.apply(this, arguments) || this;
+- _this.num = "nope, wrong";
+- return _this;
+- }
+- return WrongTypeAccessorImpl2;
+-}(WrongTypeAccessor));
+-var AbstractAccessorMismatch = /** @class */ (function () {
+- function AbstractAccessorMismatch() {
+- }
+- Object.defineProperty(AbstractAccessorMismatch.prototype, "p1", {
+- set: function (val) { },
+- enumerable: false,
+- configurable: true
+- });
++class WrongTypeProperty {
++ num;
++}
++class WrongTypePropertyImpl extends WrongTypeProperty {
++ num = "nope, wrong";
++}
++class WrongTypeAccessor {
++}
++class WrongTypeAccessorImpl extends WrongTypeAccessor {
++ get num() { return "nope, wrong"; }
++}
++class WrongTypeAccessorImpl2 extends WrongTypeAccessor {
+ num = "nope, wrong";
- }
- class AbstractAccessorMismatch {
- set p1(val) { }
\ No newline at end of file
++}
++class AbstractAccessorMismatch {
++ set p1(val) { }
+ ;
+- Object.defineProperty(AbstractAccessorMismatch.prototype, "p2", {
+- get: function () { return "should work"; },
+- enumerable: false,
+- configurable: true
+- });
+- return AbstractAccessorMismatch;
+-}());
++ get p2() { return "should work"; }
++}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/acceptableAlias1.js b/testdata/baselines/reference/submodule/compiler/acceptableAlias1.js
index a1d5c09b84..8b9c20d5cf 100644
--- a/testdata/baselines/reference/submodule/compiler/acceptableAlias1.js
+++ b/testdata/baselines/reference/submodule/compiler/acceptableAlias1.js
@@ -1,8 +1,8 @@
//// [tests/cases/compiler/acceptableAlias1.ts] ////
//// [acceptableAlias1.ts]
-module M {
- export module N {
+namespace M {
+ export namespace N {
}
export import X = N;
}
diff --git a/testdata/baselines/reference/submodule/compiler/acceptableAlias1.symbols b/testdata/baselines/reference/submodule/compiler/acceptableAlias1.symbols
index 607068de65..ff03a13bc4 100644
--- a/testdata/baselines/reference/submodule/compiler/acceptableAlias1.symbols
+++ b/testdata/baselines/reference/submodule/compiler/acceptableAlias1.symbols
@@ -1,15 +1,15 @@
//// [tests/cases/compiler/acceptableAlias1.ts] ////
=== acceptableAlias1.ts ===
-module M {
+namespace M {
>M : Symbol(M, Decl(acceptableAlias1.ts, 0, 0))
- export module N {
->N : Symbol(N, Decl(acceptableAlias1.ts, 0, 10))
+ export namespace N {
+>N : Symbol(N, Decl(acceptableAlias1.ts, 0, 13))
}
export import X = N;
>X : Symbol(X, Decl(acceptableAlias1.ts, 2, 5))
->N : Symbol(N, Decl(acceptableAlias1.ts, 0, 10))
+>N : Symbol(N, Decl(acceptableAlias1.ts, 0, 13))
}
import r = M.X;
diff --git a/testdata/baselines/reference/submodule/compiler/acceptableAlias1.types b/testdata/baselines/reference/submodule/compiler/acceptableAlias1.types
index 33140ceb99..a458c495bd 100644
--- a/testdata/baselines/reference/submodule/compiler/acceptableAlias1.types
+++ b/testdata/baselines/reference/submodule/compiler/acceptableAlias1.types
@@ -1,10 +1,10 @@
//// [tests/cases/compiler/acceptableAlias1.ts] ////
=== acceptableAlias1.ts ===
-module M {
+namespace M {
>M : typeof M
- export module N {
+ export namespace N {
}
export import X = N;
>X : any
diff --git a/testdata/baselines/reference/submodule/compiler/accessInstanceMemberFromStaticMethod01.js.diff b/testdata/baselines/reference/submodule/compiler/accessInstanceMemberFromStaticMethod01.js.diff
index 5586842aa1..ef09ac41a3 100644
--- a/testdata/baselines/reference/submodule/compiler/accessInstanceMemberFromStaticMethod01.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/accessInstanceMemberFromStaticMethod01.js.diff
@@ -1,10 +1,19 @@
--- old.accessInstanceMemberFromStaticMethod01.js
+++ new.accessInstanceMemberFromStaticMethod01.js
-@@= skipped -10, +10 lines =@@
+@@= skipped -9, +9 lines =@@
+ }
//// [accessInstanceMemberFromStaticMethod01.js]
- class C {
+-var C = /** @class */ (function () {
+- function C() {
++class C {
+ static foo;
- bar() {
- let k = foo;
- }
\ No newline at end of file
++ bar() {
++ let k = foo;
+ }
+- C.prototype.bar = function () {
+- var k = foo;
+- };
+- return C;
+-}());
++}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/accessOverriddenBaseClassMember1.js.diff b/testdata/baselines/reference/submodule/compiler/accessOverriddenBaseClassMember1.js.diff
index da5be33c25..f6ff800075 100644
--- a/testdata/baselines/reference/submodule/compiler/accessOverriddenBaseClassMember1.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/accessOverriddenBaseClassMember1.js.diff
@@ -1,19 +1,60 @@
--- old.accessOverriddenBaseClassMember1.js
+++ new.accessOverriddenBaseClassMember1.js
-@@= skipped -18, +18 lines =@@
+@@= skipped -17, +17 lines =@@
+
//// [accessOverriddenBaseClassMember1.js]
- class Point {
+-var __extends = (this && this.__extends) || (function () {
+- var extendStatics = function (d, b) {
+- extendStatics = Object.setPrototypeOf ||
+- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+- return extendStatics(d, b);
+- };
+- return function (d, b) {
+- if (typeof b !== "function" && b !== null)
+- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+- extendStatics(d, b);
+- function __() { this.constructor = d; }
+- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+- };
+-})();
+-var Point = /** @class */ (function () {
+- function Point(x, y) {
++class Point {
+ x;
+ y;
- constructor(x, y) {
++ constructor(x, y) {
this.x = x;
this.y = y;
-@@= skipped -9, +11 lines =@@
}
- }
- class ColoredPoint extends Point {
+- Point.prototype.toString = function () {
++ toString() {
+ return "x=" + this.x + " y=" + this.y;
+- };
+- return Point;
+-}());
+-var ColoredPoint = /** @class */ (function (_super) {
+- __extends(ColoredPoint, _super);
+- function ColoredPoint(x, y, color) {
+- var _this = _super.call(this, x, y) || this;
+- _this.color = color;
+- return _this;
+- }
+- ColoredPoint.prototype.toString = function () {
+- return _super.prototype.toString.call(this) + " color=" + this.color;
+- };
+- return ColoredPoint;
+-}(Point));
++ }
++}
++class ColoredPoint extends Point {
+ color;
- constructor(x, y, color) {
- super(x, y);
- this.color = color;
\ No newline at end of file
++ constructor(x, y, color) {
++ super(x, y);
++ this.color = color;
++ }
++ toString() {
++ return super.toString() + " color=" + this.color;
++ }
++}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/accessStaticMemberFromInstanceMethod01.js.diff b/testdata/baselines/reference/submodule/compiler/accessStaticMemberFromInstanceMethod01.js.diff
index 1e2c331529..2393dd2c33 100644
--- a/testdata/baselines/reference/submodule/compiler/accessStaticMemberFromInstanceMethod01.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/accessStaticMemberFromInstanceMethod01.js.diff
@@ -1,10 +1,19 @@
--- old.accessStaticMemberFromInstanceMethod01.js
+++ new.accessStaticMemberFromInstanceMethod01.js
-@@= skipped -10, +10 lines =@@
+@@= skipped -9, +9 lines =@@
+ }
//// [accessStaticMemberFromInstanceMethod01.js]
- class C {
+-var C = /** @class */ (function () {
+- function C() {
++class C {
+ foo;
- static bar() {
- let k = foo;
- }
\ No newline at end of file
++ static bar() {
++ let k = foo;
+ }
+- C.bar = function () {
+- var k = foo;
+- };
+- return C;
+-}());
++}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/accessorAccidentalCallDiagnostic.js.diff b/testdata/baselines/reference/submodule/compiler/accessorAccidentalCallDiagnostic.js.diff
new file mode 100644
index 0000000000..f6280d1a19
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/accessorAccidentalCallDiagnostic.js.diff
@@ -0,0 +1,22 @@
+--- old.accessorAccidentalCallDiagnostic.js
++++ new.accessorAccidentalCallDiagnostic.js
+@@= skipped -11, +11 lines =@@
+
+ //// [accessorAccidentalCallDiagnostic.js]
+ // https://github.com/microsoft/TypeScript/issues/24554
+-var Test24554 = /** @class */ (function () {
+- function Test24554() {
+- }
+- Object.defineProperty(Test24554.prototype, "property", {
+- get: function () { return 1; },
+- enumerable: false,
+- configurable: true
+- });
+- return Test24554;
+-}());
++class Test24554 {
++ get property() { return 1; }
++}
+ function test24554(x) {
+ return x.property();
+ }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/accessorInAmbientContextES5.js.diff b/testdata/baselines/reference/submodule/compiler/accessorInAmbientContextES5.js.diff
index 5a989ff971..f1c8214a3c 100644
--- a/testdata/baselines/reference/submodule/compiler/accessorInAmbientContextES5.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/accessorInAmbientContextES5.js.diff
@@ -18,15 +18,23 @@
-};
-var _RegularClass_shouldError_accessor_storage;
// Regular class should still error when targeting ES5
- class RegularClass {
-- constructor() {
+-var RegularClass = /** @class */ (function () {
+- function RegularClass() {
- _RegularClass_shouldError_accessor_storage.set(this, void 0);
- }
-- get shouldError() { return __classPrivateFieldGet(this, _RegularClass_shouldError_accessor_storage, "f"); } // Should still error
-- set shouldError(value) { __classPrivateFieldSet(this, _RegularClass_shouldError_accessor_storage, value, "f"); }
-+ accessor shouldError; // Should still error
- }
+- Object.defineProperty(RegularClass.prototype, "shouldError", {
+- get: function () { return __classPrivateFieldGet(this, _RegularClass_shouldError_accessor_storage, "f"); } // Should still error
+- ,
+- set: function (value) { __classPrivateFieldSet(this, _RegularClass_shouldError_accessor_storage, value, "f"); },
+- enumerable: false,
+- configurable: true
+- });
+- return RegularClass;
+-}());
-_RegularClass_shouldError_accessor_storage = new WeakMap();
++class RegularClass {
++ accessor shouldError; // Should still error
++}
//// [accessorInAmbientContextES5.d.ts]
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/accessorParameterAccessibilityModifier.js.diff b/testdata/baselines/reference/submodule/compiler/accessorParameterAccessibilityModifier.js.diff
new file mode 100644
index 0000000000..d3c13dfd9d
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/accessorParameterAccessibilityModifier.js.diff
@@ -0,0 +1,25 @@
+--- old.accessorParameterAccessibilityModifier.js
++++ new.accessorParameterAccessibilityModifier.js
+@@= skipped -6, +6 lines =@@
+ }
+
+ //// [accessorParameterAccessibilityModifier.js]
+-var C = /** @class */ (function () {
+- function C() {
+- }
+- Object.defineProperty(C.prototype, "X", {
+- set: function (v) { },
+- enumerable: false,
+- configurable: true
+- });
+- Object.defineProperty(C, "X", {
+- set: function (v2) { },
+- enumerable: false,
+- configurable: true
+- });
+- return C;
+-}());
++class C {
++ set X(v) { }
++ static set X(v2) { }
++}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/accessorWithInitializer.js.diff b/testdata/baselines/reference/submodule/compiler/accessorWithInitializer.js.diff
new file mode 100644
index 0000000000..5ee6f121a2
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/accessorWithInitializer.js.diff
@@ -0,0 +1,29 @@
+--- old.accessorWithInitializer.js
++++ new.accessorWithInitializer.js
+@@= skipped -6, +6 lines =@@
+ }
+
+ //// [accessorWithInitializer.js]
+-var C = /** @class */ (function () {
+- function C() {
+- }
+- Object.defineProperty(C.prototype, "X", {
+- set: function (v) {
+- if (v === void 0) { v = 0; }
+- },
+- enumerable: false,
+- configurable: true
+- });
+- Object.defineProperty(C, "X", {
+- set: function (v2) {
+- if (v2 === void 0) { v2 = 0; }
+- },
+- enumerable: false,
+- configurable: true
+- });
+- return C;
+-}());
++class C {
++ set X(v = 0) { }
++ static set X(v2 = 0) { }
++}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/accessorWithLineTerminator.js.diff b/testdata/baselines/reference/submodule/compiler/accessorWithLineTerminator.js.diff
new file mode 100644
index 0000000000..bef8f93898
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/accessorWithLineTerminator.js.diff
@@ -0,0 +1,21 @@
+--- old.accessorWithLineTerminator.js
++++ new.accessorWithLineTerminator.js
+@@= skipped -9, +9 lines =@@
+ }
+
+ //// [accessorWithLineTerminator.js]
+-var C = /** @class */ (function () {
+- function C() {
+- }
+- Object.defineProperty(C.prototype, "x", {
+- get: function () { return 1; },
+- set: function (v) { },
+- enumerable: false,
+- configurable: true
+- });
+- return C;
+-}());
++class C {
++ get x() { return 1; }
++ set x(v) { }
++}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/accessorWithRestParam.js.diff b/testdata/baselines/reference/submodule/compiler/accessorWithRestParam.js.diff
new file mode 100644
index 0000000000..ba6a3110eb
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/accessorWithRestParam.js.diff
@@ -0,0 +1,35 @@
+--- old.accessorWithRestParam.js
++++ new.accessorWithRestParam.js
+@@= skipped -6, +6 lines =@@
+ }
+
+ //// [accessorWithRestParam.js]
+-var C = /** @class */ (function () {
+- function C() {
+- }
+- Object.defineProperty(C.prototype, "X", {
+- set: function () {
+- var v = [];
+- for (var _i = 0; _i < arguments.length; _i++) {
+- v[_i] = arguments[_i];
+- }
+- },
+- enumerable: false,
+- configurable: true
+- });
+- Object.defineProperty(C, "X", {
+- set: function () {
+- var v2 = [];
+- for (var _i = 0; _i < arguments.length; _i++) {
+- v2[_i] = arguments[_i];
+- }
+- },
+- enumerable: false,
+- configurable: true
+- });
+- return C;
+-}());
++class C {
++ set X(...v) { }
++ static set X(...v2) { }
++}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/accessorsEmit.js.diff b/testdata/baselines/reference/submodule/compiler/accessorsEmit.js.diff
new file mode 100644
index 0000000000..3b96eefe26
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/accessorsEmit.js.diff
@@ -0,0 +1,51 @@
+--- old.accessorsEmit.js
++++ new.accessorsEmit.js
+@@= skipped -17, +17 lines =@@
+ }
+
+ //// [accessorsEmit.js]
+-var Result = /** @class */ (function () {
+- function Result() {
+- }
+- return Result;
+-}());
+-var Test = /** @class */ (function () {
+- function Test() {
+- }
+- Object.defineProperty(Test.prototype, "Property", {
+- get: function () {
+- var x = 1;
+- return null;
+- },
+- enumerable: false,
+- configurable: true
+- });
+- return Test;
+-}());
+-var Test2 = /** @class */ (function () {
+- function Test2() {
+- }
+- Object.defineProperty(Test2.prototype, "Property", {
+- get: function () {
+- var x = 1;
+- return null;
+- },
+- enumerable: false,
+- configurable: true
+- });
+- return Test2;
+-}());
++class Result {
++}
++class Test {
++ get Property() {
++ var x = 1;
++ return null;
++ }
++}
++class Test2 {
++ get Property() {
++ var x = 1;
++ return null;
++ }
++}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/accessorsInAmbientContext.errors.txt b/testdata/baselines/reference/submodule/compiler/accessorsInAmbientContext.errors.txt
index 89cd98a0a0..9a3e5a8c36 100644
--- a/testdata/baselines/reference/submodule/compiler/accessorsInAmbientContext.errors.txt
+++ b/testdata/baselines/reference/submodule/compiler/accessorsInAmbientContext.errors.txt
@@ -9,7 +9,7 @@ accessorsInAmbientContext.ts(16,21): error TS1183: An implementation cannot be d
==== accessorsInAmbientContext.ts (8 errors) ====
- declare module M {
+ declare namespace M {
class C {
get X() { return 1; }
~
diff --git a/testdata/baselines/reference/submodule/compiler/accessorsInAmbientContext.js b/testdata/baselines/reference/submodule/compiler/accessorsInAmbientContext.js
index 05daedd495..73122973c5 100644
--- a/testdata/baselines/reference/submodule/compiler/accessorsInAmbientContext.js
+++ b/testdata/baselines/reference/submodule/compiler/accessorsInAmbientContext.js
@@ -1,7 +1,7 @@
//// [tests/cases/compiler/accessorsInAmbientContext.ts] ////
//// [accessorsInAmbientContext.ts]
-declare module M {
+declare namespace M {
class C {
get X() { return 1; }
set X(v) { }
diff --git a/testdata/baselines/reference/submodule/compiler/accessorsInAmbientContext.symbols b/testdata/baselines/reference/submodule/compiler/accessorsInAmbientContext.symbols
index ae20eb27ee..57281be161 100644
--- a/testdata/baselines/reference/submodule/compiler/accessorsInAmbientContext.symbols
+++ b/testdata/baselines/reference/submodule/compiler/accessorsInAmbientContext.symbols
@@ -1,11 +1,11 @@
//// [tests/cases/compiler/accessorsInAmbientContext.ts] ////
=== accessorsInAmbientContext.ts ===
-declare module M {
+declare namespace M {
>M : Symbol(M, Decl(accessorsInAmbientContext.ts, 0, 0))
class C {
->C : Symbol(C, Decl(accessorsInAmbientContext.ts, 0, 18))
+>C : Symbol(C, Decl(accessorsInAmbientContext.ts, 0, 21))
get X() { return 1; }
>X : Symbol(C.X, Decl(accessorsInAmbientContext.ts, 1, 13), Decl(accessorsInAmbientContext.ts, 2, 29))
diff --git a/testdata/baselines/reference/submodule/compiler/accessorsInAmbientContext.types b/testdata/baselines/reference/submodule/compiler/accessorsInAmbientContext.types
index 8f202b5af9..fd535eee97 100644
--- a/testdata/baselines/reference/submodule/compiler/accessorsInAmbientContext.types
+++ b/testdata/baselines/reference/submodule/compiler/accessorsInAmbientContext.types
@@ -1,7 +1,7 @@
//// [tests/cases/compiler/accessorsInAmbientContext.ts] ////
=== accessorsInAmbientContext.ts ===
-declare module M {
+declare namespace M {
>M : typeof M
class C {
diff --git a/testdata/baselines/reference/submodule/compiler/accessors_spec_section-4.5_error-cases.js.diff b/testdata/baselines/reference/submodule/compiler/accessors_spec_section-4.5_error-cases.js.diff
new file mode 100644
index 0000000000..8a42536c9e
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/accessors_spec_section-4.5_error-cases.js.diff
@@ -0,0 +1,45 @@
+--- old.accessors_spec_section-4.5_error-cases.js
++++ new.accessors_spec_section-4.5_error-cases.js
+@@= skipped -15, +15 lines =@@
+ }
+
+ //// [accessors_spec_section-4.5_error-cases.js]
+-var LanguageSpec_section_4_5_error_cases = /** @class */ (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) { },
+- enumerable: false,
+- configurable: true
+- });
+- Object.defineProperty(LanguageSpec_section_4_5_error_cases.prototype, "AnnotatedSetter_SetterLast", {
+- get: function () { return ""; },
+- set: function (a) { },
+- enumerable: false,
+- configurable: true
+- });
+- Object.defineProperty(LanguageSpec_section_4_5_error_cases.prototype, "AnnotatedGetter_GetterFirst", {
+- get: function () { return ""; },
+- set: function (aStr) { aStr = 0; },
+- enumerable: false,
+- configurable: true
+- });
+- Object.defineProperty(LanguageSpec_section_4_5_error_cases.prototype, "AnnotatedGetter_GetterLast", {
+- get: function () { return ""; },
+- set: function (aStr) { aStr = 0; },
+- enumerable: false,
+- configurable: true
+- });
+- return LanguageSpec_section_4_5_error_cases;
+-}());
++class LanguageSpec_section_4_5_error_cases {
++ set AnnotatedSetter_SetterFirst(a) { }
++ get AnnotatedSetter_SetterFirst() { return ""; }
++ get AnnotatedSetter_SetterLast() { return ""; }
++ set AnnotatedSetter_SetterLast(a) { }
++ get AnnotatedGetter_GetterFirst() { return ""; }
++ set AnnotatedGetter_GetterFirst(aStr) { aStr = 0; }
++ set AnnotatedGetter_GetterLast(aStr) { aStr = 0; }
++ get AnnotatedGetter_GetterLast() { return ""; }
++}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/accessors_spec_section-4.5_inference.js.diff b/testdata/baselines/reference/submodule/compiler/accessors_spec_section-4.5_inference.js.diff
new file mode 100644
index 0000000000..9f7d724a66
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/accessors_spec_section-4.5_inference.js.diff
@@ -0,0 +1,92 @@
+--- old.accessors_spec_section-4.5_inference.js
++++ new.accessors_spec_section-4.5_inference.js
+@@= skipped -26, +26 lines =@@
+ }
+
+ //// [accessors_spec_section-4.5_inference.js]
+-var __extends = (this && this.__extends) || (function () {
+- var extendStatics = function (d, b) {
+- extendStatics = Object.setPrototypeOf ||
+- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+- return extendStatics(d, b);
+- };
+- return function (d, b) {
+- if (typeof b !== "function" && b !== null)
+- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+- extendStatics(d, b);
+- function __() { this.constructor = d; }
+- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+- };
+-})();
+-var A = /** @class */ (function () {
+- function A() {
+- }
+- return A;
+-}());
+-var B = /** @class */ (function (_super) {
+- __extends(B, _super);
+- function B() {
+- return _super !== null && _super.apply(this, arguments) || this;
+- }
+- return B;
+-}(A));
+-var LanguageSpec_section_4_5_inference = /** @class */ (function () {
+- function LanguageSpec_section_4_5_inference() {
+- }
+- Object.defineProperty(LanguageSpec_section_4_5_inference.prototype, "InferredGetterFromSetterAnnotation", {
+- get: function () { return new B(); },
+- set: function (a) { },
+- enumerable: false,
+- configurable: true
+- });
+- Object.defineProperty(LanguageSpec_section_4_5_inference.prototype, "InferredGetterFromSetterAnnotation_GetterFirst", {
+- get: function () { return new B(); },
+- set: function (a) { },
+- enumerable: false,
+- configurable: true
+- });
+- Object.defineProperty(LanguageSpec_section_4_5_inference.prototype, "InferredFromGetter", {
+- get: function () { return new B(); },
+- set: function (a) { },
+- enumerable: false,
+- configurable: true
+- });
+- Object.defineProperty(LanguageSpec_section_4_5_inference.prototype, "InferredFromGetter_SetterFirst", {
+- get: function () { return new B(); },
+- set: function (a) { },
+- enumerable: false,
+- configurable: true
+- });
+- Object.defineProperty(LanguageSpec_section_4_5_inference.prototype, "InferredSetterFromGetterAnnotation", {
+- get: function () { return new B(); },
+- set: function (a) { },
+- enumerable: false,
+- configurable: true
+- });
+- Object.defineProperty(LanguageSpec_section_4_5_inference.prototype, "InferredSetterFromGetterAnnotation_GetterFirst", {
+- get: function () { return new B(); },
+- set: function (a) { },
+- enumerable: false,
+- configurable: true
+- });
+- return LanguageSpec_section_4_5_inference;
+-}());
++class A {
++}
++class B extends A {
++}
++class LanguageSpec_section_4_5_inference {
++ set InferredGetterFromSetterAnnotation(a) { }
++ get InferredGetterFromSetterAnnotation() { return new B(); }
++ get InferredGetterFromSetterAnnotation_GetterFirst() { return new B(); }
++ set InferredGetterFromSetterAnnotation_GetterFirst(a) { }
++ get InferredFromGetter() { return new B(); }
++ set InferredFromGetter(a) { }
++ set InferredFromGetter_SetterFirst(a) { }
++ get InferredFromGetter_SetterFirst() { return new B(); }
++ set InferredSetterFromGetterAnnotation(a) { }
++ get InferredSetterFromGetterAnnotation() { return new B(); }
++ get InferredSetterFromGetterAnnotation_GetterFirst() { return new B(); }
++ set InferredSetterFromGetterAnnotation_GetterFirst(a) { }
++}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/aliasAssignments.js.diff b/testdata/baselines/reference/submodule/compiler/aliasAssignments.js.diff
index bd54a55b29..4030e61cb2 100644
--- a/testdata/baselines/reference/submodule/compiler/aliasAssignments.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/aliasAssignments.js.diff
@@ -1,11 +1,17 @@
--- old.aliasAssignments.js
+++ new.aliasAssignments.js
-@@= skipped -17, +17 lines =@@
+@@= skipped -16, +16 lines =@@
+ "use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.someClass = void 0;
- class someClass {
+-var someClass = /** @class */ (function () {
+- function someClass() {
+- }
+- return someClass;
+-}());
++class someClass {
+ someData;
- }
++}
exports.someClass = someClass;
//// [aliasAssignments_1.js]
"use strict";
diff --git a/testdata/baselines/reference/submodule/compiler/aliasBug.errors.txt b/testdata/baselines/reference/submodule/compiler/aliasBug.errors.txt
index d8842b18de..dbd6ea51ef 100644
--- a/testdata/baselines/reference/submodule/compiler/aliasBug.errors.txt
+++ b/testdata/baselines/reference/submodule/compiler/aliasBug.errors.txt
@@ -2,11 +2,11 @@ aliasBug.ts(16,15): error TS2694: Namespace 'foo.bar.baz' has no exported member
==== aliasBug.ts (1 errors) ====
- module foo {
+ namespace foo {
export class Provide {
}
- export module bar { export module baz {export class boo {}}}
+ export namespace bar { export namespace baz {export class boo {}}}
}
import provide = foo;
diff --git a/testdata/baselines/reference/submodule/compiler/aliasBug.js b/testdata/baselines/reference/submodule/compiler/aliasBug.js
index 7c8e941cb5..2c496fe1a0 100644
--- a/testdata/baselines/reference/submodule/compiler/aliasBug.js
+++ b/testdata/baselines/reference/submodule/compiler/aliasBug.js
@@ -1,11 +1,11 @@
//// [tests/cases/compiler/aliasBug.ts] ////
//// [aliasBug.ts]
-module foo {
+namespace foo {
export class Provide {
}
- export module bar { export module baz {export class boo {}}}
+ export namespace bar { export namespace baz {export class boo {}}}
}
import provide = foo;
diff --git a/testdata/baselines/reference/submodule/compiler/aliasBug.js.diff b/testdata/baselines/reference/submodule/compiler/aliasBug.js.diff
index 1906307412..d143ec3acb 100644
--- a/testdata/baselines/reference/submodule/compiler/aliasBug.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/aliasBug.js.diff
@@ -1,6 +1,31 @@
--- old.aliasBug.js
+++ new.aliasBug.js
-@@= skipped -36, +36 lines =@@
+@@= skipped -23, +23 lines =@@
+ //// [aliasBug.js]
+ var foo;
+ (function (foo) {
+- var Provide = /** @class */ (function () {
+- function Provide() {
+- }
+- return Provide;
+- }());
++ class Provide {
++ }
+ foo.Provide = Provide;
+- var bar;
++ let bar;
+ (function (bar) {
+- var baz;
++ let baz;
+ (function (baz) {
+- var boo = /** @class */ (function () {
+- function boo() {
+- }
+- return boo;
+- }());
++ class boo {
++ }
+ baz.boo = boo;
})(baz = bar.baz || (bar.baz = {}));
})(bar = foo.bar || (foo.bar = {}));
})(foo || (foo = {}));
diff --git a/testdata/baselines/reference/submodule/compiler/aliasBug.symbols b/testdata/baselines/reference/submodule/compiler/aliasBug.symbols
index af29dc0302..0676ffa8e2 100644
--- a/testdata/baselines/reference/submodule/compiler/aliasBug.symbols
+++ b/testdata/baselines/reference/submodule/compiler/aliasBug.symbols
@@ -1,17 +1,17 @@
//// [tests/cases/compiler/aliasBug.ts] ////
=== aliasBug.ts ===
-module foo {
+namespace foo {
>foo : Symbol(foo, Decl(aliasBug.ts, 0, 0))
export class Provide {
->Provide : Symbol(Provide, Decl(aliasBug.ts, 0, 12))
+>Provide : Symbol(Provide, Decl(aliasBug.ts, 0, 15))
}
- export module bar { export module baz {export class boo {}}}
+ export namespace bar { export namespace baz {export class boo {}}}
>bar : Symbol(bar, Decl(aliasBug.ts, 2, 5))
->baz : Symbol(baz, Decl(aliasBug.ts, 4, 23))
->boo : Symbol(boo, Decl(aliasBug.ts, 4, 43))
+>baz : Symbol(baz, Decl(aliasBug.ts, 4, 26))
+>boo : Symbol(boo, Decl(aliasBug.ts, 4, 49))
}
import provide = foo;
@@ -22,13 +22,13 @@ import booz = foo.bar.baz;
>booz : Symbol(booz, Decl(aliasBug.ts, 7, 21))
>foo : Symbol(foo, Decl(aliasBug.ts, 0, 0))
>bar : Symbol(provide.bar, Decl(aliasBug.ts, 2, 5))
->baz : Symbol(booz, Decl(aliasBug.ts, 4, 23))
+>baz : Symbol(booz, Decl(aliasBug.ts, 4, 26))
var p = new provide.Provide();
>p : Symbol(p, Decl(aliasBug.ts, 10, 3))
->provide.Provide : Symbol(provide.Provide, Decl(aliasBug.ts, 0, 12))
+>provide.Provide : Symbol(provide.Provide, Decl(aliasBug.ts, 0, 15))
>provide : Symbol(provide, Decl(aliasBug.ts, 5, 1))
->Provide : Symbol(provide.Provide, Decl(aliasBug.ts, 0, 12))
+>Provide : Symbol(provide.Provide, Decl(aliasBug.ts, 0, 15))
function use() {
>use : Symbol(use, Decl(aliasBug.ts, 10, 30))
@@ -36,12 +36,12 @@ function use() {
var p1: provide.Provide; // error here, but should be okay
>p1 : Symbol(p1, Decl(aliasBug.ts, 13, 5))
>provide : Symbol(provide, Decl(aliasBug.ts, 5, 1))
->Provide : Symbol(provide.Provide, Decl(aliasBug.ts, 0, 12))
+>Provide : Symbol(provide.Provide, Decl(aliasBug.ts, 0, 15))
var p2: foo.Provide;
>p2 : Symbol(p2, Decl(aliasBug.ts, 14, 5))
>foo : Symbol(foo, Decl(aliasBug.ts, 0, 0))
->Provide : Symbol(provide.Provide, Decl(aliasBug.ts, 0, 12))
+>Provide : Symbol(provide.Provide, Decl(aliasBug.ts, 0, 15))
var p3:booz.bar;
>p3 : Symbol(p3, Decl(aliasBug.ts, 15, 5))
@@ -50,8 +50,8 @@ function use() {
var p22 = new provide.Provide();
>p22 : Symbol(p22, Decl(aliasBug.ts, 16, 5))
->provide.Provide : Symbol(provide.Provide, Decl(aliasBug.ts, 0, 12))
+>provide.Provide : Symbol(provide.Provide, Decl(aliasBug.ts, 0, 15))
>provide : Symbol(provide, Decl(aliasBug.ts, 5, 1))
->Provide : Symbol(provide.Provide, Decl(aliasBug.ts, 0, 12))
+>Provide : Symbol(provide.Provide, Decl(aliasBug.ts, 0, 15))
}
diff --git a/testdata/baselines/reference/submodule/compiler/aliasBug.types b/testdata/baselines/reference/submodule/compiler/aliasBug.types
index ed860ce259..cd5f1cd137 100644
--- a/testdata/baselines/reference/submodule/compiler/aliasBug.types
+++ b/testdata/baselines/reference/submodule/compiler/aliasBug.types
@@ -1,14 +1,14 @@
//// [tests/cases/compiler/aliasBug.ts] ////
=== aliasBug.ts ===
-module foo {
+namespace foo {
>foo : typeof foo
export class Provide {
>Provide : Provide
}
- export module bar { export module baz {export class boo {}}}
+ export namespace bar { export namespace baz {export class boo {}}}
>bar : typeof bar
>baz : typeof baz
>boo : boo
diff --git a/testdata/baselines/reference/submodule/compiler/aliasDoesNotDuplicateSignatures.js.diff b/testdata/baselines/reference/submodule/compiler/aliasDoesNotDuplicateSignatures.js.diff
index 78ff4b84b6..061be475dd 100644
--- a/testdata/baselines/reference/submodule/compiler/aliasDoesNotDuplicateSignatures.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/aliasDoesNotDuplicateSignatures.js.diff
@@ -7,5 +7,7 @@
-var demoModule_1 = require("demoModule");
+const demoModule_1 = require("demoModule");
// Assign an incorrect type here to see the type of 'f'.
- let x1 = demoNS.f;
- let x2 = demoModule_1.f;
\ No newline at end of file
+-var x1 = demoNS.f;
+-var x2 = demoModule_1.f;
++let x1 = demoNS.f;
++let x2 = demoModule_1.f;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/aliasErrors.errors.txt b/testdata/baselines/reference/submodule/compiler/aliasErrors.errors.txt
index 5e94cd3c9a..fb11944a2e 100644
--- a/testdata/baselines/reference/submodule/compiler/aliasErrors.errors.txt
+++ b/testdata/baselines/reference/submodule/compiler/aliasErrors.errors.txt
@@ -8,10 +8,10 @@ aliasErrors.ts(26,15): error TS2694: Namespace 'foo.bar.baz' has no exported mem
==== aliasErrors.ts (7 errors) ====
- module foo {
+ namespace foo {
export class Provide {
}
- export module bar { export module baz {export class boo {}}}
+ export namespace bar { export namespace baz {export class boo {}}}
}
import provide = foo;
diff --git a/testdata/baselines/reference/submodule/compiler/aliasErrors.js b/testdata/baselines/reference/submodule/compiler/aliasErrors.js
index dc63511f5a..5dc2cbc2b6 100644
--- a/testdata/baselines/reference/submodule/compiler/aliasErrors.js
+++ b/testdata/baselines/reference/submodule/compiler/aliasErrors.js
@@ -1,10 +1,10 @@
//// [tests/cases/compiler/aliasErrors.ts] ////
//// [aliasErrors.ts]
-module foo {
+namespace foo {
export class Provide {
}
- export module bar { export module baz {export class boo {}}}
+ export namespace bar { export namespace baz {export class boo {}}}
}
import provide = foo;
diff --git a/testdata/baselines/reference/submodule/compiler/aliasErrors.js.diff b/testdata/baselines/reference/submodule/compiler/aliasErrors.js.diff
index 24b597fbc2..80f19fc2ce 100644
--- a/testdata/baselines/reference/submodule/compiler/aliasErrors.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/aliasErrors.js.diff
@@ -1,6 +1,31 @@
--- old.aliasErrors.js
+++ new.aliasErrors.js
-@@= skipped -47, +47 lines =@@
+@@= skipped -34, +34 lines =@@
+ //// [aliasErrors.js]
+ var foo;
+ (function (foo) {
+- var Provide = /** @class */ (function () {
+- function Provide() {
+- }
+- return Provide;
+- }());
++ class Provide {
++ }
+ foo.Provide = Provide;
+- var bar;
++ let bar;
+ (function (bar) {
+- var baz;
++ let baz;
+ (function (baz) {
+- var boo = /** @class */ (function () {
+- function boo() {
+- }
+- return boo;
+- }());
++ class boo {
++ }
+ baz.boo = boo;
})(baz = bar.baz || (bar.baz = {}));
})(bar = foo.bar || (foo.bar = {}));
})(foo || (foo = {}));
diff --git a/testdata/baselines/reference/submodule/compiler/aliasErrors.symbols b/testdata/baselines/reference/submodule/compiler/aliasErrors.symbols
index e0f0f38130..f009b2d233 100644
--- a/testdata/baselines/reference/submodule/compiler/aliasErrors.symbols
+++ b/testdata/baselines/reference/submodule/compiler/aliasErrors.symbols
@@ -1,16 +1,16 @@
//// [tests/cases/compiler/aliasErrors.ts] ////
=== aliasErrors.ts ===
-module foo {
+namespace foo {
>foo : Symbol(foo, Decl(aliasErrors.ts, 0, 0))
export class Provide {
->Provide : Symbol(Provide, Decl(aliasErrors.ts, 0, 12))
+>Provide : Symbol(Provide, Decl(aliasErrors.ts, 0, 15))
}
- export module bar { export module baz {export class boo {}}}
+ export namespace bar { export namespace baz {export class boo {}}}
>bar : Symbol(bar, Decl(aliasErrors.ts, 2, 5))
->baz : Symbol(baz, Decl(aliasErrors.ts, 3, 23))
->boo : Symbol(boo, Decl(aliasErrors.ts, 3, 43))
+>baz : Symbol(baz, Decl(aliasErrors.ts, 3, 26))
+>boo : Symbol(boo, Decl(aliasErrors.ts, 3, 49))
}
import provide = foo;
@@ -21,7 +21,7 @@ import booz = foo.bar.baz;
>booz : Symbol(booz, Decl(aliasErrors.ts, 6, 21))
>foo : Symbol(foo, Decl(aliasErrors.ts, 0, 0))
>bar : Symbol(beez, Decl(aliasErrors.ts, 2, 5))
->baz : Symbol(booz, Decl(aliasErrors.ts, 3, 23))
+>baz : Symbol(booz, Decl(aliasErrors.ts, 3, 26))
import beez = foo.bar;
>beez : Symbol(beez, Decl(aliasErrors.ts, 7, 26))
@@ -49,29 +49,29 @@ import r = undefined;
var p = new provide.Provide();
>p : Symbol(p, Decl(aliasErrors.ts, 18, 3))
->provide.Provide : Symbol(provide.Provide, Decl(aliasErrors.ts, 0, 12))
+>provide.Provide : Symbol(provide.Provide, Decl(aliasErrors.ts, 0, 15))
>provide : Symbol(provide, Decl(aliasErrors.ts, 4, 1))
->Provide : Symbol(provide.Provide, Decl(aliasErrors.ts, 0, 12))
+>Provide : Symbol(provide.Provide, Decl(aliasErrors.ts, 0, 15))
function use() {
>use : Symbol(use, Decl(aliasErrors.ts, 18, 30))
beez.baz.boo;
->beez.baz.boo : Symbol(booz.boo, Decl(aliasErrors.ts, 3, 43))
->beez.baz : Symbol(booz, Decl(aliasErrors.ts, 3, 23))
+>beez.baz.boo : Symbol(booz.boo, Decl(aliasErrors.ts, 3, 49))
+>beez.baz : Symbol(booz, Decl(aliasErrors.ts, 3, 26))
>beez : Symbol(beez, Decl(aliasErrors.ts, 7, 26))
->baz : Symbol(booz, Decl(aliasErrors.ts, 3, 23))
->boo : Symbol(booz.boo, Decl(aliasErrors.ts, 3, 43))
+>baz : Symbol(booz, Decl(aliasErrors.ts, 3, 26))
+>boo : Symbol(booz.boo, Decl(aliasErrors.ts, 3, 49))
var p1: provide.Provide;
>p1 : Symbol(p1, Decl(aliasErrors.ts, 23, 5))
>provide : Symbol(provide, Decl(aliasErrors.ts, 4, 1))
->Provide : Symbol(provide.Provide, Decl(aliasErrors.ts, 0, 12))
+>Provide : Symbol(provide.Provide, Decl(aliasErrors.ts, 0, 15))
var p2: foo.Provide;
>p2 : Symbol(p2, Decl(aliasErrors.ts, 24, 5))
>foo : Symbol(foo, Decl(aliasErrors.ts, 0, 0))
->Provide : Symbol(provide.Provide, Decl(aliasErrors.ts, 0, 12))
+>Provide : Symbol(provide.Provide, Decl(aliasErrors.ts, 0, 15))
var p3:booz.bar;
>p3 : Symbol(p3, Decl(aliasErrors.ts, 25, 5))
@@ -80,9 +80,9 @@ function use() {
var p22 = new provide.Provide();
>p22 : Symbol(p22, Decl(aliasErrors.ts, 26, 5))
->provide.Provide : Symbol(provide.Provide, Decl(aliasErrors.ts, 0, 12))
+>provide.Provide : Symbol(provide.Provide, Decl(aliasErrors.ts, 0, 15))
>provide : Symbol(provide, Decl(aliasErrors.ts, 4, 1))
->Provide : Symbol(provide.Provide, Decl(aliasErrors.ts, 0, 12))
+>Provide : Symbol(provide.Provide, Decl(aliasErrors.ts, 0, 15))
}
diff --git a/testdata/baselines/reference/submodule/compiler/aliasErrors.symbols.diff b/testdata/baselines/reference/submodule/compiler/aliasErrors.symbols.diff
index 41d7daef72..57d5febccb 100644
--- a/testdata/baselines/reference/submodule/compiler/aliasErrors.symbols.diff
+++ b/testdata/baselines/reference/submodule/compiler/aliasErrors.symbols.diff
@@ -6,7 +6,7 @@
>foo : Symbol(foo, Decl(aliasErrors.ts, 0, 0))
->bar : Symbol(provide.bar, Decl(aliasErrors.ts, 2, 5))
+>bar : Symbol(beez, Decl(aliasErrors.ts, 2, 5))
- >baz : Symbol(booz, Decl(aliasErrors.ts, 3, 23))
+ >baz : Symbol(booz, Decl(aliasErrors.ts, 3, 26))
import beez = foo.bar;
>beez : Symbol(beez, Decl(aliasErrors.ts, 7, 26))
diff --git a/testdata/baselines/reference/submodule/compiler/aliasErrors.types b/testdata/baselines/reference/submodule/compiler/aliasErrors.types
index c3824ddd6e..8905c060da 100644
--- a/testdata/baselines/reference/submodule/compiler/aliasErrors.types
+++ b/testdata/baselines/reference/submodule/compiler/aliasErrors.types
@@ -1,13 +1,13 @@
//// [tests/cases/compiler/aliasErrors.ts] ////
=== aliasErrors.ts ===
-module foo {
+namespace foo {
>foo : typeof foo
export class Provide {
>Provide : Provide
}
- export module bar { export module baz {export class boo {}}}
+ export namespace bar { export namespace baz {export class boo {}}}
>bar : typeof bar
>baz : typeof baz
>boo : boo
diff --git a/testdata/baselines/reference/submodule/compiler/aliasInaccessibleModule.js b/testdata/baselines/reference/submodule/compiler/aliasInaccessibleModule.js
index 436451a9d7..cb4f818bbe 100644
--- a/testdata/baselines/reference/submodule/compiler/aliasInaccessibleModule.js
+++ b/testdata/baselines/reference/submodule/compiler/aliasInaccessibleModule.js
@@ -1,8 +1,8 @@
//// [tests/cases/compiler/aliasInaccessibleModule.ts] ////
//// [aliasInaccessibleModule.ts]
-module M {
- module N {
+namespace M {
+ namespace N {
}
export import X = N;
}
diff --git a/testdata/baselines/reference/submodule/compiler/aliasInaccessibleModule.symbols b/testdata/baselines/reference/submodule/compiler/aliasInaccessibleModule.symbols
index 642fbd88fb..8b47a71ec0 100644
--- a/testdata/baselines/reference/submodule/compiler/aliasInaccessibleModule.symbols
+++ b/testdata/baselines/reference/submodule/compiler/aliasInaccessibleModule.symbols
@@ -1,13 +1,13 @@
//// [tests/cases/compiler/aliasInaccessibleModule.ts] ////
=== aliasInaccessibleModule.ts ===
-module M {
+namespace M {
>M : Symbol(M, Decl(aliasInaccessibleModule.ts, 0, 0))
- module N {
->N : Symbol(N, Decl(aliasInaccessibleModule.ts, 0, 10))
+ namespace N {
+>N : Symbol(N, Decl(aliasInaccessibleModule.ts, 0, 13))
}
export import X = N;
>X : Symbol(X, Decl(aliasInaccessibleModule.ts, 2, 5))
->N : Symbol(N, Decl(aliasInaccessibleModule.ts, 0, 10))
+>N : Symbol(N, Decl(aliasInaccessibleModule.ts, 0, 13))
}
diff --git a/testdata/baselines/reference/submodule/compiler/aliasInaccessibleModule.types b/testdata/baselines/reference/submodule/compiler/aliasInaccessibleModule.types
index e6e74a6e05..95bedef94b 100644
--- a/testdata/baselines/reference/submodule/compiler/aliasInaccessibleModule.types
+++ b/testdata/baselines/reference/submodule/compiler/aliasInaccessibleModule.types
@@ -1,10 +1,10 @@
//// [tests/cases/compiler/aliasInaccessibleModule.ts] ////
=== aliasInaccessibleModule.ts ===
-module M {
+namespace M {
>M : typeof M
- module N {
+ namespace N {
}
export import X = N;
>X : any
diff --git a/testdata/baselines/reference/submodule/compiler/aliasInaccessibleModule2.js b/testdata/baselines/reference/submodule/compiler/aliasInaccessibleModule2.js
index 12b498bae9..979b7157bb 100644
--- a/testdata/baselines/reference/submodule/compiler/aliasInaccessibleModule2.js
+++ b/testdata/baselines/reference/submodule/compiler/aliasInaccessibleModule2.js
@@ -1,8 +1,8 @@
//// [tests/cases/compiler/aliasInaccessibleModule2.ts] ////
//// [aliasInaccessibleModule2.ts]
-module M {
- module N {
+namespace M {
+ namespace N {
class C {
}
diff --git a/testdata/baselines/reference/submodule/compiler/aliasInaccessibleModule2.js.diff b/testdata/baselines/reference/submodule/compiler/aliasInaccessibleModule2.js.diff
new file mode 100644
index 0000000000..caaf9172c9
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/aliasInaccessibleModule2.js.diff
@@ -0,0 +1,19 @@
+--- old.aliasInaccessibleModule2.js
++++ new.aliasInaccessibleModule2.js
+@@= skipped -13, +13 lines =@@
+ //// [aliasInaccessibleModule2.js]
+ var M;
+ (function (M) {
+- var N;
++ let N;
+ (function (N) {
+- var C = /** @class */ (function () {
+- function C() {
+- }
+- return C;
+- }());
++ class C {
++ }
+ })(N || (N = {}));
+ var R = N;
+ M.X = R;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/aliasInaccessibleModule2.symbols b/testdata/baselines/reference/submodule/compiler/aliasInaccessibleModule2.symbols
index a45790dfb7..d034fe3b9d 100644
--- a/testdata/baselines/reference/submodule/compiler/aliasInaccessibleModule2.symbols
+++ b/testdata/baselines/reference/submodule/compiler/aliasInaccessibleModule2.symbols
@@ -1,20 +1,20 @@
//// [tests/cases/compiler/aliasInaccessibleModule2.ts] ////
=== aliasInaccessibleModule2.ts ===
-module M {
+namespace M {
>M : Symbol(M, Decl(aliasInaccessibleModule2.ts, 0, 0))
- module N {
->N : Symbol(N, Decl(aliasInaccessibleModule2.ts, 0, 10))
+ namespace N {
+>N : Symbol(N, Decl(aliasInaccessibleModule2.ts, 0, 13))
class C {
->C : Symbol(C, Decl(aliasInaccessibleModule2.ts, 1, 14))
+>C : Symbol(C, Decl(aliasInaccessibleModule2.ts, 1, 17))
}
}
import R = N;
>R : Symbol(R, Decl(aliasInaccessibleModule2.ts, 5, 5))
->N : Symbol(N, Decl(aliasInaccessibleModule2.ts, 0, 10))
+>N : Symbol(N, Decl(aliasInaccessibleModule2.ts, 0, 13))
export import X = R;
>X : Symbol(X, Decl(aliasInaccessibleModule2.ts, 6, 17))
diff --git a/testdata/baselines/reference/submodule/compiler/aliasInaccessibleModule2.types b/testdata/baselines/reference/submodule/compiler/aliasInaccessibleModule2.types
index 178cd768d6..bc2337a744 100644
--- a/testdata/baselines/reference/submodule/compiler/aliasInaccessibleModule2.types
+++ b/testdata/baselines/reference/submodule/compiler/aliasInaccessibleModule2.types
@@ -1,10 +1,10 @@
//// [tests/cases/compiler/aliasInaccessibleModule2.ts] ////
=== aliasInaccessibleModule2.ts ===
-module M {
+namespace M {
>M : typeof M
- module N {
+ namespace N {
>N : typeof N
class C {
diff --git a/testdata/baselines/reference/submodule/compiler/aliasInstantiationExpressionGenericIntersectionNoCrash1.js.diff b/testdata/baselines/reference/submodule/compiler/aliasInstantiationExpressionGenericIntersectionNoCrash1.js.diff
index 99893034bd..5147b27857 100644
--- a/testdata/baselines/reference/submodule/compiler/aliasInstantiationExpressionGenericIntersectionNoCrash1.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/aliasInstantiationExpressionGenericIntersectionNoCrash1.js.diff
@@ -5,7 +5,12 @@
//// [aliasInstantiationExpressionGenericIntersectionNoCrash1.js]
-"use strict";
- class ErrImpl {
+-var ErrImpl = /** @class */ (function () {
+- function ErrImpl() {
+- }
+- return ErrImpl;
+-}());
++class ErrImpl {
+ e;
- }
++}
e;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/aliasOfGenericFunctionWithRestBehavedSameAsUnaliased.js.diff b/testdata/baselines/reference/submodule/compiler/aliasOfGenericFunctionWithRestBehavedSameAsUnaliased.js.diff
index 5f3c71a237..c36c849ac2 100644
--- a/testdata/baselines/reference/submodule/compiler/aliasOfGenericFunctionWithRestBehavedSameAsUnaliased.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/aliasOfGenericFunctionWithRestBehavedSameAsUnaliased.js.diff
@@ -6,6 +6,11 @@
//// [aliasOfGenericFunctionWithRestBehavedSameAsUnaliased.js]
-"use strict";
-// the type printback for every `test` below should be "y"
- let check = "y";
- let check1 = "y";
- let check2 = "y";
\ No newline at end of file
+-var check = "y";
+-var check1 = "y";
+-var check2 = "y";
+-var check3 = "y";
++let check = "y";
++let check1 = "y";
++let check2 = "y";
++let check3 = "y";
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/aliasOnMergedModuleInterface.errors.txt b/testdata/baselines/reference/submodule/compiler/aliasOnMergedModuleInterface.errors.txt
index 69493aecad..327faccff8 100644
--- a/testdata/baselines/reference/submodule/compiler/aliasOnMergedModuleInterface.errors.txt
+++ b/testdata/baselines/reference/submodule/compiler/aliasOnMergedModuleInterface.errors.txt
@@ -13,7 +13,7 @@ aliasOnMergedModuleInterface_1.ts(5,16): error TS2708: Cannot use namespace 'foo
==== aliasOnMergedModuleInterface_0.ts (0 errors) ====
declare module "foo"
{
- module B {
+ namespace B {
export interface A {
}
}
diff --git a/testdata/baselines/reference/submodule/compiler/aliasOnMergedModuleInterface.js b/testdata/baselines/reference/submodule/compiler/aliasOnMergedModuleInterface.js
index f1b78e4ef5..e7cac961b6 100644
--- a/testdata/baselines/reference/submodule/compiler/aliasOnMergedModuleInterface.js
+++ b/testdata/baselines/reference/submodule/compiler/aliasOnMergedModuleInterface.js
@@ -3,7 +3,7 @@
//// [aliasOnMergedModuleInterface_0.ts]
declare module "foo"
{
- module B {
+ namespace B {
export interface A {
}
}
diff --git a/testdata/baselines/reference/submodule/compiler/aliasOnMergedModuleInterface.symbols b/testdata/baselines/reference/submodule/compiler/aliasOnMergedModuleInterface.symbols
index 3cda351469..6544197e32 100644
--- a/testdata/baselines/reference/submodule/compiler/aliasOnMergedModuleInterface.symbols
+++ b/testdata/baselines/reference/submodule/compiler/aliasOnMergedModuleInterface.symbols
@@ -17,17 +17,17 @@ z.bar("hello"); // This should be ok
var x: foo.A = foo.bar("hello"); // foo.A should be ok but foo.bar should be error
>x : Symbol(x, Decl(aliasOnMergedModuleInterface_1.ts, 4, 3))
>foo : Symbol(foo, Decl(aliasOnMergedModuleInterface_1.ts, 0, 0))
->A : Symbol(foo.A, Decl(aliasOnMergedModuleInterface_0.ts, 2, 14))
+>A : Symbol(foo.A, Decl(aliasOnMergedModuleInterface_0.ts, 2, 17))
=== aliasOnMergedModuleInterface_0.ts ===
declare module "foo"
>"foo" : Symbol("foo", Decl(aliasOnMergedModuleInterface_0.ts, 0, 0))
{
- module B {
+ namespace B {
>B : Symbol(B, Decl(aliasOnMergedModuleInterface_0.ts, 1, 1), Decl(aliasOnMergedModuleInterface_0.ts, 5, 5))
export interface A {
->A : Symbol(A, Decl(aliasOnMergedModuleInterface_0.ts, 2, 14))
+>A : Symbol(A, Decl(aliasOnMergedModuleInterface_0.ts, 2, 17))
}
}
interface B {
@@ -37,7 +37,7 @@ declare module "foo"
>bar : Symbol(B.bar, Decl(aliasOnMergedModuleInterface_0.ts, 6, 17))
>name : Symbol(name, Decl(aliasOnMergedModuleInterface_0.ts, 7, 12))
>B : Symbol(B, Decl(aliasOnMergedModuleInterface_0.ts, 1, 1), Decl(aliasOnMergedModuleInterface_0.ts, 5, 5))
->A : Symbol(B.A, Decl(aliasOnMergedModuleInterface_0.ts, 2, 14))
+>A : Symbol(B.A, Decl(aliasOnMergedModuleInterface_0.ts, 2, 17))
}
export = B;
>B : Symbol(B, Decl(aliasOnMergedModuleInterface_0.ts, 1, 1), Decl(aliasOnMergedModuleInterface_0.ts, 5, 5))
diff --git a/testdata/baselines/reference/submodule/compiler/aliasOnMergedModuleInterface.types b/testdata/baselines/reference/submodule/compiler/aliasOnMergedModuleInterface.types
index a8653dcc88..9827b8c929 100644
--- a/testdata/baselines/reference/submodule/compiler/aliasOnMergedModuleInterface.types
+++ b/testdata/baselines/reference/submodule/compiler/aliasOnMergedModuleInterface.types
@@ -28,7 +28,7 @@ var x: foo.A = foo.bar("hello"); // foo.A should be ok but foo.bar should be err
declare module "foo"
>"foo" : typeof import("foo")
{
- module B {
+ namespace B {
export interface A {
}
}
diff --git a/testdata/baselines/reference/submodule/compiler/aliasUsageInAccessorsOfClass.js.diff b/testdata/baselines/reference/submodule/compiler/aliasUsageInAccessorsOfClass.js.diff
index e816863525..c6295649f3 100644
--- a/testdata/baselines/reference/submodule/compiler/aliasUsageInAccessorsOfClass.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/aliasUsageInAccessorsOfClass.js.diff
@@ -1,28 +1,75 @@
--- old.aliasUsageInAccessorsOfClass.js
+++ new.aliasUsageInAccessorsOfClass.js
-@@= skipped -31, +31 lines =@@
+@@= skipped -30, +30 lines =@@
+ "use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Model = void 0;
- class Model {
+-var Model = /** @class */ (function () {
+- function Model() {
+- }
+- return Model;
+-}());
++class Model {
+ someData;
- }
++}
exports.Model = Model;
//// [aliasUsage1_moduleA.js]
"use strict";
+-var __extends = (this && this.__extends) || (function () {
+- var extendStatics = function (d, b) {
+- extendStatics = Object.setPrototypeOf ||
+- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+- return extendStatics(d, b);
+- };
+- return function (d, b) {
+- if (typeof b !== "function" && b !== null)
+- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+- extendStatics(d, b);
+- function __() { this.constructor = d; }
+- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+- };
+-})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.VisualizationModel = void 0;
-var Backbone = require("./aliasUsage1_backbone");
+-var VisualizationModel = /** @class */ (function (_super) {
+- __extends(VisualizationModel, _super);
+- function VisualizationModel() {
+- return _super !== null && _super.apply(this, arguments) || this;
+- }
+- return VisualizationModel;
+-}(Backbone.Model));
+const Backbone = require("./aliasUsage1_backbone");
- class VisualizationModel extends Backbone.Model {
- }
++class VisualizationModel extends Backbone.Model {
++}
exports.VisualizationModel = VisualizationModel;
//// [aliasUsage1_main.js]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
-var moduleA = require("./aliasUsage1_moduleA");
+-var C2 = /** @class */ (function () {
+- function C2() {
+- }
+- Object.defineProperty(C2.prototype, "A", {
+- get: function () {
+- return this.x;
+- },
+- set: function (x) {
+- x = moduleA;
+- },
+- enumerable: false,
+- configurable: true
+- });
+- return C2;
+-}());
+const moduleA = require("./aliasUsage1_moduleA");
- class C2 {
++class C2 {
+ x;
- get A() {
- return this.x;
- }
\ No newline at end of file
++ get A() {
++ return this.x;
++ }
++ set A(x) {
++ x = moduleA;
++ }
++}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/aliasUsageInArray.js.diff b/testdata/baselines/reference/submodule/compiler/aliasUsageInArray.js.diff
index 7db6c429c0..7f06685666 100644
--- a/testdata/baselines/reference/submodule/compiler/aliasUsageInArray.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/aliasUsageInArray.js.diff
@@ -1,20 +1,48 @@
--- old.aliasUsageInArray.js
+++ new.aliasUsageInArray.js
-@@= skipped -25, +25 lines =@@
+@@= skipped -24, +24 lines =@@
+ "use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Model = void 0;
- class Model {
+-var Model = /** @class */ (function () {
+- function Model() {
+- }
+- return Model;
+-}());
++class Model {
+ someData;
- }
++}
exports.Model = Model;
//// [aliasUsageInArray_moduleA.js]
"use strict";
+-var __extends = (this && this.__extends) || (function () {
+- var extendStatics = function (d, b) {
+- extendStatics = Object.setPrototypeOf ||
+- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+- return extendStatics(d, b);
+- };
+- return function (d, b) {
+- if (typeof b !== "function" && b !== null)
+- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+- extendStatics(d, b);
+- function __() { this.constructor = d; }
+- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+- };
+-})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.VisualizationModel = void 0;
-var Backbone = require("./aliasUsageInArray_backbone");
+-var VisualizationModel = /** @class */ (function (_super) {
+- __extends(VisualizationModel, _super);
+- function VisualizationModel() {
+- return _super !== null && _super.apply(this, arguments) || this;
+- }
+- return VisualizationModel;
+-}(Backbone.Model));
+const Backbone = require("./aliasUsageInArray_backbone");
- class VisualizationModel extends Backbone.Model {
- }
++class VisualizationModel extends Backbone.Model {
++}
exports.VisualizationModel = VisualizationModel;
//// [aliasUsageInArray_main.js]
"use strict";
diff --git a/testdata/baselines/reference/submodule/compiler/aliasUsageInFunctionExpression.js.diff b/testdata/baselines/reference/submodule/compiler/aliasUsageInFunctionExpression.js.diff
index cc771acb3a..bad752b6ea 100644
--- a/testdata/baselines/reference/submodule/compiler/aliasUsageInFunctionExpression.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/aliasUsageInFunctionExpression.js.diff
@@ -1,25 +1,55 @@
--- old.aliasUsageInFunctionExpression.js
+++ new.aliasUsageInFunctionExpression.js
-@@= skipped -24, +24 lines =@@
+@@= skipped -23, +23 lines =@@
+ "use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Model = void 0;
- class Model {
+-var Model = /** @class */ (function () {
+- function Model() {
+- }
+- return Model;
+-}());
++class Model {
+ someData;
- }
++}
exports.Model = Model;
//// [aliasUsageInFunctionExpression_moduleA.js]
"use strict";
+-var __extends = (this && this.__extends) || (function () {
+- var extendStatics = function (d, b) {
+- extendStatics = Object.setPrototypeOf ||
+- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+- return extendStatics(d, b);
+- };
+- return function (d, b) {
+- if (typeof b !== "function" && b !== null)
+- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+- extendStatics(d, b);
+- function __() { this.constructor = d; }
+- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+- };
+-})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.VisualizationModel = void 0;
-var Backbone = require("./aliasUsageInFunctionExpression_backbone");
+-var VisualizationModel = /** @class */ (function (_super) {
+- __extends(VisualizationModel, _super);
+- function VisualizationModel() {
+- return _super !== null && _super.apply(this, arguments) || this;
+- }
+- return VisualizationModel;
+-}(Backbone.Model));
+const Backbone = require("./aliasUsageInFunctionExpression_backbone");
- class VisualizationModel extends Backbone.Model {
- }
++class VisualizationModel extends Backbone.Model {
++}
exports.VisualizationModel = VisualizationModel;
//// [aliasUsageInFunctionExpression_main.js]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
-var moduleA = require("./aliasUsageInFunctionExpression_moduleA");
+-var f = function (x) { return x; };
+-f = function (x) { return moduleA; };
+const moduleA = require("./aliasUsageInFunctionExpression_moduleA");
- var f = (x) => x;
- f = (x) => moduleA;
\ No newline at end of file
++var f = (x) => x;
++f = (x) => moduleA;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/aliasUsageInGenericFunction.js.diff b/testdata/baselines/reference/submodule/compiler/aliasUsageInGenericFunction.js.diff
index 5de3c24e3f..aaf1263831 100644
--- a/testdata/baselines/reference/submodule/compiler/aliasUsageInGenericFunction.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/aliasUsageInGenericFunction.js.diff
@@ -1,20 +1,48 @@
--- old.aliasUsageInGenericFunction.js
+++ new.aliasUsageInGenericFunction.js
-@@= skipped -28, +28 lines =@@
+@@= skipped -27, +27 lines =@@
+ "use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Model = void 0;
- class Model {
+-var Model = /** @class */ (function () {
+- function Model() {
+- }
+- return Model;
+-}());
++class Model {
+ someData;
- }
++}
exports.Model = Model;
//// [aliasUsageInGenericFunction_moduleA.js]
"use strict";
+-var __extends = (this && this.__extends) || (function () {
+- var extendStatics = function (d, b) {
+- extendStatics = Object.setPrototypeOf ||
+- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+- return extendStatics(d, b);
+- };
+- return function (d, b) {
+- if (typeof b !== "function" && b !== null)
+- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+- extendStatics(d, b);
+- function __() { this.constructor = d; }
+- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+- };
+-})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.VisualizationModel = void 0;
-var Backbone = require("./aliasUsageInGenericFunction_backbone");
+-var VisualizationModel = /** @class */ (function (_super) {
+- __extends(VisualizationModel, _super);
+- function VisualizationModel() {
+- return _super !== null && _super.apply(this, arguments) || this;
+- }
+- return VisualizationModel;
+-}(Backbone.Model));
+const Backbone = require("./aliasUsageInGenericFunction_backbone");
- class VisualizationModel extends Backbone.Model {
- }
++class VisualizationModel extends Backbone.Model {
++}
exports.VisualizationModel = VisualizationModel;
//// [aliasUsageInGenericFunction_main.js]
"use strict";
diff --git a/testdata/baselines/reference/submodule/compiler/aliasUsageInIndexerOfClass.js.diff b/testdata/baselines/reference/submodule/compiler/aliasUsageInIndexerOfClass.js.diff
index 32d8707f5d..b302008a97 100644
--- a/testdata/baselines/reference/submodule/compiler/aliasUsageInIndexerOfClass.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/aliasUsageInIndexerOfClass.js.diff
@@ -1,32 +1,68 @@
--- old.aliasUsageInIndexerOfClass.js
+++ new.aliasUsageInIndexerOfClass.js
-@@= skipped -30, +30 lines =@@
+@@= skipped -29, +29 lines =@@
+ "use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Model = void 0;
- class Model {
+-var Model = /** @class */ (function () {
+- function Model() {
+- }
+- return Model;
+-}());
++class Model {
+ someData;
- }
++}
exports.Model = Model;
//// [aliasUsageInIndexerOfClass_moduleA.js]
"use strict";
+-var __extends = (this && this.__extends) || (function () {
+- var extendStatics = function (d, b) {
+- extendStatics = Object.setPrototypeOf ||
+- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+- return extendStatics(d, b);
+- };
+- return function (d, b) {
+- if (typeof b !== "function" && b !== null)
+- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+- extendStatics(d, b);
+- function __() { this.constructor = d; }
+- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+- };
+-})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.VisualizationModel = void 0;
-var Backbone = require("./aliasUsageInIndexerOfClass_backbone");
+-var VisualizationModel = /** @class */ (function (_super) {
+- __extends(VisualizationModel, _super);
+- function VisualizationModel() {
+- return _super !== null && _super.apply(this, arguments) || this;
+- }
+- return VisualizationModel;
+-}(Backbone.Model));
+const Backbone = require("./aliasUsageInIndexerOfClass_backbone");
- class VisualizationModel extends Backbone.Model {
- }
++class VisualizationModel extends Backbone.Model {
++}
exports.VisualizationModel = VisualizationModel;
//// [aliasUsageInIndexerOfClass_main.js]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
-var moduleA = require("./aliasUsageInIndexerOfClass_moduleA");
-+const moduleA = require("./aliasUsageInIndexerOfClass_moduleA");
- class N {
-- constructor() {
+-var N = /** @class */ (function () {
+- function N() {
- this.x = moduleA;
- }
+- return N;
+-}());
+-var N2 = /** @class */ (function () {
+- function N2() {
+- }
+- return N2;
+-}());
++const moduleA = require("./aliasUsageInIndexerOfClass_moduleA");
++class N {
+ x = moduleA;
- }
- class N2 {
++}
++class N2 {
+ x;
- }
\ No newline at end of file
++}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/aliasUsageInObjectLiteral.js.diff b/testdata/baselines/reference/submodule/compiler/aliasUsageInObjectLiteral.js.diff
index 906bac9bc4..f2f4d3b02c 100644
--- a/testdata/baselines/reference/submodule/compiler/aliasUsageInObjectLiteral.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/aliasUsageInObjectLiteral.js.diff
@@ -1,20 +1,48 @@
--- old.aliasUsageInObjectLiteral.js
+++ new.aliasUsageInObjectLiteral.js
-@@= skipped -25, +25 lines =@@
+@@= skipped -24, +24 lines =@@
+ "use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Model = void 0;
- class Model {
+-var Model = /** @class */ (function () {
+- function Model() {
+- }
+- return Model;
+-}());
++class Model {
+ someData;
- }
++}
exports.Model = Model;
//// [aliasUsageInObjectLiteral_moduleA.js]
"use strict";
+-var __extends = (this && this.__extends) || (function () {
+- var extendStatics = function (d, b) {
+- extendStatics = Object.setPrototypeOf ||
+- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+- return extendStatics(d, b);
+- };
+- return function (d, b) {
+- if (typeof b !== "function" && b !== null)
+- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+- extendStatics(d, b);
+- function __() { this.constructor = d; }
+- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+- };
+-})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.VisualizationModel = void 0;
-var Backbone = require("./aliasUsageInObjectLiteral_backbone");
+-var VisualizationModel = /** @class */ (function (_super) {
+- __extends(VisualizationModel, _super);
+- function VisualizationModel() {
+- return _super !== null && _super.apply(this, arguments) || this;
+- }
+- return VisualizationModel;
+-}(Backbone.Model));
+const Backbone = require("./aliasUsageInObjectLiteral_backbone");
- class VisualizationModel extends Backbone.Model {
- }
++class VisualizationModel extends Backbone.Model {
++}
exports.VisualizationModel = VisualizationModel;
//// [aliasUsageInObjectLiteral_main.js]
"use strict";
diff --git a/testdata/baselines/reference/submodule/compiler/aliasUsageInOrExpression.js.diff b/testdata/baselines/reference/submodule/compiler/aliasUsageInOrExpression.js.diff
index 2770714897..0259cbfab3 100644
--- a/testdata/baselines/reference/submodule/compiler/aliasUsageInOrExpression.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/aliasUsageInOrExpression.js.diff
@@ -1,20 +1,48 @@
--- old.aliasUsageInOrExpression.js
+++ new.aliasUsageInOrExpression.js
-@@= skipped -28, +28 lines =@@
+@@= skipped -27, +27 lines =@@
+ "use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Model = void 0;
- class Model {
+-var Model = /** @class */ (function () {
+- function Model() {
+- }
+- return Model;
+-}());
++class Model {
+ someData;
- }
++}
exports.Model = Model;
//// [aliasUsageInOrExpression_moduleA.js]
"use strict";
+-var __extends = (this && this.__extends) || (function () {
+- var extendStatics = function (d, b) {
+- extendStatics = Object.setPrototypeOf ||
+- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+- return extendStatics(d, b);
+- };
+- return function (d, b) {
+- if (typeof b !== "function" && b !== null)
+- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+- extendStatics(d, b);
+- function __() { this.constructor = d; }
+- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+- };
+-})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.VisualizationModel = void 0;
-var Backbone = require("./aliasUsageInOrExpression_backbone");
+-var VisualizationModel = /** @class */ (function (_super) {
+- __extends(VisualizationModel, _super);
+- function VisualizationModel() {
+- return _super !== null && _super.apply(this, arguments) || this;
+- }
+- return VisualizationModel;
+-}(Backbone.Model));
+const Backbone = require("./aliasUsageInOrExpression_backbone");
- class VisualizationModel extends Backbone.Model {
- }
++class VisualizationModel extends Backbone.Model {
++}
exports.VisualizationModel = VisualizationModel;
//// [aliasUsageInOrExpression_main.js]
"use strict";
diff --git a/testdata/baselines/reference/submodule/compiler/aliasUsageInTypeArgumentOfExtendsClause.js.diff b/testdata/baselines/reference/submodule/compiler/aliasUsageInTypeArgumentOfExtendsClause.js.diff
index 47986a8d15..a460d7e62a 100644
--- a/testdata/baselines/reference/submodule/compiler/aliasUsageInTypeArgumentOfExtendsClause.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/aliasUsageInTypeArgumentOfExtendsClause.js.diff
@@ -1,33 +1,86 @@
--- old.aliasUsageInTypeArgumentOfExtendsClause.js
+++ new.aliasUsageInTypeArgumentOfExtendsClause.js
-@@= skipped -28, +28 lines =@@
+@@= skipped -27, +27 lines =@@
+ "use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Model = void 0;
- class Model {
+-var Model = /** @class */ (function () {
+- function Model() {
+- }
+- return Model;
+-}());
++class Model {
+ someData;
- }
++}
exports.Model = Model;
//// [aliasUsageInTypeArgumentOfExtendsClause_moduleA.js]
"use strict";
+-var __extends = (this && this.__extends) || (function () {
+- var extendStatics = function (d, b) {
+- extendStatics = Object.setPrototypeOf ||
+- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+- return extendStatics(d, b);
+- };
+- return function (d, b) {
+- if (typeof b !== "function" && b !== null)
+- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+- extendStatics(d, b);
+- function __() { this.constructor = d; }
+- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+- };
+-})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.VisualizationModel = void 0;
-var Backbone = require("./aliasUsageInTypeArgumentOfExtendsClause_backbone");
+-var VisualizationModel = /** @class */ (function (_super) {
+- __extends(VisualizationModel, _super);
+- function VisualizationModel() {
+- return _super !== null && _super.apply(this, arguments) || this;
+- }
+- return VisualizationModel;
+-}(Backbone.Model));
+const Backbone = require("./aliasUsageInTypeArgumentOfExtendsClause_backbone");
- class VisualizationModel extends Backbone.Model {
- }
++class VisualizationModel extends Backbone.Model {
++}
exports.VisualizationModel = VisualizationModel;
//// [aliasUsageInTypeArgumentOfExtendsClause_main.js]
"use strict";
+-var __extends = (this && this.__extends) || (function () {
+- var extendStatics = function (d, b) {
+- extendStatics = Object.setPrototypeOf ||
+- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+- return extendStatics(d, b);
+- };
+- return function (d, b) {
+- if (typeof b !== "function" && b !== null)
+- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+- extendStatics(d, b);
+- function __() { this.constructor = d; }
+- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+- };
+-})();
Object.defineProperty(exports, "__esModule", { value: true });
-var moduleA = require("./aliasUsageInTypeArgumentOfExtendsClause_moduleA");
+-var C = /** @class */ (function () {
+- function C() {
+- }
+- return C;
+-}());
+-var D = /** @class */ (function (_super) {
+- __extends(D, _super);
+- function D() {
+- var _this = _super !== null && _super.apply(this, arguments) || this;
+- _this.x = moduleA;
+- return _this;
+- }
+- return D;
+-}(C));
+const moduleA = require("./aliasUsageInTypeArgumentOfExtendsClause_moduleA");
- class C {
++class C {
+ x;
- }
- class D extends C {
-- constructor() {
-- super(...arguments);
-- this.x = moduleA;
-- }
++}
++class D extends C {
+ x = moduleA;
- }
\ No newline at end of file
++}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/aliasUsageInVarAssignment.js.diff b/testdata/baselines/reference/submodule/compiler/aliasUsageInVarAssignment.js.diff
index f2b32cfcab..189417c831 100644
--- a/testdata/baselines/reference/submodule/compiler/aliasUsageInVarAssignment.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/aliasUsageInVarAssignment.js.diff
@@ -1,18 +1,48 @@
--- old.aliasUsageInVarAssignment.js
+++ new.aliasUsageInVarAssignment.js
-@@= skipped -24, +24 lines =@@
+@@= skipped -23, +23 lines =@@
+ "use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Model = void 0;
- class Model {
+-var Model = /** @class */ (function () {
+- function Model() {
+- }
+- return Model;
+-}());
++class Model {
+ someData;
- }
++}
exports.Model = Model;
//// [aliasUsageInVarAssignment_moduleA.js]
"use strict";
+-var __extends = (this && this.__extends) || (function () {
+- var extendStatics = function (d, b) {
+- extendStatics = Object.setPrototypeOf ||
+- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+- return extendStatics(d, b);
+- };
+- return function (d, b) {
+- if (typeof b !== "function" && b !== null)
+- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+- extendStatics(d, b);
+- function __() { this.constructor = d; }
+- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+- };
+-})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.VisualizationModel = void 0;
-var Backbone = require("./aliasUsageInVarAssignment_backbone");
+-var VisualizationModel = /** @class */ (function (_super) {
+- __extends(VisualizationModel, _super);
+- function VisualizationModel() {
+- return _super !== null && _super.apply(this, arguments) || this;
+- }
+- return VisualizationModel;
+-}(Backbone.Model));
+const Backbone = require("./aliasUsageInVarAssignment_backbone");
- class VisualizationModel extends Backbone.Model {
- }
- exports.VisualizationModel = VisualizationModel;
\ No newline at end of file
++class VisualizationModel extends Backbone.Model {
++}
+ exports.VisualizationModel = VisualizationModel;
+ //// [aliasUsageInVarAssignment_main.js]
+ "use strict";
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/allowImportClausesToMergeWithTypes.js.diff b/testdata/baselines/reference/submodule/compiler/allowImportClausesToMergeWithTypes.js.diff
index 467ca1a9f4..f9be5a59b2 100644
--- a/testdata/baselines/reference/submodule/compiler/allowImportClausesToMergeWithTypes.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/allowImportClausesToMergeWithTypes.js.diff
@@ -7,16 +7,19 @@
-var b_1 = require("./b");
+const b_1 = require("./b");
exports.default = b_1.default;
- const x = { x: "" };
+-var x = { x: "" };
++const x = { x: "" };
b_1.default;
//// [index.js]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
-var a_1 = require("./a");
+-var x = { x: "" };
+const a_1 = require("./a");
- const x = { x: "" };
++const x = { x: "" };
a_1.default;
-var b_1 = require("./b");
+const b_1 = require("./b");
b_1.default;
- const y = x;
\ No newline at end of file
+-var y = x;
++const y = x;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/allowJscheckJsTypeParameterNoCrash.js.diff b/testdata/baselines/reference/submodule/compiler/allowJscheckJsTypeParameterNoCrash.js.diff
index 44a7593278..419efd674f 100644
--- a/testdata/baselines/reference/submodule/compiler/allowJscheckJsTypeParameterNoCrash.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/allowJscheckJsTypeParameterNoCrash.js.diff
@@ -8,4 +8,12 @@
+const func_1 = require("./func");
// hover on vextend
exports.a = (0, func_1.vextend)({
- watch: {
\ No newline at end of file
+ watch: {
+- data1: function (val) {
++ data1(val) {
+ this.data2 = 1;
+ },
+- data2: function (val) { },
++ data2(val) { },
+ }
+ });
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/alwaysStrictModule.errors.txt b/testdata/baselines/reference/submodule/compiler/alwaysStrictModule.errors.txt
index d3fa738698..d073999d24 100644
--- a/testdata/baselines/reference/submodule/compiler/alwaysStrictModule.errors.txt
+++ b/testdata/baselines/reference/submodule/compiler/alwaysStrictModule.errors.txt
@@ -2,7 +2,7 @@ alwaysStrictModule.ts(3,13): error TS1100: Invalid use of 'arguments' in strict
==== alwaysStrictModule.ts (1 errors) ====
- module M {
+ namespace M {
export function f() {
var arguments = [];
~~~~~~~~~
diff --git a/testdata/baselines/reference/submodule/compiler/alwaysStrictModule.js b/testdata/baselines/reference/submodule/compiler/alwaysStrictModule.js
index 1dd397d5f4..ffdb4d0e98 100644
--- a/testdata/baselines/reference/submodule/compiler/alwaysStrictModule.js
+++ b/testdata/baselines/reference/submodule/compiler/alwaysStrictModule.js
@@ -1,7 +1,7 @@
//// [tests/cases/compiler/alwaysStrictModule.ts] ////
//// [alwaysStrictModule.ts]
-module M {
+namespace M {
export function f() {
var arguments = [];
}
diff --git a/testdata/baselines/reference/submodule/compiler/alwaysStrictModule.symbols b/testdata/baselines/reference/submodule/compiler/alwaysStrictModule.symbols
index 8e3f76ef47..5dd9a1aa25 100644
--- a/testdata/baselines/reference/submodule/compiler/alwaysStrictModule.symbols
+++ b/testdata/baselines/reference/submodule/compiler/alwaysStrictModule.symbols
@@ -1,11 +1,11 @@
//// [tests/cases/compiler/alwaysStrictModule.ts] ////
=== alwaysStrictModule.ts ===
-module M {
+namespace M {
>M : Symbol(M, Decl(alwaysStrictModule.ts, 0, 0))
export function f() {
->f : Symbol(f, Decl(alwaysStrictModule.ts, 0, 10))
+>f : Symbol(f, Decl(alwaysStrictModule.ts, 0, 13))
var arguments = [];
>arguments : Symbol(arguments, Decl(alwaysStrictModule.ts, 2, 11))
diff --git a/testdata/baselines/reference/submodule/compiler/alwaysStrictModule.types b/testdata/baselines/reference/submodule/compiler/alwaysStrictModule.types
index 639c482bc3..827ceaa216 100644
--- a/testdata/baselines/reference/submodule/compiler/alwaysStrictModule.types
+++ b/testdata/baselines/reference/submodule/compiler/alwaysStrictModule.types
@@ -1,7 +1,7 @@
//// [tests/cases/compiler/alwaysStrictModule.ts] ////
=== alwaysStrictModule.ts ===
-module M {
+namespace M {
>M : typeof M
export function f() {
diff --git a/testdata/baselines/reference/submodule/compiler/alwaysStrictModule2.errors.txt b/testdata/baselines/reference/submodule/compiler/alwaysStrictModule2.errors.txt
index eae1ba1ed9..5cc7c385fc 100644
--- a/testdata/baselines/reference/submodule/compiler/alwaysStrictModule2.errors.txt
+++ b/testdata/baselines/reference/submodule/compiler/alwaysStrictModule2.errors.txt
@@ -5,7 +5,7 @@ b.ts(3,13): error TS1100: Invalid use of 'arguments' in strict mode.
!!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration.
==== a.ts (1 errors) ====
- module M {
+ namespace M {
export function f() {
var arguments = [];
~~~~~~~~~
@@ -14,7 +14,7 @@ b.ts(3,13): error TS1100: Invalid use of 'arguments' in strict mode.
}
==== b.ts (1 errors) ====
- module M {
+ namespace M {
export function f2() {
var arguments = [];
~~~~~~~~~
diff --git a/testdata/baselines/reference/submodule/compiler/alwaysStrictModule2.symbols b/testdata/baselines/reference/submodule/compiler/alwaysStrictModule2.symbols
index 43ad606a40..b56aa3f3af 100644
--- a/testdata/baselines/reference/submodule/compiler/alwaysStrictModule2.symbols
+++ b/testdata/baselines/reference/submodule/compiler/alwaysStrictModule2.symbols
@@ -1,11 +1,11 @@
//// [tests/cases/compiler/alwaysStrictModule2.ts] ////
=== a.ts ===
-module M {
+namespace M {
>M : Symbol(M, Decl(a.ts, 0, 0), Decl(b.ts, 0, 0))
export function f() {
->f : Symbol(f, Decl(a.ts, 0, 10))
+>f : Symbol(f, Decl(a.ts, 0, 13))
var arguments = [];
>arguments : Symbol(arguments, Decl(a.ts, 2, 11))
@@ -13,11 +13,11 @@ module M {
}
=== b.ts ===
-module M {
+namespace M {
>M : Symbol(M, Decl(a.ts, 0, 0), Decl(b.ts, 0, 0))
export function f2() {
->f2 : Symbol(f2, Decl(b.ts, 0, 10))
+>f2 : Symbol(f2, Decl(b.ts, 0, 13))
var arguments = [];
>arguments : Symbol(arguments, Decl(b.ts, 2, 11))
diff --git a/testdata/baselines/reference/submodule/compiler/alwaysStrictModule2.types b/testdata/baselines/reference/submodule/compiler/alwaysStrictModule2.types
index ddf13f957e..e96a6a9be3 100644
--- a/testdata/baselines/reference/submodule/compiler/alwaysStrictModule2.types
+++ b/testdata/baselines/reference/submodule/compiler/alwaysStrictModule2.types
@@ -1,7 +1,7 @@
//// [tests/cases/compiler/alwaysStrictModule2.ts] ////
=== a.ts ===
-module M {
+namespace M {
>M : typeof M
export function f() {
@@ -14,7 +14,7 @@ module M {
}
=== b.ts ===
-module M {
+namespace M {
>M : typeof M
export function f2() {
diff --git a/testdata/baselines/reference/submodule/compiler/alwaysStrictModule3.js.diff b/testdata/baselines/reference/submodule/compiler/alwaysStrictModule3.js.diff
new file mode 100644
index 0000000000..543dd479ff
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/alwaysStrictModule3.js.diff
@@ -0,0 +1,8 @@
+--- old.alwaysStrictModule3.js
++++ new.alwaysStrictModule3.js
+@@= skipped -5, +5 lines =@@
+
+ //// [alwaysStrictModule3.js]
+ // module ES2015
+-export var a = 1;
++export const a = 1;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/ambientConstLiterals.js.diff b/testdata/baselines/reference/submodule/compiler/ambientConstLiterals.js.diff
new file mode 100644
index 0000000000..7ffad08432
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/ambientConstLiterals.js.diff
@@ -0,0 +1,39 @@
+--- old.ambientConstLiterals.js
++++ new.ambientConstLiterals.js
+@@= skipped -33, +33 lines =@@
+ E[E["C"] = 2] = "C";
+ E[E["non identifier"] = 3] = "non identifier";
+ })(E || (E = {}));
+-var c1 = "abc";
+-var c2 = 123;
+-var c3 = c1;
+-var c4 = c2;
+-var c5 = f(123);
+-var c6 = f(-123);
+-var c7 = true;
+-var c8 = E.A;
+-var c8b = E["non identifier"];
+-var c9 = { x: "abc" };
+-var c10 = [123];
+-var c11 = "abc" + "def";
+-var c12 = 123 + 456;
+-var c13 = Math.random() > 0.5 ? "abc" : "def";
+-var c14 = Math.random() > 0.5 ? 123 : 456;
++const c1 = "abc";
++const c2 = 123;
++const c3 = c1;
++const c4 = c2;
++const c5 = f(123);
++const c6 = f(-123);
++const c7 = true;
++const c8 = E.A;
++const c8b = E["non identifier"];
++const c9 = { x: "abc" };
++const c10 = [123];
++const c11 = "abc" + "def";
++const c12 = 123 + 456;
++const c13 = Math.random() > 0.5 ? "abc" : "def";
++const c14 = Math.random() > 0.5 ? 123 : 456;
+
+
+ //// [ambientConstLiterals.d.ts]
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/ambientConstLiterals.symbols.diff b/testdata/baselines/reference/submodule/compiler/ambientConstLiterals.symbols.diff
new file mode 100644
index 0000000000..e0cba3da91
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/ambientConstLiterals.symbols.diff
@@ -0,0 +1,16 @@
+--- old.ambientConstLiterals.symbols
++++ new.ambientConstLiterals.symbols
+@@= skipped -70, +70 lines =@@
+ const c13 = Math.random() > 0.5 ? "abc" : "def";
+ >c13 : Symbol(c13, Decl(ambientConstLiterals.ts, 19, 5))
+ >Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --))
+->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+ >random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --))
+
+ const c14 = Math.random() > 0.5 ? 123 : 456;
+ >c14 : Symbol(c14, Decl(ambientConstLiterals.ts, 20, 5))
+ >Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --))
+->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+ >random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --))
diff --git a/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer6.js b/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer6.js
index 91b0518200..59e6b64781 100644
--- a/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer6.js
+++ b/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer6.js
@@ -1,7 +1,7 @@
//// [tests/cases/compiler/ambientEnumElementInitializer6.ts] ////
//// [ambientEnumElementInitializer6.ts]
-declare module M {
+declare namespace M {
enum E {
e = 3
}
diff --git a/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer6.symbols b/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer6.symbols
index 47eb704911..26dce152cd 100644
--- a/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer6.symbols
+++ b/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer6.symbols
@@ -1,11 +1,11 @@
//// [tests/cases/compiler/ambientEnumElementInitializer6.ts] ////
=== ambientEnumElementInitializer6.ts ===
-declare module M {
+declare namespace M {
>M : Symbol(M, Decl(ambientEnumElementInitializer6.ts, 0, 0))
enum E {
->E : Symbol(E, Decl(ambientEnumElementInitializer6.ts, 0, 18))
+>E : Symbol(E, Decl(ambientEnumElementInitializer6.ts, 0, 21))
e = 3
>e : Symbol(E.e, Decl(ambientEnumElementInitializer6.ts, 1, 12))
diff --git a/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer6.types b/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer6.types
index f852e992be..f9372be1e6 100644
--- a/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer6.types
+++ b/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer6.types
@@ -1,7 +1,7 @@
//// [tests/cases/compiler/ambientEnumElementInitializer6.ts] ////
=== ambientEnumElementInitializer6.ts ===
-declare module M {
+declare namespace M {
>M : typeof M
enum E {
diff --git a/testdata/baselines/reference/submodule/compiler/ambientExportDefaultErrors.types.diff b/testdata/baselines/reference/submodule/compiler/ambientExportDefaultErrors.types.diff
new file mode 100644
index 0000000000..6c27892c52
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/ambientExportDefaultErrors.types.diff
@@ -0,0 +1,19 @@
+--- old.ambientExportDefaultErrors.types
++++ new.ambientExportDefaultErrors.types
+@@= skipped -31, +31 lines =@@
+ >"indirect" : typeof import("indirect")
+
+ export default typeof Foo.default;
+->typeof Foo.default : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
++>typeof Foo.default : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
+ >Foo.default : number
+ >Foo : typeof Foo
+ >default : number
+@@= skipped -12, +12 lines =@@
+ >"indirect2" : typeof import("indirect2")
+
+ export = typeof Foo2;
+->typeof Foo2 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
++>typeof Foo2 : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
+ >Foo2 : number
+ }
diff --git a/testdata/baselines/reference/submodule/compiler/ambientFundule.js b/testdata/baselines/reference/submodule/compiler/ambientFundule.js
index deffb57f79..6ede114d99 100644
--- a/testdata/baselines/reference/submodule/compiler/ambientFundule.js
+++ b/testdata/baselines/reference/submodule/compiler/ambientFundule.js
@@ -2,7 +2,7 @@
//// [ambientFundule.ts]
declare function f();
-declare module f { var x }
+declare namespace f { var x }
declare function f(x);
//// [ambientFundule.js]
diff --git a/testdata/baselines/reference/submodule/compiler/ambientFundule.symbols b/testdata/baselines/reference/submodule/compiler/ambientFundule.symbols
index b8daf73847..eacd01f572 100644
--- a/testdata/baselines/reference/submodule/compiler/ambientFundule.symbols
+++ b/testdata/baselines/reference/submodule/compiler/ambientFundule.symbols
@@ -2,13 +2,13 @@
=== ambientFundule.ts ===
declare function f();
->f : Symbol(f, Decl(ambientFundule.ts, 0, 0), Decl(ambientFundule.ts, 1, 26), Decl(ambientFundule.ts, 0, 21))
+>f : Symbol(f, Decl(ambientFundule.ts, 0, 0), Decl(ambientFundule.ts, 1, 29), Decl(ambientFundule.ts, 0, 21))
-declare module f { var x }
->f : Symbol(f, Decl(ambientFundule.ts, 0, 0), Decl(ambientFundule.ts, 1, 26), Decl(ambientFundule.ts, 0, 21))
->x : Symbol(x, Decl(ambientFundule.ts, 1, 22))
+declare namespace f { var x }
+>f : Symbol(f, Decl(ambientFundule.ts, 0, 0), Decl(ambientFundule.ts, 1, 29), Decl(ambientFundule.ts, 0, 21))
+>x : Symbol(x, Decl(ambientFundule.ts, 1, 25))
declare function f(x);
->f : Symbol(f, Decl(ambientFundule.ts, 0, 0), Decl(ambientFundule.ts, 1, 26), Decl(ambientFundule.ts, 0, 21))
+>f : Symbol(f, Decl(ambientFundule.ts, 0, 0), Decl(ambientFundule.ts, 1, 29), Decl(ambientFundule.ts, 0, 21))
>x : Symbol(x, Decl(ambientFundule.ts, 2, 19))
diff --git a/testdata/baselines/reference/submodule/compiler/ambientFundule.types b/testdata/baselines/reference/submodule/compiler/ambientFundule.types
index 64681d6907..becd968c2b 100644
--- a/testdata/baselines/reference/submodule/compiler/ambientFundule.types
+++ b/testdata/baselines/reference/submodule/compiler/ambientFundule.types
@@ -4,7 +4,7 @@
declare function f();
>f : typeof f
-declare module f { var x }
+declare namespace f { var x }
>f : typeof f
>x : any
diff --git a/testdata/baselines/reference/submodule/compiler/ambientModuleExports.js b/testdata/baselines/reference/submodule/compiler/ambientModuleExports.js
index 5067df2a06..e4ea4d04c9 100644
--- a/testdata/baselines/reference/submodule/compiler/ambientModuleExports.js
+++ b/testdata/baselines/reference/submodule/compiler/ambientModuleExports.js
@@ -1,7 +1,7 @@
//// [tests/cases/compiler/ambientModuleExports.ts] ////
//// [ambientModuleExports.ts]
-declare module Foo {
+declare namespace Foo {
function a():void;
var b:number;
class C {}
@@ -11,7 +11,7 @@ Foo.a();
Foo.b;
var c = new Foo.C();
-declare module Foo2 {
+declare namespace Foo2 {
export function a(): void;
export var b: number;
export class C { }
diff --git a/testdata/baselines/reference/submodule/compiler/ambientModuleExports.symbols b/testdata/baselines/reference/submodule/compiler/ambientModuleExports.symbols
index 1fdab327d7..1f338c067f 100644
--- a/testdata/baselines/reference/submodule/compiler/ambientModuleExports.symbols
+++ b/testdata/baselines/reference/submodule/compiler/ambientModuleExports.symbols
@@ -1,11 +1,11 @@
//// [tests/cases/compiler/ambientModuleExports.ts] ////
=== ambientModuleExports.ts ===
-declare module Foo {
+declare namespace Foo {
>Foo : Symbol(Foo, Decl(ambientModuleExports.ts, 0, 0))
function a():void;
->a : Symbol(a, Decl(ambientModuleExports.ts, 0, 20))
+>a : Symbol(a, Decl(ambientModuleExports.ts, 0, 23))
var b:number;
>b : Symbol(b, Decl(ambientModuleExports.ts, 2, 4))
@@ -15,9 +15,9 @@ declare module Foo {
}
Foo.a();
->Foo.a : Symbol(Foo.a, Decl(ambientModuleExports.ts, 0, 20))
+>Foo.a : Symbol(Foo.a, Decl(ambientModuleExports.ts, 0, 23))
>Foo : Symbol(Foo, Decl(ambientModuleExports.ts, 0, 0))
->a : Symbol(Foo.a, Decl(ambientModuleExports.ts, 0, 20))
+>a : Symbol(Foo.a, Decl(ambientModuleExports.ts, 0, 23))
Foo.b;
>Foo.b : Symbol(Foo.b, Decl(ambientModuleExports.ts, 2, 4))
@@ -30,11 +30,11 @@ var c = new Foo.C();
>Foo : Symbol(Foo, Decl(ambientModuleExports.ts, 0, 0))
>C : Symbol(Foo.C, Decl(ambientModuleExports.ts, 2, 14))
-declare module Foo2 {
+declare namespace Foo2 {
>Foo2 : Symbol(Foo2, Decl(ambientModuleExports.ts, 8, 20))
export function a(): void;
->a : Symbol(a, Decl(ambientModuleExports.ts, 10, 21))
+>a : Symbol(a, Decl(ambientModuleExports.ts, 10, 24))
export var b: number;
>b : Symbol(b, Decl(ambientModuleExports.ts, 12, 14))
@@ -44,9 +44,9 @@ declare module Foo2 {
}
Foo2.a();
->Foo2.a : Symbol(Foo2.a, Decl(ambientModuleExports.ts, 10, 21))
+>Foo2.a : Symbol(Foo2.a, Decl(ambientModuleExports.ts, 10, 24))
>Foo2 : Symbol(Foo2, Decl(ambientModuleExports.ts, 8, 20))
->a : Symbol(Foo2.a, Decl(ambientModuleExports.ts, 10, 21))
+>a : Symbol(Foo2.a, Decl(ambientModuleExports.ts, 10, 24))
Foo2.b;
>Foo2.b : Symbol(Foo2.b, Decl(ambientModuleExports.ts, 12, 14))
diff --git a/testdata/baselines/reference/submodule/compiler/ambientModuleExports.types b/testdata/baselines/reference/submodule/compiler/ambientModuleExports.types
index 57f727d333..a22bbc3599 100644
--- a/testdata/baselines/reference/submodule/compiler/ambientModuleExports.types
+++ b/testdata/baselines/reference/submodule/compiler/ambientModuleExports.types
@@ -1,7 +1,7 @@
//// [tests/cases/compiler/ambientModuleExports.ts] ////
=== ambientModuleExports.ts ===
-declare module Foo {
+declare namespace Foo {
>Foo : typeof Foo
function a():void;
@@ -32,7 +32,7 @@ var c = new Foo.C();
>Foo : typeof Foo
>C : typeof Foo.C
-declare module Foo2 {
+declare namespace Foo2 {
>Foo2 : typeof Foo2
export function a(): void;
diff --git a/testdata/baselines/reference/submodule/compiler/ambientModuleWithClassDeclarationWithExtends.js b/testdata/baselines/reference/submodule/compiler/ambientModuleWithClassDeclarationWithExtends.js
index 45a7d6e06e..89af25fa66 100644
--- a/testdata/baselines/reference/submodule/compiler/ambientModuleWithClassDeclarationWithExtends.js
+++ b/testdata/baselines/reference/submodule/compiler/ambientModuleWithClassDeclarationWithExtends.js
@@ -1,7 +1,7 @@
//// [tests/cases/compiler/ambientModuleWithClassDeclarationWithExtends.ts] ////
//// [ambientModuleWithClassDeclarationWithExtends.ts]
-declare module foo {
+declare namespace foo {
class A { }
class B extends A { }
}
diff --git a/testdata/baselines/reference/submodule/compiler/ambientModuleWithClassDeclarationWithExtends.symbols b/testdata/baselines/reference/submodule/compiler/ambientModuleWithClassDeclarationWithExtends.symbols
index f5161339f6..2f9fdbbd54 100644
--- a/testdata/baselines/reference/submodule/compiler/ambientModuleWithClassDeclarationWithExtends.symbols
+++ b/testdata/baselines/reference/submodule/compiler/ambientModuleWithClassDeclarationWithExtends.symbols
@@ -1,13 +1,13 @@
//// [tests/cases/compiler/ambientModuleWithClassDeclarationWithExtends.ts] ////
=== ambientModuleWithClassDeclarationWithExtends.ts ===
-declare module foo {
+declare namespace foo {
>foo : Symbol(foo, Decl(ambientModuleWithClassDeclarationWithExtends.ts, 0, 0))
class A { }
->A : Symbol(A, Decl(ambientModuleWithClassDeclarationWithExtends.ts, 0, 20))
+>A : Symbol(A, Decl(ambientModuleWithClassDeclarationWithExtends.ts, 0, 23))
class B extends A { }
>B : Symbol(B, Decl(ambientModuleWithClassDeclarationWithExtends.ts, 1, 15))
->A : Symbol(A, Decl(ambientModuleWithClassDeclarationWithExtends.ts, 0, 20))
+>A : Symbol(A, Decl(ambientModuleWithClassDeclarationWithExtends.ts, 0, 23))
}
diff --git a/testdata/baselines/reference/submodule/compiler/ambientModuleWithClassDeclarationWithExtends.types b/testdata/baselines/reference/submodule/compiler/ambientModuleWithClassDeclarationWithExtends.types
index bb42378d64..532cc461bc 100644
--- a/testdata/baselines/reference/submodule/compiler/ambientModuleWithClassDeclarationWithExtends.types
+++ b/testdata/baselines/reference/submodule/compiler/ambientModuleWithClassDeclarationWithExtends.types
@@ -1,7 +1,7 @@
//// [tests/cases/compiler/ambientModuleWithClassDeclarationWithExtends.ts] ////
=== ambientModuleWithClassDeclarationWithExtends.ts ===
-declare module foo {
+declare namespace foo {
>foo : typeof foo
class A { }
diff --git a/testdata/baselines/reference/submodule/compiler/ambientModuleWithTemplateLiterals.js b/testdata/baselines/reference/submodule/compiler/ambientModuleWithTemplateLiterals.js
index c57ef31e0c..e2fce1a4cd 100644
--- a/testdata/baselines/reference/submodule/compiler/ambientModuleWithTemplateLiterals.js
+++ b/testdata/baselines/reference/submodule/compiler/ambientModuleWithTemplateLiterals.js
@@ -1,7 +1,7 @@
//// [tests/cases/compiler/ambientModuleWithTemplateLiterals.ts] ////
//// [ambientModuleWithTemplateLiterals.ts]
-declare module Foo {
+declare namespace Foo {
enum Bar {
a = `1`,
b = '2',
diff --git a/testdata/baselines/reference/submodule/compiler/ambientModuleWithTemplateLiterals.symbols b/testdata/baselines/reference/submodule/compiler/ambientModuleWithTemplateLiterals.symbols
index df96ad10c3..b832ba305c 100644
--- a/testdata/baselines/reference/submodule/compiler/ambientModuleWithTemplateLiterals.symbols
+++ b/testdata/baselines/reference/submodule/compiler/ambientModuleWithTemplateLiterals.symbols
@@ -1,11 +1,11 @@
//// [tests/cases/compiler/ambientModuleWithTemplateLiterals.ts] ////
=== ambientModuleWithTemplateLiterals.ts ===
-declare module Foo {
+declare namespace Foo {
>Foo : Symbol(Foo, Decl(ambientModuleWithTemplateLiterals.ts, 0, 0))
enum Bar {
->Bar : Symbol(Bar, Decl(ambientModuleWithTemplateLiterals.ts, 0, 20))
+>Bar : Symbol(Bar, Decl(ambientModuleWithTemplateLiterals.ts, 0, 23))
a = `1`,
>a : Symbol(Bar.a, Decl(ambientModuleWithTemplateLiterals.ts, 1, 14))
@@ -26,17 +26,17 @@ declare module Foo {
export const c = Bar.a;
>c : Symbol(c, Decl(ambientModuleWithTemplateLiterals.ts, 10, 16))
>Bar.a : Symbol(Bar.a, Decl(ambientModuleWithTemplateLiterals.ts, 1, 14))
->Bar : Symbol(Bar, Decl(ambientModuleWithTemplateLiterals.ts, 0, 20))
+>Bar : Symbol(Bar, Decl(ambientModuleWithTemplateLiterals.ts, 0, 23))
>a : Symbol(Bar.a, Decl(ambientModuleWithTemplateLiterals.ts, 1, 14))
export const d = Bar['b'];
>d : Symbol(d, Decl(ambientModuleWithTemplateLiterals.ts, 11, 16))
->Bar : Symbol(Bar, Decl(ambientModuleWithTemplateLiterals.ts, 0, 20))
+>Bar : Symbol(Bar, Decl(ambientModuleWithTemplateLiterals.ts, 0, 23))
>'b' : Symbol(Bar.b, Decl(ambientModuleWithTemplateLiterals.ts, 2, 16))
export const e = Bar[`c`];
>e : Symbol(e, Decl(ambientModuleWithTemplateLiterals.ts, 12, 16))
->Bar : Symbol(Bar, Decl(ambientModuleWithTemplateLiterals.ts, 0, 20))
+>Bar : Symbol(Bar, Decl(ambientModuleWithTemplateLiterals.ts, 0, 23))
>`c` : Symbol(Bar.c, Decl(ambientModuleWithTemplateLiterals.ts, 3, 16))
}
diff --git a/testdata/baselines/reference/submodule/compiler/ambientModuleWithTemplateLiterals.types b/testdata/baselines/reference/submodule/compiler/ambientModuleWithTemplateLiterals.types
index a57801abb2..c2c79f0900 100644
--- a/testdata/baselines/reference/submodule/compiler/ambientModuleWithTemplateLiterals.types
+++ b/testdata/baselines/reference/submodule/compiler/ambientModuleWithTemplateLiterals.types
@@ -1,7 +1,7 @@
//// [tests/cases/compiler/ambientModuleWithTemplateLiterals.ts] ////
=== ambientModuleWithTemplateLiterals.ts ===
-declare module Foo {
+declare namespace Foo {
>Foo : typeof Foo
enum Bar {
diff --git a/testdata/baselines/reference/submodule/compiler/ambientModules.js b/testdata/baselines/reference/submodule/compiler/ambientModules.js
index cea5c21436..2bf38460e6 100644
--- a/testdata/baselines/reference/submodule/compiler/ambientModules.js
+++ b/testdata/baselines/reference/submodule/compiler/ambientModules.js
@@ -1,7 +1,7 @@
//// [tests/cases/compiler/ambientModules.ts] ////
//// [ambientModules.ts]
-declare module Foo.Bar { export var foo; };
+declare namespace Foo.Bar { export var foo; };
Foo.Bar.foo = 5;
//// [ambientModules.js]
diff --git a/testdata/baselines/reference/submodule/compiler/ambientModules.symbols b/testdata/baselines/reference/submodule/compiler/ambientModules.symbols
index 1ef6c20a4f..9190683049 100644
--- a/testdata/baselines/reference/submodule/compiler/ambientModules.symbols
+++ b/testdata/baselines/reference/submodule/compiler/ambientModules.symbols
@@ -1,15 +1,15 @@
//// [tests/cases/compiler/ambientModules.ts] ////
=== ambientModules.ts ===
-declare module Foo.Bar { export var foo; };
+declare namespace Foo.Bar { export var foo; };
>Foo : Symbol(Foo, Decl(ambientModules.ts, 0, 0))
->Bar : Symbol(Bar, Decl(ambientModules.ts, 0, 19))
->foo : Symbol(foo, Decl(ambientModules.ts, 0, 35))
+>Bar : Symbol(Bar, Decl(ambientModules.ts, 0, 22))
+>foo : Symbol(foo, Decl(ambientModules.ts, 0, 38))
Foo.Bar.foo = 5;
->Foo.Bar.foo : Symbol(Foo.Bar.foo, Decl(ambientModules.ts, 0, 35))
->Foo.Bar : Symbol(Foo.Bar, Decl(ambientModules.ts, 0, 19))
+>Foo.Bar.foo : Symbol(Foo.Bar.foo, Decl(ambientModules.ts, 0, 38))
+>Foo.Bar : Symbol(Foo.Bar, Decl(ambientModules.ts, 0, 22))
>Foo : Symbol(Foo, Decl(ambientModules.ts, 0, 0))
->Bar : Symbol(Foo.Bar, Decl(ambientModules.ts, 0, 19))
->foo : Symbol(Foo.Bar.foo, Decl(ambientModules.ts, 0, 35))
+>Bar : Symbol(Foo.Bar, Decl(ambientModules.ts, 0, 22))
+>foo : Symbol(Foo.Bar.foo, Decl(ambientModules.ts, 0, 38))
diff --git a/testdata/baselines/reference/submodule/compiler/ambientModules.types b/testdata/baselines/reference/submodule/compiler/ambientModules.types
index 601805b48d..9aa1e4b84d 100644
--- a/testdata/baselines/reference/submodule/compiler/ambientModules.types
+++ b/testdata/baselines/reference/submodule/compiler/ambientModules.types
@@ -1,7 +1,7 @@
//// [tests/cases/compiler/ambientModules.ts] ////
=== ambientModules.ts ===
-declare module Foo.Bar { export var foo; };
+declare namespace Foo.Bar { export var foo; };
>Foo : typeof Foo
>Bar : typeof Bar
>foo : any
diff --git a/testdata/baselines/reference/submodule/compiler/ambientRequireFunction(module=commonjs).js.diff b/testdata/baselines/reference/submodule/compiler/ambientRequireFunction(module=commonjs).js.diff
new file mode 100644
index 0000000000..6b2e625333
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/ambientRequireFunction(module=commonjs).js.diff
@@ -0,0 +1,10 @@
+--- old.ambientRequireFunction(module=commonjs).js
++++ new.ambientRequireFunction(module=commonjs).js
+@@= skipped -14, +14 lines =@@
+
+ //// [app.js]
+ ///
+-var fs = require("fs");
+-var text = fs.readFileSync("/a/b/c");
++const fs = require("fs");
++const text = fs.readFileSync("/a/b/c");
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/ambientRequireFunction(module=preserve).js.diff b/testdata/baselines/reference/submodule/compiler/ambientRequireFunction(module=preserve).js.diff
new file mode 100644
index 0000000000..dfa305a9d8
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/ambientRequireFunction(module=preserve).js.diff
@@ -0,0 +1,10 @@
+--- old.ambientRequireFunction(module=preserve).js
++++ new.ambientRequireFunction(module=preserve).js
+@@= skipped -14, +14 lines =@@
+
+ //// [app.js]
+ ///
+-var fs = require("fs");
+-var text = fs.readFileSync("/a/b/c");
++const fs = require("fs");
++const text = fs.readFileSync("/a/b/c");
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/ambientStatement1.errors.txt b/testdata/baselines/reference/submodule/compiler/ambientStatement1.errors.txt
index 8ab93c1b1f..d7af3687d5 100644
--- a/testdata/baselines/reference/submodule/compiler/ambientStatement1.errors.txt
+++ b/testdata/baselines/reference/submodule/compiler/ambientStatement1.errors.txt
@@ -3,7 +3,7 @@ ambientStatement1.ts(4,22): error TS1039: Initializers are not allowed in ambien
==== ambientStatement1.ts (2 errors) ====
- declare module M1 {
+ declare namespace M1 {
while(true);
~~~~~
!!! error TS1036: Statements are not allowed in ambient contexts.
diff --git a/testdata/baselines/reference/submodule/compiler/ambientStatement1.js b/testdata/baselines/reference/submodule/compiler/ambientStatement1.js
index 60e5400465..4143238a2b 100644
--- a/testdata/baselines/reference/submodule/compiler/ambientStatement1.js
+++ b/testdata/baselines/reference/submodule/compiler/ambientStatement1.js
@@ -1,7 +1,7 @@
//// [tests/cases/compiler/ambientStatement1.ts] ////
//// [ambientStatement1.ts]
- declare module M1 {
+ declare namespace M1 {
while(true);
export var v1 = () => false;
diff --git a/testdata/baselines/reference/submodule/compiler/ambientStatement1.symbols b/testdata/baselines/reference/submodule/compiler/ambientStatement1.symbols
index 408900b536..68bc6e86f6 100644
--- a/testdata/baselines/reference/submodule/compiler/ambientStatement1.symbols
+++ b/testdata/baselines/reference/submodule/compiler/ambientStatement1.symbols
@@ -1,7 +1,7 @@
//// [tests/cases/compiler/ambientStatement1.ts] ////
=== ambientStatement1.ts ===
- declare module M1 {
+ declare namespace M1 {
>M1 : Symbol(M1, Decl(ambientStatement1.ts, 0, 0))
while(true);
diff --git a/testdata/baselines/reference/submodule/compiler/ambientStatement1.types b/testdata/baselines/reference/submodule/compiler/ambientStatement1.types
index 7d52415ced..f19dfa44ed 100644
--- a/testdata/baselines/reference/submodule/compiler/ambientStatement1.types
+++ b/testdata/baselines/reference/submodule/compiler/ambientStatement1.types
@@ -1,7 +1,7 @@
//// [tests/cases/compiler/ambientStatement1.ts] ////
=== ambientStatement1.ts ===
- declare module M1 {
+ declare namespace M1 {
>M1 : typeof M1
while(true);
diff --git a/testdata/baselines/reference/submodule/compiler/ambientWithStatements.errors.txt b/testdata/baselines/reference/submodule/compiler/ambientWithStatements.errors.txt
index 5201538571..bef1bb8c98 100644
--- a/testdata/baselines/reference/submodule/compiler/ambientWithStatements.errors.txt
+++ b/testdata/baselines/reference/submodule/compiler/ambientWithStatements.errors.txt
@@ -5,7 +5,7 @@ ambientWithStatements.ts(25,5): error TS2410: The 'with' statement is not suppor
==== ambientWithStatements.ts (4 errors) ====
- declare module M {
+ declare namespace M {
break;
~~~~~
!!! error TS1036: Statements are not allowed in ambient contexts.
diff --git a/testdata/baselines/reference/submodule/compiler/ambientWithStatements.js b/testdata/baselines/reference/submodule/compiler/ambientWithStatements.js
index c2d3d23364..d56d11b021 100644
--- a/testdata/baselines/reference/submodule/compiler/ambientWithStatements.js
+++ b/testdata/baselines/reference/submodule/compiler/ambientWithStatements.js
@@ -1,7 +1,7 @@
//// [tests/cases/compiler/ambientWithStatements.ts] ////
//// [ambientWithStatements.ts]
-declare module M {
+declare namespace M {
break;
continue;
debugger;
diff --git a/testdata/baselines/reference/submodule/compiler/ambientWithStatements.symbols b/testdata/baselines/reference/submodule/compiler/ambientWithStatements.symbols
index bf545c56ea..9442562aa5 100644
--- a/testdata/baselines/reference/submodule/compiler/ambientWithStatements.symbols
+++ b/testdata/baselines/reference/submodule/compiler/ambientWithStatements.symbols
@@ -1,7 +1,7 @@
//// [tests/cases/compiler/ambientWithStatements.ts] ////
=== ambientWithStatements.ts ===
-declare module M {
+declare namespace M {
>M : Symbol(M, Decl(ambientWithStatements.ts, 0, 0))
break;
diff --git a/testdata/baselines/reference/submodule/compiler/ambientWithStatements.types b/testdata/baselines/reference/submodule/compiler/ambientWithStatements.types
index 6040eb295a..5a3b13ca97 100644
--- a/testdata/baselines/reference/submodule/compiler/ambientWithStatements.types
+++ b/testdata/baselines/reference/submodule/compiler/ambientWithStatements.types
@@ -1,7 +1,7 @@
//// [tests/cases/compiler/ambientWithStatements.ts] ////
=== ambientWithStatements.ts ===
-declare module M {
+declare namespace M {
>M : typeof M
break;
diff --git a/testdata/baselines/reference/submodule/compiler/ambiguousCallsWhereReturnTypesAgree.js.diff b/testdata/baselines/reference/submodule/compiler/ambiguousCallsWhereReturnTypesAgree.js.diff
new file mode 100644
index 0000000000..2d824b73c2
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/ambiguousCallsWhereReturnTypesAgree.js.diff
@@ -0,0 +1,37 @@
+--- old.ambiguousCallsWhereReturnTypesAgree.js
++++ new.ambiguousCallsWhereReturnTypesAgree.js
+@@= skipped -30, +30 lines =@@
+
+
+ //// [ambiguousCallsWhereReturnTypesAgree.js]
+-var TestClass = /** @class */ (function () {
+- function TestClass() {
++class TestClass {
++ bar(x) {
+ }
+- TestClass.prototype.bar = function (x) {
+- };
+- TestClass.prototype.foo = function (x) {
++ foo(x) {
+ this.bar(x); // should not error
+- };
+- return TestClass;
+-}());
+-var TestClass2 = /** @class */ (function () {
+- function TestClass2() {
+ }
+- TestClass2.prototype.bar = function (x) {
++}
++class TestClass2 {
++ bar(x) {
+ return 0;
+- };
+- TestClass2.prototype.foo = function (x) {
++ }
++ foo(x) {
+ return this.bar(x); // should not error
+- };
+- return TestClass2;
+-}());
++ }
++}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/ambiguousGenericAssertion1.js.diff b/testdata/baselines/reference/submodule/compiler/ambiguousGenericAssertion1.js.diff
new file mode 100644
index 0000000000..94c8feebc1
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/ambiguousGenericAssertion1.js.diff
@@ -0,0 +1,11 @@
+--- old.ambiguousGenericAssertion1.js
++++ new.ambiguousGenericAssertion1.js
+@@= skipped -8, +8 lines =@@
+
+ //// [ambiguousGenericAssertion1.js]
+ function f(x) { return null; }
+-var r = function (x) { return x; };
++var r = (x) => x;
+ var r2 = f; // valid
+ var r3 = << T > (x), T;
+ T > f; // ambiguous, appears to the parser as a << operation
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/ambiguousOverloadResolution.js.diff b/testdata/baselines/reference/submodule/compiler/ambiguousOverloadResolution.js.diff
index b9b8f70338..93505b5478 100644
--- a/testdata/baselines/reference/submodule/compiler/ambiguousOverloadResolution.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/ambiguousOverloadResolution.js.diff
@@ -1,10 +1,40 @@
--- old.ambiguousOverloadResolution.js
+++ new.ambiguousOverloadResolution.js
-@@= skipped -13, +13 lines =@@
- class A {
- }
- class B extends A {
+@@= skipped -10, +10 lines =@@
+ var t: number = f(x, x); // Not an error
+
+ //// [ambiguousOverloadResolution.js]
+-var __extends = (this && this.__extends) || (function () {
+- var extendStatics = function (d, b) {
+- extendStatics = Object.setPrototypeOf ||
+- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+- return extendStatics(d, b);
+- };
+- return function (d, b) {
+- if (typeof b !== "function" && b !== null)
+- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+- extendStatics(d, b);
+- function __() { this.constructor = d; }
+- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+- };
+-})();
+-var A = /** @class */ (function () {
+- function A() {
+- }
+- return A;
+-}());
+-var B = /** @class */ (function (_super) {
+- __extends(B, _super);
+- function B() {
+- return _super !== null && _super.apply(this, arguments) || this;
+- }
+- return B;
+-}(A));
++class A {
++}
++class B extends A {
+ x;
- }
++}
var x;
var t = f(x, x); // Not an error
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/anonClassDeclarationEmitIsAnon.js.diff b/testdata/baselines/reference/submodule/compiler/anonClassDeclarationEmitIsAnon.js.diff
index 211600ef2e..d1e8ee35ff 100644
--- a/testdata/baselines/reference/submodule/compiler/anonClassDeclarationEmitIsAnon.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/anonClassDeclarationEmitIsAnon.js.diff
@@ -1,29 +1,99 @@
--- old.anonClassDeclarationEmitIsAnon.js
+++ new.anonClassDeclarationEmitIsAnon.js
-@@= skipped -47, +47 lines =@@
+@@= skipped -35, +35 lines =@@
+
+ //// [wrapClass.js]
+ "use strict";
+-var __extends = (this && this.__extends) || (function () {
+- var extendStatics = function (d, b) {
+- extendStatics = Object.setPrototypeOf ||
+- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+- return extendStatics(d, b);
+- };
+- return function (d, b) {
+- if (typeof b !== "function" && b !== null)
+- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+- extendStatics(d, b);
+- function __() { this.constructor = d; }
+- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+- };
+-})();
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.wrapClass = wrapClass;
+ exports.Timestamped = Timestamped;
+ function wrapClass(param) {
+- return /** @class */ (function () {
+- function Wrapped() {
+- }
+- Wrapped.prototype.foo = function () {
++ return class Wrapped {
++ foo() {
+ return param;
+- };
+- return Wrapped;
+- }());
++ }
++ };
}
function Timestamped(Base) {
- return class extends Base {
-- constructor() {
-- super(...arguments);
-- this.timestamp = Date.now();
+- return /** @class */ (function (_super) {
+- __extends(class_1, _super);
+- function class_1() {
+- var _this = _super !== null && _super.apply(this, arguments) || this;
+- _this.timestamp = Date.now();
+- return _this;
- }
+- return class_1;
+- }(Base));
++ return class extends Base {
+ timestamp = Date.now();
- };
++ };
}
//// [index.js]
"use strict";
+-var __extends = (this && this.__extends) || (function () {
+- var extendStatics = function (d, b) {
+- extendStatics = Object.setPrototypeOf ||
+- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+- return extendStatics(d, b);
+- };
+- return function (d, b) {
+- if (typeof b !== "function" && b !== null)
+- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+- extendStatics(d, b);
+- function __() { this.constructor = d; }
+- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+- };
+-})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.TimestampedUser = exports.User = void 0;
-var wrapClass_1 = require("./wrapClass");
+const wrapClass_1 = require("./wrapClass");
exports.default = (0, wrapClass_1.wrapClass)(0);
// Simple class
- class User {
-- constructor() {
+-var User = /** @class */ (function () {
+- function User() {
- this.name = '';
- }
+- return User;
+-}());
++class User {
+ name = '';
- }
++}
exports.User = User;
- // User that is Timestamped
\ No newline at end of file
+ // User that is Timestamped
+-var TimestampedUser = /** @class */ (function (_super) {
+- __extends(TimestampedUser, _super);
+- function TimestampedUser() {
+- return _super.call(this) || this;
++class TimestampedUser extends (0, wrapClass_1.Timestamped)(User) {
++ constructor() {
++ super();
+ }
+- return TimestampedUser;
+-}((0, wrapClass_1.Timestamped)(User)));
++}
+ exports.TimestampedUser = TimestampedUser;
+
diff --git a/testdata/baselines/reference/submodule/compiler/anonClassDeclarationEmitIsAnon.symbols.diff b/testdata/baselines/reference/submodule/compiler/anonClassDeclarationEmitIsAnon.symbols.diff
new file mode 100644
index 0000000000..d5da498208
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/anonClassDeclarationEmitIsAnon.symbols.diff
@@ -0,0 +1,11 @@
+--- old.anonClassDeclarationEmitIsAnon.symbols
++++ new.anonClassDeclarationEmitIsAnon.symbols
+@@= skipped -35, +35 lines =@@
+ timestamp = Date.now();
+ >timestamp : Symbol((Anonymous class).timestamp, Decl(wrapClass.ts, 11, 31))
+ >Date.now : Symbol(DateConstructor.now, Decl(lib.es5.d.ts, --, --))
+->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --))
+ >now : Symbol(DateConstructor.now, Decl(lib.es5.d.ts, --, --))
+
+ };
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/anonterface.js b/testdata/baselines/reference/submodule/compiler/anonterface.js
index 014edc26b6..c7e0fa4431 100644
--- a/testdata/baselines/reference/submodule/compiler/anonterface.js
+++ b/testdata/baselines/reference/submodule/compiler/anonterface.js
@@ -1,7 +1,7 @@
//// [tests/cases/compiler/anonterface.ts] ////
//// [anonterface.ts]
-module M {
+namespace M {
export class C {
m(fn:{ (n:number):string; },n2:number):string {
return fn(n2);
diff --git a/testdata/baselines/reference/submodule/compiler/anonterface.js.diff b/testdata/baselines/reference/submodule/compiler/anonterface.js.diff
new file mode 100644
index 0000000000..6e6d353418
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/anonterface.js.diff
@@ -0,0 +1,21 @@
+--- old.anonterface.js
++++ new.anonterface.js
+@@= skipped -18, +18 lines =@@
+ //// [anonterface.js]
+ var M;
+ (function (M) {
+- var C = /** @class */ (function () {
+- function C() {
+- }
+- C.prototype.m = function (fn, n2) {
++ class C {
++ m(fn, n2) {
+ return fn(n2);
+- };
+- return C;
+- }());
++ }
++ }
+ M.C = C;
+ })(M || (M = {}));
+ var c = new M.C();
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/anonterface.symbols b/testdata/baselines/reference/submodule/compiler/anonterface.symbols
index 5491336c74..e7149ac3b4 100644
--- a/testdata/baselines/reference/submodule/compiler/anonterface.symbols
+++ b/testdata/baselines/reference/submodule/compiler/anonterface.symbols
@@ -1,11 +1,11 @@
//// [tests/cases/compiler/anonterface.ts] ////
=== anonterface.ts ===
-module M {
+namespace M {
>M : Symbol(M, Decl(anonterface.ts, 0, 0))
export class C {
->C : Symbol(C, Decl(anonterface.ts, 0, 10))
+>C : Symbol(C, Decl(anonterface.ts, 0, 13))
m(fn:{ (n:number):string; },n2:number):string {
>m : Symbol(C.m, Decl(anonterface.ts, 1, 20))
@@ -22,9 +22,9 @@ module M {
var c=new M.C();
>c : Symbol(c, Decl(anonterface.ts, 8, 3))
->M.C : Symbol(M.C, Decl(anonterface.ts, 0, 10))
+>M.C : Symbol(M.C, Decl(anonterface.ts, 0, 13))
>M : Symbol(M, Decl(anonterface.ts, 0, 0))
->C : Symbol(M.C, Decl(anonterface.ts, 0, 10))
+>C : Symbol(M.C, Decl(anonterface.ts, 0, 13))
c.m(function(n) { return "hello: "+n; },18);
>c.m : Symbol(M.C.m, Decl(anonterface.ts, 1, 20))
diff --git a/testdata/baselines/reference/submodule/compiler/anonterface.types b/testdata/baselines/reference/submodule/compiler/anonterface.types
index 7427468484..9d50569455 100644
--- a/testdata/baselines/reference/submodule/compiler/anonterface.types
+++ b/testdata/baselines/reference/submodule/compiler/anonterface.types
@@ -1,7 +1,7 @@
//// [tests/cases/compiler/anonterface.ts] ////
=== anonterface.ts ===
-module M {
+namespace M {
>M : typeof M
export class C {
diff --git a/testdata/baselines/reference/submodule/compiler/anonymousClassDeclarationDoesntPrintWithReadonly.js.diff b/testdata/baselines/reference/submodule/compiler/anonymousClassDeclarationDoesntPrintWithReadonly.js.diff
index fea082a3df..12d65fe02e 100644
--- a/testdata/baselines/reference/submodule/compiler/anonymousClassDeclarationDoesntPrintWithReadonly.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/anonymousClassDeclarationDoesntPrintWithReadonly.js.diff
@@ -1,10 +1,47 @@
--- old.anonymousClassDeclarationDoesntPrintWithReadonly.js
+++ new.anonymousClassDeclarationDoesntPrintWithReadonly.js
-@@= skipped -14, +14 lines =@@
+@@= skipped -10, +10 lines =@@
+
+ //// [anonymousClassDeclarationDoesntPrintWithReadonly.js]
+ "use strict";
+-var __extends = (this && this.__extends) || (function () {
+- var extendStatics = function (d, b) {
+- extendStatics = Object.setPrototypeOf ||
+- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+- return extendStatics(d, b);
+- };
+- return function (d, b) {
+- if (typeof b !== "function" && b !== null)
+- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+- extendStatics(d, b);
+- function __() { this.constructor = d; }
+- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+- };
+-})();
+ Object.defineProperty(exports, "__esModule", { value: true });
exports.X = void 0;
exports.y = y;
- class X {
+-var X = /** @class */ (function () {
+- function X(a) {
++class X {
+ a;
- constructor(a) {
++ constructor(a) {
this.a = a;
- }
\ No newline at end of file
+ }
+- return X;
+-}());
++}
+ exports.X = X;
+ function y() {
+- return /** @class */ (function (_super) {
+- __extends(class_1, _super);
+- function class_1() {
+- return _super !== null && _super.apply(this, arguments) || this;
+- }
+- return class_1;
+- }(X));
++ return class extends X {
++ };
+ }
+
diff --git a/testdata/baselines/reference/submodule/compiler/anonymousClassExpression1.js.diff b/testdata/baselines/reference/submodule/compiler/anonymousClassExpression1.js.diff
new file mode 100644
index 0000000000..c0cb008daf
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/anonymousClassExpression1.js.diff
@@ -0,0 +1,14 @@
+--- old.anonymousClassExpression1.js
++++ new.anonymousClassExpression1.js
+@@= skipped -6, +6 lines =@@
+
+ //// [anonymousClassExpression1.js]
+ function f() {
+- return typeof /** @class */ (function () {
+- function class_1() {
+- }
+- return class_1;
+- }()) === "function";
++ return typeof class {
++ } === "function";
+ }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/anonymousClassExpression1.types.diff b/testdata/baselines/reference/submodule/compiler/anonymousClassExpression1.types.diff
new file mode 100644
index 0000000000..769c6a2a42
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/anonymousClassExpression1.types.diff
@@ -0,0 +1,11 @@
+--- old.anonymousClassExpression1.types
++++ new.anonymousClassExpression1.types
+@@= skipped -5, +5 lines =@@
+
+ return typeof class {} === "function";
+ >typeof class {} === "function" : boolean
+->typeof class {} : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
++>typeof class {} : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
+ >class {} : typeof (Anonymous class)
+ >"function" : "function"
+ }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/anonymousClassExpression2.js.diff b/testdata/baselines/reference/submodule/compiler/anonymousClassExpression2.js.diff
new file mode 100644
index 0000000000..03eef30d4b
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/anonymousClassExpression2.js.diff
@@ -0,0 +1,31 @@
+--- old.anonymousClassExpression2.js
++++ new.anonymousClassExpression2.js
+@@= skipped -24, +24 lines =@@
+ // note: repros with `while (0);` too
+ // but it's less inscrutable and more obvious to put it *inside* the loop
+ while (0) {
+- var A = /** @class */ (function () {
+- function A() {
+- }
+- A.prototype.methodA = function () {
++ class A {
++ methodA() {
+ this; //note: a this reference of some kind is required to trigger the bug
+- };
+- return A;
+- }());
+- var B = /** @class */ (function () {
+- function B() {
+ }
+- B.prototype.methodB = function () {
++ }
++ class B {
++ methodB() {
+ this.methodA; // error
+ this.methodB; // ok
+- };
+- return B;
+- }());
++ }
++ }
+ }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/anyAndUnknownHaveFalsyComponents.js.diff b/testdata/baselines/reference/submodule/compiler/anyAndUnknownHaveFalsyComponents.js.diff
new file mode 100644
index 0000000000..5ac4c9eb73
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/anyAndUnknownHaveFalsyComponents.js.diff
@@ -0,0 +1,18 @@
+--- old.anyAndUnknownHaveFalsyComponents.js
++++ new.anyAndUnknownHaveFalsyComponents.js
+@@= skipped -41, +41 lines =@@
+ };
+ return __assign.apply(this, arguments);
+ };
+-var y1 = x1 && 3;
++const y1 = x1 && 3;
+ function foo1() {
+ return __assign({ display: "block" }, (isTreeHeader1 && {
+ display: "flex",
+ }));
+ }
+-var y2 = x2 && 3;
++const y2 = x2 && 3;
+ function foo2() {
+ return __assign({ display: "block" }, (isTreeHeader1 && {
+ display: "flex",
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/anyDeclare.errors.txt b/testdata/baselines/reference/submodule/compiler/anyDeclare.errors.txt
index cfbb06ee70..2423c2c43c 100644
--- a/testdata/baselines/reference/submodule/compiler/anyDeclare.errors.txt
+++ b/testdata/baselines/reference/submodule/compiler/anyDeclare.errors.txt
@@ -4,7 +4,7 @@ anyDeclare.ts(4,14): error TS2300: Duplicate identifier 'myFn'.
==== anyDeclare.ts (2 errors) ====
declare var x: any;
- module myMod {
+ namespace myMod {
var myFn;
~~~~
!!! error TS2300: Duplicate identifier 'myFn'.
diff --git a/testdata/baselines/reference/submodule/compiler/anyDeclare.js b/testdata/baselines/reference/submodule/compiler/anyDeclare.js
index 295e93e72e..6e16859b59 100644
--- a/testdata/baselines/reference/submodule/compiler/anyDeclare.js
+++ b/testdata/baselines/reference/submodule/compiler/anyDeclare.js
@@ -2,7 +2,7 @@
//// [anyDeclare.ts]
declare var x: any;
-module myMod {
+namespace myMod {
var myFn;
function myFn() { }
}
diff --git a/testdata/baselines/reference/submodule/compiler/anyDeclare.symbols b/testdata/baselines/reference/submodule/compiler/anyDeclare.symbols
index 56d3e51027..fecba41fa2 100644
--- a/testdata/baselines/reference/submodule/compiler/anyDeclare.symbols
+++ b/testdata/baselines/reference/submodule/compiler/anyDeclare.symbols
@@ -4,7 +4,7 @@
declare var x: any;
>x : Symbol(x, Decl(anyDeclare.ts, 0, 11))
-module myMod {
+namespace myMod {
>myMod : Symbol(myMod, Decl(anyDeclare.ts, 0, 19))
var myFn;
diff --git a/testdata/baselines/reference/submodule/compiler/anyDeclare.types b/testdata/baselines/reference/submodule/compiler/anyDeclare.types
index e4a7c89ba1..5b802ab688 100644
--- a/testdata/baselines/reference/submodule/compiler/anyDeclare.types
+++ b/testdata/baselines/reference/submodule/compiler/anyDeclare.types
@@ -4,7 +4,7 @@
declare var x: any;
>x : any
-module myMod {
+namespace myMod {
>myMod : typeof myMod
var myFn;
diff --git a/testdata/baselines/reference/submodule/compiler/anyIdenticalToItself.js.diff b/testdata/baselines/reference/submodule/compiler/anyIdenticalToItself.js.diff
new file mode 100644
index 0000000000..64e5e74c65
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/anyIdenticalToItself.js.diff
@@ -0,0 +1,29 @@
+--- old.anyIdenticalToItself.js
++++ new.anyIdenticalToItself.js
+@@= skipped -15, +15 lines =@@
+
+ //// [anyIdenticalToItself.js]
+ function foo(x, y) { }
+-var C = /** @class */ (function () {
+- function C() {
+- }
+- Object.defineProperty(C.prototype, "X", {
+- get: function () {
+- var y;
+- return y;
+- },
+- set: function (v) {
+- },
+- enumerable: false,
+- configurable: true
+- });
+- return C;
+-}());
++class C {
++ get X() {
++ var y;
++ return y;
++ }
++ set X(v) {
++ }
++}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/anyInferenceAnonymousFunctions.js.diff b/testdata/baselines/reference/submodule/compiler/anyInferenceAnonymousFunctions.js.diff
new file mode 100644
index 0000000000..cadde7f29c
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/anyInferenceAnonymousFunctions.js.diff
@@ -0,0 +1,15 @@
+--- old.anyInferenceAnonymousFunctions.js
++++ new.anyInferenceAnonymousFunctions.js
+@@= skipped -23, +23 lines =@@
+ paired.reduce(function (a1, a2) {
+ return a1.concat({});
+ }, []);
+-paired.reduce(function (b1, b2) {
++paired.reduce((b1, b2) => {
+ return b1.concat({});
+ }, []);
+-paired.reduce(function (b3, b4) { return b3.concat({}); }, []);
+-paired.map(function (c1) { return c1.count; });
++paired.reduce((b3, b4) => b3.concat({}), []);
++paired.map((c1) => c1.count);
+ paired.map(function (c2) { return c2.count; });
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/argsInScope.js.diff b/testdata/baselines/reference/submodule/compiler/argsInScope.js.diff
new file mode 100644
index 0000000000..2c47da9455
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/argsInScope.js.diff
@@ -0,0 +1,22 @@
+--- old.argsInScope.js
++++ new.argsInScope.js
+@@= skipped -13, +13 lines =@@
+
+
+ //// [argsInScope.js]
+-var C = /** @class */ (function () {
+- function C() {
+- }
+- C.prototype.P = function (ii, j, k) {
++class C {
++ P(ii, j, k) {
+ for (var i = 0; i < arguments.length; i++) {
+ // WScript.Echo("param: " + arguments[i]);
+ }
+- };
+- return C;
+-}());
++ }
++}
+ var c = new C();
+ c.P(1, 2, 3);
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/argumentsAsPropertyName.js.diff b/testdata/baselines/reference/submodule/compiler/argumentsAsPropertyName.js.diff
new file mode 100644
index 0000000000..ec396e8ac2
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/argumentsAsPropertyName.js.diff
@@ -0,0 +1,18 @@
+--- old.argumentsAsPropertyName.js
++++ new.argumentsAsPropertyName.js
+@@= skipped -18, +18 lines =@@
+
+ //// [argumentsAsPropertyName.js]
+ function myFunction(myType) {
+- var _loop_1 = function (i) {
++ for (let i = 0; i < 10; i++) {
+ use(myType.arguments[i]);
+ // create closure so that tsc will turn loop body into function
+- var x = 5;
++ const x = 5;
+ [1, 2, 3].forEach(function (j) { use(x); });
+- };
+- for (var i = 0; i < 10; i++) {
+- _loop_1(i);
+ }
+ }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/argumentsAsPropertyName.symbols.diff b/testdata/baselines/reference/submodule/compiler/argumentsAsPropertyName.symbols.diff
new file mode 100644
index 0000000000..211c0d01fd
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/argumentsAsPropertyName.symbols.diff
@@ -0,0 +1,11 @@
+--- old.argumentsAsPropertyName.symbols
++++ new.argumentsAsPropertyName.symbols
+@@= skipped -6, +6 lines =@@
+
+ arguments: Array
+ >arguments : Symbol(arguments, Decl(argumentsAsPropertyName.ts, 1, 15))
+->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+ }
+
+ declare function use(s: any);
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/argumentsAsPropertyName2.js.diff b/testdata/baselines/reference/submodule/compiler/argumentsAsPropertyName2.js.diff
new file mode 100644
index 0000000000..12381631f4
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/argumentsAsPropertyName2.js.diff
@@ -0,0 +1,22 @@
+--- old.argumentsAsPropertyName2.js
++++ new.argumentsAsPropertyName2.js
+@@= skipped -16, +16 lines =@@
+ //// [argumentsAsPropertyName2.js]
+ // target: es5
+ function foo() {
+- var _loop_1 = function (x) {
+- var i;
++ for (let x = 0; x < 1; ++x) {
++ let i;
+ [].forEach(function () { i; });
+ ({ arguments: 0 });
+- ({ arguments: arguments_1 });
+- ({ arguments: arguments_1 });
+- };
+- var arguments_1 = arguments;
+- for (var x = 0; x < 1; ++x) {
+- _loop_1(x);
++ ({ arguments });
++ ({ arguments: arguments });
+ }
+ }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/argumentsObjectIterator01_ES5.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/argumentsObjectIterator01_ES5.errors.txt.diff
new file mode 100644
index 0000000000..4e6624a5d6
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/argumentsObjectIterator01_ES5.errors.txt.diff
@@ -0,0 +1,17 @@
+--- old.argumentsObjectIterator01_ES5.errors.txt
++++ new.argumentsObjectIterator01_ES5.errors.txt
+@@= skipped -0, +0 lines =@@
+-argumentsObjectIterator01_ES5.ts(3,21): error TS2802: Type 'IArguments' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher.
++argumentsObjectIterator01_ES5.ts(3,21): error TS2495: Type 'IArguments' is not an array type or a string type.
+
+
+ ==== argumentsObjectIterator01_ES5.ts (1 errors) ====
+@@= skipped -5, +5 lines =@@
+ let result = [];
+ for (let arg of arguments) {
+ ~~~~~~~~~
+-!!! error TS2802: Type 'IArguments' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher.
++!!! error TS2495: Type 'IArguments' is not an array type or a string type.
+ result.push(arg + arg);
+ }
+ return <[any, any, any]>result;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/argumentsObjectIterator01_ES5.js.diff b/testdata/baselines/reference/submodule/compiler/argumentsObjectIterator01_ES5.js.diff
new file mode 100644
index 0000000000..a471eefaf8
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/argumentsObjectIterator01_ES5.js.diff
@@ -0,0 +1,14 @@
+--- old.argumentsObjectIterator01_ES5.js
++++ new.argumentsObjectIterator01_ES5.js
+@@= skipped -10, +10 lines =@@
+
+ //// [argumentsObjectIterator01_ES5.js]
+ function doubleAndReturnAsArray(x, y, z) {
+- var result = [];
+- for (var _i = 0, arguments_1 = arguments; _i < arguments_1.length; _i++) {
+- var arg = arguments_1[_i];
++ let result = [];
++ for (let arg of arguments) {
+ result.push(arg + arg);
+ }
+ return result;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/argumentsObjectIterator02_ES5.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/argumentsObjectIterator02_ES5.errors.txt.diff
new file mode 100644
index 0000000000..06e834e642
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/argumentsObjectIterator02_ES5.errors.txt.diff
@@ -0,0 +1,20 @@
+--- old.argumentsObjectIterator02_ES5.errors.txt
++++ new.argumentsObjectIterator02_ES5.errors.txt
+@@= skipped -0, +0 lines =@@
+-argumentsObjectIterator02_ES5.ts(5,21): error TS2802: Type 'ArrayIterator' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher.
++argumentsObjectIterator02_ES5.ts(2,26): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
+
+
+ ==== argumentsObjectIterator02_ES5.ts (1 errors) ====
+ function doubleAndReturnAsArray(x: number, y: number, z: number): [number, number, number] {
+ let blah = arguments[Symbol.iterator];
++ ~~~~~~
++!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
+
+ let result = [];
+ for (let arg of blah()) {
+- ~~~~~~
+-!!! error TS2802: Type 'ArrayIterator' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher.
+ result.push(arg + arg);
+ }
+ return <[any, any, any]>result;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/argumentsObjectIterator02_ES5.js.diff b/testdata/baselines/reference/submodule/compiler/argumentsObjectIterator02_ES5.js.diff
new file mode 100644
index 0000000000..739d4bd153
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/argumentsObjectIterator02_ES5.js.diff
@@ -0,0 +1,16 @@
+--- old.argumentsObjectIterator02_ES5.js
++++ new.argumentsObjectIterator02_ES5.js
+@@= skipped -14, +14 lines =@@
+
+ //// [argumentsObjectIterator02_ES5.js]
+ function doubleAndReturnAsArray(x, y, z) {
+- var blah = arguments[Symbol.iterator];
+- var result = [];
+- for (var _i = 0, _a = blah(); _i < _a.length; _i++) {
+- var arg = _a[_i];
++ let blah = arguments[Symbol.iterator];
++ let result = [];
++ for (let arg of blah()) {
+ result.push(arg + arg);
+ }
+ return result;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/argumentsObjectIterator02_ES5.symbols.diff b/testdata/baselines/reference/submodule/compiler/argumentsObjectIterator02_ES5.symbols.diff
new file mode 100644
index 0000000000..6f8eac7933
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/argumentsObjectIterator02_ES5.symbols.diff
@@ -0,0 +1,12 @@
+--- old.argumentsObjectIterator02_ES5.symbols
++++ new.argumentsObjectIterator02_ES5.symbols
+@@= skipped -9, +9 lines =@@
+ let blah = arguments[Symbol.iterator];
+ >blah : Symbol(blah, Decl(argumentsObjectIterator02_ES5.ts, 1, 7))
+ >arguments : Symbol(arguments)
+->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --))
+->Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
+->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --))
+
+ let result = [];
+ >result : Symbol(result, Decl(argumentsObjectIterator02_ES5.ts, 3, 7))
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/argumentsObjectIterator02_ES5.types.diff b/testdata/baselines/reference/submodule/compiler/argumentsObjectIterator02_ES5.types.diff
new file mode 100644
index 0000000000..7db4eb52d4
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/argumentsObjectIterator02_ES5.types.diff
@@ -0,0 +1,31 @@
+--- old.argumentsObjectIterator02_ES5.types
++++ new.argumentsObjectIterator02_ES5.types
+@@= skipped -7, +7 lines =@@
+ >z : number
+
+ let blah = arguments[Symbol.iterator];
+->blah : () => ArrayIterator
+->arguments[Symbol.iterator] : () => ArrayIterator
++>blah : any
++>arguments[Symbol.iterator] : any
+ >arguments : IArguments
+->Symbol.iterator : unique symbol
+->Symbol : SymbolConstructor
+->iterator : unique symbol
++>Symbol.iterator : any
++>Symbol : any
++>iterator : any
+
+ let result = [];
+ >result : any[]
+@@= skipped -13, +13 lines =@@
+
+ for (let arg of blah()) {
+ >arg : any
+->blah() : ArrayIterator
+->blah : () => ArrayIterator
++>blah() : any
++>blah : any
+
+ result.push(arg + arg);
+ >result.push(arg + arg) : number
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/argumentsObjectIterator03_ES5.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/argumentsObjectIterator03_ES5.errors.txt.diff
new file mode 100644
index 0000000000..54e90f7cb1
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/argumentsObjectIterator03_ES5.errors.txt.diff
@@ -0,0 +1,16 @@
+--- old.argumentsObjectIterator03_ES5.errors.txt
++++ new.argumentsObjectIterator03_ES5.errors.txt
+@@= skipped -0, +0 lines =@@
+-argumentsObjectIterator03_ES5.ts(2,9): error TS2802: Type 'IArguments' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher.
++argumentsObjectIterator03_ES5.ts(2,9): error TS2461: Type 'IArguments' is not an array type.
+
+
+ ==== argumentsObjectIterator03_ES5.ts (1 errors) ====
+ function asReversedTuple(a: number, b: string, c: boolean): [boolean, string, number] {
+ let [x, y, z] = arguments;
+ ~~~~~~~~~
+-!!! error TS2802: Type 'IArguments' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher.
++!!! error TS2461: Type 'IArguments' is not an array type.
+
+ return [z, y, x];
+ }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/argumentsObjectIterator03_ES5.js.diff b/testdata/baselines/reference/submodule/compiler/argumentsObjectIterator03_ES5.js.diff
new file mode 100644
index 0000000000..5ae567ce07
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/argumentsObjectIterator03_ES5.js.diff
@@ -0,0 +1,10 @@
+--- old.argumentsObjectIterator03_ES5.js
++++ new.argumentsObjectIterator03_ES5.js
+@@= skipped -10, +10 lines =@@
+
+ //// [argumentsObjectIterator03_ES5.js]
+ function asReversedTuple(a, b, c) {
+- var x = arguments[0], y = arguments[1], z = arguments[2];
++ let [x, y, z] = arguments;
+ return [z, y, x];
+ }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/argumentsPropertyNameInJsMode1.js.diff b/testdata/baselines/reference/submodule/compiler/argumentsPropertyNameInJsMode1.js.diff
index 814809d520..f15918274e 100644
--- a/testdata/baselines/reference/submodule/compiler/argumentsPropertyNameInJsMode1.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/argumentsPropertyNameInJsMode1.js.diff
@@ -1,6 +1,19 @@
--- old.argumentsPropertyNameInJsMode1.js
+++ new.argumentsPropertyNameInJsMode1.js
-@@= skipped -22, +22 lines =@@
+@@= skipped -12, +12 lines =@@
+
+
+ //// [a.js]
+-var foo = {
+- f1: function (params) { }
++const foo = {
++ f1: (params) => { }
+ };
+ function f2(x) {
+- foo.f1({ x: x, arguments: [] });
++ foo.f1({ x, arguments: [] });
+ }
+ f2(1, 2, 3);
//// [a.d.ts]
diff --git a/testdata/baselines/reference/submodule/compiler/argumentsSpreadRestIterables(target=es5).errors.txt.diff b/testdata/baselines/reference/submodule/compiler/argumentsSpreadRestIterables(target=es5).errors.txt.diff
new file mode 100644
index 0000000000..371964c303
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/argumentsSpreadRestIterables(target=es5).errors.txt.diff
@@ -0,0 +1,72 @@
+--- old.argumentsSpreadRestIterables(target=es5).errors.txt
++++ new.argumentsSpreadRestIterables(target=es5).errors.txt
+@@= skipped -0, +0 lines =@@
+-argumentsSpreadRestIterables.tsx(3,28): error TS2802: Type 'Iterable' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher.
+-argumentsSpreadRestIterables.tsx(4,35): error TS2802: Type 'Iterable' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher.
+-argumentsSpreadRestIterables.tsx(5,41): error TS2802: Type 'Iterable' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher.
+-argumentsSpreadRestIterables.tsx(8,21): error TS2802: Type '"hello"' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher.
+-argumentsSpreadRestIterables.tsx(9,21): error TS2802: Type 'Iterable' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher.
+-argumentsSpreadRestIterables.tsx(10,27): error TS2802: Type '"hello"' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher.
+-argumentsSpreadRestIterables.tsx(11,27): error TS2802: Type 'Iterable' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher.
+-argumentsSpreadRestIterables.tsx(15,19): error TS2802: Type '"hello"' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher.
+-argumentsSpreadRestIterables.tsx(16,19): error TS2802: Type 'Iterable' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher.
+-argumentsSpreadRestIterables.tsx(17,25): error TS2802: Type '"hello"' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher.
+-argumentsSpreadRestIterables.tsx(18,25): error TS2802: Type 'Iterable' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher.
+-
+-
+-==== argumentsSpreadRestIterables.tsx (11 errors) ====
++argumentsSpreadRestIterables.tsx(1,22): error TS2304: Cannot find name 'Iterable'.
++argumentsSpreadRestIterables.tsx(8,21): error TS2461: Type '"hello"' is not an array type.
++argumentsSpreadRestIterables.tsx(10,27): error TS2461: Type '"hello"' is not an array type.
++argumentsSpreadRestIterables.tsx(15,19): error TS2461: Type '"hello"' is not an array type.
++argumentsSpreadRestIterables.tsx(17,25): error TS2461: Type '"hello"' is not an array type.
++
++
++==== argumentsSpreadRestIterables.tsx (5 errors) ====
+ declare const itNum: Iterable
++ ~~~~~~~~
++!!! error TS2304: Cannot find name 'Iterable'.
+
+ ;(function(...rest) {})(...itNum)
+- ~~~~~
+-!!! error TS2802: Type 'Iterable' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher.
+ ;(function(a, ...rest) {})('', ...itNum)
+- ~~~~~
+-!!! error TS2802: Type 'Iterable' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher.
+ ;(function(a, ...rest) {})('', true, ...itNum)
+- ~~~~~
+-!!! error TS2802: Type 'Iterable' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher.
+
+ declare function fn1(...args: T): T;
+ const res1 = fn1(..."hello");
+ ~~~~~~~
+-!!! error TS2802: Type '"hello"' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher.
++!!! error TS2461: Type '"hello"' is not an array type.
+ const res2 = fn1(...itNum);
+- ~~~~~
+-!!! error TS2802: Type 'Iterable' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher.
+ const res3 = fn1(true, ..."hello");
+ ~~~~~~~
+-!!! error TS2802: Type '"hello"' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher.
++!!! error TS2461: Type '"hello"' is not an array type.
+ const res4 = fn1(true, ...itNum);
+- ~~~~~
+-!!! error TS2802: Type 'Iterable' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher.
+
+ // repro from #52781
+ declare function foo(...args: T): T;
+ const p1 = foo(..."hello");
+ ~~~~~~~
+-!!! error TS2802: Type '"hello"' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher.
++!!! error TS2461: Type '"hello"' is not an array type.
+ const p2 = foo(...itNum);
+- ~~~~~
+-!!! error TS2802: Type 'Iterable' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher.
+ const p3 = foo(true, ..."hello");
+ ~~~~~~~
+-!!! error TS2802: Type '"hello"' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher.
++!!! error TS2461: Type '"hello"' is not an array type.
+ const p4 = foo(true, ...itNum);
+- ~~~~~
+-!!! error TS2802: Type 'Iterable' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher.
+
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/argumentsSpreadRestIterables(target=es5).symbols.diff b/testdata/baselines/reference/submodule/compiler/argumentsSpreadRestIterables(target=es5).symbols.diff
new file mode 100644
index 0000000000..6a68b3a9c9
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/argumentsSpreadRestIterables(target=es5).symbols.diff
@@ -0,0 +1,11 @@
+--- old.argumentsSpreadRestIterables(target=es5).symbols
++++ new.argumentsSpreadRestIterables(target=es5).symbols
+@@= skipped -2, +2 lines =@@
+ === argumentsSpreadRestIterables.tsx ===
+ declare const itNum: Iterable
+ >itNum : Symbol(itNum, Decl(argumentsSpreadRestIterables.tsx, 0, 13))
+->Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --))
++>Iterable : Symbol(Iterable)
+
+ ;(function(...rest) {})(...itNum)
+ >rest : Symbol(rest, Decl(argumentsSpreadRestIterables.tsx, 2, 11))
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/argumentsSpreadRestIterables(target=es5).types.diff b/testdata/baselines/reference/submodule/compiler/argumentsSpreadRestIterables(target=es5).types.diff
new file mode 100644
index 0000000000..09e1f8f299
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/argumentsSpreadRestIterables(target=es5).types.diff
@@ -0,0 +1,102 @@
+--- old.argumentsSpreadRestIterables(target=es5).types
++++ new.argumentsSpreadRestIterables(target=es5).types
+@@= skipped -5, +5 lines =@@
+
+ ;(function(...rest) {})(...itNum)
+ >(function(...rest) {})(...itNum) : void
+->(function(...rest) {}) : (...rest: any[]) => void
+->function(...rest) {} : (...rest: any[]) => void
+->rest : any[]
+->...itNum : any
++>(function(...rest) {}) : (...rest: Iterable) => void
++>function(...rest) {} : (...rest: Iterable) => void
++>rest : Iterable
++>...itNum : Iterable
+ >itNum : Iterable
+
+ ;(function(a, ...rest) {})('', ...itNum)
+ >(function(a, ...rest) {})('', ...itNum) : void
+->(function(a, ...rest) {}) : (a: string, ...rest: any[]) => void
+->function(a, ...rest) {} : (a: string, ...rest: any[]) => void
++>(function(a, ...rest) {}) : (a: string, ...rest: Iterable) => void
++>function(a, ...rest) {} : (a: string, ...rest: Iterable) => void
+ >a : string
+->rest : any[]
++>rest : Iterable
+ >'' : ""
+->...itNum : any
++>...itNum : Iterable
+ >itNum : Iterable
+
+ ;(function(a, ...rest) {})('', true, ...itNum)
+ >(function(a, ...rest) {})('', true, ...itNum) : void
+->(function(a, ...rest) {}) : (a: string, rest_0: boolean, ...rest: any[]) => void
+->function(a, ...rest) {} : (a: string, rest_0: boolean, ...rest: any[]) => void
++>(function(a, ...rest) {}) : (a: string, rest_0: boolean, ...rest: Iterable[]) => void
++>function(a, ...rest) {} : (a: string, rest_0: boolean, ...rest: Iterable[]) => void
+ >a : string
+->rest : [boolean, ...any[]]
++>rest : [boolean, ...Iterable[]]
+ >'' : ""
+ >true : true
+->...itNum : any
++>...itNum : Iterable
+ >itNum : Iterable
+
+ declare function fn1(...args: T): T;
+@@= skipped -39, +39 lines =@@
+ >"hello" : "hello"
+
+ const res2 = fn1(...itNum);
+->res2 : readonly any[]
+->fn1(...itNum) : readonly any[]
++>res2 : Iterable
++>fn1(...itNum) : Iterable
+ >fn1 : (...args: T) => T
+->...itNum : any
++>...itNum : Iterable
+ >itNum : Iterable
+
+ const res3 = fn1(true, ..."hello");
+@@= skipped -15, +15 lines =@@
+ >"hello" : "hello"
+
+ const res4 = fn1(true, ...itNum);
+->res4 : readonly [true, ...any[]]
+->fn1(true, ...itNum) : readonly [true, ...any[]]
++>res4 : readonly [true, ...Iterable[]]
++>fn1(true, ...itNum) : readonly [true, ...Iterable[]]
+ >fn1 : (...args: T) => T
+ >true : true
+->...itNum : any
++>...itNum : Iterable
+ >itNum : Iterable
+
+ // repro from #52781
+@@= skipped -20, +20 lines =@@
+ >"hello" : "hello"
+
+ const p2 = foo(...itNum);
+->p2 : any[]
+->foo(...itNum) : any[]
++>p2 : Iterable
++>foo(...itNum) : Iterable
+ >foo : (...args: T) => T
+->...itNum : any
++>...itNum : Iterable
+ >itNum : Iterable
+
+ const p3 = foo(true, ..."hello");
+@@= skipped -15, +15 lines =@@
+ >"hello" : "hello"
+
+ const p4 = foo(true, ...itNum);
+->p4 : [boolean, ...any[]]
+->foo(true, ...itNum) : [boolean, ...any[]]
++>p4 : [boolean, ...Iterable[]]
++>foo(true, ...itNum) : [boolean, ...Iterable[]]
+ >foo : (...args: T) => T
+ >true : true
+->...itNum : any
++>...itNum : Iterable
+ >itNum : Iterable
diff --git a/testdata/baselines/reference/submodule/compiler/argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.errors.txt.diff
new file mode 100644
index 0000000000..6a6757650d
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.errors.txt.diff
@@ -0,0 +1,27 @@
+--- old.argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.errors.txt
++++ new.argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.errors.txt
+@@= skipped -4, +4 lines =@@
+ argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.ts(33,16): error TS2815: 'arguments' cannot be referenced in property initializers or class static initialization blocks.
+ argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.ts(40,7): error TS2815: 'arguments' cannot be referenced in property initializers or class static initialization blocks.
+ argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.ts(42,16): error TS2815: 'arguments' cannot be referenced in property initializers or class static initialization blocks.
++argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.ts(66,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
+ argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.ts(75,7): error TS2815: 'arguments' cannot be referenced in property initializers or class static initialization blocks.
+ argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.ts(77,9): error TS2815: 'arguments' cannot be referenced in property initializers or class static initialization blocks.
+ argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.ts(96,26): error TS2815: 'arguments' cannot be referenced in property initializers or class static initialization blocks.
+ argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.ts(102,15): error TS2815: 'arguments' cannot be referenced in property initializers or class static initialization blocks.
+
+
+-==== argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.ts (11 errors) ====
++==== argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.ts (12 errors) ====
+ function A() {
+ return class T {
+ a = arguments
+@@= skipped -87, +88 lines =@@
+ arguments; // ok
+ }
+ [Symbol.iterator]() {
++ ~~~~~~
++!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
+ arguments; // ok
+ }
+ }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.js.diff b/testdata/baselines/reference/submodule/compiler/argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.js.diff
index da291e63c7..87276ed32b 100644
--- a/testdata/baselines/reference/submodule/compiler/argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.js.diff
@@ -1,87 +1,150 @@
--- old.argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.js
+++ new.argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.js
-@@= skipped -117, +117 lines =@@
+@@= skipped -116, +116 lines =@@
+
//// [argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.js]
function A() {
- return class T {
-- constructor() {
+- return /** @class */ (function () {
+- function T() {
- this.a = arguments;
- }
+- return T;
+- }());
++ return class T {
+ a = arguments;
- };
++ };
}
function A1() {
- return new class T {
-- constructor() {
+- return new /** @class */ (function () {
+- function T() {
- this.a = arguments;
- }
+- return T;
+- }());
++ return new class T {
+ a = arguments;
- };
++ };
}
function B() {
- return class T {
-- constructor() {
+- return /** @class */ (function () {
+- function T() {
- this.a = { b: arguments };
- }
+- return T;
+- }());
++ return class T {
+ a = { b: arguments };
- };
++ };
}
function B1() {
- return new class T {
-- constructor() {
+- return new /** @class */ (function () {
+- function T() {
- this.a = { b: arguments };
- }
+- return T;
+- }());
++ return new class T {
+ a = { b: arguments };
- };
++ };
}
function C() {
- return class T {
-- constructor() {
+- return /** @class */ (function () {
+- function T() {
- this.a = function () { arguments; };
- }
+- return T;
+- }());
++ return class T {
+ a = function () { arguments; };
- };
++ };
}
function D() {
- return class T {
-- constructor() {
-- this.a = () => arguments; // should error
+- return /** @class */ (function () {
+- function T() {
+- this.a = function () { return arguments; }; // should error
- }
+- return T;
+- }());
++ return class T {
+ a = () => arguments; // should error
- };
++ };
}
function D1() {
- return class T {
-- constructor() {
-- this.a = () => {
+- return /** @class */ (function () {
+- function T() {
+- this.a = function () {
- arguments; // should error
-- const b = () => {
+- var b = function () {
- return arguments; // should error
- };
- function f() {
- return arguments; // ok
- }
++ return class T {
+ a = () => {
+ arguments; // should error
+ const b = () => {
+ return arguments; // should error
};
- }
+- return T;
+- }());
+-}
+-function D2() {
+- return /** @class */ (function () {
+- function class_1() {
+- arguments; // ok
+- }
+- Object.defineProperty(class_1.prototype, "foo", {
+- get: function () {
+ function f() {
-+ return arguments; // ok
+ return arguments; // ok
+- },
+- set: function (foo) {
+- arguments; // ok
+- },
+- enumerable: false,
+- configurable: true
+- });
+- class_1.prototype.bar = function () {
+- arguments; // ok
+- };
+- class_1.prototype[Symbol.iterator] = function () {
+- arguments; // ok
+- };
+- return class_1;
+- }());
+ }
+ };
- };
- }
- function D2() {
-@@= skipped -75, +61 lines =@@
- };
++ };
++}
++function D2() {
++ return class {
++ constructor() {
++ arguments; // ok
++ }
++ get foo() {
++ return arguments; // ok
++ }
++ set foo(foo) {
++ arguments; // ok
++ }
++ bar() {
++ arguments; // ok
++ }
++ [Symbol.iterator]() {
++ arguments; // ok
++ }
++ };
}
function D3() {
- var _a;
-- return _a = class T {
-- },
-- (() => {
+- return _a = /** @class */ (function () {
+- function T() {
+- }
+- return T;
+- }()),
+- (function () {
+ return class T {
+ static {
arguments; // should error
@@ -95,9 +158,12 @@
}
function D4() {
- var _a;
-- return _a = class T {
-- },
-- (() => {
+- return _a = /** @class */ (function () {
+- function T() {
+- }
+- return T;
+- }()),
+- (function () {
+ return class T {
+ static {
function f() {
@@ -109,19 +175,39 @@
+ };
}
function D5() {
- return class T {
-- constructor() {
-- this.a = (() => { return arguments; })(); // should error
+- return /** @class */ (function () {
+- function T() {
+- this.a = (function () { return arguments; })(); // should error
- }
+- return T;
+- }());
++ return class T {
+ a = (() => { return arguments; })(); // should error
- };
++ };
}
function D6() {
- return class T {
-- constructor() {
-- this.a = (x = arguments) => { }; // should error
+- return /** @class */ (function () {
+- function T() {
+- this.a = function (x) {
+- if (x === void 0) { x = arguments; }
+- }; // should error
- }
+- return T;
+- }());
++ return class T {
+ a = (x = arguments) => { }; // should error
- };
++ };
}
- function D7() {
\ No newline at end of file
+ function D7() {
+- return /** @class */ (function () {
+- function T() {
++ return class T {
++ a(x = arguments) {
+ }
+- T.prototype.a = function (x) {
+- if (x === void 0) { x = arguments; }
+- };
+- return T;
+- }());
++ };
+ }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.symbols.diff b/testdata/baselines/reference/submodule/compiler/argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.symbols.diff
new file mode 100644
index 0000000000..05947c8337
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.symbols.diff
@@ -0,0 +1,12 @@
+--- old.argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.symbols
++++ new.argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.symbols
+@@= skipped -132, +132 lines =@@
+ }
+ [Symbol.iterator]() {
+ >[Symbol.iterator] : Symbol((Anonymous class)[Symbol.iterator], Decl(argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.ts, 64, 5))
+->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --))
+->Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
+->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --))
+
+ arguments; // ok
+ >arguments : Symbol(arguments)
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.types.diff b/testdata/baselines/reference/submodule/compiler/argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.types.diff
index e820f62202..1cdedaa21c 100644
--- a/testdata/baselines/reference/submodule/compiler/argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.types.diff
+++ b/testdata/baselines/reference/submodule/compiler/argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.types.diff
@@ -1,65 +1,15 @@
--- old.argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.types
+++ new.argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.types
-@@= skipped -80, +80 lines =@@
- >T : typeof T
-
- a = () => arguments // should error
-->a : () => IArguments
-->() => arguments : () => IArguments
-->arguments : IArguments
-+>a : () => any
-+>() => arguments : () => any
-+>arguments : any
- }
- }
-
-@@= skipped -18, +18 lines =@@
- >() => { arguments; // should error const b = () => { return arguments; // should error } function f() { return arguments; // ok } } : () => void
-
- arguments; // should error
-->arguments : IArguments
-+>arguments : any
-
- const b = () => {
-->b : () => IArguments
-->() => { return arguments; // should error } : () => IArguments
-+>b : () => any
-+>() => { return arguments; // should error } : () => any
-
- return arguments; // should error
-->arguments : IArguments
-+>arguments : any
- }
-
- function f() {
-@@= skipped -109, +109 lines =@@
- >T : typeof T
-
- a = (() => { return arguments; })() // should error
-->a : IArguments
-->(() => { return arguments; })() : IArguments
-->(() => { return arguments; }) : () => IArguments
-->() => { return arguments; } : () => IArguments
-->arguments : IArguments
-+>a : any
-+>(() => { return arguments; })() : any
-+>(() => { return arguments; }) : () => any
-+>() => { return arguments; } : () => any
-+>arguments : any
- }
- }
-
-@@= skipped -16, +16 lines =@@
- >T : typeof T
-
- a = (x = arguments) => {} // should error
-->a : (x?: IArguments) => void
-->(x = arguments) => {} : (x?: IArguments) => void
-->x : IArguments
-->arguments : IArguments
-+>a : (x?: any) => void
-+>(x = arguments) => {} : (x?: any) => void
-+>x : any
-+>arguments : any
- }
- }
+@@= skipped -149, +149 lines =@@
+ }
+ [Symbol.iterator]() {
+ >[Symbol.iterator] : () => void
+->Symbol.iterator : unique symbol
+->Symbol : SymbolConstructor
+->iterator : unique symbol
++>Symbol.iterator : any
++>Symbol : any
++>iterator : any
+
+ arguments; // ok
+ >arguments : IArguments
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/argumentsUsedInObjectLiteralProperty.js.diff b/testdata/baselines/reference/submodule/compiler/argumentsUsedInObjectLiteralProperty.js.diff
new file mode 100644
index 0000000000..dd13a0c4b0
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/argumentsUsedInObjectLiteralProperty.js.diff
@@ -0,0 +1,20 @@
+--- old.argumentsUsedInObjectLiteralProperty.js
++++ new.argumentsUsedInObjectLiteralProperty.js
+@@= skipped -9, +9 lines =@@
+ }
+
+ //// [argumentsUsedInObjectLiteralProperty.js]
+-var A = /** @class */ (function () {
+- function A() {
+- }
+- A.createSelectableViewModel = function (initialState, selectedValue) {
++class A {
++ static createSelectableViewModel(initialState, selectedValue) {
+ return {
+ selectedValue: arguments.length
+ };
+- };
+- return A;
+-}());
++ }
++}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arithAssignTyping.js.diff b/testdata/baselines/reference/submodule/compiler/arithAssignTyping.js.diff
new file mode 100644
index 0000000000..ca83d07896
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/arithAssignTyping.js.diff
@@ -0,0 +1,16 @@
+--- old.arithAssignTyping.js
++++ new.arithAssignTyping.js
+@@= skipped -16, +16 lines =@@
+ f ^= 1; // error
+
+ //// [arithAssignTyping.js]
+-var f = /** @class */ (function () {
+- function f() {
+- }
+- return f;
+-}());
++class f {
++}
+ f += ''; // error
+ f += 1; // error
+ f -= 1; // error
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arityErrorRelatedSpanBindingPattern.js.diff b/testdata/baselines/reference/submodule/compiler/arityErrorRelatedSpanBindingPattern.js.diff
new file mode 100644
index 0000000000..f6e5f0a5a2
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/arityErrorRelatedSpanBindingPattern.js.diff
@@ -0,0 +1,16 @@
+--- old.arityErrorRelatedSpanBindingPattern.js
++++ new.arityErrorRelatedSpanBindingPattern.js
+@@= skipped -10, +10 lines =@@
+
+
+ //// [arityErrorRelatedSpanBindingPattern.js]
+-function foo(a, b, _a) {
+- var c = _a.c;
+-}
+-function bar(a, b, _a) {
+- var c = _a[0];
+-}
++function foo(a, b, { c }) { }
++function bar(a, b, [c]) { }
+ foo("", 0);
+ bar("", 0);
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest1.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest1.errors.txt.diff
new file mode 100644
index 0000000000..2ba1222fca
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest1.errors.txt.diff
@@ -0,0 +1,85 @@
+--- old.arrayAssignmentTest1.errors.txt
++++ new.arrayAssignmentTest1.errors.txt
+@@= skipped -0, +0 lines =@@
+ arrayAssignmentTest1.ts(46,5): error TS2741: Property 'IM1' is missing in type 'undefined[]' but required in type 'I1'.
+ arrayAssignmentTest1.ts(47,5): error TS2739: Type 'undefined[]' is missing the following properties from type 'C1': IM1, C1M1
+-arrayAssignmentTest1.ts(48,5): error TS2739: Type 'undefined[]' is missing the following properties from type 'C2': C2M1, IM1, C1M1
++arrayAssignmentTest1.ts(48,5): error TS2739: Type 'undefined[]' is missing the following properties from type 'C2': IM1, C1M1, C2M1
+ arrayAssignmentTest1.ts(49,5): error TS2741: Property 'CM3M1' is missing in type 'undefined[]' but required in type 'C3'.
+ arrayAssignmentTest1.ts(60,1): error TS2322: Type 'C3[]' is not assignable to type 'I1[]'.
+ Property 'IM1' is missing in type 'C3' but required in type 'I1'.
+@@= skipped -10, +10 lines =@@
+ arrayAssignmentTest1.ts(68,1): error TS2322: Type 'C1[]' is not assignable to type 'C2[]'.
+ Property 'C2M1' is missing in type 'C1' but required in type 'C2'.
+ arrayAssignmentTest1.ts(69,1): error TS2322: Type 'I1[]' is not assignable to type 'C2[]'.
+- Type 'I1' is missing the following properties from type 'C2': C2M1, C1M1
++ Type 'I1' is missing the following properties from type 'C2': C1M1, C2M1
+ arrayAssignmentTest1.ts(70,1): error TS2322: Type 'C3[]' is not assignable to type 'C2[]'.
+- Type 'C3' is missing the following properties from type 'C2': C2M1, IM1, C1M1
++ Type 'C3' is missing the following properties from type 'C2': IM1, C1M1, C2M1
+ arrayAssignmentTest1.ts(75,1): error TS2322: Type 'C2[]' is not assignable to type 'C3[]'.
+ Property 'CM3M1' is missing in type 'C2' but required in type 'C3'.
+ arrayAssignmentTest1.ts(76,1): error TS2322: Type 'C1[]' is not assignable to type 'C3[]'.
+@@= skipped -10, +10 lines =@@
+ arrayAssignmentTest1.ts(77,1): error TS2322: Type 'I1[]' is not assignable to type 'C3[]'.
+ Property 'CM3M1' is missing in type 'I1' but required in type 'C3'.
+ arrayAssignmentTest1.ts(79,1): error TS2322: Type '() => C1' is not assignable to type 'any[]'.
+-arrayAssignmentTest1.ts(80,1): error TS2740: Type '{ one: number; }' is missing the following properties from type 'any[]': length, pop, push, concat, and 25 more.
+-arrayAssignmentTest1.ts(82,1): error TS2740: Type 'C1' is missing the following properties from type 'any[]': length, pop, push, concat, and 25 more.
+-arrayAssignmentTest1.ts(83,1): error TS2740: Type 'C2' is missing the following properties from type 'any[]': length, pop, push, concat, and 25 more.
+-arrayAssignmentTest1.ts(84,1): error TS2740: Type 'C3' is missing the following properties from type 'any[]': length, pop, push, concat, and 25 more.
+-arrayAssignmentTest1.ts(85,1): error TS2740: Type 'I1' is missing the following properties from type 'any[]': length, pop, push, concat, and 25 more.
++arrayAssignmentTest1.ts(80,1): error TS2740: Type '{ one: number; }' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more.
++arrayAssignmentTest1.ts(82,1): error TS2740: Type 'C1' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more.
++arrayAssignmentTest1.ts(83,1): error TS2740: Type 'C2' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more.
++arrayAssignmentTest1.ts(84,1): error TS2740: Type 'C3' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more.
++arrayAssignmentTest1.ts(85,1): error TS2740: Type 'I1' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more.
+
+
+ ==== arrayAssignmentTest1.ts (19 errors) ====
+@@= skipped -62, +62 lines =@@
+ !!! error TS2739: Type 'undefined[]' is missing the following properties from type 'C1': IM1, C1M1
+ var c2_error: C2 = []; // should be an error - is
+ ~~~~~~~~
+-!!! error TS2739: Type 'undefined[]' is missing the following properties from type 'C2': C2M1, IM1, C1M1
++!!! error TS2739: Type 'undefined[]' is missing the following properties from type 'C2': IM1, C1M1, C2M1
+ var c3_error: C3 = []; // should be an error - is
+ ~~~~~~~~
+ !!! error TS2741: Property 'CM3M1' is missing in type 'undefined[]' but required in type 'C3'.
+@@= skipped -42, +42 lines =@@
+ arr_c2 = arr_i1; // should be an error - subtype relationship - is
+ ~~~~~~
+ !!! error TS2322: Type 'I1[]' is not assignable to type 'C2[]'.
+-!!! error TS2322: Type 'I1' is missing the following properties from type 'C2': C2M1, C1M1
++!!! error TS2322: Type 'I1' is missing the following properties from type 'C2': C1M1, C2M1
+ arr_c2 = arr_c3; // should be an error - is
+ ~~~~~~
+ !!! error TS2322: Type 'C3[]' is not assignable to type 'C2[]'.
+-!!! error TS2322: Type 'C3' is missing the following properties from type 'C2': C2M1, IM1, C1M1
++!!! error TS2322: Type 'C3' is missing the following properties from type 'C2': IM1, C1M1, C2M1
+
+ // "clean up bug" occurs at this point
+ // if you move these three expressions to another file, they raise an error
+@@= skipped -30, +30 lines =@@
+ !!! error TS2322: Type '() => C1' is not assignable to type 'any[]'.
+ arr_any = o1; // should be an error - is
+ ~~~~~~~
+-!!! error TS2740: Type '{ one: number; }' is missing the following properties from type 'any[]': length, pop, push, concat, and 25 more.
++!!! error TS2740: Type '{ one: number; }' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more.
+ arr_any = a1; // should be ok - is
+ arr_any = c1; // should be an error - is
+ ~~~~~~~
+-!!! error TS2740: Type 'C1' is missing the following properties from type 'any[]': length, pop, push, concat, and 25 more.
++!!! error TS2740: Type 'C1' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more.
+ arr_any = c2; // should be an error - is
+ ~~~~~~~
+-!!! error TS2740: Type 'C2' is missing the following properties from type 'any[]': length, pop, push, concat, and 25 more.
++!!! error TS2740: Type 'C2' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more.
+ arr_any = c3; // should be an error - is
+ ~~~~~~~
+-!!! error TS2740: Type 'C3' is missing the following properties from type 'any[]': length, pop, push, concat, and 25 more.
++!!! error TS2740: Type 'C3' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more.
+ arr_any = i1; // should be an error - is
+ ~~~~~~~
+-!!! error TS2740: Type 'I1' is missing the following properties from type 'any[]': length, pop, push, concat, and 25 more.
++!!! error TS2740: Type 'I1' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more.
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest1.js.diff b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest1.js.diff
new file mode 100644
index 0000000000..1b8626d7a1
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest1.js.diff
@@ -0,0 +1,55 @@
+--- old.arrayAssignmentTest1.js
++++ new.arrayAssignmentTest1.js
+@@= skipped -87, +87 lines =@@
+ arr_any = i1; // should be an error - is
+
+ //// [arrayAssignmentTest1.js]
+-var __extends = (this && this.__extends) || (function () {
+- var extendStatics = function (d, b) {
+- extendStatics = Object.setPrototypeOf ||
+- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+- return extendStatics(d, b);
+- };
+- return function (d, b) {
+- if (typeof b !== "function" && b !== null)
+- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+- extendStatics(d, b);
+- function __() { this.constructor = d; }
+- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+- };
+-})();
+-var C1 = /** @class */ (function () {
+- function C1() {
+- }
+- C1.prototype.IM1 = function () { return null; };
+- C1.prototype.C1M1 = function () { return null; };
+- return C1;
+-}());
+-var C2 = /** @class */ (function (_super) {
+- __extends(C2, _super);
+- function C2() {
+- return _super !== null && _super.apply(this, arguments) || this;
+- }
+- C2.prototype.C2M1 = function () { return null; };
+- return C2;
+-}(C1));
+-var C3 = /** @class */ (function () {
+- function C3() {
+- }
+- C3.prototype.CM3M1 = function () { return 3; };
+- return C3;
+-}());
++class C1 {
++ IM1() { return null; }
++ C1M1() { return null; }
++}
++class C2 extends C1 {
++ C2M1() { return null; }
++}
++class C3 {
++ CM3M1() { return 3; }
++}
+ /*
+
+ This behaves unexpectedly with the following types:
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest2.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest2.errors.txt.diff
new file mode 100644
index 0000000000..d74aa3f315
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest2.errors.txt.diff
@@ -0,0 +1,43 @@
+--- old.arrayAssignmentTest2.errors.txt
++++ new.arrayAssignmentTest2.errors.txt
+@@= skipped -5, +5 lines =@@
+ Property 'CM3M1' is missing in type 'I1' but required in type 'C3'.
+ arrayAssignmentTest2.ts(51,1): error TS2322: Type '() => C1' is not assignable to type 'any[]'.
+ arrayAssignmentTest2.ts(52,1): error TS2322: Type '() => any' is not assignable to type 'any[]'.
+-arrayAssignmentTest2.ts(53,1): error TS2740: Type '{ one: number; }' is missing the following properties from type 'any[]': length, pop, push, concat, and 25 more.
+-arrayAssignmentTest2.ts(55,1): error TS2740: Type 'C1' is missing the following properties from type 'any[]': length, pop, push, concat, and 25 more.
+-arrayAssignmentTest2.ts(56,1): error TS2740: Type 'C2' is missing the following properties from type 'any[]': length, pop, push, concat, and 25 more.
+-arrayAssignmentTest2.ts(57,1): error TS2740: Type 'C3' is missing the following properties from type 'any[]': length, pop, push, concat, and 25 more.
+-arrayAssignmentTest2.ts(58,1): error TS2740: Type 'I1' is missing the following properties from type 'any[]': length, pop, push, concat, and 25 more.
++arrayAssignmentTest2.ts(53,1): error TS2740: Type '{ one: number; }' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more.
++arrayAssignmentTest2.ts(55,1): error TS2740: Type 'C1' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more.
++arrayAssignmentTest2.ts(56,1): error TS2740: Type 'C2' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more.
++arrayAssignmentTest2.ts(57,1): error TS2740: Type 'C3' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more.
++arrayAssignmentTest2.ts(58,1): error TS2740: Type 'I1' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more.
+
+
+ ==== arrayAssignmentTest2.ts (10 errors) ====
+@@= skipped -78, +78 lines =@@
+ !!! error TS2322: Type '() => any' is not assignable to type 'any[]'.
+ arr_any = o1; // should be an error - is
+ ~~~~~~~
+-!!! error TS2740: Type '{ one: number; }' is missing the following properties from type 'any[]': length, pop, push, concat, and 25 more.
++!!! error TS2740: Type '{ one: number; }' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more.
+ arr_any = a1; // should be ok - is
+ arr_any = c1; // should be an error - is
+ ~~~~~~~
+-!!! error TS2740: Type 'C1' is missing the following properties from type 'any[]': length, pop, push, concat, and 25 more.
++!!! error TS2740: Type 'C1' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more.
+ arr_any = c2; // should be an error - is
+ ~~~~~~~
+-!!! error TS2740: Type 'C2' is missing the following properties from type 'any[]': length, pop, push, concat, and 25 more.
++!!! error TS2740: Type 'C2' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more.
+ arr_any = c3; // should be an error - is
+ ~~~~~~~
+-!!! error TS2740: Type 'C3' is missing the following properties from type 'any[]': length, pop, push, concat, and 25 more.
++!!! error TS2740: Type 'C3' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more.
+ arr_any = i1; // should be an error - is
+ ~~~~~~~
+-!!! error TS2740: Type 'I1' is missing the following properties from type 'any[]': length, pop, push, concat, and 25 more.
++!!! error TS2740: Type 'I1' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more.
+
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest2.js.diff b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest2.js.diff
new file mode 100644
index 0000000000..20c0f401e0
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest2.js.diff
@@ -0,0 +1,55 @@
+--- old.arrayAssignmentTest2.js
++++ new.arrayAssignmentTest2.js
+@@= skipped -61, +61 lines =@@
+
+
+ //// [arrayAssignmentTest2.js]
+-var __extends = (this && this.__extends) || (function () {
+- var extendStatics = function (d, b) {
+- extendStatics = Object.setPrototypeOf ||
+- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+- return extendStatics(d, b);
+- };
+- return function (d, b) {
+- if (typeof b !== "function" && b !== null)
+- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+- extendStatics(d, b);
+- function __() { this.constructor = d; }
+- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+- };
+-})();
+-var C1 = /** @class */ (function () {
+- function C1() {
+- }
+- C1.prototype.IM1 = function () { return null; };
+- C1.prototype.C1M1 = function () { return null; };
+- return C1;
+-}());
+-var C2 = /** @class */ (function (_super) {
+- __extends(C2, _super);
+- function C2() {
+- return _super !== null && _super.apply(this, arguments) || this;
+- }
+- C2.prototype.C2M1 = function () { return null; };
+- return C2;
+-}(C1));
+-var C3 = /** @class */ (function () {
+- function C3() {
+- }
+- C3.prototype.CM3M1 = function () { return 3; };
+- return C3;
+-}());
++class C1 {
++ IM1() { return null; }
++ C1M1() { return null; }
++}
++class C2 extends C1 {
++ C2M1() { return null; }
++}
++class C3 {
++ CM3M1() { return 3; }
++}
+ /*
+
+ This behaves unexpectedly with the following types:
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest3.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest3.errors.txt.diff
index 1503b565a1..b4d741b5e3 100644
--- a/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest3.errors.txt.diff
+++ b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest3.errors.txt.diff
@@ -2,7 +2,7 @@
+++ new.arrayAssignmentTest3.errors.txt
@@= skipped -0, +0 lines =@@
-arrayAssignmentTest3.ts(12,25): error TS2345: Argument of type 'B' is not assignable to parameter of type 'B[]'.
-- Type 'B' is missing the following properties from type 'B[]': length, pop, push, concat, and 16 more.
+- Type 'B' is missing the following properties from type 'B[]': length, pop, push, concat, and 25 more.
+arrayAssignmentTest3.ts(12,25): error TS2740: Type 'B' is missing the following properties from type 'B[]': length, pop, push, concat, and 16 more.
@@ -12,7 +12,7 @@
var xx = new a(null, 7, new B());
~~~~~~~
-!!! error TS2345: Argument of type 'B' is not assignable to parameter of type 'B[]'.
--!!! error TS2345: Type 'B' is missing the following properties from type 'B[]': length, pop, push, concat, and 16 more.
+-!!! error TS2345: Type 'B' is missing the following properties from type 'B[]': length, pop, push, concat, and 25 more.
+!!! error TS2740: Type 'B' is missing the following properties from type 'B[]': length, pop, push, concat, and 16 more.
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest3.js.diff b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest3.js.diff
index aa56f2d95c..32c230238f 100644
--- a/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest3.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest3.js.diff
@@ -1,11 +1,26 @@
--- old.arrayAssignmentTest3.js
+++ new.arrayAssignmentTest3.js
-@@= skipped -22, +22 lines =@@
- class B {
- }
- class a {
+@@= skipped -19, +19 lines =@@
+ // The following gives no error
+ // Michal saw no error if he used number instead of B,
+ // but I do...
+-var B = /** @class */ (function () {
+- function B() {
+- }
+- return B;
+-}());
+-var a = /** @class */ (function () {
+- function a(x, y, z) {
++class B {
++}
++class a {
+ x;
+ y;
- constructor(x, y, z) {
++ constructor(x, y, z) {
this.x = x;
- this.y = y;
\ No newline at end of file
+ this.y = y;
+ }
+- return a;
+-}());
++}
+ var xx = new a(null, 7, new B());
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest4.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest4.errors.txt.diff
new file mode 100644
index 0000000000..554dbee4f7
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest4.errors.txt.diff
@@ -0,0 +1,16 @@
+--- old.arrayAssignmentTest4.errors.txt
++++ new.arrayAssignmentTest4.errors.txt
+@@= skipped -0, +0 lines =@@
+ arrayAssignmentTest4.ts(22,1): error TS2322: Type '() => any' is not assignable to type 'any[]'.
+-arrayAssignmentTest4.ts(23,1): error TS2740: Type 'C3' is missing the following properties from type 'any[]': length, pop, push, concat, and 25 more.
++arrayAssignmentTest4.ts(23,1): error TS2740: Type 'C3' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more.
+
+
+ ==== arrayAssignmentTest4.ts (2 errors) ====
+@@= skipped -28, +28 lines =@@
+ !!! error TS2322: Type '() => any' is not assignable to type 'any[]'.
+ arr_any = c3; // should be an error - is
+ ~~~~~~~
+-!!! error TS2740: Type 'C3' is missing the following properties from type 'any[]': length, pop, push, concat, and 25 more.
++!!! error TS2740: Type 'C3' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more.
+
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest4.js.diff b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest4.js.diff
new file mode 100644
index 0000000000..ca2ea88559
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest4.js.diff
@@ -0,0 +1,18 @@
+--- old.arrayAssignmentTest4.js
++++ new.arrayAssignmentTest4.js
+@@= skipped -26, +26 lines =@@
+
+
+ //// [arrayAssignmentTest4.js]
+-var C3 = /** @class */ (function () {
+- function C3() {
+- }
+- C3.prototype.CM3M1 = function () { return 3; };
+- return C3;
+-}());
++class C3 {
++ CM3M1() { return 3; }
++}
+ /*
+
+ This behaves unexpectedly with teh following types:
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest5.errors.txt b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest5.errors.txt
index a8263630de..ffbb476fe8 100644
--- a/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest5.errors.txt
+++ b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest5.errors.txt
@@ -3,7 +3,7 @@ arrayAssignmentTest5.ts(23,17): error TS2322: Type 'IToken[]' is not assignable
==== arrayAssignmentTest5.ts (1 errors) ====
- module Test {
+ namespace Test {
interface IState {
}
interface IToken {
diff --git a/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest5.js b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest5.js
index 805f670c21..e1006e91b8 100644
--- a/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest5.js
+++ b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest5.js
@@ -1,7 +1,7 @@
//// [tests/cases/compiler/arrayAssignmentTest5.ts] ////
//// [arrayAssignmentTest5.ts]
-module Test {
+namespace Test {
interface IState {
}
interface IToken {
diff --git a/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest5.js.diff b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest5.js.diff
new file mode 100644
index 0000000000..39f0c732ba
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest5.js.diff
@@ -0,0 +1,29 @@
+--- old.arrayAssignmentTest5.js
++++ new.arrayAssignmentTest5.js
+@@= skipped -37, +37 lines =@@
+ //// [arrayAssignmentTest5.js]
+ var Test;
+ (function (Test) {
+- var Bug = /** @class */ (function () {
+- function Bug() {
+- }
+- Bug.prototype.onEnter = function (line, state, offset) {
++ class Bug {
++ onEnter(line, state, offset) {
+ var lineTokens = this.tokenize(line, state, true);
+ var tokens = lineTokens.tokens;
+ if (tokens.length === 0) {
+ return this.onEnter(line, tokens, offset); // <== this should produce an error since onEnter can not be called with (string, IStateToken[], offset)
+ }
+- };
+- Bug.prototype.tokenize = function (line, state, includeStates) {
++ }
++ tokenize(line, state, includeStates) {
+ return null;
+- };
+- return Bug;
+- }());
++ }
++ }
+ Test.Bug = Bug;
+ })(Test || (Test = {}));
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest5.symbols b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest5.symbols
index 6ec2d24f20..98578cb028 100644
--- a/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest5.symbols
+++ b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest5.symbols
@@ -1,11 +1,11 @@
//// [tests/cases/compiler/arrayAssignmentTest5.ts] ////
=== arrayAssignmentTest5.ts ===
-module Test {
+namespace Test {
>Test : Symbol(Test, Decl(arrayAssignmentTest5.ts, 0, 0))
interface IState {
->IState : Symbol(IState, Decl(arrayAssignmentTest5.ts, 0, 13))
+>IState : Symbol(IState, Decl(arrayAssignmentTest5.ts, 0, 16))
}
interface IToken {
>IToken : Symbol(IToken, Decl(arrayAssignmentTest5.ts, 2, 5))
@@ -19,7 +19,7 @@ module Test {
state: IState;
>state : Symbol(IStateToken.state, Decl(arrayAssignmentTest5.ts, 6, 42))
->IState : Symbol(IState, Decl(arrayAssignmentTest5.ts, 0, 13))
+>IState : Symbol(IState, Decl(arrayAssignmentTest5.ts, 0, 16))
}
interface ILineTokens {
>ILineTokens : Symbol(ILineTokens, Decl(arrayAssignmentTest5.ts, 8, 5))
@@ -30,7 +30,7 @@ module Test {
endState: IState;
>endState : Symbol(ILineTokens.endState, Decl(arrayAssignmentTest5.ts, 10, 25))
->IState : Symbol(IState, Decl(arrayAssignmentTest5.ts, 0, 13))
+>IState : Symbol(IState, Decl(arrayAssignmentTest5.ts, 0, 16))
}
interface IAction {
>IAction : Symbol(IAction, Decl(arrayAssignmentTest5.ts, 12, 5))
@@ -42,7 +42,7 @@ module Test {
>onEnter : Symbol(IMode.onEnter, Decl(arrayAssignmentTest5.ts, 15, 21))
>line : Symbol(line, Decl(arrayAssignmentTest5.ts, 16, 16))
>state : Symbol(state, Decl(arrayAssignmentTest5.ts, 16, 28))
->IState : Symbol(IState, Decl(arrayAssignmentTest5.ts, 0, 13))
+>IState : Symbol(IState, Decl(arrayAssignmentTest5.ts, 0, 16))
>offset : Symbol(offset, Decl(arrayAssignmentTest5.ts, 16, 42))
>IAction : Symbol(IAction, Decl(arrayAssignmentTest5.ts, 12, 5))
@@ -50,7 +50,7 @@ module Test {
>tokenize : Symbol(IMode.tokenize, Decl(arrayAssignmentTest5.ts, 16, 66))
>line : Symbol(line, Decl(arrayAssignmentTest5.ts, 17, 17))
>state : Symbol(state, Decl(arrayAssignmentTest5.ts, 17, 29))
->IState : Symbol(IState, Decl(arrayAssignmentTest5.ts, 0, 13))
+>IState : Symbol(IState, Decl(arrayAssignmentTest5.ts, 0, 16))
>includeStates : Symbol(includeStates, Decl(arrayAssignmentTest5.ts, 17, 43))
>ILineTokens : Symbol(ILineTokens, Decl(arrayAssignmentTest5.ts, 8, 5))
}
@@ -62,7 +62,7 @@ module Test {
>onEnter : Symbol(Bug.onEnter, Decl(arrayAssignmentTest5.ts, 19, 39))
>line : Symbol(line, Decl(arrayAssignmentTest5.ts, 20, 23))
>state : Symbol(state, Decl(arrayAssignmentTest5.ts, 20, 35))
->IState : Symbol(IState, Decl(arrayAssignmentTest5.ts, 0, 13))
+>IState : Symbol(IState, Decl(arrayAssignmentTest5.ts, 0, 16))
>offset : Symbol(offset, Decl(arrayAssignmentTest5.ts, 20, 49))
>IAction : Symbol(IAction, Decl(arrayAssignmentTest5.ts, 12, 5))
@@ -100,7 +100,7 @@ module Test {
>tokenize : Symbol(Bug.tokenize, Decl(arrayAssignmentTest5.ts, 26, 9))
>line : Symbol(line, Decl(arrayAssignmentTest5.ts, 27, 24))
>state : Symbol(state, Decl(arrayAssignmentTest5.ts, 27, 36))
->IState : Symbol(IState, Decl(arrayAssignmentTest5.ts, 0, 13))
+>IState : Symbol(IState, Decl(arrayAssignmentTest5.ts, 0, 16))
>includeStates : Symbol(includeStates, Decl(arrayAssignmentTest5.ts, 27, 50))
>ILineTokens : Symbol(ILineTokens, Decl(arrayAssignmentTest5.ts, 8, 5))
diff --git a/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest5.types b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest5.types
index 877f42a8bf..f34228a738 100644
--- a/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest5.types
+++ b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest5.types
@@ -1,7 +1,7 @@
//// [tests/cases/compiler/arrayAssignmentTest5.ts] ////
=== arrayAssignmentTest5.ts ===
-module Test {
+namespace Test {
>Test : typeof Test
interface IState {
diff --git a/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest6.js b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest6.js
index 98120b6354..7a521047fc 100644
--- a/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest6.js
+++ b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest6.js
@@ -1,7 +1,7 @@
//// [tests/cases/compiler/arrayAssignmentTest6.ts] ////
//// [arrayAssignmentTest6.ts]
-module Test {
+namespace Test {
interface IState {
}
interface IToken {
diff --git a/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest6.js.diff b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest6.js.diff
new file mode 100644
index 0000000000..43e49a6fda
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest6.js.diff
@@ -0,0 +1,20 @@
+--- old.arrayAssignmentTest6.js
++++ new.arrayAssignmentTest6.js
+@@= skipped -24, +24 lines =@@
+ //// [arrayAssignmentTest6.js]
+ var Test;
+ (function (Test) {
+- var Bug = /** @class */ (function () {
+- function Bug() {
+- }
+- Bug.prototype.tokenize = function (line, tokens, includeStates) {
++ class Bug {
++ tokenize(line, tokens, includeStates) {
+ return null;
+- };
+- return Bug;
+- }());
++ }
++ }
+ Test.Bug = Bug;
+ })(Test || (Test = {}));
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest6.symbols b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest6.symbols
index d41afbb82d..0bbcc562b9 100644
--- a/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest6.symbols
+++ b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest6.symbols
@@ -1,11 +1,11 @@
//// [tests/cases/compiler/arrayAssignmentTest6.ts] ////
=== arrayAssignmentTest6.ts ===
-module Test {
+namespace Test {
>Test : Symbol(Test, Decl(arrayAssignmentTest6.ts, 0, 0))
interface IState {
->IState : Symbol(IState, Decl(arrayAssignmentTest6.ts, 0, 13))
+>IState : Symbol(IState, Decl(arrayAssignmentTest6.ts, 0, 16))
}
interface IToken {
>IToken : Symbol(IToken, Decl(arrayAssignmentTest6.ts, 2, 5))
@@ -22,7 +22,7 @@ module Test {
endState: IState;
>endState : Symbol(ILineTokens.endState, Decl(arrayAssignmentTest6.ts, 7, 25))
->IState : Symbol(IState, Decl(arrayAssignmentTest6.ts, 0, 13))
+>IState : Symbol(IState, Decl(arrayAssignmentTest6.ts, 0, 16))
}
interface IMode {
>IMode : Symbol(IMode, Decl(arrayAssignmentTest6.ts, 9, 5))
@@ -31,7 +31,7 @@ module Test {
>tokenize : Symbol(IMode.tokenize, Decl(arrayAssignmentTest6.ts, 10, 21))
>line : Symbol(line, Decl(arrayAssignmentTest6.ts, 11, 17))
>state : Symbol(state, Decl(arrayAssignmentTest6.ts, 11, 29))
->IState : Symbol(IState, Decl(arrayAssignmentTest6.ts, 0, 13))
+>IState : Symbol(IState, Decl(arrayAssignmentTest6.ts, 0, 16))
>includeStates : Symbol(includeStates, Decl(arrayAssignmentTest6.ts, 11, 43))
>ILineTokens : Symbol(ILineTokens, Decl(arrayAssignmentTest6.ts, 5, 5))
}
diff --git a/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest6.types b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest6.types
index e829e25389..8075fcc0de 100644
--- a/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest6.types
+++ b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest6.types
@@ -1,7 +1,7 @@
//// [tests/cases/compiler/arrayAssignmentTest6.ts] ////
=== arrayAssignmentTest6.ts ===
-module Test {
+namespace Test {
>Test : typeof Test
interface IState {
diff --git a/testdata/baselines/reference/submodule/compiler/arrayAugment.symbols.diff b/testdata/baselines/reference/submodule/compiler/arrayAugment.symbols.diff
new file mode 100644
index 0000000000..d6ab4ed272
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/arrayAugment.symbols.diff
@@ -0,0 +1,19 @@
+--- old.arrayAugment.symbols
++++ new.arrayAugment.symbols
+@@= skipped -1, +1 lines =@@
+
+ === arrayAugment.ts ===
+ interface Array {
+->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 1 more)
+->T : Symbol(T, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(arrayAugment.ts, 0, 16))
++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(arrayAugment.ts, 0, 0))
++>T : Symbol(T, Decl(lib.es5.d.ts, --, --), Decl(arrayAugment.ts, 0, 16))
+
+ split: (parts: number) => T[][];
+ >split : Symbol(Array.split, Decl(arrayAugment.ts, 0, 20))
+ >parts : Symbol(parts, Decl(arrayAugment.ts, 1, 12))
+->T : Symbol(T, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(arrayAugment.ts, 0, 16))
++>T : Symbol(T, Decl(lib.es5.d.ts, --, --), Decl(arrayAugment.ts, 0, 16))
+ }
+
+ var x = [''];
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arrayBestCommonTypes.js b/testdata/baselines/reference/submodule/compiler/arrayBestCommonTypes.js
index b3c5e8766a..f7ca47930a 100644
--- a/testdata/baselines/reference/submodule/compiler/arrayBestCommonTypes.js
+++ b/testdata/baselines/reference/submodule/compiler/arrayBestCommonTypes.js
@@ -1,7 +1,7 @@
//// [tests/cases/compiler/arrayBestCommonTypes.ts] ////
//// [arrayBestCommonTypes.ts]
-module EmptyTypes {
+namespace EmptyTypes {
interface iface { }
class base implements iface { }
class base2 implements iface { }
@@ -54,7 +54,7 @@ module EmptyTypes {
}
}
-module NonEmptyTypes {
+namespace NonEmptyTypes {
interface iface { x: string; }
class base implements iface { x: string; y: string; }
class base2 implements iface { x: string; z: string; }
diff --git a/testdata/baselines/reference/submodule/compiler/arrayBestCommonTypes.js.diff b/testdata/baselines/reference/submodule/compiler/arrayBestCommonTypes.js.diff
index 0b4eb802fb..42105013ad 100644
--- a/testdata/baselines/reference/submodule/compiler/arrayBestCommonTypes.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/arrayBestCommonTypes.js.diff
@@ -1,18 +1,124 @@
--- old.arrayBestCommonTypes.js
+++ new.arrayBestCommonTypes.js
-@@= skipped -154, +154 lines =@@
+@@= skipped -109, +109 lines =@@
+
+
+ //// [arrayBestCommonTypes.js]
+-var __extends = (this && this.__extends) || (function () {
+- var extendStatics = function (d, b) {
+- extendStatics = Object.setPrototypeOf ||
+- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+- return extendStatics(d, b);
+- };
+- return function (d, b) {
+- if (typeof b !== "function" && b !== null)
+- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+- extendStatics(d, b);
+- function __() { this.constructor = d; }
+- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+- };
+-})();
+ var EmptyTypes;
+ (function (EmptyTypes) {
+- var base = /** @class */ (function () {
+- function base() {
+- }
+- return base;
+- }());
+- var base2 = /** @class */ (function () {
+- function base2() {
+- }
+- return base2;
+- }());
+- var derived = /** @class */ (function (_super) {
+- __extends(derived, _super);
+- function derived() {
+- return _super !== null && _super.apply(this, arguments) || this;
+- }
+- return derived;
+- }(base));
+- var f = /** @class */ (function () {
+- function f() {
+- }
+- f.prototype.voidIfAny = function (x, y) {
+- if (y === void 0) { y = false; }
+- return null;
+- };
+- f.prototype.x = function () {
++ class base {
++ }
++ class base2 {
++ }
++ class derived extends base {
++ }
++ class f {
++ voidIfAny(x, y = false) { return null; }
++ x() {
+ (this.voidIfAny([4, 2][0]));
+ (this.voidIfAny([4, 2, undefined][0]));
+ (this.voidIfAny([undefined, 2, 4][0]));
+@@= skipped -70, +39 lines =@@
+ var b2 = [base2Obj, baseObj, ifaceObj];
+ var b3 = [baseObj, ifaceObj, base2Obj];
+ var b4 = [ifaceObj, baseObj, base2Obj];
+- };
+- return f;
+- }());
++ }
++ }
+ })(EmptyTypes || (EmptyTypes = {}));
var NonEmptyTypes;
(function (NonEmptyTypes) {
- class base {
+- var base = /** @class */ (function () {
+- function base() {
+- }
+- return base;
+- }());
+- var base2 = /** @class */ (function () {
+- function base2() {
+- }
+- return base2;
+- }());
+- var derived = /** @class */ (function (_super) {
+- __extends(derived, _super);
+- function derived() {
+- return _super !== null && _super.apply(this, arguments) || this;
+- }
+- return derived;
+- }(base));
+- var f = /** @class */ (function () {
+- function f() {
+- }
+- f.prototype.voidIfAny = function (x, y) {
+- if (y === void 0) { y = false; }
+- return null;
+- };
+- f.prototype.x = function () {
++ class base {
+ x;
+ y;
- }
- class base2 {
++ }
++ class base2 {
+ x;
+ z;
- }
- class derived extends base {
++ }
++ class derived extends base {
+ a;
- }
- class f {
- voidIfAny(x, y = false) { return null; }
\ No newline at end of file
++ }
++ class f {
++ voidIfAny(x, y = false) { return null; }
++ x() {
+ (this.voidIfAny([4, 2][0]));
+ (this.voidIfAny([4, 2, undefined][0]));
+ (this.voidIfAny([undefined, 2, 4][0]));
+@@= skipped -59, +47 lines =@@
+ var b2 = [base2Obj, baseObj, ifaceObj];
+ var b3 = [baseObj, ifaceObj, base2Obj];
+ var b4 = [ifaceObj, baseObj, base2Obj];
+- };
+- return f;
+- }());
++ }
++ }
+ })(NonEmptyTypes || (NonEmptyTypes = {}));
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arrayBestCommonTypes.symbols b/testdata/baselines/reference/submodule/compiler/arrayBestCommonTypes.symbols
index 2e4d5fbdb3..2ad95c4749 100644
--- a/testdata/baselines/reference/submodule/compiler/arrayBestCommonTypes.symbols
+++ b/testdata/baselines/reference/submodule/compiler/arrayBestCommonTypes.symbols
@@ -1,19 +1,19 @@
//// [tests/cases/compiler/arrayBestCommonTypes.ts] ////
=== arrayBestCommonTypes.ts ===
-module EmptyTypes {
+namespace EmptyTypes {
>EmptyTypes : Symbol(EmptyTypes, Decl(arrayBestCommonTypes.ts, 0, 0))
interface iface { }
->iface : Symbol(iface, Decl(arrayBestCommonTypes.ts, 0, 19))
+>iface : Symbol(iface, Decl(arrayBestCommonTypes.ts, 0, 22))
class base implements iface { }
>base : Symbol(base, Decl(arrayBestCommonTypes.ts, 1, 23))
->iface : Symbol(iface, Decl(arrayBestCommonTypes.ts, 0, 19))
+>iface : Symbol(iface, Decl(arrayBestCommonTypes.ts, 0, 22))
class base2 implements iface { }
>base2 : Symbol(base2, Decl(arrayBestCommonTypes.ts, 2, 35))
->iface : Symbol(iface, Decl(arrayBestCommonTypes.ts, 0, 19))
+>iface : Symbol(iface, Decl(arrayBestCommonTypes.ts, 0, 22))
class derived extends base { }
>derived : Symbol(derived, Decl(arrayBestCommonTypes.ts, 3, 36))
@@ -191,7 +191,7 @@ module EmptyTypes {
var ifaceObj: iface = null;
>ifaceObj : Symbol(ifaceObj, Decl(arrayBestCommonTypes.ts, 41, 15))
->iface : Symbol(iface, Decl(arrayBestCommonTypes.ts, 0, 19))
+>iface : Symbol(iface, Decl(arrayBestCommonTypes.ts, 0, 22))
var baseObj = new base();
>baseObj : Symbol(baseObj, Decl(arrayBestCommonTypes.ts, 42, 15))
@@ -228,22 +228,22 @@ module EmptyTypes {
}
}
-module NonEmptyTypes {
+namespace NonEmptyTypes {
>NonEmptyTypes : Symbol(NonEmptyTypes, Decl(arrayBestCommonTypes.ts, 51, 1))
interface iface { x: string; }
->iface : Symbol(iface, Decl(arrayBestCommonTypes.ts, 53, 22))
+>iface : Symbol(iface, Decl(arrayBestCommonTypes.ts, 53, 25))
>x : Symbol(iface.x, Decl(arrayBestCommonTypes.ts, 54, 21))
class base implements iface { x: string; y: string; }
>base : Symbol(base, Decl(arrayBestCommonTypes.ts, 54, 34))
->iface : Symbol(iface, Decl(arrayBestCommonTypes.ts, 53, 22))
+>iface : Symbol(iface, Decl(arrayBestCommonTypes.ts, 53, 25))
>x : Symbol(base.x, Decl(arrayBestCommonTypes.ts, 55, 33))
>y : Symbol(base.y, Decl(arrayBestCommonTypes.ts, 55, 44))
class base2 implements iface { x: string; z: string; }
>base2 : Symbol(base2, Decl(arrayBestCommonTypes.ts, 55, 57))
->iface : Symbol(iface, Decl(arrayBestCommonTypes.ts, 53, 22))
+>iface : Symbol(iface, Decl(arrayBestCommonTypes.ts, 53, 25))
>x : Symbol(base2.x, Decl(arrayBestCommonTypes.ts, 56, 34))
>z : Symbol(base2.z, Decl(arrayBestCommonTypes.ts, 56, 45))
@@ -424,7 +424,7 @@ module NonEmptyTypes {
var ifaceObj: iface = null;
>ifaceObj : Symbol(ifaceObj, Decl(arrayBestCommonTypes.ts, 94, 15))
->iface : Symbol(iface, Decl(arrayBestCommonTypes.ts, 53, 22))
+>iface : Symbol(iface, Decl(arrayBestCommonTypes.ts, 53, 25))
var baseObj = new base();
>baseObj : Symbol(baseObj, Decl(arrayBestCommonTypes.ts, 95, 15))
diff --git a/testdata/baselines/reference/submodule/compiler/arrayBestCommonTypes.types b/testdata/baselines/reference/submodule/compiler/arrayBestCommonTypes.types
index 1ee5f447bd..4cdb6400d1 100644
--- a/testdata/baselines/reference/submodule/compiler/arrayBestCommonTypes.types
+++ b/testdata/baselines/reference/submodule/compiler/arrayBestCommonTypes.types
@@ -1,7 +1,7 @@
//// [tests/cases/compiler/arrayBestCommonTypes.ts] ////
=== arrayBestCommonTypes.ts ===
-module EmptyTypes {
+namespace EmptyTypes {
>EmptyTypes : typeof EmptyTypes
interface iface { }
@@ -380,7 +380,7 @@ module EmptyTypes {
}
}
-module NonEmptyTypes {
+namespace NonEmptyTypes {
>NonEmptyTypes : typeof NonEmptyTypes
interface iface { x: string; }
diff --git a/testdata/baselines/reference/submodule/compiler/arrayBestCommonTypes.types.diff b/testdata/baselines/reference/submodule/compiler/arrayBestCommonTypes.types.diff
new file mode 100644
index 0000000000..fcc316edf6
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/arrayBestCommonTypes.types.diff
@@ -0,0 +1,40 @@
+--- old.arrayBestCommonTypes.types
++++ new.arrayBestCommonTypes.types
+@@= skipped -349, +349 lines =@@
+ >base2 : typeof base2
+
+ var b1 = [baseObj, base2Obj, ifaceObj];
+->b1 : iface[]
+->[baseObj, base2Obj, ifaceObj] : iface[]
++>b1 : (base | base2)[]
++>[baseObj, base2Obj, ifaceObj] : (base | base2)[]
+ >baseObj : base
+ >base2Obj : base2
+ >ifaceObj : iface
+
+ var b2 = [base2Obj, baseObj, ifaceObj];
+->b2 : iface[]
+->[base2Obj, baseObj, ifaceObj] : iface[]
++>b2 : (base | base2)[]
++>[base2Obj, baseObj, ifaceObj] : (base | base2)[]
+ >base2Obj : base2
+ >baseObj : base
+ >ifaceObj : iface
+
+ var b3 = [baseObj, ifaceObj, base2Obj];
+->b3 : iface[]
+->[baseObj, ifaceObj, base2Obj] : iface[]
++>b3 : (base | base2)[]
++>[baseObj, ifaceObj, base2Obj] : (base | base2)[]
+ >baseObj : base
+ >ifaceObj : iface
+ >base2Obj : base2
+
+ var b4 = [ifaceObj, baseObj, base2Obj];
+->b4 : iface[]
+->[ifaceObj, baseObj, base2Obj] : iface[]
++>b4 : (base | base2)[]
++>[ifaceObj, baseObj, base2Obj] : (base | base2)[]
+ >ifaceObj : iface
+ >baseObj : base
+ >base2Obj : base2
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arrayBindingPatternOmittedExpressions.types.diff b/testdata/baselines/reference/submodule/compiler/arrayBindingPatternOmittedExpressions.types.diff
new file mode 100644
index 0000000000..6a0a594a8f
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/arrayBindingPatternOmittedExpressions.types.diff
@@ -0,0 +1,29 @@
+--- old.arrayBindingPatternOmittedExpressions.types
++++ new.arrayBindingPatternOmittedExpressions.types
+@@= skipped -5, +5 lines =@@
+
+ {
+ let [, b, , a] = results;
+-> : undefined
+ >b : string
+-> : undefined
+ >a : string
+ >results : string[]
+
+@@= skipped -21, +19 lines =@@
+
+ function f([, a, , b, , , , s, , , ] = results) {
+ >f : ([, a, , b, , , , s, , ,]?: string[]) => void
+-> : undefined
+ >a : string
+-> : undefined
+ >b : string
+-> : undefined
+-> : undefined
+-> : undefined
+ >s : string
+-> : undefined
+-> : undefined
+ >results : string[]
+
+ a = s[1];
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arrayBufferIsViewNarrowsType.symbols.diff b/testdata/baselines/reference/submodule/compiler/arrayBufferIsViewNarrowsType.symbols.diff
new file mode 100644
index 0000000000..ac4c64b582
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/arrayBufferIsViewNarrowsType.symbols.diff
@@ -0,0 +1,10 @@
+--- old.arrayBufferIsViewNarrowsType.symbols
++++ new.arrayBufferIsViewNarrowsType.symbols
+@@= skipped -6, +6 lines =@@
+
+ if (ArrayBuffer.isView(obj)) {
+ >ArrayBuffer.isView : Symbol(ArrayBufferConstructor.isView, Decl(lib.es5.d.ts, --, --))
+->ArrayBuffer : Symbol(ArrayBuffer, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>ArrayBuffer : Symbol(ArrayBuffer, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+ >isView : Symbol(ArrayBufferConstructor.isView, Decl(lib.es5.d.ts, --, --))
+ >obj : Symbol(obj, Decl(arrayBufferIsViewNarrowsType.ts, 0, 3))
diff --git a/testdata/baselines/reference/submodule/compiler/arrayConcat2.symbols.diff b/testdata/baselines/reference/submodule/compiler/arrayConcat2.symbols.diff
new file mode 100644
index 0000000000..2ef6516c07
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/arrayConcat2.symbols.diff
@@ -0,0 +1,11 @@
+--- old.arrayConcat2.symbols
++++ new.arrayConcat2.symbols
+@@= skipped -15, +15 lines =@@
+
+ var b = new Array();
+ >b : Symbol(b, Decl(arrayConcat2.ts, 5, 3))
+->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+
+ b.concat('hello');
+ >b.concat : Symbol(Array.concat, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arrayConcat3.symbols.diff b/testdata/baselines/reference/submodule/compiler/arrayConcat3.symbols.diff
new file mode 100644
index 0000000000..f7c7810715
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/arrayConcat3.symbols.diff
@@ -0,0 +1,15 @@
+--- old.arrayConcat3.symbols
++++ new.arrayConcat3.symbols
+@@= skipped -16, +16 lines =@@
+ >T1 : Symbol(T1, Decl(arrayConcat3.ts, 2, 34))
+ >T : Symbol(T, Decl(arrayConcat3.ts, 2, 17))
+ >a : Symbol(a, Decl(arrayConcat3.ts, 2, 49))
+->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+ >Fn : Symbol(Fn, Decl(arrayConcat3.ts, 0, 0))
+ >T : Symbol(T, Decl(arrayConcat3.ts, 2, 17))
+ >b : Symbol(b, Decl(arrayConcat3.ts, 2, 65))
+->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+ >Fn : Symbol(Fn, Decl(arrayConcat3.ts, 0, 0))
+ >T1 : Symbol(T1, Decl(arrayConcat3.ts, 2, 34))
diff --git a/testdata/baselines/reference/submodule/compiler/arrayConcat3.types.diff b/testdata/baselines/reference/submodule/compiler/arrayConcat3.types.diff
index 2d82657c95..275ae6ef43 100644
--- a/testdata/baselines/reference/submodule/compiler/arrayConcat3.types.diff
+++ b/testdata/baselines/reference/submodule/compiler/arrayConcat3.types.diff
@@ -8,3 +8,13 @@
+>doStuff : (a: Fn[], b: Fn[]) => void
>a : Fn[]
>b : Fn[]
+
+ b.concat(a);
+ >b.concat(a) : Fn[]
+->b.concat : { (...items: ConcatArray>[]): Fn[]; (...items: (Fn | ConcatArray>)[]): Fn[]; }
++>b.concat : { (...items: ConcatArray>[]): Fn[]; (...items: (ConcatArray> | Fn)[]): Fn[]; }
+ >b : Fn[]
+->concat : { (...items: ConcatArray>[]): Fn[]; (...items: (Fn | ConcatArray>)[]): Fn[]; }
++>concat : { (...items: ConcatArray>[]): Fn[]; (...items: (ConcatArray> | Fn)[]): Fn[]; }
+ >a : Fn[]
+ }
diff --git a/testdata/baselines/reference/submodule/compiler/arrayConcatMap.js.diff b/testdata/baselines/reference/submodule/compiler/arrayConcatMap.js.diff
new file mode 100644
index 0000000000..0a5ec848f0
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/arrayConcatMap.js.diff
@@ -0,0 +1,8 @@
+--- old.arrayConcatMap.js
++++ new.arrayConcatMap.js
+@@= skipped -5, +5 lines =@@
+
+ //// [arrayConcatMap.js]
+ var x = [].concat([{ a: 1 }], [{ a: 2 }])
+- .map(function (b) { return b.a; });
++ .map(b => b.a);
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arrayConstructors1.symbols.diff b/testdata/baselines/reference/submodule/compiler/arrayConstructors1.symbols.diff
new file mode 100644
index 0000000000..bae6bfc2ef
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/arrayConstructors1.symbols.diff
@@ -0,0 +1,36 @@
+--- old.arrayConstructors1.symbols
++++ new.arrayConstructors1.symbols
+@@= skipped -5, +5 lines =@@
+
+ x = new Array(1);
+ >x : Symbol(x, Decl(arrayConstructors1.ts, 0, 3))
+->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+
+ x = new Array('hi', 'bye');
+ >x : Symbol(x, Decl(arrayConstructors1.ts, 0, 3))
+->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+
+ x = new Array('hi', 'bye');
+ >x : Symbol(x, Decl(arrayConstructors1.ts, 0, 3))
+->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+
+ var y: number[];
+ >y : Symbol(y, Decl(arrayConstructors1.ts, 5, 3))
+
+ y = new Array(1);
+ >y : Symbol(y, Decl(arrayConstructors1.ts, 5, 3))
+->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+
+ y = new Array(1,2);
+ >y : Symbol(y, Decl(arrayConstructors1.ts, 5, 3))
+->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+
+ y = new Array(1, 2);
+ >y : Symbol(y, Decl(arrayConstructors1.ts, 5, 3))
+->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
diff --git a/testdata/baselines/reference/submodule/compiler/arrayDestructuringInSwitch1.js.diff b/testdata/baselines/reference/submodule/compiler/arrayDestructuringInSwitch1.js.diff
new file mode 100644
index 0000000000..72a9cd5956
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/arrayDestructuringInSwitch1.js.diff
@@ -0,0 +1,22 @@
+--- old.arrayDestructuringInSwitch1.js
++++ new.arrayDestructuringInSwitch1.js
+@@= skipped -28, +28 lines =@@
+ exports.evaluate = evaluate;
+ function evaluate(expression) {
+ if (Array.isArray(expression)) {
+- var operator = expression[0], operands = expression.slice(1);
++ const [operator, ...operands] = expression;
+ switch (operator) {
+ case 'and': {
+- return operands.every(function (child) { return evaluate(child); });
++ return operands.every((child) => evaluate(child));
+ }
+ case 'not': {
+ return !evaluate(operands[0]);
+ }
+ default: {
+- throw new Error("".concat(operator, " is not a supported operator"));
++ throw new Error(`${operator} is not a supported operator`);
+ }
+ }
+ }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arrayDestructuringInSwitch1.symbols.diff b/testdata/baselines/reference/submodule/compiler/arrayDestructuringInSwitch1.symbols.diff
new file mode 100644
index 0000000000..a3110cb3eb
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/arrayDestructuringInSwitch1.symbols.diff
@@ -0,0 +1,10 @@
+--- old.arrayDestructuringInSwitch1.symbols
++++ new.arrayDestructuringInSwitch1.symbols
+@@= skipped -16, +16 lines =@@
+
+ if (Array.isArray(expression)) {
+ >Array.isArray : Symbol(ArrayConstructor.isArray, Decl(lib.es5.d.ts, --, --))
+->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+ >isArray : Symbol(ArrayConstructor.isArray, Decl(lib.es5.d.ts, --, --))
+ >expression : Symbol(expression, Decl(arrayDestructuringInSwitch1.ts, 3, 25))
diff --git a/testdata/baselines/reference/submodule/compiler/arrayDestructuringInSwitch1.types.diff b/testdata/baselines/reference/submodule/compiler/arrayDestructuringInSwitch1.types.diff
new file mode 100644
index 0000000000..d1f22c1f4d
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/arrayDestructuringInSwitch1.types.diff
@@ -0,0 +1,11 @@
+--- old.arrayDestructuringInSwitch1.types
++++ new.arrayDestructuringInSwitch1.types
+@@= skipped -61, +61 lines =@@
+ } else {
+ return expression === 'true';
+ >expression === 'true' : boolean
+->expression : "true" | "false"
++>expression : "false" | "true"
+ >'true' : "true"
+ }
+ }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arrayDestructuringInSwitch2.js.diff b/testdata/baselines/reference/submodule/compiler/arrayDestructuringInSwitch2.js.diff
new file mode 100644
index 0000000000..844c597bfd
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/arrayDestructuringInSwitch2.js.diff
@@ -0,0 +1,19 @@
+--- old.arrayDestructuringInSwitch2.js
++++ new.arrayDestructuringInSwitch2.js
+@@= skipped -17, +17 lines =@@
+
+ //// [arrayDestructuringInSwitch2.js]
+ function foo(x) {
+- var kind = x.kind, a = x.a;
++ const { kind, a } = x;
+ switch (kind) {
+ case "a":
+ return a[0];
+ case "b":
+ return 1;
+ default:
+- var n = a[0];
++ const [n] = a;
+ return a;
+ }
+ }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arrayEvery.js.diff b/testdata/baselines/reference/submodule/compiler/arrayEvery.js.diff
new file mode 100644
index 0000000000..879276daed
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/arrayEvery.js.diff
@@ -0,0 +1,13 @@
+--- old.arrayEvery.js
++++ new.arrayEvery.js
+@@= skipped -10, +10 lines =@@
+
+
+ //// [arrayEvery.js]
+-var foo = ['aaa'];
+-var isString = function (x) { return typeof x === 'string'; };
++const foo = ['aaa'];
++const isString = (x) => typeof x === 'string';
+ if (foo.every(isString)) {
+ foo[0].slice(0);
+ }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arrayEvery.types.diff b/testdata/baselines/reference/submodule/compiler/arrayEvery.types.diff
new file mode 100644
index 0000000000..69a0a4aa87
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/arrayEvery.types.diff
@@ -0,0 +1,10 @@
+--- old.arrayEvery.types
++++ new.arrayEvery.types
+@@= skipped -10, +10 lines =@@
+ >(x: unknown): x is string => typeof x === 'string' : (x: unknown) => x is string
+ >x : unknown
+ >typeof x === 'string' : boolean
+->typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
++>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
+ >x : unknown
+ >'string' : "string"
diff --git a/testdata/baselines/reference/submodule/compiler/arrayFilter.js.diff b/testdata/baselines/reference/submodule/compiler/arrayFilter.js.diff
new file mode 100644
index 0000000000..75b5ec7f57
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/arrayFilter.js.diff
@@ -0,0 +1,8 @@
+--- old.arrayFilter.js
++++ new.arrayFilter.js
+@@= skipped -14, +14 lines =@@
+ { name: null },
+ { name: 'baz' }
+ ];
+-foo.filter(function (x) { return x.name; }); //should accepted all possible types not only boolean!
++foo.filter(x => x.name); //should accepted all possible types not only boolean!
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arrayFind.js.diff b/testdata/baselines/reference/submodule/compiler/arrayFind.js.diff
new file mode 100644
index 0000000000..4acf523d16
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/arrayFind.js.diff
@@ -0,0 +1,14 @@
+--- old.arrayFind.js
++++ new.arrayFind.js
+@@= skipped -17, +17 lines =@@
+ function isNumber(x) {
+ return typeof x === "number";
+ }
+-var arrayOfStringsNumbersAndBooleans = ["string", false, 0, "strung", 1, true];
+-var foundNumber = arrayOfStringsNumbersAndBooleans.find(isNumber);
+-var readonlyArrayOfStringsNumbersAndBooleans = arrayOfStringsNumbersAndBooleans;
+-var readonlyFoundNumber = readonlyArrayOfStringsNumbersAndBooleans.find(isNumber);
++const arrayOfStringsNumbersAndBooleans = ["string", false, 0, "strung", 1, true];
++const foundNumber = arrayOfStringsNumbersAndBooleans.find(isNumber);
++const readonlyArrayOfStringsNumbersAndBooleans = arrayOfStringsNumbersAndBooleans;
++const readonlyFoundNumber = readonlyArrayOfStringsNumbersAndBooleans.find(isNumber);
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arrayFind.types.diff b/testdata/baselines/reference/submodule/compiler/arrayFind.types.diff
new file mode 100644
index 0000000000..e03232e653
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/arrayFind.types.diff
@@ -0,0 +1,11 @@
+--- old.arrayFind.types
++++ new.arrayFind.types
+@@= skipped -7, +7 lines =@@
+
+ return typeof x === "number";
+ >typeof x === "number" : boolean
+->typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
++>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
+ >x : any
+ >"number" : "number"
+ }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arrayFlatMap.js.diff b/testdata/baselines/reference/submodule/compiler/arrayFlatMap.js.diff
new file mode 100644
index 0000000000..42599165f2
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/arrayFlatMap.js.diff
@@ -0,0 +1,14 @@
+--- old.arrayFlatMap.js
++++ new.arrayFlatMap.js
+@@= skipped -7, +7 lines =@@
+
+
+ //// [arrayFlatMap.js]
+-var array = [];
+-var readonlyArray = [];
+-array.flatMap(function () { return []; }); // ok
+-readonlyArray.flatMap(function () { return []; }); // ok
++const array = [];
++const readonlyArray = [];
++array.flatMap(() => []); // ok
++readonlyArray.flatMap(() => []); // ok
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arrayFlatNoCrashInference.types.diff b/testdata/baselines/reference/submodule/compiler/arrayFlatNoCrashInference.types.diff
new file mode 100644
index 0000000000..ba10fb4f92
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/arrayFlatNoCrashInference.types.diff
@@ -0,0 +1,17 @@
+--- old.arrayFlatNoCrashInference.types
++++ new.arrayFlatNoCrashInference.types
+@@= skipped -1, +1 lines =@@
+
+ === arrayFlatNoCrashInference.ts ===
+ function foo(arr: T[], depth: number) {
+->foo : (arr: T[], depth: number) => FlatArray[]
++>foo : (arr: T[], depth: number) => FlatArray[]
+ >arr : T[]
+ >depth : number
+
+ return arr.flat(depth);
+->arr.flat(depth) : FlatArray[]
++>arr.flat(depth) : FlatArray[]
+ >arr.flat : (this: A, depth?: D | undefined) => FlatArray[]
+ >arr : T[]
+ >flat : (this: A, depth?: D | undefined) => FlatArray[]
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arrayFlatNoCrashInferenceDeclarations.js.diff b/testdata/baselines/reference/submodule/compiler/arrayFlatNoCrashInferenceDeclarations.js.diff
index 89e78ce769..bec93992b2 100644
--- a/testdata/baselines/reference/submodule/compiler/arrayFlatNoCrashInferenceDeclarations.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/arrayFlatNoCrashInferenceDeclarations.js.diff
@@ -7,4 +7,9 @@
-"use strict";
function foo(arr, depth) {
return arr.flat(depth);
- }
\ No newline at end of file
+ }
+
+
+ //// [arrayFlatNoCrashInferenceDeclarations.d.ts]
+-declare function foo(arr: T[], depth: number): FlatArray[];
++declare function foo(arr: T[], depth: number): FlatArray[];
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arrayFlatNoCrashInferenceDeclarations.types.diff b/testdata/baselines/reference/submodule/compiler/arrayFlatNoCrashInferenceDeclarations.types.diff
new file mode 100644
index 0000000000..1d1a99809a
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/arrayFlatNoCrashInferenceDeclarations.types.diff
@@ -0,0 +1,17 @@
+--- old.arrayFlatNoCrashInferenceDeclarations.types
++++ new.arrayFlatNoCrashInferenceDeclarations.types
+@@= skipped -1, +1 lines =@@
+
+ === arrayFlatNoCrashInferenceDeclarations.ts ===
+ function foo(arr: T[], depth: number) {
+->foo : (arr: T[], depth: number) => FlatArray[]
++>foo : (arr: T[], depth: number) => FlatArray[]
+ >arr : T[]
+ >depth : number
+
+ return arr.flat(depth);
+->arr.flat(depth) : FlatArray[]
++>arr.flat(depth) : FlatArray[]
+ >arr.flat : (this: A, depth?: D | undefined) => FlatArray[]
+ >arr : T[]
+ >flat : (this: A, depth?: D | undefined) => FlatArray[]
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arrayFrom.js.diff b/testdata/baselines/reference/submodule/compiler/arrayFrom.js.diff
index 9386f60d71..59e9de3fa0 100644
--- a/testdata/baselines/reference/submodule/compiler/arrayFrom.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/arrayFrom.js.diff
@@ -6,6 +6,50 @@
//// [arrayFrom.js]
-// Tests fix for #20432, ensures Array.from accepts all valid inputs
-// Also tests for #19682
- const inputA = [];
- const inputB = [];
- const inputALike = { length: 0 };
\ No newline at end of file
+-var inputA = [];
+-var inputB = [];
+-var inputALike = { length: 0 };
+-var inputARand = getEither(inputA, inputALike);
+-var inputASet = new Set();
+-var result1 = Array.from(inputA);
+-var result2 = Array.from(inputA.values());
+-var result3 = Array.from(inputA.values()); // expect error
+-var result4 = Array.from(inputB, function (_a) {
+- var b = _a.b;
+- return ({ a: b });
+-});
+-var result5 = Array.from(inputALike);
+-var result6 = Array.from(inputALike); // expect error
+-var result7 = Array.from(inputALike, function (_a) {
+- var a = _a.a;
+- return ({ b: a });
+-});
+-var result8 = Array.from(inputARand);
+-var result9 = Array.from(inputARand, function (_a) {
+- var a = _a.a;
+- return ({ b: a });
+-});
+-var result10 = Array.from(new Set());
+-var result11 = Array.from(inputASet, function (_a) {
+- var a = _a.a;
+- return ({ b: a });
+-});
++const inputA = [];
++const inputB = [];
++const inputALike = { length: 0 };
++const inputARand = getEither(inputA, inputALike);
++const inputASet = new Set();
++const result1 = Array.from(inputA);
++const result2 = Array.from(inputA.values());
++const result3 = Array.from(inputA.values()); // expect error
++const result4 = Array.from(inputB, ({ b }) => ({ a: b }));
++const result5 = Array.from(inputALike);
++const result6 = Array.from(inputALike); // expect error
++const result7 = Array.from(inputALike, ({ a }) => ({ b: a }));
++const result8 = Array.from(inputARand);
++const result9 = Array.from(inputARand, ({ a }) => ({ b: a }));
++const result10 = Array.from(new Set());
++const result11 = Array.from(inputASet, ({ a }) => ({ b: a }));
+ // if this is written inline, the compiler seems to infer
+ // the ?: as always taking the false branch, narrowing to ArrayLike,
+ // even when the type is written as : Iterable|ArrayLike
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arrayIndexWithArrayFails.js.diff b/testdata/baselines/reference/submodule/compiler/arrayIndexWithArrayFails.js.diff
new file mode 100644
index 0000000000..94144cf6e2
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/arrayIndexWithArrayFails.js.diff
@@ -0,0 +1,8 @@
+--- old.arrayIndexWithArrayFails.js
++++ new.arrayIndexWithArrayFails.js
+@@= skipped -5, +5 lines =@@
+ const j = arr2[arr1[0]]; // should error
+
+ //// [arrayIndexWithArrayFails.js]
+-var j = arr2[arr1[0]]; // should error
++const j = arr2[arr1[0]]; // should error
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arrayLiteralAndArrayConstructorEquivalence1.symbols.diff b/testdata/baselines/reference/submodule/compiler/arrayLiteralAndArrayConstructorEquivalence1.symbols.diff
new file mode 100644
index 0000000000..e28045d39c
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/arrayLiteralAndArrayConstructorEquivalence1.symbols.diff
@@ -0,0 +1,26 @@
+--- old.arrayLiteralAndArrayConstructorEquivalence1.symbols
++++ new.arrayLiteralAndArrayConstructorEquivalence1.symbols
+@@= skipped -2, +2 lines =@@
+ === arrayLiteralAndArrayConstructorEquivalence1.ts ===
+ var myCars=new Array();
+ >myCars : Symbol(myCars, Decl(arrayLiteralAndArrayConstructorEquivalence1.ts, 0, 3))
+->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+
+ var myCars3 = new Array({});
+ >myCars3 : Symbol(myCars3, Decl(arrayLiteralAndArrayConstructorEquivalence1.ts, 1, 3))
+->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+
+ var myCars4: Array; // error
+ >myCars4 : Symbol(myCars4, Decl(arrayLiteralAndArrayConstructorEquivalence1.ts, 2, 3))
+->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+
+ var myCars5: Array[];
+ >myCars5 : Symbol(myCars5, Decl(arrayLiteralAndArrayConstructorEquivalence1.ts, 3, 3))
+->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+
+ myCars = myCars3;
+ >myCars : Symbol(myCars, Decl(arrayLiteralAndArrayConstructorEquivalence1.ts, 0, 3))
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arrayLiteralComments.js.diff b/testdata/baselines/reference/submodule/compiler/arrayLiteralComments.js.diff
new file mode 100644
index 0000000000..ce15ae9ba9
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/arrayLiteralComments.js.diff
@@ -0,0 +1,11 @@
+--- old.arrayLiteralComments.js
++++ new.arrayLiteralComments.js
+@@= skipped -19, +19 lines =@@
+ var testArrayWithFunc = [
+ // Function comment
+ function () {
+- var x = 1;
++ let x = 1;
+ },
+ // String comment
+ '1',
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arrayLiteralComments.types.diff b/testdata/baselines/reference/submodule/compiler/arrayLiteralComments.types.diff
new file mode 100644
index 0000000000..41d69bfd32
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/arrayLiteralComments.types.diff
@@ -0,0 +1,13 @@
+--- old.arrayLiteralComments.types
++++ new.arrayLiteralComments.types
+@@= skipped -1, +1 lines =@@
+
+ === arrayLiteralComments.ts ===
+ var testArrayWithFunc = [
+->testArrayWithFunc : (string | number | (() => void) | number[] | { a: number; })[]
+->[ // Function comment function() { let x = 1; }, // String comment '1', // Numeric comment 2, // Object comment { a: 1 }, // Array comment [1, 2, 3]] : (string | number | (() => void) | number[] | { a: number; })[]
++>testArrayWithFunc : (string | number | number[] | (() => void) | { a: number; })[]
++>[ // Function comment function() { let x = 1; }, // String comment '1', // Numeric comment 2, // Object comment { a: 1 }, // Array comment [1, 2, 3]] : (string | number | number[] | (() => void) | { a: number; })[]
+
+ // Function comment
+ function() {
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arrayLiteralContextualType.js.diff b/testdata/baselines/reference/submodule/compiler/arrayLiteralContextualType.js.diff
index 0d83f3dcf1..c2c6c38b97 100644
--- a/testdata/baselines/reference/submodule/compiler/arrayLiteralContextualType.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/arrayLiteralContextualType.js.diff
@@ -1,23 +1,31 @@
--- old.arrayLiteralContextualType.js
+++ new.arrayLiteralContextualType.js
-@@= skipped -32, +32 lines =@@
+@@= skipped -31, +31 lines =@@
+ bar(arr); // ok because arr is Array not {}[]
//// [arrayLiteralContextualType.js]
- class Giraffe {
-- constructor() {
+-var Giraffe = /** @class */ (function () {
+- function Giraffe() {
- this.name = "Giraffe";
- this.neckLength = "3m";
- }
-+ name = "Giraffe";
-+ neckLength = "3m";
- }
- class Elephant {
-- constructor() {
+- return Giraffe;
+-}());
+-var Elephant = /** @class */ (function () {
+- function Elephant() {
- this.name = "Elephant";
- this.trunkDiameter = "20cm";
- }
+- return Elephant;
+-}());
++class Giraffe {
++ name = "Giraffe";
++ neckLength = "3m";
++}
++class Elephant {
+ name = "Elephant";
+ trunkDiameter = "20cm";
- }
++}
function foo(animals) { }
- function bar(animals) { }
\ No newline at end of file
+ function bar(animals) { }
+ foo([
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arrayLiteralContextualType.types.diff b/testdata/baselines/reference/submodule/compiler/arrayLiteralContextualType.types.diff
new file mode 100644
index 0000000000..4367c23518
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/arrayLiteralContextualType.types.diff
@@ -0,0 +1,43 @@
+--- old.arrayLiteralContextualType.types
++++ new.arrayLiteralContextualType.types
+@@= skipped -41, +41 lines =@@
+ foo([
+ >foo([ new Giraffe(), new Elephant()]) : void
+ >foo : (animals: IAnimal[]) => void
+->[ new Giraffe(), new Elephant()] : (Giraffe | Elephant)[]
++>[ new Giraffe(), new Elephant()] : (Elephant | Giraffe)[]
+
+ new Giraffe(),
+ >new Giraffe() : Giraffe
+@@= skipped -14, +14 lines =@@
+ bar([
+ >bar([ new Giraffe(), new Elephant()]) : void
+ >bar : (animals: { [n: number]: IAnimal; }) => void
+->[ new Giraffe(), new Elephant()] : (Giraffe | Elephant)[]
++>[ new Giraffe(), new Elephant()] : (Elephant | Giraffe)[]
+
+ new Giraffe(),
+ >new Giraffe() : Giraffe
+@@= skipped -13, +13 lines =@@
+ ]); // Legal because of the contextual type IAnimal provided by the parameter
+
+ var arr = [new Giraffe(), new Elephant()];
+->arr : (Giraffe | Elephant)[]
+->[new Giraffe(), new Elephant()] : (Giraffe | Elephant)[]
++>arr : (Elephant | Giraffe)[]
++>[new Giraffe(), new Elephant()] : (Elephant | Giraffe)[]
+ >new Giraffe() : Giraffe
+ >Giraffe : typeof Giraffe
+ >new Elephant() : Elephant
+@@= skipped -10, +10 lines =@@
+ foo(arr); // ok because arr is Array not {}[]
+ >foo(arr) : void
+ >foo : (animals: IAnimal[]) => void
+->arr : (Giraffe | Elephant)[]
++>arr : (Elephant | Giraffe)[]
+
+ bar(arr); // ok because arr is Array not {}[]
+ >bar(arr) : void
+ >bar : (animals: { [n: number]: IAnimal; }) => void
+->arr : (Giraffe | Elephant)[]
++>arr : (Elephant | Giraffe)[]
diff --git a/testdata/baselines/reference/submodule/compiler/arrayLiteralInNonVarArgParameter.js.diff b/testdata/baselines/reference/submodule/compiler/arrayLiteralInNonVarArgParameter.js.diff
new file mode 100644
index 0000000000..29ff770d71
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/arrayLiteralInNonVarArgParameter.js.diff
@@ -0,0 +1,14 @@
+--- old.arrayLiteralInNonVarArgParameter.js
++++ new.arrayLiteralInNonVarArgParameter.js
+@@= skipped -6, +6 lines =@@
+
+
+ //// [arrayLiteralInNonVarArgParameter.js]
+-function panic(val) {
+- var opt = [];
+- for (var _i = 1; _i < arguments.length; _i++) {
+- opt[_i - 1] = arguments[_i];
+- }
+-}
++function panic(val, ...opt) { }
+ panic([], 'one', 'two');
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arrayLiteralTypeInference.js.diff b/testdata/baselines/reference/submodule/compiler/arrayLiteralTypeInference.js.diff
index e20b2e7900..975221fc1d 100644
--- a/testdata/baselines/reference/submodule/compiler/arrayLiteralTypeInference.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/arrayLiteralTypeInference.js.diff
@@ -1,16 +1,52 @@
--- old.arrayLiteralTypeInference.js
+++ new.arrayLiteralTypeInference.js
-@@= skipped -54, +54 lines =@@
+@@= skipped -53, +53 lines =@@
+
//// [arrayLiteralTypeInference.js]
- class Action {
+-var __extends = (this && this.__extends) || (function () {
+- var extendStatics = function (d, b) {
+- extendStatics = Object.setPrototypeOf ||
+- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+- return extendStatics(d, b);
+- };
+- return function (d, b) {
+- if (typeof b !== "function" && b !== null)
+- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+- extendStatics(d, b);
+- function __() { this.constructor = d; }
+- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+- };
+-})();
+-var Action = /** @class */ (function () {
+- function Action() {
+- }
+- return Action;
+-}());
+-var ActionA = /** @class */ (function (_super) {
+- __extends(ActionA, _super);
+- function ActionA() {
+- return _super !== null && _super.apply(this, arguments) || this;
+- }
+- return ActionA;
+-}(Action));
+-var ActionB = /** @class */ (function (_super) {
+- __extends(ActionB, _super);
+- function ActionB() {
+- return _super !== null && _super.apply(this, arguments) || this;
+- }
+- return ActionB;
+-}(Action));
++class Action {
+ id;
- }
- class ActionA extends Action {
++}
++class ActionA extends Action {
+ value;
- }
- class ActionB extends Action {
++}
++class ActionB extends Action {
+ trueNess;
- }
++}
var x1 = [
- { id: 2, trueness: false },
\ No newline at end of file
+ { id: 2, trueness: false },
+ { id: 3, name: "three" }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arrayOfExportedClass.js.diff b/testdata/baselines/reference/submodule/compiler/arrayOfExportedClass.js.diff
index 112d1c3be7..2ed80093d2 100644
--- a/testdata/baselines/reference/submodule/compiler/arrayOfExportedClass.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/arrayOfExportedClass.js.diff
@@ -1,16 +1,31 @@
--- old.arrayOfExportedClass.js
+++ new.arrayOfExportedClass.js
-@@= skipped -26, +26 lines =@@
+@@= skipped -25, +25 lines =@@
+
//// [arrayOfExportedClass_0.js]
"use strict";
- class Car {
+-var Car = /** @class */ (function () {
+- function Car() {
+- }
+- return Car;
+-}());
++class Car {
+ foo;
- }
++}
module.exports = Car;
//// [arrayOfExportedClass_1.js]
"use strict";
- class Road {
+-var Road = /** @class */ (function () {
+- function Road() {
+- }
+- Road.prototype.AddCars = function (cars) {
++class Road {
+ cars;
- AddCars(cars) {
++ AddCars(cars) {
this.cars = cars;
- }
\ No newline at end of file
+- };
+- return Road;
+-}());
++ }
++}
+ module.exports = Road;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.js.diff b/testdata/baselines/reference/submodule/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.js.diff
index 5684da1ffa..29087e5333 100644
--- a/testdata/baselines/reference/submodule/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.js.diff
@@ -1,16 +1,52 @@
--- old.arrayOfSubtypeIsAssignableToReadonlyArray.js
+++ new.arrayOfSubtypeIsAssignableToReadonlyArray.js
-@@= skipped -22, +22 lines =@@
+@@= skipped -21, +21 lines =@@
+
//// [arrayOfSubtypeIsAssignableToReadonlyArray.js]
- class A {
+-var __extends = (this && this.__extends) || (function () {
+- var extendStatics = function (d, b) {
+- extendStatics = Object.setPrototypeOf ||
+- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+- return extendStatics(d, b);
+- };
+- return function (d, b) {
+- if (typeof b !== "function" && b !== null)
+- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+- extendStatics(d, b);
+- function __() { this.constructor = d; }
+- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+- };
+-})();
+-var A = /** @class */ (function () {
+- function A() {
+- }
+- return A;
+-}());
+-var B = /** @class */ (function (_super) {
+- __extends(B, _super);
+- function B() {
+- return _super !== null && _super.apply(this, arguments) || this;
+- }
+- return B;
+-}(A));
+-var C = /** @class */ (function (_super) {
+- __extends(C, _super);
+- function C() {
+- return _super !== null && _super.apply(this, arguments) || this;
+- }
+- return C;
+-}(Array));
++class A {
+ a;
- }
- class B extends A {
++}
++class B extends A {
+ b;
- }
- class C extends Array {
++}
++class C extends Array {
+ c;
- }
++}
rra = ara;
- rrb = arb; // OK, Array is assignable to ReadonlyArray
\ No newline at end of file
+ rrb = arb; // OK, Array is assignable to ReadonlyArray
+ rra = arb;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.symbols.diff b/testdata/baselines/reference/submodule/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.symbols.diff
new file mode 100644
index 0000000000..668dfc052b
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.symbols.diff
@@ -0,0 +1,26 @@
+--- old.arrayOfSubtypeIsAssignableToReadonlyArray.symbols
++++ new.arrayOfSubtypeIsAssignableToReadonlyArray.symbols
+@@= skipped -12, +12 lines =@@
+ class C extends Array { c }
+ >C : Symbol(C, Decl(arrayOfSubtypeIsAssignableToReadonlyArray.ts, 1, 23))
+ >T : Symbol(T, Decl(arrayOfSubtypeIsAssignableToReadonlyArray.ts, 2, 8))
+->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+ >T : Symbol(T, Decl(arrayOfSubtypeIsAssignableToReadonlyArray.ts, 2, 8))
+ >c : Symbol(C.c, Decl(arrayOfSubtypeIsAssignableToReadonlyArray.ts, 2, 29))
+
+@@= skipped -24, +24 lines =@@
+
+ declare var rra: ReadonlyArray;
+ >rra : Symbol(rra, Decl(arrayOfSubtypeIsAssignableToReadonlyArray.ts, 7, 11))
+->ReadonlyArray : Symbol(ReadonlyArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>ReadonlyArray : Symbol(ReadonlyArray, Decl(lib.es5.d.ts, --, --))
+ >A : Symbol(A, Decl(arrayOfSubtypeIsAssignableToReadonlyArray.ts, 0, 0))
+
+ declare var rrb: ReadonlyArray;
+ >rrb : Symbol(rrb, Decl(arrayOfSubtypeIsAssignableToReadonlyArray.ts, 8, 11))
+->ReadonlyArray : Symbol(ReadonlyArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>ReadonlyArray : Symbol(ReadonlyArray, Decl(lib.es5.d.ts, --, --))
+ >B : Symbol(B, Decl(arrayOfSubtypeIsAssignableToReadonlyArray.ts, 0, 13))
+
+ rra = ara;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arrayReferenceWithoutTypeArgs.js.diff b/testdata/baselines/reference/submodule/compiler/arrayReferenceWithoutTypeArgs.js.diff
new file mode 100644
index 0000000000..1831e051ca
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/arrayReferenceWithoutTypeArgs.js.diff
@@ -0,0 +1,15 @@
+--- old.arrayReferenceWithoutTypeArgs.js
++++ new.arrayReferenceWithoutTypeArgs.js
+@@= skipped -5, +5 lines =@@
+ }
+
+ //// [arrayReferenceWithoutTypeArgs.js]
+-var X = /** @class */ (function () {
+- function X() {
+- }
+- X.prototype.f = function (a) { };
+- return X;
+-}());
++class X {
++ f(a) { }
++}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arrayReferenceWithoutTypeArgs.symbols.diff b/testdata/baselines/reference/submodule/compiler/arrayReferenceWithoutTypeArgs.symbols.diff
new file mode 100644
index 0000000000..d0bd24c2b5
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/arrayReferenceWithoutTypeArgs.symbols.diff
@@ -0,0 +1,9 @@
+--- old.arrayReferenceWithoutTypeArgs.symbols
++++ new.arrayReferenceWithoutTypeArgs.symbols
+@@= skipped -6, +6 lines =@@
+ public f(a: Array) { }
+ >f : Symbol(X.f, Decl(arrayReferenceWithoutTypeArgs.ts, 0, 9))
+ >a : Symbol(a, Decl(arrayReferenceWithoutTypeArgs.ts, 1, 13))
+->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+ }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arraySigChecking.errors.txt b/testdata/baselines/reference/submodule/compiler/arraySigChecking.errors.txt
index e1b1746de5..d39a86ec11 100644
--- a/testdata/baselines/reference/submodule/compiler/arraySigChecking.errors.txt
+++ b/testdata/baselines/reference/submodule/compiler/arraySigChecking.errors.txt
@@ -5,7 +5,7 @@ arraySigChecking.ts(22,16): error TS2322: Type 'number' is not assignable to typ
==== arraySigChecking.ts (4 errors) ====
- declare module M {
+ declare namespace M {
interface iBar { t: any; }
interface iFoo extends iBar {
s: any;
diff --git a/testdata/baselines/reference/submodule/compiler/arraySigChecking.js b/testdata/baselines/reference/submodule/compiler/arraySigChecking.js
index f83b5bb3b7..12b13af0ef 100644
--- a/testdata/baselines/reference/submodule/compiler/arraySigChecking.js
+++ b/testdata/baselines/reference/submodule/compiler/arraySigChecking.js
@@ -1,7 +1,7 @@
//// [tests/cases/compiler/arraySigChecking.ts] ////
//// [arraySigChecking.ts]
-declare module M {
+declare namespace M {
interface iBar { t: any; }
interface iFoo extends iBar {
s: any;
diff --git a/testdata/baselines/reference/submodule/compiler/arraySigChecking.symbols b/testdata/baselines/reference/submodule/compiler/arraySigChecking.symbols
index 10c48f6e6b..d0bccb2385 100644
--- a/testdata/baselines/reference/submodule/compiler/arraySigChecking.symbols
+++ b/testdata/baselines/reference/submodule/compiler/arraySigChecking.symbols
@@ -1,16 +1,16 @@
//// [tests/cases/compiler/arraySigChecking.ts] ////
=== arraySigChecking.ts ===
-declare module M {
+declare namespace M {
>M : Symbol(M, Decl(arraySigChecking.ts, 0, 0))
interface iBar { t: any; }
->iBar : Symbol(iBar, Decl(arraySigChecking.ts, 0, 18))
+>iBar : Symbol(iBar, Decl(arraySigChecking.ts, 0, 21))
>t : Symbol(iBar.t, Decl(arraySigChecking.ts, 1, 20))
interface iFoo extends iBar {
>iFoo : Symbol(iFoo, Decl(arraySigChecking.ts, 1, 30))
->iBar : Symbol(iBar, Decl(arraySigChecking.ts, 0, 18))
+>iBar : Symbol(iBar, Decl(arraySigChecking.ts, 0, 21))
s: any;
>s : Symbol(iFoo.s, Decl(arraySigChecking.ts, 2, 33))
diff --git a/testdata/baselines/reference/submodule/compiler/arraySigChecking.symbols.diff b/testdata/baselines/reference/submodule/compiler/arraySigChecking.symbols.diff
new file mode 100644
index 0000000000..fde66cb6ca
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/arraySigChecking.symbols.diff
@@ -0,0 +1,16 @@
+--- old.arraySigChecking.symbols
++++ new.arraySigChecking.symbols
+@@= skipped -66, +66 lines =@@
+
+ isEmpty(new Array(3));
+ >isEmpty : Symbol(isEmpty, Decl(arraySigChecking.ts, 21, 19))
+->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+
+ isEmpty(new Array(3));
+ >isEmpty : Symbol(isEmpty, Decl(arraySigChecking.ts, 21, 19))
+->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+
+ isEmpty(['a']);
+ >isEmpty : Symbol(isEmpty, Decl(arraySigChecking.ts, 21, 19))
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arraySigChecking.types b/testdata/baselines/reference/submodule/compiler/arraySigChecking.types
index 0cea993b4f..d496f0dcb0 100644
--- a/testdata/baselines/reference/submodule/compiler/arraySigChecking.types
+++ b/testdata/baselines/reference/submodule/compiler/arraySigChecking.types
@@ -1,7 +1,7 @@
//// [tests/cases/compiler/arraySigChecking.ts] ////
=== arraySigChecking.ts ===
-declare module M {
+declare namespace M {
>M : typeof M
interface iBar { t: any; }
diff --git a/testdata/baselines/reference/submodule/compiler/arrayToLocaleStringES5.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/arrayToLocaleStringES5.errors.txt.diff
new file mode 100644
index 0000000000..eb8dff5099
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/arrayToLocaleStringES5.errors.txt.diff
@@ -0,0 +1,129 @@
+--- old.arrayToLocaleStringES5.errors.txt
++++ new.arrayToLocaleStringES5.errors.txt
+@@= skipped -0, +0 lines =@@
+-
++arrayToLocaleStringES5.ts(4,26): error TS2554: Expected 0 arguments, but got 1.
++arrayToLocaleStringES5.ts(5,26): error TS2554: Expected 0 arguments, but got 2.
++arrayToLocaleStringES5.ts(9,28): error TS2554: Expected 0 arguments, but got 1.
++arrayToLocaleStringES5.ts(10,28): error TS2554: Expected 0 arguments, but got 2.
++arrayToLocaleStringES5.ts(14,32): error TS2554: Expected 0 arguments, but got 1.
++arrayToLocaleStringES5.ts(15,32): error TS2554: Expected 0 arguments, but got 2.
++arrayToLocaleStringES5.ts(19,33): error TS2554: Expected 0 arguments, but got 1.
++arrayToLocaleStringES5.ts(20,33): error TS2554: Expected 0 arguments, but got 2.
++arrayToLocaleStringES5.ts(24,40): error TS2554: Expected 0 arguments, but got 1.
++arrayToLocaleStringES5.ts(25,40): error TS2554: Expected 0 arguments, but got 2.
++arrayToLocaleStringES5.ts(29,33): error TS2554: Expected 0 arguments, but got 1.
++arrayToLocaleStringES5.ts(30,33): error TS2554: Expected 0 arguments, but got 2.
++arrayToLocaleStringES5.ts(34,34): error TS2554: Expected 0 arguments, but got 1.
++arrayToLocaleStringES5.ts(35,34): error TS2554: Expected 0 arguments, but got 2.
++arrayToLocaleStringES5.ts(39,33): error TS2554: Expected 0 arguments, but got 1.
++arrayToLocaleStringES5.ts(40,33): error TS2554: Expected 0 arguments, but got 2.
++arrayToLocaleStringES5.ts(44,34): error TS2554: Expected 0 arguments, but got 1.
++arrayToLocaleStringES5.ts(45,34): error TS2554: Expected 0 arguments, but got 2.
++arrayToLocaleStringES5.ts(49,35): error TS2554: Expected 0 arguments, but got 1.
++arrayToLocaleStringES5.ts(50,35): error TS2554: Expected 0 arguments, but got 2.
++arrayToLocaleStringES5.ts(54,35): error TS2554: Expected 0 arguments, but got 1.
++arrayToLocaleStringES5.ts(55,35): error TS2554: Expected 0 arguments, but got 2.
++
++
++==== arrayToLocaleStringES5.ts (22 errors) ====
++ let str: string;
++ const arr = [1, 2, 3];
++ str = arr.toLocaleString(); // OK
++ str = arr.toLocaleString('en-US'); // should be error
++ ~~~~~~~
++!!! error TS2554: Expected 0 arguments, but got 1.
++ str = arr.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error
++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
++!!! error TS2554: Expected 0 arguments, but got 2.
++
++ const dates: readonly Date[] = [new Date(), new Date()];
++ str = dates.toLocaleString(); // OK
++ str = dates.toLocaleString('fr'); // should be error
++ ~~~~
++!!! error TS2554: Expected 0 arguments, but got 1.
++ str = dates.toLocaleString('fr', { timeZone: 'UTC' }); // should be error
++ ~~~~~~~~~~~~~~~~~~~~~~~~~
++!!! error TS2554: Expected 0 arguments, but got 2.
++
++ const int8Array = new Int8Array(3);
++ str = int8Array.toLocaleString(); // OK
++ str = int8Array.toLocaleString('en-US'); // should be error
++ ~~~~~~~
++!!! error TS2554: Expected 0 arguments, but got 1.
++ str = int8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error
++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
++!!! error TS2554: Expected 0 arguments, but got 2.
++
++ const uint8Array = new Uint8Array(3);
++ str = uint8Array.toLocaleString(); // OK
++ str = uint8Array.toLocaleString('en-US'); // should be error
++ ~~~~~~~
++!!! error TS2554: Expected 0 arguments, but got 1.
++ str = uint8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error
++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
++!!! error TS2554: Expected 0 arguments, but got 2.
++
++ const uint8ClampedArray = new Uint8ClampedArray(3);
++ str = uint8ClampedArray.toLocaleString(); // OK
++ str = uint8ClampedArray.toLocaleString('en-US'); // should be error
++ ~~~~~~~
++!!! error TS2554: Expected 0 arguments, but got 1.
++ str = uint8ClampedArray.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error
++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
++!!! error TS2554: Expected 0 arguments, but got 2.
++
++ const int16Array = new Int16Array(3);
++ str = int16Array.toLocaleString(); // OK
++ str = int16Array.toLocaleString('en-US'); // should be error
++ ~~~~~~~
++!!! error TS2554: Expected 0 arguments, but got 1.
++ str = int16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error
++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
++!!! error TS2554: Expected 0 arguments, but got 2.
++
++ const uint16Array = new Uint16Array(3);
++ str = uint16Array.toLocaleString(); // OK
++ str = uint16Array.toLocaleString('en-US'); // should be error
++ ~~~~~~~
++!!! error TS2554: Expected 0 arguments, but got 1.
++ str = uint16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error
++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
++!!! error TS2554: Expected 0 arguments, but got 2.
++
++ const int32Array = new Int32Array(3);
++ str = int32Array.toLocaleString(); // OK
++ str = int32Array.toLocaleString('en-US'); // should be error
++ ~~~~~~~
++!!! error TS2554: Expected 0 arguments, but got 1.
++ str = int32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error
++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
++!!! error TS2554: Expected 0 arguments, but got 2.
++
++ const uint32Array = new Uint32Array(3);
++ str = uint32Array.toLocaleString(); // OK
++ str = uint32Array.toLocaleString('en-US'); // should be error
++ ~~~~~~~
++!!! error TS2554: Expected 0 arguments, but got 1.
++ str = uint32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error
++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
++!!! error TS2554: Expected 0 arguments, but got 2.
++
++ const float32Array = new Float32Array(3);
++ str = float32Array.toLocaleString(); // OK
++ str = float32Array.toLocaleString('en-US'); // should be error
++ ~~~~~~~
++!!! error TS2554: Expected 0 arguments, but got 1.
++ str = float32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error
++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
++!!! error TS2554: Expected 0 arguments, but got 2.
++
++ const float64Array = new Float64Array(3);
++ str = float64Array.toLocaleString(); // OK
++ str = float64Array.toLocaleString('en-US'); // should be error
++ ~~~~~~~
++!!! error TS2554: Expected 0 arguments, but got 1.
++ str = float64Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error
++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
++!!! error TS2554: Expected 0 arguments, but got 2.
++
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arrayToLocaleStringES5.js.diff b/testdata/baselines/reference/submodule/compiler/arrayToLocaleStringES5.js.diff
new file mode 100644
index 0000000000..eb02de8910
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/arrayToLocaleStringES5.js.diff
@@ -0,0 +1,63 @@
+--- old.arrayToLocaleStringES5.js
++++ new.arrayToLocaleStringES5.js
+@@= skipped -58, +58 lines =@@
+
+
+ //// [arrayToLocaleStringES5.js]
+-var str;
+-var arr = [1, 2, 3];
++let str;
++const arr = [1, 2, 3];
+ str = arr.toLocaleString(); // OK
+ str = arr.toLocaleString('en-US'); // should be error
+ str = arr.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error
+-var dates = [new Date(), new Date()];
++const dates = [new Date(), new Date()];
+ str = dates.toLocaleString(); // OK
+ str = dates.toLocaleString('fr'); // should be error
+ str = dates.toLocaleString('fr', { timeZone: 'UTC' }); // should be error
+-var int8Array = new Int8Array(3);
++const int8Array = new Int8Array(3);
+ str = int8Array.toLocaleString(); // OK
+ str = int8Array.toLocaleString('en-US'); // should be error
+ str = int8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error
+-var uint8Array = new Uint8Array(3);
++const uint8Array = new Uint8Array(3);
+ str = uint8Array.toLocaleString(); // OK
+ str = uint8Array.toLocaleString('en-US'); // should be error
+ str = uint8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error
+-var uint8ClampedArray = new Uint8ClampedArray(3);
++const uint8ClampedArray = new Uint8ClampedArray(3);
+ str = uint8ClampedArray.toLocaleString(); // OK
+ str = uint8ClampedArray.toLocaleString('en-US'); // should be error
+ str = uint8ClampedArray.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error
+-var int16Array = new Int16Array(3);
++const int16Array = new Int16Array(3);
+ str = int16Array.toLocaleString(); // OK
+ str = int16Array.toLocaleString('en-US'); // should be error
+ str = int16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error
+-var uint16Array = new Uint16Array(3);
++const uint16Array = new Uint16Array(3);
+ str = uint16Array.toLocaleString(); // OK
+ str = uint16Array.toLocaleString('en-US'); // should be error
+ str = uint16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error
+-var int32Array = new Int32Array(3);
++const int32Array = new Int32Array(3);
+ str = int32Array.toLocaleString(); // OK
+ str = int32Array.toLocaleString('en-US'); // should be error
+ str = int32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error
+-var uint32Array = new Uint32Array(3);
++const uint32Array = new Uint32Array(3);
+ str = uint32Array.toLocaleString(); // OK
+ str = uint32Array.toLocaleString('en-US'); // should be error
+ str = uint32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error
+-var float32Array = new Float32Array(3);
++const float32Array = new Float32Array(3);
+ str = float32Array.toLocaleString(); // OK
+ str = float32Array.toLocaleString('en-US'); // should be error
+ str = float32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error
+-var float64Array = new Float64Array(3);
++const float64Array = new Float64Array(3);
+ str = float64Array.toLocaleString(); // OK
+ str = float64Array.toLocaleString('en-US'); // should be error
+ str = float64Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arrayToLocaleStringES5.symbols.diff b/testdata/baselines/reference/submodule/compiler/arrayToLocaleStringES5.symbols.diff
new file mode 100644
index 0000000000..66f5e82863
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/arrayToLocaleStringES5.symbols.diff
@@ -0,0 +1,342 @@
+--- old.arrayToLocaleStringES5.symbols
++++ new.arrayToLocaleStringES5.symbols
+@@= skipped -8, +8 lines =@@
+
+ str = arr.toLocaleString(); // OK
+ >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3))
+->arr.toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>arr.toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --))
+ >arr : Symbol(arr, Decl(arrayToLocaleStringES5.ts, 1, 5))
+->toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --))
+
+ str = arr.toLocaleString('en-US'); // should be error
+ >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3))
+->arr.toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>arr.toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --))
+ >arr : Symbol(arr, Decl(arrayToLocaleStringES5.ts, 1, 5))
+->toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --))
+
+ str = arr.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error
+ >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3))
+->arr.toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>arr.toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --))
+ >arr : Symbol(arr, Decl(arrayToLocaleStringES5.ts, 1, 5))
+->toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --))
+ >style : Symbol(style, Decl(arrayToLocaleStringES5.ts, 4, 35))
+ >currency : Symbol(currency, Decl(arrayToLocaleStringES5.ts, 4, 54))
+
+ const dates: readonly Date[] = [new Date(), new Date()];
+ >dates : Symbol(dates, Decl(arrayToLocaleStringES5.ts, 6, 5))
+->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
+->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
+->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --))
++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --))
++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --))
+
+ str = dates.toLocaleString(); // OK
+ >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3))
+->dates.toLocaleString : Symbol(ReadonlyArray.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>dates.toLocaleString : Symbol(ReadonlyArray.toLocaleString, Decl(lib.es5.d.ts, --, --))
+ >dates : Symbol(dates, Decl(arrayToLocaleStringES5.ts, 6, 5))
+->toLocaleString : Symbol(ReadonlyArray.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>toLocaleString : Symbol(ReadonlyArray.toLocaleString, Decl(lib.es5.d.ts, --, --))
+
+ str = dates.toLocaleString('fr'); // should be error
+ >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3))
+->dates.toLocaleString : Symbol(ReadonlyArray.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>dates.toLocaleString : Symbol(ReadonlyArray.toLocaleString, Decl(lib.es5.d.ts, --, --))
+ >dates : Symbol(dates, Decl(arrayToLocaleStringES5.ts, 6, 5))
+->toLocaleString : Symbol(ReadonlyArray.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>toLocaleString : Symbol(ReadonlyArray.toLocaleString, Decl(lib.es5.d.ts, --, --))
+
+ str = dates.toLocaleString('fr', { timeZone: 'UTC' }); // should be error
+ >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3))
+->dates.toLocaleString : Symbol(ReadonlyArray.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>dates.toLocaleString : Symbol(ReadonlyArray.toLocaleString, Decl(lib.es5.d.ts, --, --))
+ >dates : Symbol(dates, Decl(arrayToLocaleStringES5.ts, 6, 5))
+->toLocaleString : Symbol(ReadonlyArray.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>toLocaleString : Symbol(ReadonlyArray.toLocaleString, Decl(lib.es5.d.ts, --, --))
+ >timeZone : Symbol(timeZone, Decl(arrayToLocaleStringES5.ts, 9, 34))
+
+ const int8Array = new Int8Array(3);
+ >int8Array : Symbol(int8Array, Decl(arrayToLocaleStringES5.ts, 11, 5))
+->Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+
+ str = int8Array.toLocaleString(); // OK
+ >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3))
+->int8Array.toLocaleString : Symbol(Int8Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>int8Array.toLocaleString : Symbol(Int8Array.toLocaleString, Decl(lib.es5.d.ts, --, --))
+ >int8Array : Symbol(int8Array, Decl(arrayToLocaleStringES5.ts, 11, 5))
+->toLocaleString : Symbol(Int8Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>toLocaleString : Symbol(Int8Array.toLocaleString, Decl(lib.es5.d.ts, --, --))
+
+ str = int8Array.toLocaleString('en-US'); // should be error
+ >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3))
+->int8Array.toLocaleString : Symbol(Int8Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>int8Array.toLocaleString : Symbol(Int8Array.toLocaleString, Decl(lib.es5.d.ts, --, --))
+ >int8Array : Symbol(int8Array, Decl(arrayToLocaleStringES5.ts, 11, 5))
+->toLocaleString : Symbol(Int8Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>toLocaleString : Symbol(Int8Array.toLocaleString, Decl(lib.es5.d.ts, --, --))
+
+ str = int8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error
+ >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3))
+->int8Array.toLocaleString : Symbol(Int8Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>int8Array.toLocaleString : Symbol(Int8Array.toLocaleString, Decl(lib.es5.d.ts, --, --))
+ >int8Array : Symbol(int8Array, Decl(arrayToLocaleStringES5.ts, 11, 5))
+->toLocaleString : Symbol(Int8Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>toLocaleString : Symbol(Int8Array.toLocaleString, Decl(lib.es5.d.ts, --, --))
+ >style : Symbol(style, Decl(arrayToLocaleStringES5.ts, 14, 41))
+ >currency : Symbol(currency, Decl(arrayToLocaleStringES5.ts, 14, 60))
+
+ const uint8Array = new Uint8Array(3);
+ >uint8Array : Symbol(uint8Array, Decl(arrayToLocaleStringES5.ts, 16, 5))
+->Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+
+ str = uint8Array.toLocaleString(); // OK
+ >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3))
+->uint8Array.toLocaleString : Symbol(Uint8Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>uint8Array.toLocaleString : Symbol(Uint8Array.toLocaleString, Decl(lib.es5.d.ts, --, --))
+ >uint8Array : Symbol(uint8Array, Decl(arrayToLocaleStringES5.ts, 16, 5))
+->toLocaleString : Symbol(Uint8Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>toLocaleString : Symbol(Uint8Array.toLocaleString, Decl(lib.es5.d.ts, --, --))
+
+ str = uint8Array.toLocaleString('en-US'); // should be error
+ >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3))
+->uint8Array.toLocaleString : Symbol(Uint8Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>uint8Array.toLocaleString : Symbol(Uint8Array.toLocaleString, Decl(lib.es5.d.ts, --, --))
+ >uint8Array : Symbol(uint8Array, Decl(arrayToLocaleStringES5.ts, 16, 5))
+->toLocaleString : Symbol(Uint8Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>toLocaleString : Symbol(Uint8Array.toLocaleString, Decl(lib.es5.d.ts, --, --))
+
+ str = uint8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error
+ >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3))
+->uint8Array.toLocaleString : Symbol(Uint8Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>uint8Array.toLocaleString : Symbol(Uint8Array.toLocaleString, Decl(lib.es5.d.ts, --, --))
+ >uint8Array : Symbol(uint8Array, Decl(arrayToLocaleStringES5.ts, 16, 5))
+->toLocaleString : Symbol(Uint8Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>toLocaleString : Symbol(Uint8Array.toLocaleString, Decl(lib.es5.d.ts, --, --))
+ >style : Symbol(style, Decl(arrayToLocaleStringES5.ts, 19, 42))
+ >currency : Symbol(currency, Decl(arrayToLocaleStringES5.ts, 19, 61))
+
+ const uint8ClampedArray = new Uint8ClampedArray(3);
+ >uint8ClampedArray : Symbol(uint8ClampedArray, Decl(arrayToLocaleStringES5.ts, 21, 5))
+->Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+
+ str = uint8ClampedArray.toLocaleString(); // OK
+ >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3))
+->uint8ClampedArray.toLocaleString : Symbol(Uint8ClampedArray.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>uint8ClampedArray.toLocaleString : Symbol(Uint8ClampedArray.toLocaleString, Decl(lib.es5.d.ts, --, --))
+ >uint8ClampedArray : Symbol(uint8ClampedArray, Decl(arrayToLocaleStringES5.ts, 21, 5))
+->toLocaleString : Symbol(Uint8ClampedArray.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>toLocaleString : Symbol(Uint8ClampedArray.toLocaleString, Decl(lib.es5.d.ts, --, --))
+
+ str = uint8ClampedArray.toLocaleString('en-US'); // should be error
+ >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3))
+->uint8ClampedArray.toLocaleString : Symbol(Uint8ClampedArray.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>uint8ClampedArray.toLocaleString : Symbol(Uint8ClampedArray.toLocaleString, Decl(lib.es5.d.ts, --, --))
+ >uint8ClampedArray : Symbol(uint8ClampedArray, Decl(arrayToLocaleStringES5.ts, 21, 5))
+->toLocaleString : Symbol(Uint8ClampedArray.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>toLocaleString : Symbol(Uint8ClampedArray.toLocaleString, Decl(lib.es5.d.ts, --, --))
+
+ str = uint8ClampedArray.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error
+ >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3))
+->uint8ClampedArray.toLocaleString : Symbol(Uint8ClampedArray.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>uint8ClampedArray.toLocaleString : Symbol(Uint8ClampedArray.toLocaleString, Decl(lib.es5.d.ts, --, --))
+ >uint8ClampedArray : Symbol(uint8ClampedArray, Decl(arrayToLocaleStringES5.ts, 21, 5))
+->toLocaleString : Symbol(Uint8ClampedArray.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>toLocaleString : Symbol(Uint8ClampedArray.toLocaleString, Decl(lib.es5.d.ts, --, --))
+ >style : Symbol(style, Decl(arrayToLocaleStringES5.ts, 24, 49))
+ >currency : Symbol(currency, Decl(arrayToLocaleStringES5.ts, 24, 68))
+
+ const int16Array = new Int16Array(3);
+ >int16Array : Symbol(int16Array, Decl(arrayToLocaleStringES5.ts, 26, 5))
+->Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+
+ str = int16Array.toLocaleString(); // OK
+ >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3))
+->int16Array.toLocaleString : Symbol(Int16Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>int16Array.toLocaleString : Symbol(Int16Array.toLocaleString, Decl(lib.es5.d.ts, --, --))
+ >int16Array : Symbol(int16Array, Decl(arrayToLocaleStringES5.ts, 26, 5))
+->toLocaleString : Symbol(Int16Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>toLocaleString : Symbol(Int16Array.toLocaleString, Decl(lib.es5.d.ts, --, --))
+
+ str = int16Array.toLocaleString('en-US'); // should be error
+ >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3))
+->int16Array.toLocaleString : Symbol(Int16Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>int16Array.toLocaleString : Symbol(Int16Array.toLocaleString, Decl(lib.es5.d.ts, --, --))
+ >int16Array : Symbol(int16Array, Decl(arrayToLocaleStringES5.ts, 26, 5))
+->toLocaleString : Symbol(Int16Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>toLocaleString : Symbol(Int16Array.toLocaleString, Decl(lib.es5.d.ts, --, --))
+
+ str = int16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error
+ >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3))
+->int16Array.toLocaleString : Symbol(Int16Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>int16Array.toLocaleString : Symbol(Int16Array.toLocaleString, Decl(lib.es5.d.ts, --, --))
+ >int16Array : Symbol(int16Array, Decl(arrayToLocaleStringES5.ts, 26, 5))
+->toLocaleString : Symbol(Int16Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>toLocaleString : Symbol(Int16Array.toLocaleString, Decl(lib.es5.d.ts, --, --))
+ >style : Symbol(style, Decl(arrayToLocaleStringES5.ts, 29, 42))
+ >currency : Symbol(currency, Decl(arrayToLocaleStringES5.ts, 29, 61))
+
+ const uint16Array = new Uint16Array(3);
+ >uint16Array : Symbol(uint16Array, Decl(arrayToLocaleStringES5.ts, 31, 5))
+->Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+
+ str = uint16Array.toLocaleString(); // OK
+ >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3))
+->uint16Array.toLocaleString : Symbol(Uint16Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>uint16Array.toLocaleString : Symbol(Uint16Array.toLocaleString, Decl(lib.es5.d.ts, --, --))
+ >uint16Array : Symbol(uint16Array, Decl(arrayToLocaleStringES5.ts, 31, 5))
+->toLocaleString : Symbol(Uint16Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>toLocaleString : Symbol(Uint16Array.toLocaleString, Decl(lib.es5.d.ts, --, --))
+
+ str = uint16Array.toLocaleString('en-US'); // should be error
+ >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3))
+->uint16Array.toLocaleString : Symbol(Uint16Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>uint16Array.toLocaleString : Symbol(Uint16Array.toLocaleString, Decl(lib.es5.d.ts, --, --))
+ >uint16Array : Symbol(uint16Array, Decl(arrayToLocaleStringES5.ts, 31, 5))
+->toLocaleString : Symbol(Uint16Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>toLocaleString : Symbol(Uint16Array.toLocaleString, Decl(lib.es5.d.ts, --, --))
+
+ str = uint16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error
+ >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3))
+->uint16Array.toLocaleString : Symbol(Uint16Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>uint16Array.toLocaleString : Symbol(Uint16Array.toLocaleString, Decl(lib.es5.d.ts, --, --))
+ >uint16Array : Symbol(uint16Array, Decl(arrayToLocaleStringES5.ts, 31, 5))
+->toLocaleString : Symbol(Uint16Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>toLocaleString : Symbol(Uint16Array.toLocaleString, Decl(lib.es5.d.ts, --, --))
+ >style : Symbol(style, Decl(arrayToLocaleStringES5.ts, 34, 43))
+ >currency : Symbol(currency, Decl(arrayToLocaleStringES5.ts, 34, 62))
+
+ const int32Array = new Int32Array(3);
+ >int32Array : Symbol(int32Array, Decl(arrayToLocaleStringES5.ts, 36, 5))
+->Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+
+ str = int32Array.toLocaleString(); // OK
+ >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3))
+->int32Array.toLocaleString : Symbol(Int32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>int32Array.toLocaleString : Symbol(Int32Array.toLocaleString, Decl(lib.es5.d.ts, --, --))
+ >int32Array : Symbol(int32Array, Decl(arrayToLocaleStringES5.ts, 36, 5))
+->toLocaleString : Symbol(Int32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>toLocaleString : Symbol(Int32Array.toLocaleString, Decl(lib.es5.d.ts, --, --))
+
+ str = int32Array.toLocaleString('en-US'); // should be error
+ >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3))
+->int32Array.toLocaleString : Symbol(Int32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>int32Array.toLocaleString : Symbol(Int32Array.toLocaleString, Decl(lib.es5.d.ts, --, --))
+ >int32Array : Symbol(int32Array, Decl(arrayToLocaleStringES5.ts, 36, 5))
+->toLocaleString : Symbol(Int32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>toLocaleString : Symbol(Int32Array.toLocaleString, Decl(lib.es5.d.ts, --, --))
+
+ str = int32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error
+ >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3))
+->int32Array.toLocaleString : Symbol(Int32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>int32Array.toLocaleString : Symbol(Int32Array.toLocaleString, Decl(lib.es5.d.ts, --, --))
+ >int32Array : Symbol(int32Array, Decl(arrayToLocaleStringES5.ts, 36, 5))
+->toLocaleString : Symbol(Int32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>toLocaleString : Symbol(Int32Array.toLocaleString, Decl(lib.es5.d.ts, --, --))
+ >style : Symbol(style, Decl(arrayToLocaleStringES5.ts, 39, 42))
+ >currency : Symbol(currency, Decl(arrayToLocaleStringES5.ts, 39, 61))
+
+ const uint32Array = new Uint32Array(3);
+ >uint32Array : Symbol(uint32Array, Decl(arrayToLocaleStringES5.ts, 41, 5))
+->Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+
+ str = uint32Array.toLocaleString(); // OK
+ >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3))
+->uint32Array.toLocaleString : Symbol(Uint32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>uint32Array.toLocaleString : Symbol(Uint32Array.toLocaleString, Decl(lib.es5.d.ts, --, --))
+ >uint32Array : Symbol(uint32Array, Decl(arrayToLocaleStringES5.ts, 41, 5))
+->toLocaleString : Symbol(Uint32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>toLocaleString : Symbol(Uint32Array.toLocaleString, Decl(lib.es5.d.ts, --, --))
+
+ str = uint32Array.toLocaleString('en-US'); // should be error
+ >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3))
+->uint32Array.toLocaleString : Symbol(Uint32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>uint32Array.toLocaleString : Symbol(Uint32Array.toLocaleString, Decl(lib.es5.d.ts, --, --))
+ >uint32Array : Symbol(uint32Array, Decl(arrayToLocaleStringES5.ts, 41, 5))
+->toLocaleString : Symbol(Uint32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>toLocaleString : Symbol(Uint32Array.toLocaleString, Decl(lib.es5.d.ts, --, --))
+
+ str = uint32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error
+ >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3))
+->uint32Array.toLocaleString : Symbol(Uint32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>uint32Array.toLocaleString : Symbol(Uint32Array.toLocaleString, Decl(lib.es5.d.ts, --, --))
+ >uint32Array : Symbol(uint32Array, Decl(arrayToLocaleStringES5.ts, 41, 5))
+->toLocaleString : Symbol(Uint32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>toLocaleString : Symbol(Uint32Array.toLocaleString, Decl(lib.es5.d.ts, --, --))
+ >style : Symbol(style, Decl(arrayToLocaleStringES5.ts, 44, 43))
+ >currency : Symbol(currency, Decl(arrayToLocaleStringES5.ts, 44, 62))
+
+ const float32Array = new Float32Array(3);
+ >float32Array : Symbol(float32Array, Decl(arrayToLocaleStringES5.ts, 46, 5))
+->Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+
+ str = float32Array.toLocaleString(); // OK
+ >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3))
+->float32Array.toLocaleString : Symbol(Float32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>float32Array.toLocaleString : Symbol(Float32Array.toLocaleString, Decl(lib.es5.d.ts, --, --))
+ >float32Array : Symbol(float32Array, Decl(arrayToLocaleStringES5.ts, 46, 5))
+->toLocaleString : Symbol(Float32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>toLocaleString : Symbol(Float32Array.toLocaleString, Decl(lib.es5.d.ts, --, --))
+
+ str = float32Array.toLocaleString('en-US'); // should be error
+ >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3))
+->float32Array.toLocaleString : Symbol(Float32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>float32Array.toLocaleString : Symbol(Float32Array.toLocaleString, Decl(lib.es5.d.ts, --, --))
+ >float32Array : Symbol(float32Array, Decl(arrayToLocaleStringES5.ts, 46, 5))
+->toLocaleString : Symbol(Float32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>toLocaleString : Symbol(Float32Array.toLocaleString, Decl(lib.es5.d.ts, --, --))
+
+ str = float32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error
+ >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3))
+->float32Array.toLocaleString : Symbol(Float32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>float32Array.toLocaleString : Symbol(Float32Array.toLocaleString, Decl(lib.es5.d.ts, --, --))
+ >float32Array : Symbol(float32Array, Decl(arrayToLocaleStringES5.ts, 46, 5))
+->toLocaleString : Symbol(Float32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>toLocaleString : Symbol(Float32Array.toLocaleString, Decl(lib.es5.d.ts, --, --))
+ >style : Symbol(style, Decl(arrayToLocaleStringES5.ts, 49, 44))
+ >currency : Symbol(currency, Decl(arrayToLocaleStringES5.ts, 49, 63))
+
+ const float64Array = new Float64Array(3);
+ >float64Array : Symbol(float64Array, Decl(arrayToLocaleStringES5.ts, 51, 5))
+->Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+
+ str = float64Array.toLocaleString(); // OK
+ >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3))
+->float64Array.toLocaleString : Symbol(Float64Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>float64Array.toLocaleString : Symbol(Float64Array.toLocaleString, Decl(lib.es5.d.ts, --, --))
+ >float64Array : Symbol(float64Array, Decl(arrayToLocaleStringES5.ts, 51, 5))
+->toLocaleString : Symbol(Float64Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>toLocaleString : Symbol(Float64Array.toLocaleString, Decl(lib.es5.d.ts, --, --))
+
+ str = float64Array.toLocaleString('en-US'); // should be error
+ >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3))
+->float64Array.toLocaleString : Symbol(Float64Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>float64Array.toLocaleString : Symbol(Float64Array.toLocaleString, Decl(lib.es5.d.ts, --, --))
+ >float64Array : Symbol(float64Array, Decl(arrayToLocaleStringES5.ts, 51, 5))
+->toLocaleString : Symbol(Float64Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>toLocaleString : Symbol(Float64Array.toLocaleString, Decl(lib.es5.d.ts, --, --))
+
+ str = float64Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error
+ >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3))
+->float64Array.toLocaleString : Symbol(Float64Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>float64Array.toLocaleString : Symbol(Float64Array.toLocaleString, Decl(lib.es5.d.ts, --, --))
+ >float64Array : Symbol(float64Array, Decl(arrayToLocaleStringES5.ts, 51, 5))
+->toLocaleString : Symbol(Float64Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>toLocaleString : Symbol(Float64Array.toLocaleString, Decl(lib.es5.d.ts, --, --))
+ >style : Symbol(style, Decl(arrayToLocaleStringES5.ts, 54, 44))
+ >currency : Symbol(currency, Decl(arrayToLocaleStringES5.ts, 54, 63))
diff --git a/testdata/baselines/reference/submodule/compiler/arrayToLocaleStringES5.types.diff b/testdata/baselines/reference/submodule/compiler/arrayToLocaleStringES5.types.diff
new file mode 100644
index 0000000000..4f141920ff
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/arrayToLocaleStringES5.types.diff
@@ -0,0 +1,415 @@
+--- old.arrayToLocaleStringES5.types
++++ new.arrayToLocaleStringES5.types
+@@= skipped -14, +14 lines =@@
+ >str = arr.toLocaleString() : string
+ >str : string
+ >arr.toLocaleString() : string
+->arr.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; }
++>arr.toLocaleString : () => string
+ >arr : number[]
+->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; }
++>toLocaleString : () => string
+
+ str = arr.toLocaleString('en-US'); // should be error
+ >str = arr.toLocaleString('en-US') : string
+ >str : string
+ >arr.toLocaleString('en-US') : string
+->arr.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; }
++>arr.toLocaleString : () => string
+ >arr : number[]
+->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; }
++>toLocaleString : () => string
+ >'en-US' : "en-US"
+
+ str = arr.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error
+ >str = arr.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string
+ >str : string
+ >arr.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string
+->arr.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; }
++>arr.toLocaleString : () => string
+ >arr : number[]
+->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; }
++>toLocaleString : () => string
+ >'en-US' : "en-US"
+->{ style: 'currency', currency: 'EUR' } : { style: "currency"; currency: string; }
+->style : "currency"
++>{ style: 'currency', currency: 'EUR' } : { style: string; currency: string; }
++>style : string
+ >'currency' : "currency"
+ >currency : string
+ >'EUR' : "EUR"
+@@= skipped -39, +39 lines =@@
+ >str = dates.toLocaleString() : string
+ >str : string
+ >dates.toLocaleString() : string
+->dates.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; }
++>dates.toLocaleString : () => string
+ >dates : readonly Date[]
+->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; }
++>toLocaleString : () => string
+
+ str = dates.toLocaleString('fr'); // should be error
+ >str = dates.toLocaleString('fr') : string
+ >str : string
+ >dates.toLocaleString('fr') : string
+->dates.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; }
++>dates.toLocaleString : () => string
+ >dates : readonly Date[]
+->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; }
++>toLocaleString : () => string
+ >'fr' : "fr"
+
+ str = dates.toLocaleString('fr', { timeZone: 'UTC' }); // should be error
+ >str = dates.toLocaleString('fr', { timeZone: 'UTC' }) : string
+ >str : string
+ >dates.toLocaleString('fr', { timeZone: 'UTC' }) : string
+->dates.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; }
++>dates.toLocaleString : () => string
+ >dates : readonly Date[]
+->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; }
++>toLocaleString : () => string
+ >'fr' : "fr"
+ >{ timeZone: 'UTC' } : { timeZone: string; }
+ >timeZone : string
+@@= skipped -35, +35 lines =@@
+ >str = int8Array.toLocaleString() : string
+ >str : string
+ >int8Array.toLocaleString() : string
+->int8Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; }
++>int8Array.toLocaleString : () => string
+ >int8Array : Int8Array
+->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; }
++>toLocaleString : () => string
+
+ str = int8Array.toLocaleString('en-US'); // should be error
+ >str = int8Array.toLocaleString('en-US') : string
+ >str : string
+ >int8Array.toLocaleString('en-US') : string
+->int8Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; }
++>int8Array.toLocaleString : () => string
+ >int8Array : Int8Array
+->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; }
++>toLocaleString : () => string
+ >'en-US' : "en-US"
+
+ str = int8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error
+ >str = int8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string
+ >str : string
+ >int8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string
+->int8Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; }
++>int8Array.toLocaleString : () => string
+ >int8Array : Int8Array
+->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; }
++>toLocaleString : () => string
+ >'en-US' : "en-US"
+->{ style: 'currency', currency: 'EUR' } : { style: "currency"; currency: string; }
+->style : "currency"
++>{ style: 'currency', currency: 'EUR' } : { style: string; currency: string; }
++>style : string
+ >'currency' : "currency"
+ >currency : string
+ >'EUR' : "EUR"
+@@= skipped -37, +37 lines =@@
+ >str = uint8Array.toLocaleString() : string
+ >str : string
+ >uint8Array.toLocaleString() : string
+->uint8Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; }
++>uint8Array.toLocaleString : () => string
+ >uint8Array : Uint8Array
+->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; }
++>toLocaleString : () => string
+
+ str = uint8Array.toLocaleString('en-US'); // should be error
+ >str = uint8Array.toLocaleString('en-US') : string
+ >str : string
+ >uint8Array.toLocaleString('en-US') : string
+->uint8Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; }
++>uint8Array.toLocaleString : () => string
+ >uint8Array : Uint8Array
+->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; }
++>toLocaleString : () => string
+ >'en-US' : "en-US"
+
+ str = uint8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error
+ >str = uint8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string
+ >str : string
+ >uint8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string
+->uint8Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; }
++>uint8Array.toLocaleString : () => string
+ >uint8Array : Uint8Array
+->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; }
++>toLocaleString : () => string
+ >'en-US' : "en-US"
+->{ style: 'currency', currency: 'EUR' } : { style: "currency"; currency: string; }
+->style : "currency"
++>{ style: 'currency', currency: 'EUR' } : { style: string; currency: string; }
++>style : string
+ >'currency' : "currency"
+ >currency : string
+ >'EUR' : "EUR"
+@@= skipped -37, +37 lines =@@
+ >str = uint8ClampedArray.toLocaleString() : string
+ >str : string
+ >uint8ClampedArray.toLocaleString() : string
+->uint8ClampedArray.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; }
++>uint8ClampedArray.toLocaleString : () => string
+ >uint8ClampedArray : Uint8ClampedArray
+->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; }
++>toLocaleString : () => string
+
+ str = uint8ClampedArray.toLocaleString('en-US'); // should be error
+ >str = uint8ClampedArray.toLocaleString('en-US') : string
+ >str : string
+ >uint8ClampedArray.toLocaleString('en-US') : string
+->uint8ClampedArray.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; }
++>uint8ClampedArray.toLocaleString : () => string
+ >uint8ClampedArray : Uint8ClampedArray
+->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; }
++>toLocaleString : () => string
+ >'en-US' : "en-US"
+
+ str = uint8ClampedArray.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error
+ >str = uint8ClampedArray.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string
+ >str : string
+ >uint8ClampedArray.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string
+->uint8ClampedArray.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; }
++>uint8ClampedArray.toLocaleString : () => string
+ >uint8ClampedArray : Uint8ClampedArray
+->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; }
++>toLocaleString : () => string
+ >'en-US' : "en-US"
+->{ style: 'currency', currency: 'EUR' } : { style: "currency"; currency: string; }
+->style : "currency"
++>{ style: 'currency', currency: 'EUR' } : { style: string; currency: string; }
++>style : string
+ >'currency' : "currency"
+ >currency : string
+ >'EUR' : "EUR"
+@@= skipped -37, +37 lines =@@
+ >str = int16Array.toLocaleString() : string
+ >str : string
+ >int16Array.toLocaleString() : string
+->int16Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; }
++>int16Array.toLocaleString : () => string
+ >int16Array : Int16Array
+->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; }
++>toLocaleString : () => string
+
+ str = int16Array.toLocaleString('en-US'); // should be error
+ >str = int16Array.toLocaleString('en-US') : string
+ >str : string
+ >int16Array.toLocaleString('en-US') : string
+->int16Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; }
++>int16Array.toLocaleString : () => string
+ >int16Array : Int16Array
+->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; }
++>toLocaleString : () => string
+ >'en-US' : "en-US"
+
+ str = int16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error
+ >str = int16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string
+ >str : string
+ >int16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string
+->int16Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; }
++>int16Array.toLocaleString : () => string
+ >int16Array : Int16Array
+->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; }
++>toLocaleString : () => string
+ >'en-US' : "en-US"
+->{ style: 'currency', currency: 'EUR' } : { style: "currency"; currency: string; }
+->style : "currency"
++>{ style: 'currency', currency: 'EUR' } : { style: string; currency: string; }
++>style : string
+ >'currency' : "currency"
+ >currency : string
+ >'EUR' : "EUR"
+@@= skipped -37, +37 lines =@@
+ >str = uint16Array.toLocaleString() : string
+ >str : string
+ >uint16Array.toLocaleString() : string
+->uint16Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; }
++>uint16Array.toLocaleString : () => string
+ >uint16Array : Uint16Array
+->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; }
++>toLocaleString : () => string
+
+ str = uint16Array.toLocaleString('en-US'); // should be error
+ >str = uint16Array.toLocaleString('en-US') : string
+ >str : string
+ >uint16Array.toLocaleString('en-US') : string
+->uint16Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; }
++>uint16Array.toLocaleString : () => string
+ >uint16Array : Uint16Array
+->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; }
++>toLocaleString : () => string
+ >'en-US' : "en-US"
+
+ str = uint16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error
+ >str = uint16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string
+ >str : string
+ >uint16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string
+->uint16Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; }
++>uint16Array.toLocaleString : () => string
+ >uint16Array : Uint16Array
+->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; }
++>toLocaleString : () => string
+ >'en-US' : "en-US"
+->{ style: 'currency', currency: 'EUR' } : { style: "currency"; currency: string; }
+->style : "currency"
++>{ style: 'currency', currency: 'EUR' } : { style: string; currency: string; }
++>style : string
+ >'currency' : "currency"
+ >currency : string
+ >'EUR' : "EUR"
+@@= skipped -37, +37 lines =@@
+ >str = int32Array.toLocaleString() : string
+ >str : string
+ >int32Array.toLocaleString() : string
+->int32Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; }
++>int32Array.toLocaleString : () => string
+ >int32Array : Int32Array
+->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; }
++>toLocaleString : () => string
+
+ str = int32Array.toLocaleString('en-US'); // should be error
+ >str = int32Array.toLocaleString('en-US') : string
+ >str : string
+ >int32Array.toLocaleString('en-US') : string
+->int32Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; }
++>int32Array.toLocaleString : () => string
+ >int32Array : Int32Array
+->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; }
++>toLocaleString : () => string
+ >'en-US' : "en-US"
+
+ str = int32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error
+ >str = int32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string
+ >str : string
+ >int32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string
+->int32Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; }
++>int32Array.toLocaleString : () => string
+ >int32Array : Int32Array
+->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; }
++>toLocaleString : () => string
+ >'en-US' : "en-US"
+->{ style: 'currency', currency: 'EUR' } : { style: "currency"; currency: string; }
+->style : "currency"
++>{ style: 'currency', currency: 'EUR' } : { style: string; currency: string; }
++>style : string
+ >'currency' : "currency"
+ >currency : string
+ >'EUR' : "EUR"
+@@= skipped -37, +37 lines =@@
+ >str = uint32Array.toLocaleString() : string
+ >str : string
+ >uint32Array.toLocaleString() : string
+->uint32Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; }
++>uint32Array.toLocaleString : () => string
+ >uint32Array : Uint32Array
+->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; }
++>toLocaleString : () => string
+
+ str = uint32Array.toLocaleString('en-US'); // should be error
+ >str = uint32Array.toLocaleString('en-US') : string
+ >str : string
+ >uint32Array.toLocaleString('en-US') : string
+->uint32Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; }
++>uint32Array.toLocaleString : () => string
+ >uint32Array : Uint32Array
+->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; }
++>toLocaleString : () => string
+ >'en-US' : "en-US"
+
+ str = uint32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error
+ >str = uint32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string
+ >str : string
+ >uint32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string
+->uint32Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; }
++>uint32Array.toLocaleString : () => string
+ >uint32Array : Uint32Array
+->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; }
++>toLocaleString : () => string
+ >'en-US' : "en-US"
+->{ style: 'currency', currency: 'EUR' } : { style: "currency"; currency: string; }
+->style : "currency"
++>{ style: 'currency', currency: 'EUR' } : { style: string; currency: string; }
++>style : string
+ >'currency' : "currency"
+ >currency : string
+ >'EUR' : "EUR"
+@@= skipped -37, +37 lines =@@
+ >str = float32Array.toLocaleString() : string
+ >str : string
+ >float32Array.toLocaleString() : string
+->float32Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; }
++>float32Array.toLocaleString : () => string
+ >float32Array : Float32Array
+->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; }
++>toLocaleString : () => string
+
+ str = float32Array.toLocaleString('en-US'); // should be error
+ >str = float32Array.toLocaleString('en-US') : string
+ >str : string
+ >float32Array.toLocaleString('en-US') : string
+->float32Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; }
++>float32Array.toLocaleString : () => string
+ >float32Array : Float32Array
+->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; }
++>toLocaleString : () => string
+ >'en-US' : "en-US"
+
+ str = float32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error
+ >str = float32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string
+ >str : string
+ >float32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string
+->float32Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; }
++>float32Array.toLocaleString : () => string
+ >float32Array : Float32Array
+->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; }
++>toLocaleString : () => string
+ >'en-US' : "en-US"
+->{ style: 'currency', currency: 'EUR' } : { style: "currency"; currency: string; }
+->style : "currency"
++>{ style: 'currency', currency: 'EUR' } : { style: string; currency: string; }
++>style : string
+ >'currency' : "currency"
+ >currency : string
+ >'EUR' : "EUR"
+@@= skipped -37, +37 lines =@@
+ >str = float64Array.toLocaleString() : string
+ >str : string
+ >float64Array.toLocaleString() : string
+->float64Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; }
++>float64Array.toLocaleString : () => string
+ >float64Array : Float64Array
+->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; }
++>toLocaleString : () => string
+
+ str = float64Array.toLocaleString('en-US'); // should be error
+ >str = float64Array.toLocaleString('en-US') : string
+ >str : string
+ >float64Array.toLocaleString('en-US') : string
+->float64Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; }
++>float64Array.toLocaleString : () => string
+ >float64Array : Float64Array
+->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; }
++>toLocaleString : () => string
+ >'en-US' : "en-US"
+
+ str = float64Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error
+ >str = float64Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string
+ >str : string
+ >float64Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string
+->float64Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; }
++>float64Array.toLocaleString : () => string
+ >float64Array : Float64Array
+->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; }
++>toLocaleString : () => string
+ >'en-US' : "en-US"
+->{ style: 'currency', currency: 'EUR' } : { style: "currency"; currency: string; }
+->style : "currency"
++>{ style: 'currency', currency: 'EUR' } : { style: string; currency: string; }
++>style : string
+ >'currency' : "currency"
+ >currency : string
+ >'EUR' : "EUR"
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arrayTypeInSignatureOfInterfaceAndClass.js b/testdata/baselines/reference/submodule/compiler/arrayTypeInSignatureOfInterfaceAndClass.js
index cffc71656b..b99e5e949b 100644
--- a/testdata/baselines/reference/submodule/compiler/arrayTypeInSignatureOfInterfaceAndClass.js
+++ b/testdata/baselines/reference/submodule/compiler/arrayTypeInSignatureOfInterfaceAndClass.js
@@ -1,12 +1,12 @@
//// [tests/cases/compiler/arrayTypeInSignatureOfInterfaceAndClass.ts] ////
//// [arrayTypeInSignatureOfInterfaceAndClass.ts]
-declare module WinJS {
+declare namespace WinJS {
class Promise {
then(success?: (value: T) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise;
}
}
-declare module Data {
+declare namespace Data {
export interface IListItem {
itemIndex: number;
key: any;
diff --git a/testdata/baselines/reference/submodule/compiler/arrayTypeInSignatureOfInterfaceAndClass.symbols b/testdata/baselines/reference/submodule/compiler/arrayTypeInSignatureOfInterfaceAndClass.symbols
index 263bb0d26b..0ada87f0c0 100644
--- a/testdata/baselines/reference/submodule/compiler/arrayTypeInSignatureOfInterfaceAndClass.symbols
+++ b/testdata/baselines/reference/submodule/compiler/arrayTypeInSignatureOfInterfaceAndClass.symbols
@@ -1,11 +1,11 @@
//// [tests/cases/compiler/arrayTypeInSignatureOfInterfaceAndClass.ts] ////
=== arrayTypeInSignatureOfInterfaceAndClass.ts ===
-declare module WinJS {
+declare namespace WinJS {
>WinJS : Symbol(WinJS, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 0, 0))
class Promise {
->Promise : Symbol(Promise, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 0, 22))
+>Promise : Symbol(Promise, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 0, 25))
>T : Symbol(T, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 1, 18))
then(success?: (value: T) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise;
@@ -14,23 +14,23 @@ declare module WinJS {
>success : Symbol(success, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 2, 16))
>value : Symbol(value, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 2, 27))
>T : Symbol(T, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 1, 18))
->Promise : Symbol(Promise, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 0, 22))
+>Promise : Symbol(Promise, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 0, 25))
>U : Symbol(U, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 2, 13))
>error : Symbol(error, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 2, 51))
>error : Symbol(error, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 2, 61))
->Promise : Symbol(Promise, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 0, 22))
+>Promise : Symbol(Promise, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 0, 25))
>U : Symbol(U, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 2, 13))
>progress : Symbol(progress, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 2, 87))
>progress : Symbol(progress, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 2, 100))
->Promise : Symbol(Promise, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 0, 22))
+>Promise : Symbol(Promise, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 0, 25))
>U : Symbol(U, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 2, 13))
}
}
-declare module Data {
+declare namespace Data {
>Data : Symbol(Data, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 4, 1))
export interface IListItem {
->IListItem : Symbol(IListItem, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 5, 21))
+>IListItem : Symbol(IListItem, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 5, 24))
>T : Symbol(T, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 6, 31))
itemIndex: number;
@@ -68,8 +68,8 @@ declare module Data {
>indices : Symbol(indices, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 18, 22))
>options : Symbol(options, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 18, 40))
>WinJS : Symbol(WinJS, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 0, 0))
->Promise : Symbol(WinJS.Promise, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 0, 22))
->IListItem : Symbol(IListItem, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 5, 21))
+>Promise : Symbol(WinJS.Promise, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 0, 25))
+>IListItem : Symbol(IListItem, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 5, 24))
>T : Symbol(T, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 16, 34))
}
export class VirtualList implements IVirtualList {
@@ -84,8 +84,8 @@ declare module Data {
>indices : Symbol(indices, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 22, 29))
>options : Symbol(options, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 22, 47))
>WinJS : Symbol(WinJS, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 0, 0))
->Promise : Symbol(WinJS.Promise, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 0, 22))
->IListItem : Symbol(IListItem, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 5, 21))
+>Promise : Symbol(WinJS.Promise, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 0, 25))
+>IListItem : Symbol(IListItem, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 5, 24))
>T : Symbol(T, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 20, 29))
}
}
diff --git a/testdata/baselines/reference/submodule/compiler/arrayTypeInSignatureOfInterfaceAndClass.types b/testdata/baselines/reference/submodule/compiler/arrayTypeInSignatureOfInterfaceAndClass.types
index eabcdbce05..08220130bd 100644
--- a/testdata/baselines/reference/submodule/compiler/arrayTypeInSignatureOfInterfaceAndClass.types
+++ b/testdata/baselines/reference/submodule/compiler/arrayTypeInSignatureOfInterfaceAndClass.types
@@ -1,7 +1,7 @@
//// [tests/cases/compiler/arrayTypeInSignatureOfInterfaceAndClass.ts] ////
=== arrayTypeInSignatureOfInterfaceAndClass.ts ===
-declare module WinJS {
+declare namespace WinJS {
>WinJS : typeof WinJS
class Promise {
@@ -17,7 +17,7 @@ declare module WinJS {
>progress : any
}
}
-declare module Data {
+declare namespace Data {
>Data : typeof Data
export interface IListItem {
diff --git a/testdata/baselines/reference/submodule/compiler/arrayconcat.js.diff b/testdata/baselines/reference/submodule/compiler/arrayconcat.js.diff
index 52f285b2cd..8bfa3caa13 100644
--- a/testdata/baselines/reference/submodule/compiler/arrayconcat.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/arrayconcat.js.diff
@@ -1,10 +1,25 @@
--- old.arrayconcat.js
+++ new.arrayconcat.js
-@@= skipped -31, +31 lines =@@
+@@= skipped -30, +30 lines =@@
+ }
//// [arrayconcat.js]
- class parser {
+-var parser = /** @class */ (function () {
+- function parser() {
+- }
+- parser.prototype.m = function () {
++class parser {
+ options;
- m() {
++ m() {
this.options = this.options.sort(function (a, b) {
- var aName = a.name.toLowerCase();
\ No newline at end of file
+ var aName = a.name.toLowerCase();
+ var bName = b.name.toLowerCase();
+@@= skipped -17, +16 lines =@@
+ return 0;
+ }
+ });
+- };
+- return parser;
+-}());
++ }
++}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arrayconcat.types.diff b/testdata/baselines/reference/submodule/compiler/arrayconcat.types.diff
new file mode 100644
index 0000000000..8ea3093058
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/arrayconcat.types.diff
@@ -0,0 +1,10 @@
+--- old.arrayconcat.types
++++ new.arrayconcat.types
+@@= skipped -44, +44 lines =@@
+ >this : this
+ >options : IOptions[]
+ >sort : (compareFn?: (a: IOptions, b: IOptions) => number) => IOptions[]
+->function(a, b) { var aName = a.name.toLowerCase(); var bName = b.name.toLowerCase(); if (aName > bName) { return 1; } else if (aName < bName) { return -1; } else { return 0; } } : (a: IOptions, b: IOptions) => 1 | -1 | 0
++>function(a, b) { var aName = a.name.toLowerCase(); var bName = b.name.toLowerCase(); if (aName > bName) { return 1; } else if (aName < bName) { return -1; } else { return 0; } } : (a: IOptions, b: IOptions) => -1 | 0 | 1
+ >a : IOptions
+ >b : IOptions
diff --git a/testdata/baselines/reference/submodule/compiler/arrowFunctionErrorSpan.js.diff b/testdata/baselines/reference/submodule/compiler/arrowFunctionErrorSpan.js.diff
index 9db8ead36c..06e40dc3c0 100644
--- a/testdata/baselines/reference/submodule/compiler/arrowFunctionErrorSpan.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/arrowFunctionErrorSpan.js.diff
@@ -1,13 +1,51 @@
--- old.arrowFunctionErrorSpan.js
+++ new.arrowFunctionErrorSpan.js
-@@= skipped -82, +82 lines =@@
+@@= skipped -58, +58 lines =@@
+ //// [arrowFunctionErrorSpan.js]
+ function f(a) { }
+ // oneliner
+-f(function () { });
++f(() => { });
+ // multiline, body
+-f(function () {
++f(() => {
+ });
+ // multiline 2, body
+-f(function () {
++f(() => {
+ });
+ // multiline 3, arrow on a new line
+-f(function () { });
++f(() => { });
+ // multiline 4, arguments
+-f(function (a, b, c, d) { });
++f((a, b, c, d) => { });
+ // single line with a comment
+ f(/*
+- */ function () { });
++ */ () => { });
+ // multi line with a comment
+ f(/*
+- */ function () { });
++ */ () => { });
+ // multi line with a comment 2
+ f(/*
+- */ function () {
++ */ () => {
+ });
// multi line with a comment 3
f(// comment 1
// comment 2
--() => {
+-function () {
+() =>
+// comment 3
+{
// comment 4
}
- // comment 5
\ No newline at end of file
+ // comment 5
+ );
+ // body is not a block
+-f(function (_) { return 1 +
+- 2; });
++f(_ => 1 +
++ 2);
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arrowFunctionInConstructorArgument1.js.diff b/testdata/baselines/reference/submodule/compiler/arrowFunctionInConstructorArgument1.js.diff
new file mode 100644
index 0000000000..5cd9b5d882
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/arrowFunctionInConstructorArgument1.js.diff
@@ -0,0 +1,16 @@
+--- old.arrowFunctionInConstructorArgument1.js
++++ new.arrowFunctionInConstructorArgument1.js
+@@= skipped -7, +7 lines =@@
+
+
+ //// [arrowFunctionInConstructorArgument1.js]
+-var C = /** @class */ (function () {
+- function C(x) {
+- }
+- return C;
+-}());
+-var c = new C(function () { return asdf; }); // should error
++class C {
++ constructor(x) { }
++}
++var c = new C(() => { return asdf; }); // should error
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arrowFunctionInExpressionStatement1.js.diff b/testdata/baselines/reference/submodule/compiler/arrowFunctionInExpressionStatement1.js.diff
new file mode 100644
index 0000000000..eddc34b7f4
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/arrowFunctionInExpressionStatement1.js.diff
@@ -0,0 +1,8 @@
+--- old.arrowFunctionInExpressionStatement1.js
++++ new.arrowFunctionInExpressionStatement1.js
+@@= skipped -3, +3 lines =@@
+ () => 0;
+
+ //// [arrowFunctionInExpressionStatement1.js]
+-(function () { return 0; });
++() => 0;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arrowFunctionInExpressionStatement2.js b/testdata/baselines/reference/submodule/compiler/arrowFunctionInExpressionStatement2.js
index e92c5c6b80..ae6bc2fb64 100644
--- a/testdata/baselines/reference/submodule/compiler/arrowFunctionInExpressionStatement2.js
+++ b/testdata/baselines/reference/submodule/compiler/arrowFunctionInExpressionStatement2.js
@@ -1,7 +1,7 @@
//// [tests/cases/compiler/arrowFunctionInExpressionStatement2.ts] ////
//// [arrowFunctionInExpressionStatement2.ts]
-module M {
+namespace M {
() => 0;
}
diff --git a/testdata/baselines/reference/submodule/compiler/arrowFunctionInExpressionStatement2.js.diff b/testdata/baselines/reference/submodule/compiler/arrowFunctionInExpressionStatement2.js.diff
new file mode 100644
index 0000000000..71f58c423f
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/arrowFunctionInExpressionStatement2.js.diff
@@ -0,0 +1,9 @@
+--- old.arrowFunctionInExpressionStatement2.js
++++ new.arrowFunctionInExpressionStatement2.js
+@@= skipped -7, +7 lines =@@
+ //// [arrowFunctionInExpressionStatement2.js]
+ var M;
+ (function (M) {
+- (function () { return 0; });
++ () => 0;
+ })(M || (M = {}));
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arrowFunctionInExpressionStatement2.symbols b/testdata/baselines/reference/submodule/compiler/arrowFunctionInExpressionStatement2.symbols
index eeb19bb759..ebfd509178 100644
--- a/testdata/baselines/reference/submodule/compiler/arrowFunctionInExpressionStatement2.symbols
+++ b/testdata/baselines/reference/submodule/compiler/arrowFunctionInExpressionStatement2.symbols
@@ -1,7 +1,7 @@
//// [tests/cases/compiler/arrowFunctionInExpressionStatement2.ts] ////
=== arrowFunctionInExpressionStatement2.ts ===
-module M {
+namespace M {
>M : Symbol(M, Decl(arrowFunctionInExpressionStatement2.ts, 0, 0))
() => 0;
diff --git a/testdata/baselines/reference/submodule/compiler/arrowFunctionInExpressionStatement2.types b/testdata/baselines/reference/submodule/compiler/arrowFunctionInExpressionStatement2.types
index af05180173..ce07c07c59 100644
--- a/testdata/baselines/reference/submodule/compiler/arrowFunctionInExpressionStatement2.types
+++ b/testdata/baselines/reference/submodule/compiler/arrowFunctionInExpressionStatement2.types
@@ -1,7 +1,7 @@
//// [tests/cases/compiler/arrowFunctionInExpressionStatement2.ts] ////
=== arrowFunctionInExpressionStatement2.ts ===
-module M {
+namespace M {
>M : typeof M
() => 0;
diff --git a/testdata/baselines/reference/submodule/compiler/arrowFunctionMissingCurlyWithSemicolon.js.diff b/testdata/baselines/reference/submodule/compiler/arrowFunctionMissingCurlyWithSemicolon.js.diff
new file mode 100644
index 0000000000..cc982c9efe
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/arrowFunctionMissingCurlyWithSemicolon.js.diff
@@ -0,0 +1,11 @@
+--- old.arrowFunctionMissingCurlyWithSemicolon.js
++++ new.arrowFunctionMissingCurlyWithSemicolon.js
+@@= skipped -7, +7 lines =@@
+
+ //// [arrowFunctionMissingCurlyWithSemicolon.js]
+ // Should error at semicolon.
+-var f = function () { return ; };
++var f = () => ;
+ var b = 1 * 2 * 3 * 4;
+-var square = function (x) { return x * x; };
++var square = (x) => x * x;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arrowFunctionParsingDoesNotConfuseParenthesizedObjectForArrowHead.js.diff b/testdata/baselines/reference/submodule/compiler/arrowFunctionParsingDoesNotConfuseParenthesizedObjectForArrowHead.js.diff
new file mode 100644
index 0000000000..5deec6a8a6
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/arrowFunctionParsingDoesNotConfuseParenthesizedObjectForArrowHead.js.diff
@@ -0,0 +1,20 @@
+--- old.arrowFunctionParsingDoesNotConfuseParenthesizedObjectForArrowHead.js
++++ new.arrowFunctionParsingDoesNotConfuseParenthesizedObjectForArrowHead.js
+@@= skipped -17, +17 lines =@@
+
+
+ //// [arrowFunctionParsingDoesNotConfuseParenthesizedObjectForArrowHead.js]
+-var test = function () { return ({
++const test = () => ({
+ // "Identifier expected." error on "!" and two "Duplicate identifier '(Missing)'." errors on space.
+ prop: !value, // remove ! to see that errors will be gone
+- run: function () {
++ run: () => {
+ // comment next line or remove "()" to see that errors will be gone
+ if (!a.b()) {
+ return 'special';
+ }
+ return 'default';
+ }
+-}); };
++});
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arrowFunctionParsingDoesNotConfuseParenthesizedObjectForArrowHead.types.diff b/testdata/baselines/reference/submodule/compiler/arrowFunctionParsingDoesNotConfuseParenthesizedObjectForArrowHead.types.diff
new file mode 100644
index 0000000000..44d7145ebd
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/arrowFunctionParsingDoesNotConfuseParenthesizedObjectForArrowHead.types.diff
@@ -0,0 +1,28 @@
+--- old.arrowFunctionParsingDoesNotConfuseParenthesizedObjectForArrowHead.types
++++ new.arrowFunctionParsingDoesNotConfuseParenthesizedObjectForArrowHead.types
+@@= skipped -8, +8 lines =@@
+ >a : any
+
+ const test = () => ({
+->test : () => { prop: boolean; run: () => "special" | "default"; }
+->() => ({ // "Identifier expected." error on "!" and two "Duplicate identifier '(Missing)'." errors on space. prop: !value, // remove ! to see that errors will be gone run: () => { //replace arrow function with regular function to see that errors will be gone // comment next line or remove "()" to see that errors will be gone if(!a.b()) { return 'special'; } return 'default'; }}) : () => { prop: boolean; run: () => "special" | "default"; }
+->({ // "Identifier expected." error on "!" and two "Duplicate identifier '(Missing)'." errors on space. prop: !value, // remove ! to see that errors will be gone run: () => { //replace arrow function with regular function to see that errors will be gone // comment next line or remove "()" to see that errors will be gone if(!a.b()) { return 'special'; } return 'default'; }}) : { prop: boolean; run: () => "special" | "default"; }
+->{ // "Identifier expected." error on "!" and two "Duplicate identifier '(Missing)'." errors on space. prop: !value, // remove ! to see that errors will be gone run: () => { //replace arrow function with regular function to see that errors will be gone // comment next line or remove "()" to see that errors will be gone if(!a.b()) { return 'special'; } return 'default'; }} : { prop: boolean; run: () => "special" | "default"; }
++>test : () => { prop: boolean; run: () => "default" | "special"; }
++>() => ({ // "Identifier expected." error on "!" and two "Duplicate identifier '(Missing)'." errors on space. prop: !value, // remove ! to see that errors will be gone run: () => { //replace arrow function with regular function to see that errors will be gone // comment next line or remove "()" to see that errors will be gone if(!a.b()) { return 'special'; } return 'default'; }}) : () => { prop: boolean; run: () => "default" | "special"; }
++>({ // "Identifier expected." error on "!" and two "Duplicate identifier '(Missing)'." errors on space. prop: !value, // remove ! to see that errors will be gone run: () => { //replace arrow function with regular function to see that errors will be gone // comment next line or remove "()" to see that errors will be gone if(!a.b()) { return 'special'; } return 'default'; }}) : { prop: boolean; run: () => "default" | "special"; }
++>{ // "Identifier expected." error on "!" and two "Duplicate identifier '(Missing)'." errors on space. prop: !value, // remove ! to see that errors will be gone run: () => { //replace arrow function with regular function to see that errors will be gone // comment next line or remove "()" to see that errors will be gone if(!a.b()) { return 'special'; } return 'default'; }} : { prop: boolean; run: () => "default" | "special"; }
+
+ // "Identifier expected." error on "!" and two "Duplicate identifier '(Missing)'." errors on space.
+ prop: !value, // remove ! to see that errors will be gone
+@@= skipped -12, +12 lines =@@
+ >value : boolean
+
+ run: () => { //replace arrow function with regular function to see that errors will be gone
+->run : () => "special" | "default"
+->() => { //replace arrow function with regular function to see that errors will be gone // comment next line or remove "()" to see that errors will be gone if(!a.b()) { return 'special'; } return 'default'; } : () => "special" | "default"
++>run : () => "default" | "special"
++>() => { //replace arrow function with regular function to see that errors will be gone // comment next line or remove "()" to see that errors will be gone if(!a.b()) { return 'special'; } return 'default'; } : () => "default" | "special"
+
+ // comment next line or remove "()" to see that errors will be gone
+ if(!a.b()) { return 'special'; }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arrowFunctionWithObjectLiteralBody1.js.diff b/testdata/baselines/reference/submodule/compiler/arrowFunctionWithObjectLiteralBody1.js.diff
index 675e5b6980..0109f00349 100644
--- a/testdata/baselines/reference/submodule/compiler/arrowFunctionWithObjectLiteralBody1.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/arrowFunctionWithObjectLiteralBody1.js.diff
@@ -4,5 +4,5 @@
var v = a => {}
//// [arrowFunctionWithObjectLiteralBody1.js]
--var v = a => ({});
+-var v = function (a) { return ({}); };
+var v = a => (({}));
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arrowFunctionWithObjectLiteralBody2.js.diff b/testdata/baselines/reference/submodule/compiler/arrowFunctionWithObjectLiteralBody2.js.diff
index b77814c345..403188adf6 100644
--- a/testdata/baselines/reference/submodule/compiler/arrowFunctionWithObjectLiteralBody2.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/arrowFunctionWithObjectLiteralBody2.js.diff
@@ -4,5 +4,5 @@
var v = a => {}
//// [arrowFunctionWithObjectLiteralBody2.js]
--var v = a => ({});
+-var v = function (a) { return ({}); };
+var v = a => (({}));
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arrowFunctionWithObjectLiteralBody5.js.diff b/testdata/baselines/reference/submodule/compiler/arrowFunctionWithObjectLiteralBody5.js.diff
index d407145696..591fd117f0 100644
--- a/testdata/baselines/reference/submodule/compiler/arrowFunctionWithObjectLiteralBody5.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/arrowFunctionWithObjectLiteralBody5.js.diff
@@ -4,9 +4,11 @@
var d = () => ((({ name: "foo", message: "bar" })));
//// [arrowFunctionWithObjectLiteralBody5.js]
--var a = () => ({ name: "foo", message: "bar" });
--var b = () => ({ name: "foo", message: "bar" });
+-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" }); };
+var a = () => (({ name: "foo", message: "bar" }));
+var b = () => (({ name: "foo", message: "bar" }));
- var c = () => ({ name: "foo", message: "bar" });
- var d = () => ({ name: "foo", message: "bar" });
\ No newline at end of file
++var c = () => ({ name: "foo", message: "bar" });
++var d = () => ({ name: "foo", message: "bar" });
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arrowFunctionsMissingTokens.errors.txt b/testdata/baselines/reference/submodule/compiler/arrowFunctionsMissingTokens.errors.txt
index 925b762414..392b446b4d 100644
--- a/testdata/baselines/reference/submodule/compiler/arrowFunctionsMissingTokens.errors.txt
+++ b/testdata/baselines/reference/submodule/compiler/arrowFunctionsMissingTokens.errors.txt
@@ -25,7 +25,7 @@ arrowFunctionsMissingTokens.ts(52,41): error TS1005: '=>' expected.
==== arrowFunctionsMissingTokens.ts (24 errors) ====
- module missingArrowsWithCurly {
+ namespace missingArrowsWithCurly {
var a = () { };
~
!!! error TS1005: '=>' expected.
@@ -47,8 +47,8 @@ arrowFunctionsMissingTokens.ts(52,41): error TS1005: '=>' expected.
!!! error TS1005: '=>' expected.
}
- module missingCurliesWithArrow {
- module withStatement {
+ namespace missingCurliesWithArrow {
+ namespace withStatement {
var a = () => var k = 10;};
~~~
!!! error TS1005: '{' expected.
@@ -74,7 +74,7 @@ arrowFunctionsMissingTokens.ts(52,41): error TS1005: '=>' expected.
!!! error TS1005: '{' expected.
}
- module withoutStatement {
+ namespace withoutStatement {
var a = () => };
~
!!! error TS1109: Expression expected.
@@ -105,7 +105,7 @@ arrowFunctionsMissingTokens.ts(52,41): error TS1005: '=>' expected.
~
!!! error TS1128: Declaration or statement expected.
- module ce_nEst_pas_une_arrow_function {
+ namespace ce_nEst_pas_une_arrow_function {
var a = ();
~
!!! error TS1109: Expression expected.
@@ -127,7 +127,7 @@ arrowFunctionsMissingTokens.ts(52,41): error TS1005: '=>' expected.
!!! error TS1005: '=>' expected.
}
- module okay {
+ namespace okay {
var a = () => { };
var b = (): void => { }
diff --git a/testdata/baselines/reference/submodule/compiler/arrowFunctionsMissingTokens.js b/testdata/baselines/reference/submodule/compiler/arrowFunctionsMissingTokens.js
index 53d2565dfb..a7534a4bb7 100644
--- a/testdata/baselines/reference/submodule/compiler/arrowFunctionsMissingTokens.js
+++ b/testdata/baselines/reference/submodule/compiler/arrowFunctionsMissingTokens.js
@@ -1,7 +1,7 @@
//// [tests/cases/compiler/arrowFunctionsMissingTokens.ts] ////
//// [arrowFunctionsMissingTokens.ts]
-module missingArrowsWithCurly {
+namespace missingArrowsWithCurly {
var a = () { };
var b = (): void { }
@@ -13,8 +13,8 @@ module missingArrowsWithCurly {
var e = (x: number, y: string): void { };
}
-module missingCurliesWithArrow {
- module withStatement {
+namespace missingCurliesWithArrow {
+ namespace withStatement {
var a = () => var k = 10;};
var b = (): void => var k = 10;}
@@ -28,7 +28,7 @@ module missingCurliesWithArrow {
var f = () => var k = 10;}
}
- module withoutStatement {
+ namespace withoutStatement {
var a = () => };
var b = (): void => }
@@ -43,7 +43,7 @@ module missingCurliesWithArrow {
}
}
-module ce_nEst_pas_une_arrow_function {
+namespace ce_nEst_pas_une_arrow_function {
var a = ();
var b = (): void;
@@ -55,7 +55,7 @@ module ce_nEst_pas_une_arrow_function {
var e = (x: number, y: string): void;
}
-module okay {
+namespace okay {
var a = () => { };
var b = (): void => { }
diff --git a/testdata/baselines/reference/submodule/compiler/arrowFunctionsMissingTokens.js.diff b/testdata/baselines/reference/submodule/compiler/arrowFunctionsMissingTokens.js.diff
new file mode 100644
index 0000000000..042204f1be
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/arrowFunctionsMissingTokens.js.diff
@@ -0,0 +1,83 @@
+--- old.arrowFunctionsMissingTokens.js
++++ new.arrowFunctionsMissingTokens.js
+@@= skipped -69, +69 lines =@@
+ //// [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 = () => { };
++ var b = () => { };
++ var c = (x) => { };
++ var d = (x, y) => { };
++ var e = (x, y) => { };
+ })(missingArrowsWithCurly || (missingArrowsWithCurly = {}));
+ var missingCurliesWithArrow;
+ (function (missingCurliesWithArrow) {
+- var withStatement;
++ let 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 = () => { var k = 10; };
++ var b = () => { var k = 10; };
++ var c = (x) => { var k = 10; };
++ var d = (x, y) => { var k = 10; };
++ var e = (x, y) => { var k = 10; };
++ var f = () => { var k = 10; };
+ })(withStatement || (withStatement = {}));
+- var withoutStatement;
++ let withoutStatement;
+ (function (withoutStatement) {
+- var a = function () { return ; };
++ var a = () => ;
+ })(withoutStatement || (withoutStatement = {}));
+ ;
+- var b = function () { return ; };
++ var b = () => ;
+ })(missingCurliesWithArrow || (missingCurliesWithArrow = {}));
+-var c = function (x) { return ; };
+-;
+-var d = function (x, y) { return ; };
+-;
+-var e = function (x, y) { return ; };
+-;
+-var f = function () { return ; };
++var c = (x) => ;
++;
++var d = (x, y) => ;
++;
++var e = (x, y) => ;
++;
++var f = () => ;
+ var ce_nEst_pas_une_arrow_function;
+ (function (ce_nEst_pas_une_arrow_function) {
+ var a = ();
+- var b = function () { return ; };
++ var b = () => ;
+ var c = (x);
+- var d = function (x, y) { return ; };
+- var e = function (x, y) { return ; };
++ var d = (x, y) => ;
++ var e = (x, y) => ;
+ })(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 = () => { };
++ var b = () => { };
++ var c = (x) => { };
++ var d = (x, y) => { };
++ var e = (x, y) => { };
+ })(okay || (okay = {}));
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/arrowFunctionsMissingTokens.symbols b/testdata/baselines/reference/submodule/compiler/arrowFunctionsMissingTokens.symbols
index fb67a28d35..10e0034c8e 100644
--- a/testdata/baselines/reference/submodule/compiler/arrowFunctionsMissingTokens.symbols
+++ b/testdata/baselines/reference/submodule/compiler/arrowFunctionsMissingTokens.symbols
@@ -1,7 +1,7 @@
//// [tests/cases/compiler/arrowFunctionsMissingTokens.ts] ////
=== arrowFunctionsMissingTokens.ts ===
-module missingArrowsWithCurly {
+namespace missingArrowsWithCurly {
>missingArrowsWithCurly : Symbol(missingArrowsWithCurly, Decl(arrowFunctionsMissingTokens.ts, 0, 0))
var a = () { };
@@ -25,11 +25,11 @@ module missingArrowsWithCurly {
>y : Symbol(y, Decl(arrowFunctionsMissingTokens.ts, 9, 23))
}
-module missingCurliesWithArrow {
+namespace missingCurliesWithArrow {
>missingCurliesWithArrow : Symbol(missingCurliesWithArrow, Decl(arrowFunctionsMissingTokens.ts, 10, 1))
- module withStatement {
->withStatement : Symbol(withStatement, Decl(arrowFunctionsMissingTokens.ts, 12, 32))
+ namespace withStatement {
+>withStatement : Symbol(withStatement, Decl(arrowFunctionsMissingTokens.ts, 12, 35))
var a = () => var k = 10;};
>a : Symbol(a, Decl(arrowFunctionsMissingTokens.ts, 14, 11))
@@ -61,7 +61,7 @@ module missingCurliesWithArrow {
>k : Symbol(k, Decl(arrowFunctionsMissingTokens.ts, 24, 25))
}
- module withoutStatement {
+ namespace withoutStatement {
>withoutStatement : Symbol(withoutStatement, Decl(arrowFunctionsMissingTokens.ts, 25, 5))
var a = () => };
@@ -89,7 +89,7 @@ module missingCurliesWithArrow {
}
}
-module ce_nEst_pas_une_arrow_function {
+namespace ce_nEst_pas_une_arrow_function {
>ce_nEst_pas_une_arrow_function : Symbol(ce_nEst_pas_une_arrow_function, Decl(arrowFunctionsMissingTokens.ts, 40, 1))
var a = ();
@@ -112,7 +112,7 @@ module ce_nEst_pas_une_arrow_function {
>y : Symbol(y, Decl(arrowFunctionsMissingTokens.ts, 51, 23))
}
-module okay {
+namespace okay {
>okay : Symbol(okay, Decl(arrowFunctionsMissingTokens.ts, 52, 1))
var a = () => { };
diff --git a/testdata/baselines/reference/submodule/compiler/arrowFunctionsMissingTokens.types b/testdata/baselines/reference/submodule/compiler/arrowFunctionsMissingTokens.types
index a36e955340..08a13d8c6d 100644
--- a/testdata/baselines/reference/submodule/compiler/arrowFunctionsMissingTokens.types
+++ b/testdata/baselines/reference/submodule/compiler/arrowFunctionsMissingTokens.types
@@ -1,7 +1,7 @@
//// [tests/cases/compiler/arrowFunctionsMissingTokens.ts] ////
=== arrowFunctionsMissingTokens.ts ===
-module missingArrowsWithCurly {
+namespace missingArrowsWithCurly {
>missingArrowsWithCurly : typeof missingArrowsWithCurly
var a = () { };
@@ -30,10 +30,10 @@ module missingArrowsWithCurly {
>y : string
}
-module missingCurliesWithArrow {
+namespace missingCurliesWithArrow {
>missingCurliesWithArrow : typeof missingCurliesWithArrow
- module withStatement {
+ namespace withStatement {
>withStatement : typeof withStatement
var a = () => var k = 10;};
@@ -78,7 +78,7 @@ module missingCurliesWithArrow {
>10 : 10
}
- module withoutStatement {
+ namespace withoutStatement {
>withoutStatement : typeof withoutStatement
var a = () => };
@@ -118,7 +118,7 @@ module missingCurliesWithArrow {
}
}
-module ce_nEst_pas_une_arrow_function {
+namespace ce_nEst_pas_une_arrow_function {
>ce_nEst_pas_une_arrow_function : typeof ce_nEst_pas_une_arrow_function
var a = ();
@@ -151,7 +151,7 @@ module ce_nEst_pas_une_arrow_function {
> : any
}
-module okay {
+namespace okay {
>okay : typeof okay
var a = () => { };
diff --git a/testdata/baselines/reference/submodule/compiler/asiAbstract.js.diff b/testdata/baselines/reference/submodule/compiler/asiAbstract.js.diff
index 6bd52baaf9..43d21cd42a 100644
--- a/testdata/baselines/reference/submodule/compiler/asiAbstract.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/asiAbstract.js.diff
@@ -1,13 +1,33 @@
--- old.asiAbstract.js
+++ new.asiAbstract.js
-@@= skipped -21, +21 lines =@@
- class NonAbstractClass {
- }
- class C2 {
+@@= skipped -18, +18 lines =@@
+
+ //// [asiAbstract.js]
+ abstract;
+-var NonAbstractClass = /** @class */ (function () {
+- function NonAbstractClass() {
+- }
+- return NonAbstractClass;
+-}());
+-var C2 = /** @class */ (function () {
+- function C2() {
+- }
+- C2.prototype.nonAbstractFunction = function () {
+- };
+- return C2;
+-}());
+-var C3 = /** @class */ (function () {
+- function C3() {
+- }
+- return C3;
+-}());
++class NonAbstractClass {
++}
++class C2 {
+ abstract;
- nonAbstractFunction() {
- }
- }
- class C3 {
++ nonAbstractFunction() {
++ }
++}
++class C3 {
+ abstract;
- }
\ No newline at end of file
++}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/asiInES6Classes.js.diff b/testdata/baselines/reference/submodule/compiler/asiInES6Classes.js.diff
index 36b098082a..ebde65b8fe 100644
--- a/testdata/baselines/reference/submodule/compiler/asiInES6Classes.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/asiInES6Classes.js.diff
@@ -1,17 +1,24 @@
--- old.asiInES6Classes.js
+++ new.asiInES6Classes.js
-@@= skipped -25, +25 lines =@@
+@@= skipped -24, +24 lines =@@
+
//// [asiInES6Classes.js]
- class Foo {
-- constructor() {
+-var Foo = /** @class */ (function () {
+- function Foo() {
- this.defaults = {
- done: false
- };
- }
+- Foo.prototype.bar = function () {
+- return 3;
++class Foo {
+ defaults = {
+ done: false
-+ };
- bar() {
- return 3;
- }
\ No newline at end of file
+ };
+- return Foo;
+-}());
++ bar() {
++ return 3;
++ }
++}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/asiPublicPrivateProtected.js.diff b/testdata/baselines/reference/submodule/compiler/asiPublicPrivateProtected.js.diff
index 952e909287..dfdd6ef777 100644
--- a/testdata/baselines/reference/submodule/compiler/asiPublicPrivateProtected.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/asiPublicPrivateProtected.js.diff
@@ -1,31 +1,87 @@
--- old.asiPublicPrivateProtected.js
+++ new.asiPublicPrivateProtected.js
-@@= skipped -48, +48 lines =@@
- }
- }
- class NonPublicClass2 {
+@@= skipped -43, +43 lines =@@
+
+ //// [asiPublicPrivateProtected.js]
+ public;
+-var NonPublicClass = /** @class */ (function () {
+- function NonPublicClass() {
+- }
+- NonPublicClass.prototype.s = function () {
+- };
+- return NonPublicClass;
+-}());
+-var NonPublicClass2 = /** @class */ (function () {
+- function NonPublicClass2() {
+- }
+- NonPublicClass2.prototype.nonPublicFunction = function () {
+- };
+- return NonPublicClass2;
+-}());
++class NonPublicClass {
++ s() {
++ }
++}
++class NonPublicClass2 {
+ public;
- nonPublicFunction() {
- }
- }
-@@= skipped -9, +10 lines =@@
- }
- }
- class NonPrivateClass2 {
++ nonPublicFunction() {
++ }
++}
+ private;
+-var NonPrivateClass = /** @class */ (function () {
+- function NonPrivateClass() {
+- }
+- NonPrivateClass.prototype.s = function () {
+- };
+- return NonPrivateClass;
+-}());
+-var NonPrivateClass2 = /** @class */ (function () {
+- function NonPrivateClass2() {
+- }
+- NonPrivateClass2.prototype.nonPrivateFunction = function () {
+- };
+- return NonPrivateClass2;
+-}());
++class NonPrivateClass {
++ s() {
++ }
++}
++class NonPrivateClass2 {
+ private;
- nonPrivateFunction() {
- }
- }
-@@= skipped -9, +10 lines =@@
- }
- }
- class NonProtectedClass2 {
++ nonPrivateFunction() {
++ }
++}
+ protected;
+-var NonProtectedClass = /** @class */ (function () {
+- function NonProtectedClass() {
+- }
+- NonProtectedClass.prototype.s = function () {
+- };
+- return NonProtectedClass;
+-}());
+-var NonProtectedClass2 = /** @class */ (function () {
+- function NonProtectedClass2() {
+- }
+- NonProtectedClass2.prototype.nonProtectedFunction = function () {
+- };
+- return NonProtectedClass2;
+-}());
+-var ClassWithThreeMembers = /** @class */ (function () {
+- function ClassWithThreeMembers() {
+- }
+- return ClassWithThreeMembers;
+-}());
++class NonProtectedClass {
++ s() {
++ }
++}
++class NonProtectedClass2 {
+ protected;
- nonProtectedFunction() {
- }
- }
- class ClassWithThreeMembers {
++ nonProtectedFunction() {
++ }
++}
++class ClassWithThreeMembers {
+ public;
+ private;
+ protected;
- }
\ No newline at end of file
++}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/assertInWrapSomeTypeParameter.js.diff b/testdata/baselines/reference/submodule/compiler/assertInWrapSomeTypeParameter.js.diff
new file mode 100644
index 0000000000..db5e9d58ef
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/assertInWrapSomeTypeParameter.js.diff
@@ -0,0 +1,18 @@
+--- old.assertInWrapSomeTypeParameter.js
++++ new.assertInWrapSomeTypeParameter.js
+@@= skipped -7, +7 lines =@@
+ }
+
+ //// [assertInWrapSomeTypeParameter.js]
+-var C = /** @class */ (function () {
+- function C() {
+- }
+- C.prototype.foo = function (x) {
++class C {
++ foo(x) {
+ return null;
+- };
+- return C;
+-}());
++ }
++}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/assertionFunctionsCanNarrowByDiscriminant.js.diff b/testdata/baselines/reference/submodule/compiler/assertionFunctionsCanNarrowByDiscriminant.js.diff
index bed1d3aed5..2b62575c83 100644
--- a/testdata/baselines/reference/submodule/compiler/assertionFunctionsCanNarrowByDiscriminant.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/assertionFunctionsCanNarrowByDiscriminant.js.diff
@@ -5,6 +5,11 @@
//// [assertionFunctionsCanNarrowByDiscriminant.js]
-"use strict";
- const animal = { type: 'cat', canMeow: true };
+-var animal = { type: 'cat', canMeow: true };
++const animal = { type: 'cat', canMeow: true };
assertEqual(animal.type, 'cat');
- animal.canMeow; // since is cat, should not be an error
\ No newline at end of file
+ animal.canMeow; // since is cat, should not be an error
+-var animalOrUndef = { type: 'cat', canMeow: true };
++const animalOrUndef = { type: 'cat', canMeow: true };
+ assertEqual(animalOrUndef === null || animalOrUndef === void 0 ? void 0 : animalOrUndef.type, 'cat');
+ animalOrUndef.canMeow; // since is cat, should not be an error
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/assign1.js b/testdata/baselines/reference/submodule/compiler/assign1.js
index af4babfa4a..c39e154983 100644
--- a/testdata/baselines/reference/submodule/compiler/assign1.js
+++ b/testdata/baselines/reference/submodule/compiler/assign1.js
@@ -1,7 +1,7 @@
//// [tests/cases/compiler/assign1.ts] ////
//// [assign1.ts]
-module M {
+namespace M {
interface I {
salt:number;
pepper:number;
diff --git a/testdata/baselines/reference/submodule/compiler/assign1.symbols b/testdata/baselines/reference/submodule/compiler/assign1.symbols
index e620d27a42..ca637620df 100644
--- a/testdata/baselines/reference/submodule/compiler/assign1.symbols
+++ b/testdata/baselines/reference/submodule/compiler/assign1.symbols
@@ -1,11 +1,11 @@
//// [tests/cases/compiler/assign1.ts] ////
=== assign1.ts ===
-module M {
+namespace M {
>M : Symbol(M, Decl(assign1.ts, 0, 0))
interface I {
->I : Symbol(I, Decl(assign1.ts, 0, 10))
+>I : Symbol(I, Decl(assign1.ts, 0, 13))
salt:number;
>salt : Symbol(I.salt, Decl(assign1.ts, 1, 17))
@@ -16,7 +16,7 @@ module M {
var x:I={salt:2,pepper:0};
>x : Symbol(x, Decl(assign1.ts, 6, 7))
->I : Symbol(I, Decl(assign1.ts, 0, 10))
+>I : Symbol(I, Decl(assign1.ts, 0, 13))
>salt : Symbol(salt, Decl(assign1.ts, 6, 13))
>pepper : Symbol(pepper, Decl(assign1.ts, 6, 20))
}
diff --git a/testdata/baselines/reference/submodule/compiler/assign1.types b/testdata/baselines/reference/submodule/compiler/assign1.types
index 8fe84ed77e..039ca28a93 100644
--- a/testdata/baselines/reference/submodule/compiler/assign1.types
+++ b/testdata/baselines/reference/submodule/compiler/assign1.types
@@ -1,7 +1,7 @@
//// [tests/cases/compiler/assign1.ts] ////
=== assign1.ts ===
-module M {
+namespace M {
>M : typeof M
interface I {
diff --git a/testdata/baselines/reference/submodule/compiler/assignLambdaToNominalSubtypeOfFunction.js.diff b/testdata/baselines/reference/submodule/compiler/assignLambdaToNominalSubtypeOfFunction.js.diff
new file mode 100644
index 0000000000..9feb112a87
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/assignLambdaToNominalSubtypeOfFunction.js.diff
@@ -0,0 +1,9 @@
+--- old.assignLambdaToNominalSubtypeOfFunction.js
++++ new.assignLambdaToNominalSubtypeOfFunction.js
+@@= skipped -12, +12 lines =@@
+
+ //// [assignLambdaToNominalSubtypeOfFunction.js]
+ function fn(cb) { }
+-fn(function (a, b) { return true; });
++fn((a, b) => true);
+ fn(function (a, b) { return true; });
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/assignLambdaToNominalSubtypeOfFunction.symbols.diff b/testdata/baselines/reference/submodule/compiler/assignLambdaToNominalSubtypeOfFunction.symbols.diff
new file mode 100644
index 0000000000..26d5e3319a
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/assignLambdaToNominalSubtypeOfFunction.symbols.diff
@@ -0,0 +1,11 @@
+--- old.assignLambdaToNominalSubtypeOfFunction.symbols
++++ new.assignLambdaToNominalSubtypeOfFunction.symbols
+@@= skipped -2, +2 lines =@@
+ === assignLambdaToNominalSubtypeOfFunction.ts ===
+ interface IResultCallback extends Function {
+ >IResultCallback : Symbol(IResultCallback, Decl(assignLambdaToNominalSubtypeOfFunction.ts, 0, 0))
+->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+
+ x: number;
+ >x : Symbol(IResultCallback.x, Decl(assignLambdaToNominalSubtypeOfFunction.ts, 0, 44))
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/assignToExistingClass.errors.txt b/testdata/baselines/reference/submodule/compiler/assignToExistingClass.errors.txt
index aa2cfd5c1e..0a8b913d0f 100644
--- a/testdata/baselines/reference/submodule/compiler/assignToExistingClass.errors.txt
+++ b/testdata/baselines/reference/submodule/compiler/assignToExistingClass.errors.txt
@@ -2,7 +2,7 @@ assignToExistingClass.ts(8,13): error TS2629: Cannot assign to 'Mocked' because
==== assignToExistingClass.ts (1 errors) ====
- module Test {
+ namespace Test {
class Mocked {
myProp: string;
}
diff --git a/testdata/baselines/reference/submodule/compiler/assignToExistingClass.js b/testdata/baselines/reference/submodule/compiler/assignToExistingClass.js
index 2b5a144064..733ea242ce 100644
--- a/testdata/baselines/reference/submodule/compiler/assignToExistingClass.js
+++ b/testdata/baselines/reference/submodule/compiler/assignToExistingClass.js
@@ -1,7 +1,7 @@
//// [tests/cases/compiler/assignToExistingClass.ts] ////
//// [assignToExistingClass.ts]
-module Test {
+namespace Test {
class Mocked {
myProp: string;
}
diff --git a/testdata/baselines/reference/submodule/compiler/assignToExistingClass.js.diff b/testdata/baselines/reference/submodule/compiler/assignToExistingClass.js.diff
index 766ff8bd25..90348cb71f 100644
--- a/testdata/baselines/reference/submodule/compiler/assignToExistingClass.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/assignToExistingClass.js.diff
@@ -1,10 +1,29 @@
--- old.assignToExistingClass.js
+++ new.assignToExistingClass.js
-@@= skipped -20, +20 lines =@@
+@@= skipped -19, +19 lines =@@
+ //// [assignToExistingClass.js]
var Test;
(function (Test) {
- class Mocked {
+- var Mocked = /** @class */ (function () {
+- function Mocked() {
+- }
+- return Mocked;
+- }());
+- var Tester = /** @class */ (function () {
+- function Tester() {
+- }
+- Tester.prototype.willThrowError = function () {
++ class Mocked {
+ myProp;
- }
- class Tester {
- willThrowError() {
\ No newline at end of file
++ }
++ class Tester {
++ willThrowError() {
+ Mocked = Mocked || function () {
+ return { myProp: "test" };
+ };
+- };
+- return Tester;
+- }());
++ }
++ }
+ })(Test || (Test = {}));
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/assignToExistingClass.symbols b/testdata/baselines/reference/submodule/compiler/assignToExistingClass.symbols
index e089cd5c43..87cc1e454a 100644
--- a/testdata/baselines/reference/submodule/compiler/assignToExistingClass.symbols
+++ b/testdata/baselines/reference/submodule/compiler/assignToExistingClass.symbols
@@ -1,11 +1,11 @@
//// [tests/cases/compiler/assignToExistingClass.ts] ////
=== assignToExistingClass.ts ===
-module Test {
+namespace Test {
>Test : Symbol(Test, Decl(assignToExistingClass.ts, 0, 0))
class Mocked {
->Mocked : Symbol(Mocked, Decl(assignToExistingClass.ts, 0, 13))
+>Mocked : Symbol(Mocked, Decl(assignToExistingClass.ts, 0, 16))
myProp: string;
>myProp : Symbol(Mocked.myProp, Decl(assignToExistingClass.ts, 1, 18))
@@ -18,8 +18,8 @@ module Test {
>willThrowError : Symbol(Tester.willThrowError, Decl(assignToExistingClass.ts, 5, 18))
Mocked = Mocked || function () { // => Error: Invalid left-hand side of assignment expression.
->Mocked : Symbol(Mocked, Decl(assignToExistingClass.ts, 0, 13))
->Mocked : Symbol(Mocked, Decl(assignToExistingClass.ts, 0, 13))
+>Mocked : Symbol(Mocked, Decl(assignToExistingClass.ts, 0, 16))
+>Mocked : Symbol(Mocked, Decl(assignToExistingClass.ts, 0, 16))
return { myProp: "test" };
>myProp : Symbol(myProp, Decl(assignToExistingClass.ts, 8, 24))
diff --git a/testdata/baselines/reference/submodule/compiler/assignToExistingClass.types b/testdata/baselines/reference/submodule/compiler/assignToExistingClass.types
index d49869e1f6..d840424307 100644
--- a/testdata/baselines/reference/submodule/compiler/assignToExistingClass.types
+++ b/testdata/baselines/reference/submodule/compiler/assignToExistingClass.types
@@ -1,7 +1,7 @@
//// [tests/cases/compiler/assignToExistingClass.ts] ////
=== assignToExistingClass.ts ===
-module Test {
+namespace Test {
>Test : typeof Test
class Mocked {
diff --git a/testdata/baselines/reference/submodule/compiler/assignToFn.errors.txt b/testdata/baselines/reference/submodule/compiler/assignToFn.errors.txt
index cc1b83bf65..66f8276193 100644
--- a/testdata/baselines/reference/submodule/compiler/assignToFn.errors.txt
+++ b/testdata/baselines/reference/submodule/compiler/assignToFn.errors.txt
@@ -2,7 +2,7 @@ assignToFn.ts(8,5): error TS2322: Type 'string' is not assignable to type '(n: n
==== assignToFn.ts (1 errors) ====
- module M {
+ namespace M {
interface I {
f(n:number):boolean;
}
diff --git a/testdata/baselines/reference/submodule/compiler/assignToFn.js b/testdata/baselines/reference/submodule/compiler/assignToFn.js
index 13becfdcfe..38f70b78b4 100644
--- a/testdata/baselines/reference/submodule/compiler/assignToFn.js
+++ b/testdata/baselines/reference/submodule/compiler/assignToFn.js
@@ -1,7 +1,7 @@
//// [tests/cases/compiler/assignToFn.ts] ////
//// [assignToFn.ts]
-module M {
+namespace M {
interface I {
f(n:number):boolean;
}
diff --git a/testdata/baselines/reference/submodule/compiler/assignToFn.symbols b/testdata/baselines/reference/submodule/compiler/assignToFn.symbols
index cc7cbce689..d61556731a 100644
--- a/testdata/baselines/reference/submodule/compiler/assignToFn.symbols
+++ b/testdata/baselines/reference/submodule/compiler/assignToFn.symbols
@@ -1,11 +1,11 @@
//// [tests/cases/compiler/assignToFn.ts] ////
=== assignToFn.ts ===
-module M {
+namespace M {
>M : Symbol(M, Decl(assignToFn.ts, 0, 0))
interface I {
->I : Symbol(I, Decl(assignToFn.ts, 0, 10))
+>I : Symbol(I, Decl(assignToFn.ts, 0, 13))
f(n:number):boolean;
>f : Symbol(I.f, Decl(assignToFn.ts, 1, 17))
@@ -14,7 +14,7 @@ module M {
var x:I={ f:function(n) { return true; } };
>x : Symbol(x, Decl(assignToFn.ts, 5, 7))
->I : Symbol(I, Decl(assignToFn.ts, 0, 10))
+>I : Symbol(I, Decl(assignToFn.ts, 0, 13))
>f : Symbol(f, Decl(assignToFn.ts, 5, 13))
>n : Symbol(n, Decl(assignToFn.ts, 5, 25))
diff --git a/testdata/baselines/reference/submodule/compiler/assignToFn.types b/testdata/baselines/reference/submodule/compiler/assignToFn.types
index 70709a60ce..8410da50e7 100644
--- a/testdata/baselines/reference/submodule/compiler/assignToFn.types
+++ b/testdata/baselines/reference/submodule/compiler/assignToFn.types
@@ -1,7 +1,7 @@
//// [tests/cases/compiler/assignToFn.ts] ////
=== assignToFn.ts ===
-module M {
+namespace M {
>M : typeof M
interface I {
diff --git a/testdata/baselines/reference/submodule/compiler/assignToModule.errors.txt b/testdata/baselines/reference/submodule/compiler/assignToModule.errors.txt
index 3b0a5bb65a..cba8fa1ae1 100644
--- a/testdata/baselines/reference/submodule/compiler/assignToModule.errors.txt
+++ b/testdata/baselines/reference/submodule/compiler/assignToModule.errors.txt
@@ -2,7 +2,7 @@ assignToModule.ts(2,1): error TS2708: Cannot use namespace 'A' as a value.
==== assignToModule.ts (1 errors) ====
- module A {}
+ namespace A {}
A = undefined; // invalid LHS
~
!!! error TS2708: Cannot use namespace 'A' as a value.
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/assignToModule.js b/testdata/baselines/reference/submodule/compiler/assignToModule.js
index 086dc5c44f..16e68d534f 100644
--- a/testdata/baselines/reference/submodule/compiler/assignToModule.js
+++ b/testdata/baselines/reference/submodule/compiler/assignToModule.js
@@ -1,7 +1,7 @@
//// [tests/cases/compiler/assignToModule.ts] ////
//// [assignToModule.ts]
-module A {}
+namespace A {}
A = undefined; // invalid LHS
//// [assignToModule.js]
diff --git a/testdata/baselines/reference/submodule/compiler/assignToModule.symbols b/testdata/baselines/reference/submodule/compiler/assignToModule.symbols
index 60b02202d4..978a77e1a5 100644
--- a/testdata/baselines/reference/submodule/compiler/assignToModule.symbols
+++ b/testdata/baselines/reference/submodule/compiler/assignToModule.symbols
@@ -1,7 +1,7 @@
//// [tests/cases/compiler/assignToModule.ts] ////
=== assignToModule.ts ===
-module A {}
+namespace A {}
>A : Symbol(A, Decl(assignToModule.ts, 0, 0))
A = undefined; // invalid LHS
diff --git a/testdata/baselines/reference/submodule/compiler/assignToModule.types b/testdata/baselines/reference/submodule/compiler/assignToModule.types
index 911c2820d1..3e224a27c0 100644
--- a/testdata/baselines/reference/submodule/compiler/assignToModule.types
+++ b/testdata/baselines/reference/submodule/compiler/assignToModule.types
@@ -1,7 +1,7 @@
//// [tests/cases/compiler/assignToModule.ts] ////
=== assignToModule.ts ===
-module A {}
+namespace A {}
A = undefined; // invalid LHS
>A = undefined : undefined
>A : any
diff --git a/testdata/baselines/reference/submodule/compiler/assignToObjectTypeWithPrototypeProperty.js.diff b/testdata/baselines/reference/submodule/compiler/assignToObjectTypeWithPrototypeProperty.js.diff
new file mode 100644
index 0000000000..734817438b
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/assignToObjectTypeWithPrototypeProperty.js.diff
@@ -0,0 +1,15 @@
+--- old.assignToObjectTypeWithPrototypeProperty.js
++++ new.assignToObjectTypeWithPrototypeProperty.js
+@@= skipped -5, +5 lines =@@
+ var x: {prototype: XEvent} = XEvent;
+
+ //// [assignToObjectTypeWithPrototypeProperty.js]
+-var XEvent = /** @class */ (function () {
+- function XEvent() {
+- }
+- return XEvent;
+-}());
++class XEvent {
++}
+ var p = XEvent.prototype;
+ var x = XEvent;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/assigningFromObjectToAnythingElse.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/assigningFromObjectToAnythingElse.errors.txt.diff
index 2691a4b4fc..625e588d07 100644
--- a/testdata/baselines/reference/submodule/compiler/assigningFromObjectToAnythingElse.errors.txt.diff
+++ b/testdata/baselines/reference/submodule/compiler/assigningFromObjectToAnythingElse.errors.txt.diff
@@ -2,7 +2,7 @@
+++ new.assigningFromObjectToAnythingElse.errors.txt
@@= skipped -0, +0 lines =@@
-assigningFromObjectToAnythingElse.ts(3,1): error TS2696: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead?
-- Type 'Object' is missing the following properties from type 'RegExp': exec, test, source, global, and 4 more.
+- Type 'Object' is missing the following properties from type 'RegExp': exec, test, source, global, and 11 more.
+assigningFromObjectToAnythingElse.ts(3,1): error TS2322: Type 'Object' is not assignable to type 'RegExp'.
+ The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead?
+ Type 'Object' is missing the following properties from type 'RegExp': exec, test, source, global, and 4 more.
@@ -21,7 +21,7 @@
y = x;
~
-!!! error TS2696: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead?
--!!! error TS2696: Type 'Object' is missing the following properties from type 'RegExp': exec, test, source, global, and 4 more.
+-!!! error TS2696: Type 'Object' is missing the following properties from type 'RegExp': exec, test, source, global, and 11 more.
+!!! error TS2322: Type 'Object' is not assignable to type 'RegExp'.
+!!! error TS2322: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead?
+!!! error TS2322: Type 'Object' is missing the following properties from type 'RegExp': exec, test, source, global, and 4 more.
diff --git a/testdata/baselines/reference/submodule/compiler/assigningFromObjectToAnythingElse.symbols.diff b/testdata/baselines/reference/submodule/compiler/assigningFromObjectToAnythingElse.symbols.diff
new file mode 100644
index 0000000000..371fb251f6
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/assigningFromObjectToAnythingElse.symbols.diff
@@ -0,0 +1,29 @@
+--- old.assigningFromObjectToAnythingElse.symbols
++++ new.assigningFromObjectToAnythingElse.symbols
+@@= skipped -6, +6 lines =@@
+
+ var y: RegExp;
+ >y : Symbol(y, Decl(assigningFromObjectToAnythingElse.ts, 1, 3))
+->RegExp : Symbol(RegExp, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>RegExp : Symbol(RegExp, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+
+ y = x;
+ >y : Symbol(y, Decl(assigningFromObjectToAnythingElse.ts, 1, 3))
+@@= skipped -8, +8 lines =@@
+
+ var a: String = Object.create