diff --git a/internal/printer/printer.go b/internal/printer/printer.go index 21ca046e61..d599f8afe1 100644 --- a/internal/printer/printer.go +++ b/internal/printer/printer.go @@ -4384,14 +4384,21 @@ func (p *Printer) emitSourceFile(node *ast.SourceFile) { p.writeLine() - state := p.emitDetachedCommentsBeforeStatementList(node.AsNode(), node.Statements.Loc) p.pushNameGenerationScope(node.AsNode()) p.generateAllNames(node.Statements) index := 0 + var state *commentState if node.ScriptKind != core.ScriptKindJSON { p.emitShebangIfNeeded(node) index = p.emitPrologueDirectives(node.Statements) + // Emit detached comments after prologue directives but before helpers + if !p.writer.IsAtStartOfLine() { + p.writeLine() + } + p.emitDetachedCommentsAndUpdateCommentsInfo(node.Statements.Loc) + emitFlags := p.emitContext.EmitFlags(node.AsNode()) + state = &commentState{emitFlags, node.Statements.Loc, p.containerPos, p.containerEnd, p.declarationListContainerEnd} p.emitHelpers(node.AsNode()) if node.IsDeclarationFile { p.emitTripleSlashDirectives(node) diff --git a/testdata/baselines/reference/compiler/declarationEmitNoCrashOnCrossFileNode.js b/testdata/baselines/reference/compiler/declarationEmitNoCrashOnCrossFileNode.js index e76b2fcda6..a62af024ff 100644 --- a/testdata/baselines/reference/compiler/declarationEmitNoCrashOnCrossFileNode.js +++ b/testdata/baselines/reference/compiler/declarationEmitNoCrashOnCrossFileNode.js @@ -16,11 +16,11 @@ export function foo(): ({ a, b }: { a: string, b: string }) => void { //// [other.js] "use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.foo = foo; /** * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris eu aliquet lectus, nec rhoncus metus. Donec dapibus consectetur risus vitae porta. Aenean nisi neque, dignissim quis varius vel, volutpat vel tellus. Praesent lacinia molestie est, vel convallis odio ornare id. Pellentesque quis purus ante. Morbi a nisl justo. Etiam malesuada ipsum sem, fringilla rhoncus turpis ullamcorper et. Aenean laoreet, nisl id tempus pellentesque, elit elit congue felis, sit amet luctus nulla orci sit amet velit. Praesent non tincidunt nisi, at tempor eros. Quisque tincidunt euismod posuere. Ut blandit mauris elit, a porttitor orci aliquam ac. Duis imperdiet gravida ultrices. In. */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.foo = foo; function foo() { return () => { }; } diff --git a/testdata/baselines/reference/compiler/emitEndOfFileJSDocComments2.js b/testdata/baselines/reference/compiler/emitEndOfFileJSDocComments2.js index 890f9d0031..30a336e781 100644 --- a/testdata/baselines/reference/compiler/emitEndOfFileJSDocComments2.js +++ b/testdata/baselines/reference/compiler/emitEndOfFileJSDocComments2.js @@ -23,8 +23,8 @@ function test(param) { //// [emitEndOfFileJSDocComments2.js] "use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); /** @typedef {number} A */ +Object.defineProperty(exports, "__esModule", { value: true }); /** * JSDoc comment for function * @param {string} param - A string parameter diff --git a/testdata/baselines/reference/submodule/compiler/APISample_Watch.js b/testdata/baselines/reference/submodule/compiler/APISample_Watch.js index de90b96724..ce29e2fa65 100644 --- a/testdata/baselines/reference/submodule/compiler/APISample_Watch.js +++ b/testdata/baselines/reference/submodule/compiler/APISample_Watch.js @@ -85,6 +85,11 @@ watchMain(); //// [APISample_Watch.js] "use strict"; +/* + * Note: This test is a public API sample. The sample sources can be found + * at: https://github.com/Microsoft/TypeScript-wiki/blob/master/Using-the-Compiler-API.md#writing-an-incremental-program-watcher + * Please log a "breaking change" issue for any API breaking change affecting this issue + */ Object.defineProperty(exports, "__esModule", { value: true }); const ts = require("typescript"); const formatHost = { diff --git a/testdata/baselines/reference/submodule/compiler/APISample_Watch.js.diff b/testdata/baselines/reference/submodule/compiler/APISample_Watch.js.diff index 499c77d7d5..a44deac7f4 100644 --- a/testdata/baselines/reference/submodule/compiler/APISample_Watch.js.diff +++ b/testdata/baselines/reference/submodule/compiler/APISample_Watch.js.diff @@ -1,14 +1,8 @@ --- old.APISample_Watch.js +++ new.APISample_Watch.js -@@= skipped -84, +84 lines =@@ - - //// [APISample_Watch.js] - "use strict"; --/* -- * Note: This test is a public API sample. The sample sources can be found -- * at: https://github.com/Microsoft/TypeScript-wiki/blob/master/Using-the-Compiler-API.md#writing-an-incremental-program-watcher -- * Please log a "breaking change" issue for any API breaking change affecting this issue -- */ +@@= skipped -90, +90 lines =@@ + * Please log a "breaking change" issue for any API breaking change affecting this issue + */ Object.defineProperty(exports, "__esModule", { value: true }); -var ts = require("typescript"); +const ts = require("typescript"); diff --git a/testdata/baselines/reference/submodule/compiler/APISample_WatchWithDefaults.js b/testdata/baselines/reference/submodule/compiler/APISample_WatchWithDefaults.js index d5b1a505ba..eda1e3f02b 100644 --- a/testdata/baselines/reference/submodule/compiler/APISample_WatchWithDefaults.js +++ b/testdata/baselines/reference/submodule/compiler/APISample_WatchWithDefaults.js @@ -58,6 +58,10 @@ watchMain(); //// [APISample_WatchWithDefaults.js] "use strict"; +/* + * Note: This test is a public API sample. This uses default sys interface without having to pass anything + * Please log a "breaking change" issue for any API breaking change affecting this issue + */ Object.defineProperty(exports, "__esModule", { value: true }); const ts = require("typescript"); function watchMain() { diff --git a/testdata/baselines/reference/submodule/compiler/APISample_WatchWithDefaults.js.diff b/testdata/baselines/reference/submodule/compiler/APISample_WatchWithDefaults.js.diff index 495001bf42..be2d9cde75 100644 --- a/testdata/baselines/reference/submodule/compiler/APISample_WatchWithDefaults.js.diff +++ b/testdata/baselines/reference/submodule/compiler/APISample_WatchWithDefaults.js.diff @@ -1,13 +1,8 @@ --- old.APISample_WatchWithDefaults.js +++ new.APISample_WatchWithDefaults.js -@@= skipped -57, +57 lines =@@ - - //// [APISample_WatchWithDefaults.js] - "use strict"; --/* -- * Note: This test is a public API sample. This uses default sys interface without having to pass anything -- * Please log a "breaking change" issue for any API breaking change affecting this issue -- */ +@@= skipped -62, +62 lines =@@ + * Please log a "breaking change" issue for any API breaking change affecting this issue + */ Object.defineProperty(exports, "__esModule", { value: true }); -var ts = require("typescript"); +const ts = require("typescript"); diff --git a/testdata/baselines/reference/submodule/compiler/APISample_WatchWithOwnWatchHost.js b/testdata/baselines/reference/submodule/compiler/APISample_WatchWithOwnWatchHost.js index 8e48f3cffc..915dc80a83 100644 --- a/testdata/baselines/reference/submodule/compiler/APISample_WatchWithOwnWatchHost.js +++ b/testdata/baselines/reference/submodule/compiler/APISample_WatchWithOwnWatchHost.js @@ -65,6 +65,10 @@ watchMain(); //// [APISample_WatchWithOwnWatchHost.js] "use strict"; +/* + * Note: This test is a public API sample. This sample verifies creating abstract builder to watch list of root files + * Please log a "breaking change" issue for any API breaking change affecting this issue + */ Object.defineProperty(exports, "__esModule", { value: true }); const ts = require("typescript"); function watchMain() { diff --git a/testdata/baselines/reference/submodule/compiler/APISample_WatchWithOwnWatchHost.js.diff b/testdata/baselines/reference/submodule/compiler/APISample_WatchWithOwnWatchHost.js.diff index 25d0f11df7..4d88a0aa98 100644 --- a/testdata/baselines/reference/submodule/compiler/APISample_WatchWithOwnWatchHost.js.diff +++ b/testdata/baselines/reference/submodule/compiler/APISample_WatchWithOwnWatchHost.js.diff @@ -1,13 +1,8 @@ --- old.APISample_WatchWithOwnWatchHost.js +++ new.APISample_WatchWithOwnWatchHost.js -@@= skipped -64, +64 lines =@@ - - //// [APISample_WatchWithOwnWatchHost.js] - "use strict"; --/* -- * Note: This test is a public API sample. This sample verifies creating abstract builder to watch list of root files -- * Please log a "breaking change" issue for any API breaking change affecting this issue -- */ +@@= skipped -69, +69 lines =@@ + * Please log a "breaking change" issue for any API breaking change affecting this issue + */ Object.defineProperty(exports, "__esModule", { value: true }); -var ts = require("typescript"); +const ts = require("typescript"); diff --git a/testdata/baselines/reference/submodule/compiler/APISample_compile.js b/testdata/baselines/reference/submodule/compiler/APISample_compile.js index 20616a8c0c..fdf4166c68 100644 --- a/testdata/baselines/reference/submodule/compiler/APISample_compile.js +++ b/testdata/baselines/reference/submodule/compiler/APISample_compile.js @@ -48,6 +48,11 @@ compile(process.argv.slice(2), { //// [APISample_compile.js] "use strict"; +/* + * Note: This test is a public API sample. The sample sources can be found + * at: https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API#a-minimal-compiler + * Please log a "breaking change" issue for any API breaking change affecting this issue + */ Object.defineProperty(exports, "__esModule", { value: true }); exports.compile = compile; const ts = require("typescript"); diff --git a/testdata/baselines/reference/submodule/compiler/APISample_compile.js.diff b/testdata/baselines/reference/submodule/compiler/APISample_compile.js.diff index b2e0459c6f..9b6c00442b 100644 --- a/testdata/baselines/reference/submodule/compiler/APISample_compile.js.diff +++ b/testdata/baselines/reference/submodule/compiler/APISample_compile.js.diff @@ -1,14 +1,7 @@ --- old.APISample_compile.js +++ new.APISample_compile.js -@@= skipped -47, +47 lines =@@ - - //// [APISample_compile.js] - "use strict"; --/* -- * Note: This test is a public API sample. The sample sources can be found -- * at: https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API#a-minimal-compiler -- * Please log a "breaking change" issue for any API breaking change affecting this issue -- */ +@@= skipped -54, +54 lines =@@ + */ Object.defineProperty(exports, "__esModule", { value: true }); exports.compile = compile; -var ts = require("typescript"); diff --git a/testdata/baselines/reference/submodule/compiler/APISample_jsdoc.js b/testdata/baselines/reference/submodule/compiler/APISample_jsdoc.js index e9c98da1e3..3a50a28422 100644 --- a/testdata/baselines/reference/submodule/compiler/APISample_jsdoc.js +++ b/testdata/baselines/reference/submodule/compiler/APISample_jsdoc.js @@ -123,6 +123,12 @@ function getSomeOtherTags(node: ts.Node) { //// [APISample_jsdoc.js] "use strict"; +/* + * Note: This test is a public API sample. The original sources can be found + * at: https://github.com/YousefED/typescript-json-schema + * https://github.com/vega/ts-json-schema-generator + * Please log a "breaking change" issue for any API breaking change affecting this issue + */ Object.defineProperty(exports, "__esModule", { value: true }); const ts = require("typescript"); // excerpted from https://github.com/YousefED/typescript-json-schema diff --git a/testdata/baselines/reference/submodule/compiler/APISample_jsdoc.js.diff b/testdata/baselines/reference/submodule/compiler/APISample_jsdoc.js.diff index 939a10fa62..9989abff97 100644 --- a/testdata/baselines/reference/submodule/compiler/APISample_jsdoc.js.diff +++ b/testdata/baselines/reference/submodule/compiler/APISample_jsdoc.js.diff @@ -1,15 +1,8 @@ --- old.APISample_jsdoc.js +++ new.APISample_jsdoc.js -@@= skipped -122, +122 lines =@@ - - //// [APISample_jsdoc.js] - "use strict"; --/* -- * Note: This test is a public API sample. The original sources can be found -- * at: https://github.com/YousefED/typescript-json-schema -- * https://github.com/vega/ts-json-schema-generator -- * Please log a "breaking change" issue for any API breaking change affecting this issue -- */ +@@= skipped -129, +129 lines =@@ + * Please log a "breaking change" issue for any API breaking change affecting this issue + */ Object.defineProperty(exports, "__esModule", { value: true }); -var ts = require("typescript"); +const ts = require("typescript"); diff --git a/testdata/baselines/reference/submodule/compiler/APISample_linter.js b/testdata/baselines/reference/submodule/compiler/APISample_linter.js index 81cba71e70..be5ae7c4e5 100644 --- a/testdata/baselines/reference/submodule/compiler/APISample_linter.js +++ b/testdata/baselines/reference/submodule/compiler/APISample_linter.js @@ -74,6 +74,11 @@ fileNames.forEach(fileName => { //// [APISample_linter.js] "use strict"; +/* + * Note: This test is a public API sample. The sample sources can be found + * at: https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API#traversing-the-ast-with-a-little-linter + * Please log a "breaking change" issue for any API breaking change affecting this issue + */ Object.defineProperty(exports, "__esModule", { value: true }); exports.delint = delint; const ts = require("typescript"); diff --git a/testdata/baselines/reference/submodule/compiler/APISample_linter.js.diff b/testdata/baselines/reference/submodule/compiler/APISample_linter.js.diff index 2f9b2b9e1f..5bc028be72 100644 --- a/testdata/baselines/reference/submodule/compiler/APISample_linter.js.diff +++ b/testdata/baselines/reference/submodule/compiler/APISample_linter.js.diff @@ -1,14 +1,7 @@ --- old.APISample_linter.js +++ new.APISample_linter.js -@@= skipped -73, +73 lines =@@ - - //// [APISample_linter.js] - "use strict"; --/* -- * Note: This test is a public API sample. The sample sources can be found -- * at: https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API#traversing-the-ast-with-a-little-linter -- * Please log a "breaking change" issue for any API breaking change affecting this issue -- */ +@@= skipped -80, +80 lines =@@ + */ Object.defineProperty(exports, "__esModule", { value: true }); exports.delint = delint; -var ts = require("typescript"); diff --git a/testdata/baselines/reference/submodule/compiler/APISample_parseConfig.js b/testdata/baselines/reference/submodule/compiler/APISample_parseConfig.js index 2d4cb20590..4359a0c275 100644 --- a/testdata/baselines/reference/submodule/compiler/APISample_parseConfig.js +++ b/testdata/baselines/reference/submodule/compiler/APISample_parseConfig.js @@ -46,6 +46,11 @@ export function createProgram(rootFiles: string[], compilerOptionsJson: string): //// [APISample_parseConfig.js] "use strict"; +/* + * Note: This test is a public API sample. The sample sources can be found + * at: https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API#a-minimal-compiler + * Please log a "breaking change" issue for any API breaking change affecting this issue + */ Object.defineProperty(exports, "__esModule", { value: true }); exports.createProgram = createProgram; const ts = require("typescript"); diff --git a/testdata/baselines/reference/submodule/compiler/APISample_parseConfig.js.diff b/testdata/baselines/reference/submodule/compiler/APISample_parseConfig.js.diff index aa2225246a..417f4c229e 100644 --- a/testdata/baselines/reference/submodule/compiler/APISample_parseConfig.js.diff +++ b/testdata/baselines/reference/submodule/compiler/APISample_parseConfig.js.diff @@ -1,14 +1,7 @@ --- old.APISample_parseConfig.js +++ new.APISample_parseConfig.js -@@= skipped -45, +45 lines =@@ - - //// [APISample_parseConfig.js] - "use strict"; --/* -- * Note: This test is a public API sample. The sample sources can be found -- * at: https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API#a-minimal-compiler -- * Please log a "breaking change" issue for any API breaking change affecting this issue -- */ +@@= skipped -52, +52 lines =@@ + */ Object.defineProperty(exports, "__esModule", { value: true }); exports.createProgram = createProgram; -var ts = require("typescript"); diff --git a/testdata/baselines/reference/submodule/compiler/APISample_transform.js b/testdata/baselines/reference/submodule/compiler/APISample_transform.js index c462a864e7..8f1b028cad 100644 --- a/testdata/baselines/reference/submodule/compiler/APISample_transform.js +++ b/testdata/baselines/reference/submodule/compiler/APISample_transform.js @@ -26,6 +26,11 @@ console.log(JSON.stringify(result)); //// [APISample_transform.js] "use strict"; +/* + * Note: This test is a public API sample. The sample sources can be found + * at: https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API#a-simple-transform-function + * Please log a "breaking change" issue for any API breaking change affecting this issue + */ Object.defineProperty(exports, "__esModule", { value: true }); const ts = require("typescript"); const source = "let x: string = 'string'"; diff --git a/testdata/baselines/reference/submodule/compiler/APISample_transform.js.diff b/testdata/baselines/reference/submodule/compiler/APISample_transform.js.diff index 62ddcd3067..353eeba78c 100644 --- a/testdata/baselines/reference/submodule/compiler/APISample_transform.js.diff +++ b/testdata/baselines/reference/submodule/compiler/APISample_transform.js.diff @@ -1,14 +1,8 @@ --- old.APISample_transform.js +++ new.APISample_transform.js -@@= skipped -25, +25 lines =@@ - - //// [APISample_transform.js] - "use strict"; --/* -- * Note: This test is a public API sample. The sample sources can be found -- * at: https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API#a-simple-transform-function -- * Please log a "breaking change" issue for any API breaking change affecting this issue -- */ +@@= skipped -31, +31 lines =@@ + * Please log a "breaking change" issue for any API breaking change affecting this issue + */ Object.defineProperty(exports, "__esModule", { value: true }); -var ts = require("typescript"); +const ts = require("typescript"); diff --git a/testdata/baselines/reference/submodule/compiler/APISample_watcher.js b/testdata/baselines/reference/submodule/compiler/APISample_watcher.js index 0b04a6309e..4b2a3906c9 100644 --- a/testdata/baselines/reference/submodule/compiler/APISample_watcher.js +++ b/testdata/baselines/reference/submodule/compiler/APISample_watcher.js @@ -121,6 +121,11 @@ watch(currentDirectoryFiles, { module: ts.ModuleKind.CommonJS }); //// [APISample_watcher.js] "use strict"; +/* + * Note: This test is a public API sample. The sample sources can be found + * at: https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API#incremental-build-support-using-the-language-services + * Please log a "breaking change" issue for any API breaking change affecting this issue + */ Object.defineProperty(exports, "__esModule", { value: true }); const ts = require("typescript"); function watch(rootFileNames, options) { diff --git a/testdata/baselines/reference/submodule/compiler/APISample_watcher.js.diff b/testdata/baselines/reference/submodule/compiler/APISample_watcher.js.diff index 7872ebf267..9b572eae42 100644 --- a/testdata/baselines/reference/submodule/compiler/APISample_watcher.js.diff +++ b/testdata/baselines/reference/submodule/compiler/APISample_watcher.js.diff @@ -1,14 +1,8 @@ --- old.APISample_watcher.js +++ new.APISample_watcher.js -@@= skipped -120, +120 lines =@@ - - //// [APISample_watcher.js] - "use strict"; --/* -- * Note: This test is a public API sample. The sample sources can be found -- * at: https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API#incremental-build-support-using-the-language-services -- * Please log a "breaking change" issue for any API breaking change affecting this issue -- */ +@@= skipped -126, +126 lines =@@ + * Please log a "breaking change" issue for any API breaking change affecting this issue + */ Object.defineProperty(exports, "__esModule", { value: true }); -var ts = require("typescript"); +const ts = require("typescript"); diff --git a/testdata/baselines/reference/submodule/compiler/amdDependencyComment1.js b/testdata/baselines/reference/submodule/compiler/amdDependencyComment1.js index c84dcda198..e12e847485 100644 --- a/testdata/baselines/reference/submodule/compiler/amdDependencyComment1.js +++ b/testdata/baselines/reference/submodule/compiler/amdDependencyComment1.js @@ -8,7 +8,7 @@ m1.f(); //// [amdDependencyComment1.js] "use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); /// +Object.defineProperty(exports, "__esModule", { value: true }); const m1 = require("m2"); m1.f(); diff --git a/testdata/baselines/reference/submodule/compiler/amdDependencyComment1.js.diff b/testdata/baselines/reference/submodule/compiler/amdDependencyComment1.js.diff index 848a44ccbb..de0a9033ec 100644 --- a/testdata/baselines/reference/submodule/compiler/amdDependencyComment1.js.diff +++ b/testdata/baselines/reference/submodule/compiler/amdDependencyComment1.js.diff @@ -1,12 +1,9 @@ --- old.amdDependencyComment1.js +++ new.amdDependencyComment1.js -@@= skipped -7, +7 lines =@@ - - //// [amdDependencyComment1.js] +@@= skipped -9, +9 lines =@@ "use strict"; --/// + /// Object.defineProperty(exports, "__esModule", { value: true }); -var m1 = require("m2"); -+/// +const m1 = require("m2"); m1.f(); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/amdDependencyCommentName1.js b/testdata/baselines/reference/submodule/compiler/amdDependencyCommentName1.js index e57a4276fe..7538bd86ee 100644 --- a/testdata/baselines/reference/submodule/compiler/amdDependencyCommentName1.js +++ b/testdata/baselines/reference/submodule/compiler/amdDependencyCommentName1.js @@ -8,7 +8,7 @@ m1.f(); //// [amdDependencyCommentName1.js] "use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); /// +Object.defineProperty(exports, "__esModule", { value: true }); const m1 = require("m2"); m1.f(); diff --git a/testdata/baselines/reference/submodule/compiler/amdDependencyCommentName1.js.diff b/testdata/baselines/reference/submodule/compiler/amdDependencyCommentName1.js.diff index 71ca61c44d..98845f5611 100644 --- a/testdata/baselines/reference/submodule/compiler/amdDependencyCommentName1.js.diff +++ b/testdata/baselines/reference/submodule/compiler/amdDependencyCommentName1.js.diff @@ -1,12 +1,9 @@ --- old.amdDependencyCommentName1.js +++ new.amdDependencyCommentName1.js -@@= skipped -7, +7 lines =@@ - - //// [amdDependencyCommentName1.js] +@@= skipped -9, +9 lines =@@ "use strict"; --/// + /// Object.defineProperty(exports, "__esModule", { value: true }); -var m1 = require("m2"); -+/// +const m1 = require("m2"); m1.f(); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/cachedContextualTypes.js b/testdata/baselines/reference/submodule/compiler/cachedContextualTypes.js index 378671931c..c15c8506ae 100644 --- a/testdata/baselines/reference/submodule/compiler/cachedContextualTypes.js +++ b/testdata/baselines/reference/submodule/compiler/cachedContextualTypes.js @@ -26,6 +26,7 @@ createInstance(MenuWorkbenchToolBar, { //// [cachedContextualTypes.js] "use strict"; +// Repro from #52198 Object.defineProperty(exports, "__esModule", { value: true }); class MenuWorkbenchToolBar { constructor(options) { } diff --git a/testdata/baselines/reference/submodule/compiler/cachedContextualTypes.js.diff b/testdata/baselines/reference/submodule/compiler/cachedContextualTypes.js.diff deleted file mode 100644 index 6236676ccd..0000000000 --- a/testdata/baselines/reference/submodule/compiler/cachedContextualTypes.js.diff +++ /dev/null @@ -1,10 +0,0 @@ ---- old.cachedContextualTypes.js -+++ new.cachedContextualTypes.js -@@= skipped -25, +25 lines =@@ - - //// [cachedContextualTypes.js] - "use strict"; --// Repro from #52198 - Object.defineProperty(exports, "__esModule", { value: true }); - class MenuWorkbenchToolBar { - constructor(options) { } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment1.js b/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment1.js index 0a413dc368..6bf89996a4 100644 --- a/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment1.js +++ b/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment1.js @@ -20,12 +20,12 @@ a; //// [checkJsdocTypeTagOnExportAssignment1.js] //// [a.js] "use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); /** * @typedef {Object} Foo * @property {boolean} a * @property {boolean} b */ +Object.defineProperty(exports, "__esModule", { value: true }); /** @type {Foo} */ exports.default = { c: false }; //// [b.js] diff --git a/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment1.js.diff b/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment1.js.diff index cb001a666b..962b43db5d 100644 --- a/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment1.js.diff +++ b/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment1.js.diff @@ -1,18 +1,6 @@ --- old.checkJsdocTypeTagOnExportAssignment1.js +++ new.checkJsdocTypeTagOnExportAssignment1.js -@@= skipped -19, +19 lines =@@ - //// [checkJsdocTypeTagOnExportAssignment1.js] - //// [a.js] - "use strict"; -+Object.defineProperty(exports, "__esModule", { value: true }); - /** - * @typedef {Object} Foo - * @property {boolean} a - * @property {boolean} b - */ --Object.defineProperty(exports, "__esModule", { value: true }); - /** @type {Foo} */ - exports.default = { c: false }; +@@= skipped -30, +30 lines =@@ //// [b.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment3.js b/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment3.js index 6bf97fedfe..6205b8fe2e 100644 --- a/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment3.js +++ b/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment3.js @@ -22,12 +22,12 @@ a; //// [checkJsdocTypeTagOnExportAssignment3.js] //// [a.js] "use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); /** * @typedef {Object} Foo * @property {boolean} a * @property {boolean} b */ +Object.defineProperty(exports, "__esModule", { value: true }); const bar = { c: 1 }; /** @type {Foo} */ exports.default = bar; diff --git a/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment3.js.diff b/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment3.js.diff index fc0499aae9..df954aac94 100644 --- a/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment3.js.diff +++ b/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment3.js.diff @@ -1,19 +1,6 @@ --- old.checkJsdocTypeTagOnExportAssignment3.js +++ new.checkJsdocTypeTagOnExportAssignment3.js -@@= skipped -21, +21 lines =@@ - //// [checkJsdocTypeTagOnExportAssignment3.js] - //// [a.js] - "use strict"; -+Object.defineProperty(exports, "__esModule", { value: true }); - /** - * @typedef {Object} Foo - * @property {boolean} a - * @property {boolean} b - */ --Object.defineProperty(exports, "__esModule", { value: true }); - const bar = { c: 1 }; - /** @type {Foo} */ - exports.default = bar; +@@= skipped -33, +33 lines =@@ //// [b.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment4.js b/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment4.js index a4067800e7..3e280248f4 100644 --- a/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment4.js +++ b/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment4.js @@ -15,9 +15,9 @@ export default ""; //// [checkJsdocTypeTagOnExportAssignment4.js] //// [a.js] "use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); /** * @typedef {number} Foo */ +Object.defineProperty(exports, "__esModule", { value: true }); /** @type {Foo} */ exports.default = ""; diff --git a/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment4.js.diff b/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment4.js.diff deleted file mode 100644 index aa2903966c..0000000000 --- a/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment4.js.diff +++ /dev/null @@ -1,13 +0,0 @@ ---- old.checkJsdocTypeTagOnExportAssignment4.js -+++ new.checkJsdocTypeTagOnExportAssignment4.js -@@= skipped -14, +14 lines =@@ - //// [checkJsdocTypeTagOnExportAssignment4.js] - //// [a.js] - "use strict"; -+Object.defineProperty(exports, "__esModule", { value: true }); - /** - * @typedef {number} Foo - */ --Object.defineProperty(exports, "__esModule", { value: true }); - /** @type {Foo} */ - exports.default = ""; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment5.js b/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment5.js index bd15e36ff4..25a7b3dae7 100644 --- a/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment5.js +++ b/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment5.js @@ -20,12 +20,12 @@ a; //// [checkJsdocTypeTagOnExportAssignment5.js] //// [a.js] "use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); /** * @typedef {Object} Foo * @property {number} a * @property {number} b */ +Object.defineProperty(exports, "__esModule", { value: true }); /** @type {Foo} */ exports.default = { a: 1, b: 1 }; //// [b.js] diff --git a/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment5.js.diff b/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment5.js.diff index 280223a9e8..b7331afe3b 100644 --- a/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment5.js.diff +++ b/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment5.js.diff @@ -1,18 +1,6 @@ --- old.checkJsdocTypeTagOnExportAssignment5.js +++ new.checkJsdocTypeTagOnExportAssignment5.js -@@= skipped -19, +19 lines =@@ - //// [checkJsdocTypeTagOnExportAssignment5.js] - //// [a.js] - "use strict"; -+Object.defineProperty(exports, "__esModule", { value: true }); - /** - * @typedef {Object} Foo - * @property {number} a - * @property {number} b - */ --Object.defineProperty(exports, "__esModule", { value: true }); - /** @type {Foo} */ - exports.default = { a: 1, b: 1 }; +@@= skipped -30, +30 lines =@@ //// [b.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment6.js b/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment6.js index e2b514d833..7dce488e36 100644 --- a/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment6.js +++ b/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment6.js @@ -20,12 +20,12 @@ a; //// [checkJsdocTypeTagOnExportAssignment6.js] //// [a.js] "use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); /** * @typedef {Object} Foo * @property {number} a * @property {number} b */ +Object.defineProperty(exports, "__esModule", { value: true }); /** @type {Foo} */ exports.default = { a: 1, b: 1, c: 1 }; //// [b.js] diff --git a/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment6.js.diff b/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment6.js.diff index 57ee0893a0..93ac1ae858 100644 --- a/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment6.js.diff +++ b/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment6.js.diff @@ -1,18 +1,6 @@ --- old.checkJsdocTypeTagOnExportAssignment6.js +++ new.checkJsdocTypeTagOnExportAssignment6.js -@@= skipped -19, +19 lines =@@ - //// [checkJsdocTypeTagOnExportAssignment6.js] - //// [a.js] - "use strict"; -+Object.defineProperty(exports, "__esModule", { value: true }); - /** - * @typedef {Object} Foo - * @property {number} a - * @property {number} b - */ --Object.defineProperty(exports, "__esModule", { value: true }); - /** @type {Foo} */ - exports.default = { a: 1, b: 1, c: 1 }; +@@= skipped -30, +30 lines =@@ //// [b.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment7.js b/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment7.js index 481aeef891..2c00033c88 100644 --- a/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment7.js +++ b/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment7.js @@ -22,12 +22,12 @@ a; //// [checkJsdocTypeTagOnExportAssignment7.js] //// [a.js] "use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); /** * @typedef {Object} Foo * @property {number} a * @property {number} b */ +Object.defineProperty(exports, "__esModule", { value: true }); const abc = { a: 1, b: 1, c: 1 }; /** @type {Foo} */ exports.default = abc; diff --git a/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment7.js.diff b/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment7.js.diff index d61e82ff4d..852115e2a2 100644 --- a/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment7.js.diff +++ b/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment7.js.diff @@ -1,19 +1,6 @@ --- old.checkJsdocTypeTagOnExportAssignment7.js +++ new.checkJsdocTypeTagOnExportAssignment7.js -@@= skipped -21, +21 lines =@@ - //// [checkJsdocTypeTagOnExportAssignment7.js] - //// [a.js] - "use strict"; -+Object.defineProperty(exports, "__esModule", { value: true }); - /** - * @typedef {Object} Foo - * @property {number} a - * @property {number} b - */ --Object.defineProperty(exports, "__esModule", { value: true }); - const abc = { a: 1, b: 1, c: 1 }; - /** @type {Foo} */ - exports.default = abc; +@@= skipped -33, +33 lines =@@ //// [b.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment8.js b/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment8.js index a13517d674..b63560b276 100644 --- a/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment8.js +++ b/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment8.js @@ -19,12 +19,12 @@ export default { //// [checkJsdocTypeTagOnExportAssignment8.js] //// [a.js] "use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); /** * @typedef Foo * @property {string} a * @property {'b'} b */ +Object.defineProperty(exports, "__esModule", { value: true }); /** @type {Foo} */ exports.default = { a: 'a', diff --git a/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment8.js.diff b/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment8.js.diff deleted file mode 100644 index f6124fcb3a..0000000000 --- a/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment8.js.diff +++ /dev/null @@ -1,16 +0,0 @@ ---- old.checkJsdocTypeTagOnExportAssignment8.js -+++ new.checkJsdocTypeTagOnExportAssignment8.js -@@= skipped -18, +18 lines =@@ - //// [checkJsdocTypeTagOnExportAssignment8.js] - //// [a.js] - "use strict"; -+Object.defineProperty(exports, "__esModule", { value: true }); - /** - * @typedef Foo - * @property {string} a - * @property {'b'} b - */ --Object.defineProperty(exports, "__esModule", { value: true }); - /** @type {Foo} */ - exports.default = { - a: 'a', \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classVarianceResolveCircularity2.js b/testdata/baselines/reference/submodule/compiler/classVarianceResolveCircularity2.js index 6b54aece8e..192219fc76 100644 --- a/testdata/baselines/reference/submodule/compiler/classVarianceResolveCircularity2.js +++ b/testdata/baselines/reference/submodule/compiler/classVarianceResolveCircularity2.js @@ -22,6 +22,7 @@ class Foo { //// [classVarianceResolveCircularity2.js] "use strict"; +// Issue #52813 Object.defineProperty(exports, "__esModule", { value: true }); class Bar { num; diff --git a/testdata/baselines/reference/submodule/compiler/classVarianceResolveCircularity2.js.diff b/testdata/baselines/reference/submodule/compiler/classVarianceResolveCircularity2.js.diff index 46edd29106..5d873414fc 100644 --- a/testdata/baselines/reference/submodule/compiler/classVarianceResolveCircularity2.js.diff +++ b/testdata/baselines/reference/submodule/compiler/classVarianceResolveCircularity2.js.diff @@ -1,10 +1,7 @@ --- old.classVarianceResolveCircularity2.js +++ new.classVarianceResolveCircularity2.js -@@= skipped -21, +21 lines =@@ - - //// [classVarianceResolveCircularity2.js] - "use strict"; --// Issue #52813 +@@= skipped -24, +24 lines =@@ + // Issue #52813 Object.defineProperty(exports, "__esModule", { value: true }); class Bar { - constructor() { diff --git a/testdata/baselines/reference/submodule/compiler/commentOnImportStatement3.js b/testdata/baselines/reference/submodule/compiler/commentOnImportStatement3.js index 6968403a0a..96d1f097e3 100644 --- a/testdata/baselines/reference/submodule/compiler/commentOnImportStatement3.js +++ b/testdata/baselines/reference/submodule/compiler/commentOnImportStatement3.js @@ -8,4 +8,5 @@ import foo = require('./foo'); //// [commentOnImportStatement3.js] "use strict"; +/* copyright */ Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/testdata/baselines/reference/submodule/compiler/commentOnImportStatement3.js.diff b/testdata/baselines/reference/submodule/compiler/commentOnImportStatement3.js.diff deleted file mode 100644 index 1dcd831942..0000000000 --- a/testdata/baselines/reference/submodule/compiler/commentOnImportStatement3.js.diff +++ /dev/null @@ -1,8 +0,0 @@ ---- old.commentOnImportStatement3.js -+++ new.commentOnImportStatement3.js -@@= skipped -7, +7 lines =@@ - - //// [commentOnImportStatement3.js] - "use strict"; --/* copyright */ - Object.defineProperty(exports, "__esModule", { value: true }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentWithUnreasonableIndentationLevel01.js b/testdata/baselines/reference/submodule/compiler/commentWithUnreasonableIndentationLevel01.js index 7c8e9a8c04..a19ad80982 100644 --- a/testdata/baselines/reference/submodule/compiler/commentWithUnreasonableIndentationLevel01.js +++ b/testdata/baselines/reference/submodule/compiler/commentWithUnreasonableIndentationLevel01.js @@ -10,9 +10,9 @@ export class SomeAutoGeneratedThing {} //// [commentWithUnreasonableIndentationLevel01.js] "use strict"; +// Repro from #41223 Object.defineProperty(exports, "__esModule", { value: true }); exports.SomeAutoGeneratedThing = void 0; -// Repro from #41223 /** * This is a comment with dumb indentation for some auto-generated thing. */ diff --git a/testdata/baselines/reference/submodule/compiler/commentWithUnreasonableIndentationLevel01.js.diff b/testdata/baselines/reference/submodule/compiler/commentWithUnreasonableIndentationLevel01.js.diff deleted file mode 100644 index 0392624fbc..0000000000 --- a/testdata/baselines/reference/submodule/compiler/commentWithUnreasonableIndentationLevel01.js.diff +++ /dev/null @@ -1,13 +0,0 @@ ---- old.commentWithUnreasonableIndentationLevel01.js -+++ new.commentWithUnreasonableIndentationLevel01.js -@@= skipped -9, +9 lines =@@ - - //// [commentWithUnreasonableIndentationLevel01.js] - "use strict"; --// Repro from #41223 - Object.defineProperty(exports, "__esModule", { value: true }); - exports.SomeAutoGeneratedThing = void 0; -+// Repro from #41223 - /** - * This is a comment with dumb indentation for some auto-generated thing. - */ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/complexNarrowingWithAny.js b/testdata/baselines/reference/submodule/compiler/complexNarrowingWithAny.js index 4bfa399af9..a6142ff0ec 100644 --- a/testdata/baselines/reference/submodule/compiler/complexNarrowingWithAny.js +++ b/testdata/baselines/reference/submodule/compiler/complexNarrowingWithAny.js @@ -563,9 +563,9 @@ export function viewFactory_AppComponent0(viewUtils:any,parentInjector:any,decla //// [complexNarrowingWithAny.js] "use strict"; +// Repro from #10869 Object.defineProperty(exports, "__esModule", { value: true }); exports.viewFactory_AppComponent0 = viewFactory_AppComponent0; -// Repro from #10869 /** * This file is generated by the Angular 2 template compiler. * Do not edit. diff --git a/testdata/baselines/reference/submodule/compiler/complexNarrowingWithAny.js.diff b/testdata/baselines/reference/submodule/compiler/complexNarrowingWithAny.js.diff index 07df85e517..62ebb990bc 100644 --- a/testdata/baselines/reference/submodule/compiler/complexNarrowingWithAny.js.diff +++ b/testdata/baselines/reference/submodule/compiler/complexNarrowingWithAny.js.diff @@ -1,17 +1,6 @@ --- old.complexNarrowingWithAny.js +++ new.complexNarrowingWithAny.js -@@= skipped -562, +562 lines =@@ - - //// [complexNarrowingWithAny.js] - "use strict"; --// Repro from #10869 - Object.defineProperty(exports, "__esModule", { value: true }); - exports.viewFactory_AppComponent0 = viewFactory_AppComponent0; -+// Repro from #10869 - /** - * This file is generated by the Angular 2 template compiler. - * Do not edit. -@@= skipped -130, +130 lines =@@ +@@= skipped -692, +692 lines =@@ import51.ControlContainer = ControlContainer; })(import51 || (import51 = {})); class _View_AppComponent0 { diff --git a/testdata/baselines/reference/submodule/compiler/conflictingTypeParameterSymbolTransfer.js b/testdata/baselines/reference/submodule/compiler/conflictingTypeParameterSymbolTransfer.js index 92c53c8d92..f511bb55b1 100644 --- a/testdata/baselines/reference/submodule/compiler/conflictingTypeParameterSymbolTransfer.js +++ b/testdata/baselines/reference/submodule/compiler/conflictingTypeParameterSymbolTransfer.js @@ -38,9 +38,9 @@ class Item extends BaseClass { //// [conflictingTypeParameterSymbolTransfer.js] "use strict"; +// @strict Object.defineProperty(exports, "__esModule", { value: true }); exports.C2 = void 0; -// @strict // Via #56620 class Base { } diff --git a/testdata/baselines/reference/submodule/compiler/conflictingTypeParameterSymbolTransfer.js.diff b/testdata/baselines/reference/submodule/compiler/conflictingTypeParameterSymbolTransfer.js.diff index a9203fd8cd..81a3b724a3 100644 --- a/testdata/baselines/reference/submodule/compiler/conflictingTypeParameterSymbolTransfer.js.diff +++ b/testdata/baselines/reference/submodule/compiler/conflictingTypeParameterSymbolTransfer.js.diff @@ -1,14 +1,6 @@ --- old.conflictingTypeParameterSymbolTransfer.js +++ new.conflictingTypeParameterSymbolTransfer.js -@@= skipped -37, +37 lines =@@ - - //// [conflictingTypeParameterSymbolTransfer.js] - "use strict"; --// @strict - Object.defineProperty(exports, "__esModule", { value: true }); - exports.C2 = void 0; -+// @strict - // Via #56620 +@@= skipped -44, +44 lines =@@ class Base { } class C2 extends Base { @@ -16,7 +8,7 @@ constructor(T) { super(); // Should not error -@@= skipped -20, +21 lines =@@ +@@= skipped -13, +14 lines =@@ class Leg { } class Foo extends Leg { diff --git a/testdata/baselines/reference/submodule/compiler/constraintOfRecursivelyMappedTypeWithConditionalIsResolvable.js b/testdata/baselines/reference/submodule/compiler/constraintOfRecursivelyMappedTypeWithConditionalIsResolvable.js index 434ab25a15..d7c43c002a 100644 --- a/testdata/baselines/reference/submodule/compiler/constraintOfRecursivelyMappedTypeWithConditionalIsResolvable.js +++ b/testdata/baselines/reference/submodule/compiler/constraintOfRecursivelyMappedTypeWithConditionalIsResolvable.js @@ -25,4 +25,5 @@ export interface IImmutableMap2> extends Map(o: o) => //// [declarationEmitMappedTypePreservesTypeParameterConstraint.js] "use strict"; +// repro from https://github.com/microsoft/TypeScript/issues/54560 Object.defineProperty(exports, "__esModule", { value: true }); exports.entriesOf = exports.buildSchema = void 0; const buildSchema = (version) => (({})); diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitMappedTypePreservesTypeParameterConstraint.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitMappedTypePreservesTypeParameterConstraint.js.diff index 90819e98d3..6e0f495e0e 100644 --- a/testdata/baselines/reference/submodule/compiler/declarationEmitMappedTypePreservesTypeParameterConstraint.js.diff +++ b/testdata/baselines/reference/submodule/compiler/declarationEmitMappedTypePreservesTypeParameterConstraint.js.diff @@ -1,10 +1,7 @@ --- old.declarationEmitMappedTypePreservesTypeParameterConstraint.js +++ new.declarationEmitMappedTypePreservesTypeParameterConstraint.js -@@= skipped -61, +61 lines =@@ - - //// [declarationEmitMappedTypePreservesTypeParameterConstraint.js] - "use strict"; --// repro from https://github.com/microsoft/TypeScript/issues/54560 +@@= skipped -64, +64 lines =@@ + // repro from https://github.com/microsoft/TypeScript/issues/54560 Object.defineProperty(exports, "__esModule", { value: true }); exports.entriesOf = exports.buildSchema = void 0; -const buildSchema = (version) => ({}); @@ -12,7 +9,7 @@ exports.buildSchema = buildSchema; const entriesOf = (o) => Object.entries(o); exports.entriesOf = entriesOf; -@@= skipped -31, +30 lines =@@ +@@= skipped -28, +28 lines =@@ export declare type ZodRawShape = { [k: string]: ZodTypeAny; }; diff --git a/testdata/baselines/reference/submodule/compiler/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.js b/testdata/baselines/reference/submodule/compiler/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.js index bf75d38e5a..618990a5f9 100644 --- a/testdata/baselines/reference/submodule/compiler/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.js +++ b/testdata/baselines/reference/submodule/compiler/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.js @@ -44,6 +44,8 @@ void p3.result.three; //// [declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.js] "use strict"; +// Note that both of the following have an `any` in their return type from where we bottom out the type printout +// for having too many instances of the same symbol nesting. var __assign = (this && this.__assign) || function () { __assign = Object.assign || function(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { diff --git a/testdata/baselines/reference/submodule/compiler/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.js.diff b/testdata/baselines/reference/submodule/compiler/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.js.diff deleted file mode 100644 index 936f834eeb..0000000000 --- a/testdata/baselines/reference/submodule/compiler/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.js.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- old.declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.js -+++ new.declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.js -@@= skipped -43, +43 lines =@@ - - //// [declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.js] - "use strict"; --// Note that both of the following have an `any` in their return type from where we bottom out the type printout --// for having too many instances of the same symbol nesting. - var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans6.js b/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans6.js index 67ad695067..6ba104adb8 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans6.js +++ b/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans6.js @@ -23,5 +23,5 @@ export {}; //// [file2.js] "use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); /// +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans6.js.diff b/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans6.js.diff index ce53729873..76baf49462 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans6.js.diff +++ b/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans6.js.diff @@ -7,6 +7,4 @@ -//// [file1.js] //// [file2.js] "use strict"; --/// - Object.defineProperty(exports, "__esModule", { value: true }); -+/// \ No newline at end of file + /// \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans7.js b/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans7.js index 634eac5395..5ca112f999 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans7.js +++ b/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans7.js @@ -35,5 +35,5 @@ export {}; //// [file2.js] "use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); /// +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans7.js.diff b/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans7.js.diff index 9009fe87ce..a3b62bf462 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans7.js.diff +++ b/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans7.js.diff @@ -7,6 +7,4 @@ -//// [file1.js] //// [file2.js] "use strict"; --/// - Object.defineProperty(exports, "__esModule", { value: true }); -+/// \ No newline at end of file + /// \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/duplicateLocalVariable1.js b/testdata/baselines/reference/submodule/compiler/duplicateLocalVariable1.js index 39046d4eca..52f49c2d7e 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateLocalVariable1.js +++ b/testdata/baselines/reference/submodule/compiler/duplicateLocalVariable1.js @@ -347,6 +347,8 @@ export var tests: TestRunner = (function () { //// [duplicateLocalVariable1.js] "use strict"; +//import FileManager = require('filemanager'); +//import App = require('app'); Object.defineProperty(exports, "__esModule", { value: true }); exports.tests = exports.TestRunner = exports.TestCase = void 0; var TestFileDir = ".\\TempTestFiles"; diff --git a/testdata/baselines/reference/submodule/compiler/duplicateLocalVariable1.js.diff b/testdata/baselines/reference/submodule/compiler/duplicateLocalVariable1.js.diff index 62371627fa..a7227754cb 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateLocalVariable1.js.diff +++ b/testdata/baselines/reference/submodule/compiler/duplicateLocalVariable1.js.diff @@ -1,12 +1,6 @@ --- old.duplicateLocalVariable1.js +++ new.duplicateLocalVariable1.js -@@= skipped -346, +346 lines =@@ - - //// [duplicateLocalVariable1.js] - "use strict"; --//import FileManager = require('filemanager'); --//import App = require('app'); - Object.defineProperty(exports, "__esModule", { value: true }); +@@= skipped -352, +352 lines =@@ exports.tests = exports.TestRunner = exports.TestCase = void 0; var TestFileDir = ".\\TempTestFiles"; class TestCase { @@ -16,7 +10,7 @@ constructor(name, test, errorMessageRegEx) { this.name = name; this.test = test; -@@= skipped -14, +15 lines =@@ +@@= skipped -8, +11 lines =@@ } exports.TestCase = TestCase; class TestRunner { diff --git a/testdata/baselines/reference/submodule/compiler/emitMethodCalledNew.js b/testdata/baselines/reference/submodule/compiler/emitMethodCalledNew.js index 4c61b7d7ba..3999d213aa 100644 --- a/testdata/baselines/reference/submodule/compiler/emitMethodCalledNew.js +++ b/testdata/baselines/reference/submodule/compiler/emitMethodCalledNew.js @@ -16,9 +16,9 @@ export const c = { //// [emitMethodCalledNew.js] "use strict"; +// https://github.com/microsoft/TypeScript/issues/55075 Object.defineProperty(exports, "__esModule", { value: true }); exports.c = exports.b = exports.a = void 0; -// https://github.com/microsoft/TypeScript/issues/55075 exports.a = { new(x) { return x + 1; } }; diff --git a/testdata/baselines/reference/submodule/compiler/emitMethodCalledNew.js.diff b/testdata/baselines/reference/submodule/compiler/emitMethodCalledNew.js.diff deleted file mode 100644 index 3acf938c2e..0000000000 --- a/testdata/baselines/reference/submodule/compiler/emitMethodCalledNew.js.diff +++ /dev/null @@ -1,13 +0,0 @@ ---- old.emitMethodCalledNew.js -+++ new.emitMethodCalledNew.js -@@= skipped -15, +15 lines =@@ - - //// [emitMethodCalledNew.js] - "use strict"; --// https://github.com/microsoft/TypeScript/issues/55075 - Object.defineProperty(exports, "__esModule", { value: true }); - exports.c = exports.b = exports.a = void 0; -+// https://github.com/microsoft/TypeScript/issues/55075 - exports.a = { - new(x) { return x + 1; } - }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/es6ExportEqualsInterop.js b/testdata/baselines/reference/submodule/compiler/es6ExportEqualsInterop.js index 71125ca7fe..30831ecb96 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ExportEqualsInterop.js +++ b/testdata/baselines/reference/submodule/compiler/es6ExportEqualsInterop.js @@ -208,6 +208,7 @@ export * from "class-module"; //// [main.js] "use strict"; +/// var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); diff --git a/testdata/baselines/reference/submodule/compiler/es6ExportEqualsInterop.js.diff b/testdata/baselines/reference/submodule/compiler/es6ExportEqualsInterop.js.diff index ae73ab1233..032ba1bf0d 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ExportEqualsInterop.js.diff +++ b/testdata/baselines/reference/submodule/compiler/es6ExportEqualsInterop.js.diff @@ -1,14 +1,6 @@ --- old.es6ExportEqualsInterop.js +++ new.es6ExportEqualsInterop.js -@@= skipped -207, +207 lines =@@ - - //// [main.js] - "use strict"; --/// - var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); -@@= skipped -17, +16 lines =@@ +@@= skipped -224, +224 lines =@@ }; Object.defineProperty(exports, "__esModule", { value: true }); exports.a0 = exports.a9 = exports.a8 = exports.a7 = exports.a6 = exports.a5 = exports.a4 = exports.a3 = exports.a2 = exports.a1 = void 0; diff --git a/testdata/baselines/reference/submodule/compiler/excessPropertyCheckWithMultipleDiscriminants.js b/testdata/baselines/reference/submodule/compiler/excessPropertyCheckWithMultipleDiscriminants.js index a81be3a2ca..7c0a7f2eda 100644 --- a/testdata/baselines/reference/submodule/compiler/excessPropertyCheckWithMultipleDiscriminants.js +++ b/testdata/baselines/reference/submodule/compiler/excessPropertyCheckWithMultipleDiscriminants.js @@ -144,6 +144,7 @@ const attributes2: Attribute2 = { //// [excessPropertyCheckWithMultipleDiscriminants.js] "use strict"; +// Repro from #32657 Object.defineProperty(exports, "__esModule", { value: true }); const foo = { type: "number", diff --git a/testdata/baselines/reference/submodule/compiler/excessPropertyCheckWithMultipleDiscriminants.js.diff b/testdata/baselines/reference/submodule/compiler/excessPropertyCheckWithMultipleDiscriminants.js.diff deleted file mode 100644 index 9f32319ccc..0000000000 --- a/testdata/baselines/reference/submodule/compiler/excessPropertyCheckWithMultipleDiscriminants.js.diff +++ /dev/null @@ -1,10 +0,0 @@ ---- old.excessPropertyCheckWithMultipleDiscriminants.js -+++ new.excessPropertyCheckWithMultipleDiscriminants.js -@@= skipped -143, +143 lines =@@ - - //// [excessPropertyCheckWithMultipleDiscriminants.js] - "use strict"; --// Repro from #32657 - Object.defineProperty(exports, "__esModule", { value: true }); - const foo = { - type: "number", \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/excessPropertyChecksWithNestedIntersections.js b/testdata/baselines/reference/submodule/compiler/excessPropertyChecksWithNestedIntersections.js index 2da41c0e26..1d1a6bde39 100644 --- a/testdata/baselines/reference/submodule/compiler/excessPropertyChecksWithNestedIntersections.js +++ b/testdata/baselines/reference/submodule/compiler/excessPropertyChecksWithNestedIntersections.js @@ -75,6 +75,7 @@ test = { foo: true, bar: { foo: true, bar: true, boo: true } } //// [excessPropertyChecksWithNestedIntersections.js] "use strict"; +// https://github.com/Microsoft/TypeScript/issues/13813 Object.defineProperty(exports, "__esModule", { value: true }); exports.myInstance = exports.photo = exports.obj = void 0; let a = { a: { x: 'hello' } }; // ok diff --git a/testdata/baselines/reference/submodule/compiler/excessPropertyChecksWithNestedIntersections.js.diff b/testdata/baselines/reference/submodule/compiler/excessPropertyChecksWithNestedIntersections.js.diff deleted file mode 100644 index f87d79cdcf..0000000000 --- a/testdata/baselines/reference/submodule/compiler/excessPropertyChecksWithNestedIntersections.js.diff +++ /dev/null @@ -1,10 +0,0 @@ ---- old.excessPropertyChecksWithNestedIntersections.js -+++ new.excessPropertyChecksWithNestedIntersections.js -@@= skipped -74, +74 lines =@@ - - //// [excessPropertyChecksWithNestedIntersections.js] - "use strict"; --// https://github.com/Microsoft/TypeScript/issues/13813 - Object.defineProperty(exports, "__esModule", { value: true }); - exports.myInstance = exports.photo = exports.obj = void 0; - let a = { a: { x: 'hello' } }; // ok \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/expandoFunctionBlockShadowing.js b/testdata/baselines/reference/submodule/compiler/expandoFunctionBlockShadowing.js index 1b37891205..dfa5893abe 100644 --- a/testdata/baselines/reference/submodule/compiler/expandoFunctionBlockShadowing.js +++ b/testdata/baselines/reference/submodule/compiler/expandoFunctionBlockShadowing.js @@ -22,10 +22,10 @@ if (Math.random()) { //// [expandoFunctionBlockShadowing.js] "use strict"; +// https://github.com/microsoft/TypeScript/issues/56538 Object.defineProperty(exports, "__esModule", { value: true }); exports.X = X; exports.Y = Y; -// https://github.com/microsoft/TypeScript/issues/56538 function X() { } if (Math.random()) { const X = {}; diff --git a/testdata/baselines/reference/submodule/compiler/expandoFunctionBlockShadowing.js.diff b/testdata/baselines/reference/submodule/compiler/expandoFunctionBlockShadowing.js.diff deleted file mode 100644 index ad675825bb..0000000000 --- a/testdata/baselines/reference/submodule/compiler/expandoFunctionBlockShadowing.js.diff +++ /dev/null @@ -1,14 +0,0 @@ ---- old.expandoFunctionBlockShadowing.js -+++ new.expandoFunctionBlockShadowing.js -@@= skipped -21, +21 lines =@@ - - //// [expandoFunctionBlockShadowing.js] - "use strict"; --// https://github.com/microsoft/TypeScript/issues/56538 - Object.defineProperty(exports, "__esModule", { value: true }); - exports.X = X; - exports.Y = Y; -+// https://github.com/microsoft/TypeScript/issues/56538 - function X() { } - if (Math.random()) { - const X = {}; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/expandoFunctionExpressionsWithDynamicNames.js b/testdata/baselines/reference/submodule/compiler/expandoFunctionExpressionsWithDynamicNames.js index 054a90b860..da77799946 100644 --- a/testdata/baselines/reference/submodule/compiler/expandoFunctionExpressionsWithDynamicNames.js +++ b/testdata/baselines/reference/submodule/compiler/expandoFunctionExpressionsWithDynamicNames.js @@ -14,9 +14,9 @@ expr2[s] = 0 //// [expandoFunctionExpressionsWithDynamicNames.js] "use strict"; +// https://github.com/microsoft/TypeScript/issues/54809 Object.defineProperty(exports, "__esModule", { value: true }); exports.expr2 = exports.expr = void 0; -// https://github.com/microsoft/TypeScript/issues/54809 const s = "X"; const expr = () => { }; exports.expr = expr; diff --git a/testdata/baselines/reference/submodule/compiler/expandoFunctionExpressionsWithDynamicNames.js.diff b/testdata/baselines/reference/submodule/compiler/expandoFunctionExpressionsWithDynamicNames.js.diff index df20fd2068..bc387e9ed0 100644 --- a/testdata/baselines/reference/submodule/compiler/expandoFunctionExpressionsWithDynamicNames.js.diff +++ b/testdata/baselines/reference/submodule/compiler/expandoFunctionExpressionsWithDynamicNames.js.diff @@ -1,17 +1,6 @@ --- old.expandoFunctionExpressionsWithDynamicNames.js +++ new.expandoFunctionExpressionsWithDynamicNames.js -@@= skipped -13, +13 lines =@@ - - //// [expandoFunctionExpressionsWithDynamicNames.js] - "use strict"; --// https://github.com/microsoft/TypeScript/issues/54809 - Object.defineProperty(exports, "__esModule", { value: true }); - exports.expr2 = exports.expr = void 0; -+// https://github.com/microsoft/TypeScript/issues/54809 - const s = "X"; - const expr = () => { }; - exports.expr = expr; -@@= skipped -13, +13 lines =@@ +@@= skipped -26, +26 lines =@@ //// [expandoFunctionExpressionsWithDynamicNames.d.ts] diff --git a/testdata/baselines/reference/submodule/compiler/exportDeclarationForModuleOrEnumWithMemberOfSameName(module=commonjs).js b/testdata/baselines/reference/submodule/compiler/exportDeclarationForModuleOrEnumWithMemberOfSameName(module=commonjs).js index 56044df4b6..e8fe3f601b 100644 --- a/testdata/baselines/reference/submodule/compiler/exportDeclarationForModuleOrEnumWithMemberOfSameName(module=commonjs).js +++ b/testdata/baselines/reference/submodule/compiler/exportDeclarationForModuleOrEnumWithMemberOfSameName(module=commonjs).js @@ -18,9 +18,9 @@ export { B } //// [exportDeclarationForModuleOrEnumWithMemberOfSameName.js] "use strict"; +// https://github.com/microsoft/TypeScript/issues/55038 Object.defineProperty(exports, "__esModule", { value: true }); exports.B = exports.A = void 0; -// https://github.com/microsoft/TypeScript/issues/55038 var A; (function (A_1) { A_1.A = 0; diff --git a/testdata/baselines/reference/submodule/compiler/exportDeclarationForModuleOrEnumWithMemberOfSameName(module=commonjs).js.diff b/testdata/baselines/reference/submodule/compiler/exportDeclarationForModuleOrEnumWithMemberOfSameName(module=commonjs).js.diff deleted file mode 100644 index 9675ac592a..0000000000 --- a/testdata/baselines/reference/submodule/compiler/exportDeclarationForModuleOrEnumWithMemberOfSameName(module=commonjs).js.diff +++ /dev/null @@ -1,13 +0,0 @@ ---- old.exportDeclarationForModuleOrEnumWithMemberOfSameName(module=commonjs).js -+++ new.exportDeclarationForModuleOrEnumWithMemberOfSameName(module=commonjs).js -@@= skipped -17, +17 lines =@@ - - //// [exportDeclarationForModuleOrEnumWithMemberOfSameName.js] - "use strict"; --// https://github.com/microsoft/TypeScript/issues/55038 - Object.defineProperty(exports, "__esModule", { value: true }); - exports.B = exports.A = void 0; -+// https://github.com/microsoft/TypeScript/issues/55038 - var A; - (function (A_1) { - A_1.A = 0; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/exportDefaultDuplicateCrash.js b/testdata/baselines/reference/submodule/compiler/exportDefaultDuplicateCrash.js index 30f165ebe4..077ffd357f 100644 --- a/testdata/baselines/reference/submodule/compiler/exportDefaultDuplicateCrash.js +++ b/testdata/baselines/reference/submodule/compiler/exportDefaultDuplicateCrash.js @@ -10,10 +10,10 @@ export { aa as default } from './hi' //// [exportDefaultDuplicateCrash.js] "use strict"; +// #38214 Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; exports.default = default_1; -// #38214 function default_1() { } const hi_1 = require("./hi"); Object.defineProperty(exports, "default", { enumerable: true, get: function () { return hi_1.default; } }); diff --git a/testdata/baselines/reference/submodule/compiler/exportDefaultDuplicateCrash.js.diff b/testdata/baselines/reference/submodule/compiler/exportDefaultDuplicateCrash.js.diff index 9fc17e9cc4..d457f0ef4e 100644 --- a/testdata/baselines/reference/submodule/compiler/exportDefaultDuplicateCrash.js.diff +++ b/testdata/baselines/reference/submodule/compiler/exportDefaultDuplicateCrash.js.diff @@ -1,14 +1,8 @@ --- old.exportDefaultDuplicateCrash.js +++ new.exportDefaultDuplicateCrash.js -@@= skipped -9, +9 lines =@@ - - //// [exportDefaultDuplicateCrash.js] - "use strict"; --// #38214 - Object.defineProperty(exports, "__esModule", { value: true }); +@@= skipped -14, +14 lines =@@ exports.default = void 0; exports.default = default_1; -+// #38214 function default_1() { } -var hi_1 = require("./hi"); +const hi_1 = require("./hi"); diff --git a/testdata/baselines/reference/submodule/compiler/genericInferenceDefaultTypeParameterJsxReact.js b/testdata/baselines/reference/submodule/compiler/genericInferenceDefaultTypeParameterJsxReact.js index 5dc0a47dea..7c9d1c4b98 100644 --- a/testdata/baselines/reference/submodule/compiler/genericInferenceDefaultTypeParameterJsxReact.js +++ b/testdata/baselines/reference/submodule/compiler/genericInferenceDefaultTypeParameterJsxReact.js @@ -18,11 +18,11 @@ const v1 = e.preventDefault()} />; //// [genericInferenceDefaultTypeParameterJsxReact.js] "use strict"; +/// var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); -/// // Repro from #50858 const react_1 = __importDefault(require("react")); function Component(props) { diff --git a/testdata/baselines/reference/submodule/compiler/genericInferenceDefaultTypeParameterJsxReact.js.diff b/testdata/baselines/reference/submodule/compiler/genericInferenceDefaultTypeParameterJsxReact.js.diff index fb30d959fd..7cd137b7da 100644 --- a/testdata/baselines/reference/submodule/compiler/genericInferenceDefaultTypeParameterJsxReact.js.diff +++ b/testdata/baselines/reference/submodule/compiler/genericInferenceDefaultTypeParameterJsxReact.js.diff @@ -1,15 +1,8 @@ --- old.genericInferenceDefaultTypeParameterJsxReact.js +++ new.genericInferenceDefaultTypeParameterJsxReact.js -@@= skipped -17, +17 lines =@@ - - //// [genericInferenceDefaultTypeParameterJsxReact.js] - "use strict"; --/// - var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; +@@= skipped -23, +23 lines =@@ }; Object.defineProperty(exports, "__esModule", { value: true }); -+/// // Repro from #50858 -var react_1 = __importDefault(require("react")); +const react_1 = __importDefault(require("react")); diff --git a/testdata/baselines/reference/submodule/compiler/ignoredJsxAttributes.js b/testdata/baselines/reference/submodule/compiler/ignoredJsxAttributes.js index e4eea244b9..f2d8c25c70 100644 --- a/testdata/baselines/reference/submodule/compiler/ignoredJsxAttributes.js +++ b/testdata/baselines/reference/submodule/compiler/ignoredJsxAttributes.js @@ -25,8 +25,8 @@ let x2 = ; // Error //// [ignoredJsxAttributes.js] "use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); /// +Object.defineProperty(exports, "__esModule", { value: true }); // Repro from #44797 const React = require("react"); let props = { diff --git a/testdata/baselines/reference/submodule/compiler/ignoredJsxAttributes.js.diff b/testdata/baselines/reference/submodule/compiler/ignoredJsxAttributes.js.diff index 39292a7044..1dc2a3e2ff 100644 --- a/testdata/baselines/reference/submodule/compiler/ignoredJsxAttributes.js.diff +++ b/testdata/baselines/reference/submodule/compiler/ignoredJsxAttributes.js.diff @@ -1,12 +1,8 @@ --- old.ignoredJsxAttributes.js +++ new.ignoredJsxAttributes.js -@@= skipped -24, +24 lines =@@ - - //// [ignoredJsxAttributes.js] - "use strict"; --/// +@@= skipped -27, +27 lines =@@ + /// Object.defineProperty(exports, "__esModule", { value: true }); -+/// // Repro from #44797 -var React = require("react"); +const React = require("react"); diff --git a/testdata/baselines/reference/submodule/compiler/indexedAccessRelation.js b/testdata/baselines/reference/submodule/compiler/indexedAccessRelation.js index ccdebbb66a..0a52abf84e 100644 --- a/testdata/baselines/reference/submodule/compiler/indexedAccessRelation.js +++ b/testdata/baselines/reference/submodule/compiler/indexedAccessRelation.js @@ -23,8 +23,8 @@ class Comp extends Component> //// [indexedAccessRelation.js] "use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); // Repro from #14723 +Object.defineProperty(exports, "__esModule", { value: true }); class Component { setState(state) { } } diff --git a/testdata/baselines/reference/submodule/compiler/indexedAccessRelation.js.diff b/testdata/baselines/reference/submodule/compiler/indexedAccessRelation.js.diff deleted file mode 100644 index 2f676bbe24..0000000000 --- a/testdata/baselines/reference/submodule/compiler/indexedAccessRelation.js.diff +++ /dev/null @@ -1,12 +0,0 @@ ---- old.indexedAccessRelation.js -+++ new.indexedAccessRelation.js -@@= skipped -22, +22 lines =@@ - - //// [indexedAccessRelation.js] - "use strict"; --// Repro from #14723 - Object.defineProperty(exports, "__esModule", { value: true }); -+// Repro from #14723 - class Component { - setState(state) { } - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/indexedAccessTypeConstraints.js b/testdata/baselines/reference/submodule/compiler/indexedAccessTypeConstraints.js index aa3ef89972..85888552d7 100644 --- a/testdata/baselines/reference/submodule/compiler/indexedAccessTypeConstraints.js +++ b/testdata/baselines/reference/submodule/compiler/indexedAccessTypeConstraints.js @@ -39,6 +39,7 @@ function foo(x: C, y: T['content']) { //// [indexedAccessTypeConstraints.js] "use strict"; +// Repro from #14557 Object.defineProperty(exports, "__esModule", { value: true }); exports.Bar = exports.Foo = void 0; class Parent { diff --git a/testdata/baselines/reference/submodule/compiler/indexedAccessTypeConstraints.js.diff b/testdata/baselines/reference/submodule/compiler/indexedAccessTypeConstraints.js.diff index 1fcf56ce47..7812071eaa 100644 --- a/testdata/baselines/reference/submodule/compiler/indexedAccessTypeConstraints.js.diff +++ b/testdata/baselines/reference/submodule/compiler/indexedAccessTypeConstraints.js.diff @@ -1,10 +1,6 @@ --- old.indexedAccessTypeConstraints.js +++ new.indexedAccessTypeConstraints.js -@@= skipped -38, +38 lines =@@ - - //// [indexedAccessTypeConstraints.js] - "use strict"; --// Repro from #14557 +@@= skipped -42, +42 lines =@@ Object.defineProperty(exports, "__esModule", { value: true }); exports.Bar = exports.Foo = void 0; class Parent { diff --git a/testdata/baselines/reference/submodule/compiler/infiniteConstraints.js b/testdata/baselines/reference/submodule/compiler/infiniteConstraints.js index 791ffb843a..e3dff9c7a2 100644 --- a/testdata/baselines/reference/submodule/compiler/infiniteConstraints.js +++ b/testdata/baselines/reference/submodule/compiler/infiniteConstraints.js @@ -53,6 +53,7 @@ type Conv = //// [infiniteConstraints.js] "use strict"; +// Both of the following types trigger the recursion limiter in getImmediateBaseConstraint Object.defineProperty(exports, "__esModule", { value: true }); const out = myBug({ obj1: { a: "test" } }); const noError = ensureNoDuplicates({ main: value("test"), alternate: value("test2") }); diff --git a/testdata/baselines/reference/submodule/compiler/infiniteConstraints.js.diff b/testdata/baselines/reference/submodule/compiler/infiniteConstraints.js.diff deleted file mode 100644 index bccf326f67..0000000000 --- a/testdata/baselines/reference/submodule/compiler/infiniteConstraints.js.diff +++ /dev/null @@ -1,10 +0,0 @@ ---- old.infiniteConstraints.js -+++ new.infiniteConstraints.js -@@= skipped -52, +52 lines =@@ - - //// [infiniteConstraints.js] - "use strict"; --// Both of the following types trigger the recursion limiter in getImmediateBaseConstraint - Object.defineProperty(exports, "__esModule", { value: true }); - const out = myBug({ obj1: { a: "test" } }); - const noError = ensureNoDuplicates({ main: value("test"), alternate: value("test2") }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/intersectionTypeInference1.js b/testdata/baselines/reference/submodule/compiler/intersectionTypeInference1.js index 961b7c1037..23ed81694f 100644 --- a/testdata/baselines/reference/submodule/compiler/intersectionTypeInference1.js +++ b/testdata/baselines/reference/submodule/compiler/intersectionTypeInference1.js @@ -12,9 +12,9 @@ export const Form3 = brokenFunction(parameterFn)({store: "hello"}) //// [intersectionTypeInference1.js] "use strict"; +// Repro from #8801 Object.defineProperty(exports, "__esModule", { value: true }); exports.Form3 = void 0; -// Repro from #8801 function alert(s) { } const parameterFn = (props) => alert(props.store); const brokenFunction = (f) => (o) => o; diff --git a/testdata/baselines/reference/submodule/compiler/intersectionTypeInference1.js.diff b/testdata/baselines/reference/submodule/compiler/intersectionTypeInference1.js.diff deleted file mode 100644 index 56f35b8476..0000000000 --- a/testdata/baselines/reference/submodule/compiler/intersectionTypeInference1.js.diff +++ /dev/null @@ -1,13 +0,0 @@ ---- old.intersectionTypeInference1.js -+++ new.intersectionTypeInference1.js -@@= skipped -11, +11 lines =@@ - - //// [intersectionTypeInference1.js] - "use strict"; --// Repro from #8801 - Object.defineProperty(exports, "__esModule", { value: true }); - exports.Form3 = void 0; -+// Repro from #8801 - function alert(s) { } - const parameterFn = (props) => alert(props.store); - const brokenFunction = (f) => (o) => o; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/intersectionsOfLargeUnions.js b/testdata/baselines/reference/submodule/compiler/intersectionsOfLargeUnions.js index 8a09619e08..6e682816f3 100644 --- a/testdata/baselines/reference/submodule/compiler/intersectionsOfLargeUnions.js +++ b/testdata/baselines/reference/submodule/compiler/intersectionsOfLargeUnions.js @@ -30,11 +30,11 @@ export function assertNodeProperty< //// [intersectionsOfLargeUnions.js] "use strict"; +// Repro from #23977 Object.defineProperty(exports, "__esModule", { value: true }); exports.assertIsElement = assertIsElement; exports.assertNodeTagName = assertNodeTagName; exports.assertNodeProperty = assertNodeProperty; -// Repro from #23977 function assertIsElement(node) { let nodeType = node === null ? null : node.nodeType; return nodeType === 1; diff --git a/testdata/baselines/reference/submodule/compiler/intersectionsOfLargeUnions.js.diff b/testdata/baselines/reference/submodule/compiler/intersectionsOfLargeUnions.js.diff deleted file mode 100644 index 1552e303e5..0000000000 --- a/testdata/baselines/reference/submodule/compiler/intersectionsOfLargeUnions.js.diff +++ /dev/null @@ -1,15 +0,0 @@ ---- old.intersectionsOfLargeUnions.js -+++ new.intersectionsOfLargeUnions.js -@@= skipped -29, +29 lines =@@ - - //// [intersectionsOfLargeUnions.js] - "use strict"; --// Repro from #23977 - Object.defineProperty(exports, "__esModule", { value: true }); - exports.assertIsElement = assertIsElement; - exports.assertNodeTagName = assertNodeTagName; - exports.assertNodeProperty = assertNodeProperty; -+// Repro from #23977 - function assertIsElement(node) { - let nodeType = node === null ? null : node.nodeType; - return nodeType === 1; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/intersectionsOfLargeUnions2.js b/testdata/baselines/reference/submodule/compiler/intersectionsOfLargeUnions2.js index d61b378eec..4fdc0f80b9 100644 --- a/testdata/baselines/reference/submodule/compiler/intersectionsOfLargeUnions2.js +++ b/testdata/baselines/reference/submodule/compiler/intersectionsOfLargeUnions2.js @@ -40,6 +40,7 @@ export function assertNodeProperty< //// [intersectionsOfLargeUnions2.js] "use strict"; +// Repro from #24233 Object.defineProperty(exports, "__esModule", { value: true }); exports.assertIsElement = assertIsElement; exports.assertNodeTagName = assertNodeTagName; diff --git a/testdata/baselines/reference/submodule/compiler/intersectionsOfLargeUnions2.js.diff b/testdata/baselines/reference/submodule/compiler/intersectionsOfLargeUnions2.js.diff deleted file mode 100644 index 7468281772..0000000000 --- a/testdata/baselines/reference/submodule/compiler/intersectionsOfLargeUnions2.js.diff +++ /dev/null @@ -1,10 +0,0 @@ ---- old.intersectionsOfLargeUnions2.js -+++ new.intersectionsOfLargeUnions2.js -@@= skipped -39, +39 lines =@@ - - //// [intersectionsOfLargeUnions2.js] - "use strict"; --// Repro from #24233 - Object.defineProperty(exports, "__esModule", { value: true }); - exports.assertIsElement = assertIsElement; - exports.assertNodeTagName = assertNodeTagName; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/isolatedDeclarationErrorTypes1.js b/testdata/baselines/reference/submodule/compiler/isolatedDeclarationErrorTypes1.js index f373f20796..64ad2de25b 100644 --- a/testdata/baselines/reference/submodule/compiler/isolatedDeclarationErrorTypes1.js +++ b/testdata/baselines/reference/submodule/compiler/isolatedDeclarationErrorTypes1.js @@ -12,6 +12,7 @@ export const foo3 = (type: Unresolved): void => {}; //// [isolatedDeclarationErrorTypes1.js] "use strict"; +// https://github.com/microsoft/TypeScript/issues/60192 Object.defineProperty(exports, "__esModule", { value: true }); exports.foo3 = exports.foo2 = exports.foo1 = void 0; const foo1 = (type) => { }; diff --git a/testdata/baselines/reference/submodule/compiler/isolatedDeclarationErrorTypes1.js.diff b/testdata/baselines/reference/submodule/compiler/isolatedDeclarationErrorTypes1.js.diff index bec6aaca54..4134efb25c 100644 --- a/testdata/baselines/reference/submodule/compiler/isolatedDeclarationErrorTypes1.js.diff +++ b/testdata/baselines/reference/submodule/compiler/isolatedDeclarationErrorTypes1.js.diff @@ -1,14 +1,6 @@ --- old.isolatedDeclarationErrorTypes1.js +++ new.isolatedDeclarationErrorTypes1.js -@@= skipped -11, +11 lines =@@ - - //// [isolatedDeclarationErrorTypes1.js] - "use strict"; --// https://github.com/microsoft/TypeScript/issues/60192 - Object.defineProperty(exports, "__esModule", { value: true }); - exports.foo3 = exports.foo2 = exports.foo1 = void 0; - const foo1 = (type) => { }; -@@= skipped -12, +11 lines =@@ +@@= skipped -23, +23 lines =@@ //// [isolatedDeclarationErrorTypes1.d.ts] diff --git a/testdata/baselines/reference/submodule/compiler/isolatedDeclarationsAddUndefined2.js b/testdata/baselines/reference/submodule/compiler/isolatedDeclarationsAddUndefined2.js index ead291b262..32bc756193 100644 --- a/testdata/baselines/reference/submodule/compiler/isolatedDeclarationsAddUndefined2.js +++ b/testdata/baselines/reference/submodule/compiler/isolatedDeclarationsAddUndefined2.js @@ -28,12 +28,12 @@ export function test3(x?: Unresolved): void {} //// [isolatedDeclarationsAddUndefined2.js] "use strict"; +// https://github.com/microsoft/TypeScript/issues/60123 Object.defineProperty(exports, "__esModule", { value: true }); exports.Bar4 = exports.Bar3 = exports.Bar2 = exports.Bar = void 0; exports.test1 = test1; exports.test2 = test2; exports.test3 = test3; -// https://github.com/microsoft/TypeScript/issues/60123 class Bar { x; constructor(x) { diff --git a/testdata/baselines/reference/submodule/compiler/isolatedDeclarationsAddUndefined2.js.diff b/testdata/baselines/reference/submodule/compiler/isolatedDeclarationsAddUndefined2.js.diff index b9c92a668b..1a37f56f75 100644 --- a/testdata/baselines/reference/submodule/compiler/isolatedDeclarationsAddUndefined2.js.diff +++ b/testdata/baselines/reference/submodule/compiler/isolatedDeclarationsAddUndefined2.js.diff @@ -1,16 +1,8 @@ --- old.isolatedDeclarationsAddUndefined2.js +++ new.isolatedDeclarationsAddUndefined2.js -@@= skipped -27, +27 lines =@@ - - //// [isolatedDeclarationsAddUndefined2.js] - "use strict"; --// https://github.com/microsoft/TypeScript/issues/60123 - Object.defineProperty(exports, "__esModule", { value: true }); - exports.Bar4 = exports.Bar3 = exports.Bar2 = exports.Bar = void 0; - exports.test1 = test1; +@@= skipped -34, +34 lines =@@ exports.test2 = test2; exports.test3 = test3; -+// https://github.com/microsoft/TypeScript/issues/60123 class Bar { + x; constructor(x) { diff --git a/testdata/baselines/reference/submodule/compiler/jsDeclarationEmitExportAssignedFunctionWithExtraTypedefsMembers.js b/testdata/baselines/reference/submodule/compiler/jsDeclarationEmitExportAssignedFunctionWithExtraTypedefsMembers.js index bf182d3b0a..097983ca7a 100644 --- a/testdata/baselines/reference/submodule/compiler/jsDeclarationEmitExportAssignedFunctionWithExtraTypedefsMembers.js +++ b/testdata/baselines/reference/submodule/compiler/jsDeclarationEmitExportAssignedFunctionWithExtraTypedefsMembers.js @@ -14,11 +14,11 @@ module.exports = function loader(options) {} //// [index.js] "use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); /** * @typedef Options * @property {string} opt */ +Object.defineProperty(exports, "__esModule", { value: true }); /** * @param {Options} options */ diff --git a/testdata/baselines/reference/submodule/compiler/jsDeclarationEmitExportAssignedFunctionWithExtraTypedefsMembers.js.diff b/testdata/baselines/reference/submodule/compiler/jsDeclarationEmitExportAssignedFunctionWithExtraTypedefsMembers.js.diff index b9cfac184e..684426e7e1 100644 --- a/testdata/baselines/reference/submodule/compiler/jsDeclarationEmitExportAssignedFunctionWithExtraTypedefsMembers.js.diff +++ b/testdata/baselines/reference/submodule/compiler/jsDeclarationEmitExportAssignedFunctionWithExtraTypedefsMembers.js.diff @@ -1,22 +1,22 @@ --- old.jsDeclarationEmitExportAssignedFunctionWithExtraTypedefsMembers.js +++ new.jsDeclarationEmitExportAssignedFunctionWithExtraTypedefsMembers.js -@@= skipped -13, +13 lines =@@ - - //// [index.js] - "use strict"; +@@= skipped -17, +17 lines =@@ + * @typedef Options + * @property {string} opt + */ +Object.defineProperty(exports, "__esModule", { value: true }); +/** -+ * @typedef Options -+ * @property {string} opt -+ */ -+/** + * @param {Options} options + */ +export = function loader(options) { }; ++/** ++ * @typedef Options ++ * @property {string} opt ++ */ /** - * @typedef Options - * @property {string} opt -@@= skipped -11, +20 lines =@@ + * @param {Options} options + */ +@@= skipped -7, +16 lines =@@ //// [index.d.ts] diff --git a/testdata/baselines/reference/submodule/compiler/jsFileAlternativeUseOfOverloadTag.js b/testdata/baselines/reference/submodule/compiler/jsFileAlternativeUseOfOverloadTag.js index 30fd9c4e05..6a374721cf 100644 --- a/testdata/baselines/reference/submodule/compiler/jsFileAlternativeUseOfOverloadTag.js +++ b/testdata/baselines/reference/submodule/compiler/jsFileAlternativeUseOfOverloadTag.js @@ -56,10 +56,10 @@ const example3 = { //// [jsFileAlternativeUseOfOverloadTag.js] "use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); // These are a few examples of existing alternative uses of @overload tag. // They will not work as expected with our implementation, but we are // trying to make sure that our changes do not result in any crashes here. +Object.defineProperty(exports, "__esModule", { value: true }); const example1 = { /** * @overload Example1(value) diff --git a/testdata/baselines/reference/submodule/compiler/jsFileAlternativeUseOfOverloadTag.js.diff b/testdata/baselines/reference/submodule/compiler/jsFileAlternativeUseOfOverloadTag.js.diff index 72bb7b12fe..8dae32a238 100644 --- a/testdata/baselines/reference/submodule/compiler/jsFileAlternativeUseOfOverloadTag.js.diff +++ b/testdata/baselines/reference/submodule/compiler/jsFileAlternativeUseOfOverloadTag.js.diff @@ -5,10 +5,13 @@ //// [jsFileAlternativeUseOfOverloadTag.js] +"use strict"; -+Object.defineProperty(exports, "__esModule", { value: true }); // These are a few examples of existing alternative uses of @overload tag. // They will not work as expected with our implementation, but we are // trying to make sure that our changes do not result in any crashes here. ++Object.defineProperty(exports, "__esModule", { value: true }); + const example1 = { + /** + * @overload Example1(value) @@= skipped -51, +53 lines =@@ diff --git a/testdata/baselines/reference/submodule/compiler/jsxCallElaborationCheckNoCrash1.js b/testdata/baselines/reference/submodule/compiler/jsxCallElaborationCheckNoCrash1.js index 089e12841d..4f197298a1 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxCallElaborationCheckNoCrash1.js +++ b/testdata/baselines/reference/submodule/compiler/jsxCallElaborationCheckNoCrash1.js @@ -17,9 +17,9 @@ export const Hoc = ( //// [jsxCallElaborationCheckNoCrash1.js] "use strict"; +/// Object.defineProperty(exports, "__esModule", { value: true }); exports.Hoc = void 0; -/// const React = require("react"); const Hoc = (TagElement) => { const Component = () => React.createElement(TagElement, null); diff --git a/testdata/baselines/reference/submodule/compiler/jsxCallElaborationCheckNoCrash1.js.diff b/testdata/baselines/reference/submodule/compiler/jsxCallElaborationCheckNoCrash1.js.diff index c1dbfd53f8..8e4a0e5e02 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxCallElaborationCheckNoCrash1.js.diff +++ b/testdata/baselines/reference/submodule/compiler/jsxCallElaborationCheckNoCrash1.js.diff @@ -1,14 +1,10 @@ --- old.jsxCallElaborationCheckNoCrash1.js +++ new.jsxCallElaborationCheckNoCrash1.js -@@= skipped -16, +16 lines =@@ - - //// [jsxCallElaborationCheckNoCrash1.js] - "use strict"; --/// +@@= skipped -19, +19 lines =@@ + /// Object.defineProperty(exports, "__esModule", { value: true }); exports.Hoc = void 0; -var React = require("react"); -+/// +const React = require("react"); const Hoc = (TagElement) => { const Component = () => React.createElement(TagElement, null); diff --git a/testdata/baselines/reference/submodule/compiler/jsxChildrenSingleChildConfusableWithMultipleChildrenNoError.js b/testdata/baselines/reference/submodule/compiler/jsxChildrenSingleChildConfusableWithMultipleChildrenNoError.js index 354a537461..0730e084b9 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxChildrenSingleChildConfusableWithMultipleChildrenNoError.js +++ b/testdata/baselines/reference/submodule/compiler/jsxChildrenSingleChildConfusableWithMultipleChildrenNoError.js @@ -28,9 +28,9 @@ export class App extends React.Component<{}> { //// [jsxChildrenSingleChildConfusableWithMultipleChildrenNoError.js] "use strict"; +/// Object.defineProperty(exports, "__esModule", { value: true }); exports.App = void 0; -/// const React = require("react"); function TabLayout(props) { return React.createElement("div", null); diff --git a/testdata/baselines/reference/submodule/compiler/jsxChildrenSingleChildConfusableWithMultipleChildrenNoError.js.diff b/testdata/baselines/reference/submodule/compiler/jsxChildrenSingleChildConfusableWithMultipleChildrenNoError.js.diff index 4f2d8d312a..9a6bac24b2 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxChildrenSingleChildConfusableWithMultipleChildrenNoError.js.diff +++ b/testdata/baselines/reference/submodule/compiler/jsxChildrenSingleChildConfusableWithMultipleChildrenNoError.js.diff @@ -1,14 +1,10 @@ --- old.jsxChildrenSingleChildConfusableWithMultipleChildrenNoError.js +++ new.jsxChildrenSingleChildConfusableWithMultipleChildrenNoError.js -@@= skipped -27, +27 lines =@@ - - //// [jsxChildrenSingleChildConfusableWithMultipleChildrenNoError.js] - "use strict"; --/// +@@= skipped -30, +30 lines =@@ + /// Object.defineProperty(exports, "__esModule", { value: true }); exports.App = void 0; -var React = require("react"); -+/// +const React = require("react"); function TabLayout(props) { return React.createElement("div", null); diff --git a/testdata/baselines/reference/submodule/compiler/jsxComplexSignatureHasApplicabilityError.js b/testdata/baselines/reference/submodule/compiler/jsxComplexSignatureHasApplicabilityError.js index ee76f869af..b425a88ebd 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxComplexSignatureHasApplicabilityError.js +++ b/testdata/baselines/reference/submodule/compiler/jsxComplexSignatureHasApplicabilityError.js @@ -612,6 +612,7 @@ export interface ReactSelectProps extends React.Props var __assign = (this && this.__assign) || function () { __assign = Object.assign || function(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { @@ -625,7 +626,6 @@ var __assign = (this && this.__assign) || function () { }; Object.defineProperty(exports, "__esModule", { value: true }); exports.createReactSingleSelect = createReactSingleSelect; -/// const React = require("react"); function createReactSingleSelect(WrappedComponent) { return (props) => { diff --git a/testdata/baselines/reference/submodule/compiler/jsxComplexSignatureHasApplicabilityError.js.diff b/testdata/baselines/reference/submodule/compiler/jsxComplexSignatureHasApplicabilityError.js.diff index 1a21218483..0cd38d4a45 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxComplexSignatureHasApplicabilityError.js.diff +++ b/testdata/baselines/reference/submodule/compiler/jsxComplexSignatureHasApplicabilityError.js.diff @@ -1,19 +1,10 @@ --- old.jsxComplexSignatureHasApplicabilityError.js +++ new.jsxComplexSignatureHasApplicabilityError.js -@@= skipped -611, +611 lines =@@ - - //// [jsxComplexSignatureHasApplicabilityError.js] - "use strict"; --/// - var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { -@@= skipped -14, +13 lines =@@ +@@= skipped -625, +625 lines =@@ }; Object.defineProperty(exports, "__esModule", { value: true }); exports.createReactSingleSelect = createReactSingleSelect; -var React = require("react"); -+/// +const React = require("react"); function createReactSingleSelect(WrappedComponent) { return (props) => { diff --git a/testdata/baselines/reference/submodule/compiler/jsxExcessPropsAndAssignability.js b/testdata/baselines/reference/submodule/compiler/jsxExcessPropsAndAssignability.js index cbd2b8fb00..37a0f7edfd 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxExcessPropsAndAssignability.js +++ b/testdata/baselines/reference/submodule/compiler/jsxExcessPropsAndAssignability.js @@ -20,6 +20,7 @@ const myHoc = ( //// [jsxExcessPropsAndAssignability.js] "use strict"; +/// var __assign = (this && this.__assign) || function () { __assign = Object.assign || function(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { @@ -32,7 +33,6 @@ var __assign = (this && this.__assign) || function () { return __assign.apply(this, arguments); }; Object.defineProperty(exports, "__esModule", { value: true }); -/// const React = require("react"); const myHoc = (ComposedComponent) => { const WrapperComponent = null; diff --git a/testdata/baselines/reference/submodule/compiler/jsxExcessPropsAndAssignability.js.diff b/testdata/baselines/reference/submodule/compiler/jsxExcessPropsAndAssignability.js.diff index 961aefabfb..ab464f6bd5 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxExcessPropsAndAssignability.js.diff +++ b/testdata/baselines/reference/submodule/compiler/jsxExcessPropsAndAssignability.js.diff @@ -1,19 +1,10 @@ --- old.jsxExcessPropsAndAssignability.js +++ new.jsxExcessPropsAndAssignability.js -@@= skipped -19, +19 lines =@@ - - //// [jsxExcessPropsAndAssignability.js] - "use strict"; --/// - var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { -@@= skipped -13, +12 lines =@@ +@@= skipped -32, +32 lines =@@ return __assign.apply(this, arguments); }; Object.defineProperty(exports, "__esModule", { value: true }); -var React = require("react"); -+/// +const React = require("react"); const myHoc = (ComposedComponent) => { const WrapperComponent = null; diff --git a/testdata/baselines/reference/submodule/compiler/jsxIntrinsicUnions.js b/testdata/baselines/reference/submodule/compiler/jsxIntrinsicUnions.js index 912b0e85c5..95beb17270 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxIntrinsicUnions.js +++ b/testdata/baselines/reference/submodule/compiler/jsxIntrinsicUnions.js @@ -12,8 +12,8 @@ const tag = {"Title"}; //// [jsxIntrinsicUnions.js] "use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); /// +Object.defineProperty(exports, "__esModule", { value: true }); const React = require("react"); const El = Math.random() ? 'h1' : 'h2'; const tag = React.createElement(El, { className: "ok", key: "key" }, "Title"); diff --git a/testdata/baselines/reference/submodule/compiler/jsxIntrinsicUnions.js.diff b/testdata/baselines/reference/submodule/compiler/jsxIntrinsicUnions.js.diff index 3ca0818f87..b0b95f3946 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxIntrinsicUnions.js.diff +++ b/testdata/baselines/reference/submodule/compiler/jsxIntrinsicUnions.js.diff @@ -1,13 +1,10 @@ --- old.jsxIntrinsicUnions.js +++ new.jsxIntrinsicUnions.js -@@= skipped -11, +11 lines =@@ - - //// [jsxIntrinsicUnions.js] +@@= skipped -13, +13 lines =@@ "use strict"; --/// + /// Object.defineProperty(exports, "__esModule", { value: true }); -var React = require("react"); -+/// +const React = require("react"); const El = Math.random() ? 'h1' : 'h2'; const tag = React.createElement(El, { className: "ok", key: "key" }, "Title"); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxIssuesErrorWhenTagExpectsTooManyArguments.js b/testdata/baselines/reference/submodule/compiler/jsxIssuesErrorWhenTagExpectsTooManyArguments.js index 1c70ee3d23..d6cfb6507f 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxIssuesErrorWhenTagExpectsTooManyArguments.js +++ b/testdata/baselines/reference/submodule/compiler/jsxIssuesErrorWhenTagExpectsTooManyArguments.js @@ -28,8 +28,8 @@ const d = ; // Technically OK, but probably //// [jsxIssuesErrorWhenTagExpectsTooManyArguments.js] "use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); /// +Object.defineProperty(exports, "__esModule", { value: true }); const React = require("react"); function MyComp4(props, context, bad, verybad) { return React.createElement("div", null); diff --git a/testdata/baselines/reference/submodule/compiler/jsxIssuesErrorWhenTagExpectsTooManyArguments.js.diff b/testdata/baselines/reference/submodule/compiler/jsxIssuesErrorWhenTagExpectsTooManyArguments.js.diff index 3125094b86..6b15ca0dec 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxIssuesErrorWhenTagExpectsTooManyArguments.js.diff +++ b/testdata/baselines/reference/submodule/compiler/jsxIssuesErrorWhenTagExpectsTooManyArguments.js.diff @@ -1,13 +1,10 @@ --- old.jsxIssuesErrorWhenTagExpectsTooManyArguments.js +++ new.jsxIssuesErrorWhenTagExpectsTooManyArguments.js -@@= skipped -27, +27 lines =@@ - - //// [jsxIssuesErrorWhenTagExpectsTooManyArguments.js] +@@= skipped -29, +29 lines =@@ "use strict"; --/// + /// Object.defineProperty(exports, "__esModule", { value: true }); -var React = require("react"); -+/// +const React = require("react"); function MyComp4(props, context, bad, verybad) { return React.createElement("div", null); diff --git a/testdata/baselines/reference/submodule/compiler/moduleAugmentationDuringSyntheticDefaultCheck.js b/testdata/baselines/reference/submodule/compiler/moduleAugmentationDuringSyntheticDefaultCheck.js index 1de091ed9e..145596af3b 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleAugmentationDuringSyntheticDefaultCheck.js +++ b/testdata/baselines/reference/submodule/compiler/moduleAugmentationDuringSyntheticDefaultCheck.js @@ -36,4 +36,5 @@ import moment = require("moment-timezone"); //// [idx.test.js] "use strict"; +/// Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/testdata/baselines/reference/submodule/compiler/moduleAugmentationDuringSyntheticDefaultCheck.js.diff b/testdata/baselines/reference/submodule/compiler/moduleAugmentationDuringSyntheticDefaultCheck.js.diff index 74cfebc2a4..75ddb861bb 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleAugmentationDuringSyntheticDefaultCheck.js.diff +++ b/testdata/baselines/reference/submodule/compiler/moduleAugmentationDuringSyntheticDefaultCheck.js.diff @@ -9,5 +9,4 @@ -Object.defineProperty(exports, "__esModule", { value: true }); //// [idx.test.js] "use strict"; --/// - Object.defineProperty(exports, "__esModule", { value: true }); \ No newline at end of file + /// \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/moduleAugmentationInAmbientModule1.js b/testdata/baselines/reference/submodule/compiler/moduleAugmentationInAmbientModule1.js index b1196c299a..310ddede4b 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleAugmentationInAmbientModule1.js +++ b/testdata/baselines/reference/submodule/compiler/moduleAugmentationInAmbientModule1.js @@ -28,6 +28,7 @@ x.foo().x; //// [main.js] "use strict"; +/// Object.defineProperty(exports, "__esModule", { value: true }); let x; x.foo().x; diff --git a/testdata/baselines/reference/submodule/compiler/moduleAugmentationInAmbientModule1.js.diff b/testdata/baselines/reference/submodule/compiler/moduleAugmentationInAmbientModule1.js.diff deleted file mode 100644 index d8f590916e..0000000000 --- a/testdata/baselines/reference/submodule/compiler/moduleAugmentationInAmbientModule1.js.diff +++ /dev/null @@ -1,10 +0,0 @@ ---- old.moduleAugmentationInAmbientModule1.js -+++ new.moduleAugmentationInAmbientModule1.js -@@= skipped -27, +27 lines =@@ - - //// [main.js] - "use strict"; --/// - Object.defineProperty(exports, "__esModule", { value: true }); - let x; - x.foo().x; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/moduleAugmentationInAmbientModule2.js b/testdata/baselines/reference/submodule/compiler/moduleAugmentationInAmbientModule2.js index f02b2a39a2..1f270b9f81 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleAugmentationInAmbientModule2.js +++ b/testdata/baselines/reference/submodule/compiler/moduleAugmentationInAmbientModule2.js @@ -29,6 +29,7 @@ x.foo().x; //// [main.js] "use strict"; +/// Object.defineProperty(exports, "__esModule", { value: true }); require("Map"); let x; diff --git a/testdata/baselines/reference/submodule/compiler/moduleAugmentationInAmbientModule2.js.diff b/testdata/baselines/reference/submodule/compiler/moduleAugmentationInAmbientModule2.js.diff index 5bb4aef0ec..d95b87e65e 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleAugmentationInAmbientModule2.js.diff +++ b/testdata/baselines/reference/submodule/compiler/moduleAugmentationInAmbientModule2.js.diff @@ -1,11 +1,6 @@ --- old.moduleAugmentationInAmbientModule2.js +++ new.moduleAugmentationInAmbientModule2.js -@@= skipped -28, +28 lines =@@ - - //// [main.js] - "use strict"; --/// - Object.defineProperty(exports, "__esModule", { value: true }); +@@= skipped -33, +33 lines =@@ require("Map"); let x; x.foo().x; diff --git a/testdata/baselines/reference/submodule/compiler/moduleAugmentationInAmbientModule3.js b/testdata/baselines/reference/submodule/compiler/moduleAugmentationInAmbientModule3.js index 4dc2ba18b4..dda27d1c9f 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleAugmentationInAmbientModule3.js +++ b/testdata/baselines/reference/submodule/compiler/moduleAugmentationInAmbientModule3.js @@ -39,6 +39,7 @@ x.foo2().x2; //// [main.js] "use strict"; +/// Object.defineProperty(exports, "__esModule", { value: true }); require("Map"); let x; diff --git a/testdata/baselines/reference/submodule/compiler/moduleAugmentationInAmbientModule3.js.diff b/testdata/baselines/reference/submodule/compiler/moduleAugmentationInAmbientModule3.js.diff index f9bab0626d..a7764856f2 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleAugmentationInAmbientModule3.js.diff +++ b/testdata/baselines/reference/submodule/compiler/moduleAugmentationInAmbientModule3.js.diff @@ -1,12 +1,6 @@ --- old.moduleAugmentationInAmbientModule3.js +++ new.moduleAugmentationInAmbientModule3.js -@@= skipped -38, +38 lines =@@ - - //// [main.js] - "use strict"; --/// - Object.defineProperty(exports, "__esModule", { value: true }); - require("Map"); +@@= skipped -44, +44 lines =@@ let x; x.foo().x; x.foo2().x2; diff --git a/testdata/baselines/reference/submodule/compiler/moduleAugmentationInAmbientModule4.js b/testdata/baselines/reference/submodule/compiler/moduleAugmentationInAmbientModule4.js index 7a452c7a49..68039aeea6 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleAugmentationInAmbientModule4.js +++ b/testdata/baselines/reference/submodule/compiler/moduleAugmentationInAmbientModule4.js @@ -41,6 +41,8 @@ x.foo2().x2; //// [main.js] "use strict"; +/// +/// Object.defineProperty(exports, "__esModule", { value: true }); require("Map"); let x; diff --git a/testdata/baselines/reference/submodule/compiler/moduleAugmentationInAmbientModule4.js.diff b/testdata/baselines/reference/submodule/compiler/moduleAugmentationInAmbientModule4.js.diff index b88382915e..f2d1c8beab 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleAugmentationInAmbientModule4.js.diff +++ b/testdata/baselines/reference/submodule/compiler/moduleAugmentationInAmbientModule4.js.diff @@ -1,13 +1,6 @@ --- old.moduleAugmentationInAmbientModule4.js +++ new.moduleAugmentationInAmbientModule4.js -@@= skipped -40, +40 lines =@@ - - //// [main.js] - "use strict"; --/// --/// - Object.defineProperty(exports, "__esModule", { value: true }); - require("Map"); +@@= skipped -47, +47 lines =@@ let x; x.foo().x; x.foo2().x2; diff --git a/testdata/baselines/reference/submodule/compiler/moduleResolutionWithSymlinks_preserveSymlinks.js b/testdata/baselines/reference/submodule/compiler/moduleResolutionWithSymlinks_preserveSymlinks.js index de63c70176..31cdc9ec06 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleResolutionWithSymlinks_preserveSymlinks.js +++ b/testdata/baselines/reference/submodule/compiler/moduleResolutionWithSymlinks_preserveSymlinks.js @@ -21,9 +21,9 @@ x = new C2(); //// [app.js] "use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); // We shouldn't resolve symlinks for references either. See the trace. /// +Object.defineProperty(exports, "__esModule", { value: true }); const linked_1 = require("linked"); const linked2_1 = require("linked2"); let x = new linked_1.C(); diff --git a/testdata/baselines/reference/submodule/compiler/moduleResolutionWithSymlinks_preserveSymlinks.js.diff b/testdata/baselines/reference/submodule/compiler/moduleResolutionWithSymlinks_preserveSymlinks.js.diff index 01db587117..eef0d9a16b 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleResolutionWithSymlinks_preserveSymlinks.js.diff +++ b/testdata/baselines/reference/submodule/compiler/moduleResolutionWithSymlinks_preserveSymlinks.js.diff @@ -1,13 +1,9 @@ --- old.moduleResolutionWithSymlinks_preserveSymlinks.js +++ new.moduleResolutionWithSymlinks_preserveSymlinks.js -@@= skipped -20, +20 lines =@@ - - //// [app.js] - "use strict"; -+Object.defineProperty(exports, "__esModule", { value: true }); +@@= skipped -23, +23 lines =@@ // We shouldn't resolve symlinks for references either. See the trace. /// --Object.defineProperty(exports, "__esModule", { value: true }); + Object.defineProperty(exports, "__esModule", { value: true }); -var linked_1 = require("linked"); -var linked2_1 = require("linked2"); +const linked_1 = require("linked"); diff --git a/testdata/baselines/reference/submodule/compiler/narrowingConstrainedTypeParameter.js b/testdata/baselines/reference/submodule/compiler/narrowingConstrainedTypeParameter.js index f430b1633d..9b76ba2a7a 100644 --- a/testdata/baselines/reference/submodule/compiler/narrowingConstrainedTypeParameter.js +++ b/testdata/baselines/reference/submodule/compiler/narrowingConstrainedTypeParameter.js @@ -20,6 +20,7 @@ export function speak(pet: TPet, voice: (pet: TPet) => string) //// [narrowingConstrainedTypeParameter.js] "use strict"; +// Repro from #10811 Object.defineProperty(exports, "__esModule", { value: true }); exports.speak = speak; function isPet(pet) { diff --git a/testdata/baselines/reference/submodule/compiler/narrowingConstrainedTypeParameter.js.diff b/testdata/baselines/reference/submodule/compiler/narrowingConstrainedTypeParameter.js.diff deleted file mode 100644 index a91c8edb73..0000000000 --- a/testdata/baselines/reference/submodule/compiler/narrowingConstrainedTypeParameter.js.diff +++ /dev/null @@ -1,10 +0,0 @@ ---- old.narrowingConstrainedTypeParameter.js -+++ new.narrowingConstrainedTypeParameter.js -@@= skipped -19, +19 lines =@@ - - //// [narrowingConstrainedTypeParameter.js] - "use strict"; --// Repro from #10811 - Object.defineProperty(exports, "__esModule", { value: true }); - exports.speak = speak; - function isPet(pet) { \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/reactDefaultPropsInferenceSuccess.js b/testdata/baselines/reference/submodule/compiler/reactDefaultPropsInferenceSuccess.js index ef4cb2f788..72a4c4084d 100644 --- a/testdata/baselines/reference/submodule/compiler/reactDefaultPropsInferenceSuccess.js +++ b/testdata/baselines/reference/submodule/compiler/reactDefaultPropsInferenceSuccess.js @@ -72,11 +72,11 @@ const Test5 = () => ; //// [reactDefaultPropsInferenceSuccess.js] "use strict"; +/// var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); -/// const react_1 = __importDefault(require("react")); class FieldFeedback extends react_1.default.Component { static defaultProps = { diff --git a/testdata/baselines/reference/submodule/compiler/reactDefaultPropsInferenceSuccess.js.diff b/testdata/baselines/reference/submodule/compiler/reactDefaultPropsInferenceSuccess.js.diff index f18ce8f09c..c556e5e7d2 100644 --- a/testdata/baselines/reference/submodule/compiler/reactDefaultPropsInferenceSuccess.js.diff +++ b/testdata/baselines/reference/submodule/compiler/reactDefaultPropsInferenceSuccess.js.diff @@ -1,11 +1,6 @@ --- old.reactDefaultPropsInferenceSuccess.js +++ new.reactDefaultPropsInferenceSuccess.js -@@= skipped -71, +71 lines =@@ - - //// [reactDefaultPropsInferenceSuccess.js] - "use strict"; --/// - var __importDefault = (this && this.__importDefault) || function (mod) { +@@= skipped -76, +76 lines =@@ return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); @@ -17,7 +12,6 @@ - } - } - FieldFeedback.defaultProps = { -+/// +const react_1 = __importDefault(require("react")); +class FieldFeedback extends react_1.default.Component { + static defaultProps = { diff --git a/testdata/baselines/reference/submodule/compiler/reactSFCAndFunctionResolvable.js b/testdata/baselines/reference/submodule/compiler/reactSFCAndFunctionResolvable.js index 348085d966..366d48ac9a 100644 --- a/testdata/baselines/reference/submodule/compiler/reactSFCAndFunctionResolvable.js +++ b/testdata/baselines/reference/submodule/compiler/reactSFCAndFunctionResolvable.js @@ -29,8 +29,8 @@ const RandomComponent: React.SFC = () => { //// [reactSFCAndFunctionResolvable.js] "use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); /// +Object.defineProperty(exports, "__esModule", { value: true }); const React = require("react"); const RandomComponent = () => { const Component = condition1 diff --git a/testdata/baselines/reference/submodule/compiler/reactSFCAndFunctionResolvable.js.diff b/testdata/baselines/reference/submodule/compiler/reactSFCAndFunctionResolvable.js.diff index e0547d01bf..6d6fd84e25 100644 --- a/testdata/baselines/reference/submodule/compiler/reactSFCAndFunctionResolvable.js.diff +++ b/testdata/baselines/reference/submodule/compiler/reactSFCAndFunctionResolvable.js.diff @@ -1,13 +1,10 @@ --- old.reactSFCAndFunctionResolvable.js +++ new.reactSFCAndFunctionResolvable.js -@@= skipped -28, +28 lines =@@ - - //// [reactSFCAndFunctionResolvable.js] +@@= skipped -30, +30 lines =@@ "use strict"; --/// + /// Object.defineProperty(exports, "__esModule", { value: true }); -var React = require("react"); -+/// +const React = require("react"); const RandomComponent = () => { const Component = condition1 diff --git a/testdata/baselines/reference/submodule/compiler/reactTagNameComponentWithPropsNoOOM.js b/testdata/baselines/reference/submodule/compiler/reactTagNameComponentWithPropsNoOOM.js index c7411537fb..07eb8f5ce7 100644 --- a/testdata/baselines/reference/submodule/compiler/reactTagNameComponentWithPropsNoOOM.js +++ b/testdata/baselines/reference/submodule/compiler/reactTagNameComponentWithPropsNoOOM.js @@ -15,6 +15,7 @@ const children: any[] = []; //// [reactTagNameComponentWithPropsNoOOM.js] "use strict"; +/// var __assign = (this && this.__assign) || function () { __assign = Object.assign || function(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { @@ -27,7 +28,6 @@ var __assign = (this && this.__assign) || function () { return __assign.apply(this, arguments); }; Object.defineProperty(exports, "__esModule", { value: true }); -/// const React = require("react"); const classes = ""; const rest = {}; diff --git a/testdata/baselines/reference/submodule/compiler/reactTagNameComponentWithPropsNoOOM.js.diff b/testdata/baselines/reference/submodule/compiler/reactTagNameComponentWithPropsNoOOM.js.diff index 6f68ebc762..95bdd6f6ec 100644 --- a/testdata/baselines/reference/submodule/compiler/reactTagNameComponentWithPropsNoOOM.js.diff +++ b/testdata/baselines/reference/submodule/compiler/reactTagNameComponentWithPropsNoOOM.js.diff @@ -1,19 +1,10 @@ --- old.reactTagNameComponentWithPropsNoOOM.js +++ new.reactTagNameComponentWithPropsNoOOM.js -@@= skipped -14, +14 lines =@@ - - //// [reactTagNameComponentWithPropsNoOOM.js] - "use strict"; --/// - var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { -@@= skipped -13, +12 lines =@@ +@@= skipped -27, +27 lines =@@ return __assign.apply(this, arguments); }; Object.defineProperty(exports, "__esModule", { value: true }); -var React = require("react"); -+/// +const React = require("react"); const classes = ""; const rest = {}; diff --git a/testdata/baselines/reference/submodule/compiler/reactTagNameComponentWithPropsNoOOM2.js b/testdata/baselines/reference/submodule/compiler/reactTagNameComponentWithPropsNoOOM2.js index 39837e0ce6..f7ab3ffc65 100644 --- a/testdata/baselines/reference/submodule/compiler/reactTagNameComponentWithPropsNoOOM2.js +++ b/testdata/baselines/reference/submodule/compiler/reactTagNameComponentWithPropsNoOOM2.js @@ -15,6 +15,7 @@ const children: any[] = []; //// [reactTagNameComponentWithPropsNoOOM2.js] "use strict"; +/// var __assign = (this && this.__assign) || function () { __assign = Object.assign || function(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { @@ -27,7 +28,6 @@ var __assign = (this && this.__assign) || function () { return __assign.apply(this, arguments); }; Object.defineProperty(exports, "__esModule", { value: true }); -/// const React = require("react"); const classes = ""; const rest = {}; diff --git a/testdata/baselines/reference/submodule/compiler/reactTagNameComponentWithPropsNoOOM2.js.diff b/testdata/baselines/reference/submodule/compiler/reactTagNameComponentWithPropsNoOOM2.js.diff index b3845ebbe9..ccc77b4289 100644 --- a/testdata/baselines/reference/submodule/compiler/reactTagNameComponentWithPropsNoOOM2.js.diff +++ b/testdata/baselines/reference/submodule/compiler/reactTagNameComponentWithPropsNoOOM2.js.diff @@ -1,19 +1,10 @@ --- old.reactTagNameComponentWithPropsNoOOM2.js +++ new.reactTagNameComponentWithPropsNoOOM2.js -@@= skipped -14, +14 lines =@@ - - //// [reactTagNameComponentWithPropsNoOOM2.js] - "use strict"; --/// - var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { -@@= skipped -13, +12 lines =@@ +@@= skipped -27, +27 lines =@@ return __assign.apply(this, arguments); }; Object.defineProperty(exports, "__esModule", { value: true }); -var React = require("react"); -+/// +const React = require("react"); const classes = ""; const rest = {}; diff --git a/testdata/baselines/reference/submodule/compiler/recursiveConditionalCrash2.js b/testdata/baselines/reference/submodule/compiler/recursiveConditionalCrash2.js index f8e19f6742..0ef2a76ebe 100644 --- a/testdata/baselines/reference/submodule/compiler/recursiveConditionalCrash2.js +++ b/testdata/baselines/reference/submodule/compiler/recursiveConditionalCrash2.js @@ -19,4 +19,5 @@ export type UseQueryOptions = Expand__ //// [recursiveConditionalCrash2.js] "use strict"; +// Simplified #43529 Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/testdata/baselines/reference/submodule/compiler/recursiveConditionalCrash2.js.diff b/testdata/baselines/reference/submodule/compiler/recursiveConditionalCrash2.js.diff deleted file mode 100644 index 1f0633d43e..0000000000 --- a/testdata/baselines/reference/submodule/compiler/recursiveConditionalCrash2.js.diff +++ /dev/null @@ -1,8 +0,0 @@ ---- old.recursiveConditionalCrash2.js -+++ new.recursiveConditionalCrash2.js -@@= skipped -18, +18 lines =@@ - - //// [recursiveConditionalCrash2.js] - "use strict"; --// Simplified #43529 - Object.defineProperty(exports, "__esModule", { value: true }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/recursiveConditionalCrash3.js b/testdata/baselines/reference/submodule/compiler/recursiveConditionalCrash3.js index 27c6da19f7..5d726d5a72 100644 --- a/testdata/baselines/reference/submodule/compiler/recursiveConditionalCrash3.js +++ b/testdata/baselines/reference/submodule/compiler/recursiveConditionalCrash3.js @@ -151,6 +151,7 @@ let t: UseQueryOptions //// [recursiveConditionalCrash3.js] "use strict"; +// #43529 Object.defineProperty(exports, "__esModule", { value: true }); /** * These two functions work as charm, also they are superfast and as expected they don't use additional Memory diff --git a/testdata/baselines/reference/submodule/compiler/recursiveConditionalCrash3.js.diff b/testdata/baselines/reference/submodule/compiler/recursiveConditionalCrash3.js.diff deleted file mode 100644 index 5313135627..0000000000 --- a/testdata/baselines/reference/submodule/compiler/recursiveConditionalCrash3.js.diff +++ /dev/null @@ -1,10 +0,0 @@ ---- old.recursiveConditionalCrash3.js -+++ new.recursiveConditionalCrash3.js -@@= skipped -150, +150 lines =@@ - - //// [recursiveConditionalCrash3.js] - "use strict"; --// #43529 - Object.defineProperty(exports, "__esModule", { value: true }); - /** - * These two functions work as charm, also they are superfast and as expected they don't use additional Memory \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/recursiveTupleTypeInference.js b/testdata/baselines/reference/submodule/compiler/recursiveTupleTypeInference.js index befecc076e..c56e013c04 100644 --- a/testdata/baselines/reference/submodule/compiler/recursiveTupleTypeInference.js +++ b/testdata/baselines/reference/submodule/compiler/recursiveTupleTypeInference.js @@ -28,6 +28,7 @@ foo(gK); //// [recursiveTupleTypeInference.js] "use strict"; +// Repro from #37475 Object.defineProperty(exports, "__esModule", { value: true }); const gK = { b: ["number", "null"] }; function foo(g) { diff --git a/testdata/baselines/reference/submodule/compiler/recursiveTupleTypeInference.js.diff b/testdata/baselines/reference/submodule/compiler/recursiveTupleTypeInference.js.diff deleted file mode 100644 index 76a61bfca6..0000000000 --- a/testdata/baselines/reference/submodule/compiler/recursiveTupleTypeInference.js.diff +++ /dev/null @@ -1,10 +0,0 @@ ---- old.recursiveTupleTypeInference.js -+++ new.recursiveTupleTypeInference.js -@@= skipped -27, +27 lines =@@ - - //// [recursiveTupleTypeInference.js] - "use strict"; --// Repro from #37475 - Object.defineProperty(exports, "__esModule", { value: true }); - const gK = { b: ["number", "null"] }; - function foo(g) { \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/recursiveTypeRelations.js b/testdata/baselines/reference/submodule/compiler/recursiveTypeRelations.js index d52b290cd4..47a334cdf9 100644 --- a/testdata/baselines/reference/submodule/compiler/recursiveTypeRelations.js +++ b/testdata/baselines/reference/submodule/compiler/recursiveTypeRelations.js @@ -40,6 +40,7 @@ export function css(styles: S, ...classNam //// [recursiveTypeRelations.js] "use strict"; +// Repro from #14896 Object.defineProperty(exports, "__esModule", { value: true }); exports.css = css; class Query { diff --git a/testdata/baselines/reference/submodule/compiler/recursiveTypeRelations.js.diff b/testdata/baselines/reference/submodule/compiler/recursiveTypeRelations.js.diff deleted file mode 100644 index 72cb5f8aa6..0000000000 --- a/testdata/baselines/reference/submodule/compiler/recursiveTypeRelations.js.diff +++ /dev/null @@ -1,10 +0,0 @@ ---- old.recursiveTypeRelations.js -+++ new.recursiveTypeRelations.js -@@= skipped -39, +39 lines =@@ - - //// [recursiveTypeRelations.js] - "use strict"; --// Repro from #14896 - Object.defineProperty(exports, "__esModule", { value: true }); - exports.css = css; - class Query { \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/reverseMappedPartiallyInferableTypes.js b/testdata/baselines/reference/submodule/compiler/reverseMappedPartiallyInferableTypes.js index 08a36fe515..23d5953f63 100644 --- a/testdata/baselines/reference/submodule/compiler/reverseMappedPartiallyInferableTypes.js +++ b/testdata/baselines/reference/submodule/compiler/reverseMappedPartiallyInferableTypes.js @@ -131,6 +131,7 @@ inferMappedReadonly({ //// [reverseMappedPartiallyInferableTypes.js] "use strict"; +// Repro from #30505 Object.defineProperty(exports, "__esModule", { value: true }); const r = extend({ props: { diff --git a/testdata/baselines/reference/submodule/compiler/reverseMappedPartiallyInferableTypes.js.diff b/testdata/baselines/reference/submodule/compiler/reverseMappedPartiallyInferableTypes.js.diff deleted file mode 100644 index 90fab6c9cb..0000000000 --- a/testdata/baselines/reference/submodule/compiler/reverseMappedPartiallyInferableTypes.js.diff +++ /dev/null @@ -1,10 +0,0 @@ ---- old.reverseMappedPartiallyInferableTypes.js -+++ new.reverseMappedPartiallyInferableTypes.js -@@= skipped -130, +130 lines =@@ - - //// [reverseMappedPartiallyInferableTypes.js] - "use strict"; --// Repro from #30505 - Object.defineProperty(exports, "__esModule", { value: true }); - const r = extend({ - props: { \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/shebangBeforeReferences.js b/testdata/baselines/reference/submodule/compiler/shebangBeforeReferences.js index 761ac88c07..94a4999a00 100644 --- a/testdata/baselines/reference/submodule/compiler/shebangBeforeReferences.js +++ b/testdata/baselines/reference/submodule/compiler/shebangBeforeReferences.js @@ -17,7 +17,7 @@ use(x); //// [f.js] #!/usr/bin/env node "use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); /// +Object.defineProperty(exports, "__esModule", { value: true }); const test_1 = require("test"); use(test_1.x); diff --git a/testdata/baselines/reference/submodule/compiler/shebangBeforeReferences.js.diff b/testdata/baselines/reference/submodule/compiler/shebangBeforeReferences.js.diff index 09c897fae0..0f54cd3448 100644 --- a/testdata/baselines/reference/submodule/compiler/shebangBeforeReferences.js.diff +++ b/testdata/baselines/reference/submodule/compiler/shebangBeforeReferences.js.diff @@ -1,12 +1,9 @@ --- old.shebangBeforeReferences.js +++ new.shebangBeforeReferences.js -@@= skipped -16, +16 lines =@@ - //// [f.js] - #!/usr/bin/env node +@@= skipped -18, +18 lines =@@ "use strict"; --/// + /// Object.defineProperty(exports, "__esModule", { value: true }); -var test_1 = require("test"); -+/// +const test_1 = require("test"); use(test_1.x); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/specedNoStackBlown.js b/testdata/baselines/reference/submodule/compiler/specedNoStackBlown.js index 40ae9e3318..232227568e 100644 --- a/testdata/baselines/reference/submodule/compiler/specedNoStackBlown.js +++ b/testdata/baselines/reference/submodule/compiler/specedNoStackBlown.js @@ -40,5 +40,10 @@ export default spected; //// [specedNoStackBlown.js] "use strict"; +// Type definitions for spected 0.7 +// Project: https://github.com/25th-floor/spected +// Definitions by: Benjamin Makus +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 Object.defineProperty(exports, "__esModule", { value: true }); exports.default = spected; diff --git a/testdata/baselines/reference/submodule/compiler/specedNoStackBlown.js.diff b/testdata/baselines/reference/submodule/compiler/specedNoStackBlown.js.diff deleted file mode 100644 index 569a89b30b..0000000000 --- a/testdata/baselines/reference/submodule/compiler/specedNoStackBlown.js.diff +++ /dev/null @@ -1,13 +0,0 @@ ---- old.specedNoStackBlown.js -+++ new.specedNoStackBlown.js -@@= skipped -39, +39 lines =@@ - - //// [specedNoStackBlown.js] - "use strict"; --// Type definitions for spected 0.7 --// Project: https://github.com/25th-floor/spected --// Definitions by: Benjamin Makus --// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped --// TypeScript Version: 2.8 - Object.defineProperty(exports, "__esModule", { value: true }); - exports.default = spected; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/spreadExpressionContextualTypeWithNamespace.js b/testdata/baselines/reference/submodule/compiler/spreadExpressionContextualTypeWithNamespace.js index 132ae598ca..58620e049f 100644 --- a/testdata/baselines/reference/submodule/compiler/spreadExpressionContextualTypeWithNamespace.js +++ b/testdata/baselines/reference/submodule/compiler/spreadExpressionContextualTypeWithNamespace.js @@ -36,11 +36,11 @@ getStuff().exportedDirectly; //// [spreadExpressionContextualTypeWithNamespace_0.js] "use strict"; +// Repro from #44179 with some modification Object.defineProperty(exports, "__esModule", { value: true }); exports.obj = exports.klass = void 0; exports.func = func; exports.exportedDirectly = exportedDirectly; -// Repro from #44179 with some modification function func() { } class klass { } diff --git a/testdata/baselines/reference/submodule/compiler/spreadExpressionContextualTypeWithNamespace.js.diff b/testdata/baselines/reference/submodule/compiler/spreadExpressionContextualTypeWithNamespace.js.diff index e22623ce91..c8f0893e6d 100644 --- a/testdata/baselines/reference/submodule/compiler/spreadExpressionContextualTypeWithNamespace.js.diff +++ b/testdata/baselines/reference/submodule/compiler/spreadExpressionContextualTypeWithNamespace.js.diff @@ -1,19 +1,6 @@ --- old.spreadExpressionContextualTypeWithNamespace.js +++ new.spreadExpressionContextualTypeWithNamespace.js -@@= skipped -35, +35 lines =@@ - - //// [spreadExpressionContextualTypeWithNamespace_0.js] - "use strict"; --// Repro from #44179 with some modification - Object.defineProperty(exports, "__esModule", { value: true }); - exports.obj = exports.klass = void 0; - exports.func = func; - exports.exportedDirectly = exportedDirectly; -+// Repro from #44179 with some modification - function func() { } - class klass { - } -@@= skipped -26, +26 lines =@@ +@@= skipped -61, +61 lines =@@ return __assign.apply(this, arguments); }; Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/testdata/baselines/reference/submodule/compiler/tripleSlashTypesReferenceWithMissingExports(module=node16).js b/testdata/baselines/reference/submodule/compiler/tripleSlashTypesReferenceWithMissingExports(module=node16).js index 6d734ae2ed..7c518b3b9d 100644 --- a/testdata/baselines/reference/submodule/compiler/tripleSlashTypesReferenceWithMissingExports(module=node16).js +++ b/testdata/baselines/reference/submodule/compiler/tripleSlashTypesReferenceWithMissingExports(module=node16).js @@ -15,6 +15,6 @@ const a: GlobalThing = { a: 0 }; //// [usage.js] "use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); /// +Object.defineProperty(exports, "__esModule", { value: true }); const a = { a: 0 }; diff --git a/testdata/baselines/reference/submodule/compiler/tripleSlashTypesReferenceWithMissingExports(module=node16).js.diff b/testdata/baselines/reference/submodule/compiler/tripleSlashTypesReferenceWithMissingExports(module=node16).js.diff deleted file mode 100644 index 050a3b1053..0000000000 --- a/testdata/baselines/reference/submodule/compiler/tripleSlashTypesReferenceWithMissingExports(module=node16).js.diff +++ /dev/null @@ -1,10 +0,0 @@ ---- old.tripleSlashTypesReferenceWithMissingExports(module=node16).js -+++ new.tripleSlashTypesReferenceWithMissingExports(module=node16).js -@@= skipped -14, +14 lines =@@ - - //// [usage.js] - "use strict"; --/// - Object.defineProperty(exports, "__esModule", { value: true }); -+/// - const a = { a: 0 }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/tripleSlashTypesReferenceWithMissingExports(module=node20).js b/testdata/baselines/reference/submodule/compiler/tripleSlashTypesReferenceWithMissingExports(module=node20).js index 6d734ae2ed..7c518b3b9d 100644 --- a/testdata/baselines/reference/submodule/compiler/tripleSlashTypesReferenceWithMissingExports(module=node20).js +++ b/testdata/baselines/reference/submodule/compiler/tripleSlashTypesReferenceWithMissingExports(module=node20).js @@ -15,6 +15,6 @@ const a: GlobalThing = { a: 0 }; //// [usage.js] "use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); /// +Object.defineProperty(exports, "__esModule", { value: true }); const a = { a: 0 }; diff --git a/testdata/baselines/reference/submodule/compiler/tripleSlashTypesReferenceWithMissingExports(module=node20).js.diff b/testdata/baselines/reference/submodule/compiler/tripleSlashTypesReferenceWithMissingExports(module=node20).js.diff deleted file mode 100644 index 18ceeaf53b..0000000000 --- a/testdata/baselines/reference/submodule/compiler/tripleSlashTypesReferenceWithMissingExports(module=node20).js.diff +++ /dev/null @@ -1,10 +0,0 @@ ---- old.tripleSlashTypesReferenceWithMissingExports(module=node20).js -+++ new.tripleSlashTypesReferenceWithMissingExports(module=node20).js -@@= skipped -14, +14 lines =@@ - - //// [usage.js] - "use strict"; --/// - Object.defineProperty(exports, "__esModule", { value: true }); -+/// - const a = { a: 0 }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/tripleSlashTypesReferenceWithMissingExports(module=nodenext).js b/testdata/baselines/reference/submodule/compiler/tripleSlashTypesReferenceWithMissingExports(module=nodenext).js index 6d734ae2ed..7c518b3b9d 100644 --- a/testdata/baselines/reference/submodule/compiler/tripleSlashTypesReferenceWithMissingExports(module=nodenext).js +++ b/testdata/baselines/reference/submodule/compiler/tripleSlashTypesReferenceWithMissingExports(module=nodenext).js @@ -15,6 +15,6 @@ const a: GlobalThing = { a: 0 }; //// [usage.js] "use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); /// +Object.defineProperty(exports, "__esModule", { value: true }); const a = { a: 0 }; diff --git a/testdata/baselines/reference/submodule/compiler/tripleSlashTypesReferenceWithMissingExports(module=nodenext).js.diff b/testdata/baselines/reference/submodule/compiler/tripleSlashTypesReferenceWithMissingExports(module=nodenext).js.diff deleted file mode 100644 index 02147f9a60..0000000000 --- a/testdata/baselines/reference/submodule/compiler/tripleSlashTypesReferenceWithMissingExports(module=nodenext).js.diff +++ /dev/null @@ -1,10 +0,0 @@ ---- old.tripleSlashTypesReferenceWithMissingExports(module=nodenext).js -+++ new.tripleSlashTypesReferenceWithMissingExports(module=nodenext).js -@@= skipped -14, +14 lines =@@ - - //// [usage.js] - "use strict"; --/// - Object.defineProperty(exports, "__esModule", { value: true }); -+/// - const a = { a: 0 }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/tsxNotUsingApparentTypeOfSFC.js b/testdata/baselines/reference/submodule/compiler/tsxNotUsingApparentTypeOfSFC.js index 37e3dbd216..86f61ddfe3 100644 --- a/testdata/baselines/reference/submodule/compiler/tsxNotUsingApparentTypeOfSFC.js +++ b/testdata/baselines/reference/submodule/compiler/tsxNotUsingApparentTypeOfSFC.js @@ -23,6 +23,7 @@ function test

(wrappedProps: P) { //// [tsxNotUsingApparentTypeOfSFC.js] "use strict"; +/// var __assign = (this && this.__assign) || function () { __assign = Object.assign || function(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { @@ -38,7 +39,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); -/// const react_1 = __importDefault(require("react")); function test(wrappedProps) { let MySFC = function (props) { diff --git a/testdata/baselines/reference/submodule/compiler/tsxNotUsingApparentTypeOfSFC.js.diff b/testdata/baselines/reference/submodule/compiler/tsxNotUsingApparentTypeOfSFC.js.diff index adaeb0ae16..46768e7061 100644 --- a/testdata/baselines/reference/submodule/compiler/tsxNotUsingApparentTypeOfSFC.js.diff +++ b/testdata/baselines/reference/submodule/compiler/tsxNotUsingApparentTypeOfSFC.js.diff @@ -1,19 +1,10 @@ --- old.tsxNotUsingApparentTypeOfSFC.js +++ new.tsxNotUsingApparentTypeOfSFC.js -@@= skipped -22, +22 lines =@@ - - //// [tsxNotUsingApparentTypeOfSFC.js] - "use strict"; --/// - var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { -@@= skipped -16, +15 lines =@@ +@@= skipped -38, +38 lines =@@ return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); -var react_1 = __importDefault(require("react")); -+/// +const react_1 = __importDefault(require("react")); function test(wrappedProps) { let MySFC = function (props) { diff --git a/testdata/baselines/reference/submodule/compiler/tsxReactPropsInferenceSucceedsOnIntersections.js b/testdata/baselines/reference/submodule/compiler/tsxReactPropsInferenceSucceedsOnIntersections.js index 6a231bf839..238668914a 100644 --- a/testdata/baselines/reference/submodule/compiler/tsxReactPropsInferenceSucceedsOnIntersections.js +++ b/testdata/baselines/reference/submodule/compiler/tsxReactPropsInferenceSucceedsOnIntersections.js @@ -20,6 +20,7 @@ const CustomButton: React.SFC = props =>