From b0f143750d5b3d0839cebd8a28e53b6c9158737a Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Fri, 8 Mar 2024 12:46:33 +0000 Subject: [PATCH 1/4] Added test that will change with this PR. --- .../verbatim-declarations-literals.js | 78 +++++++++++++++ .../verbatim-declarations-literals.symbols | 76 +++++++++++++++ .../verbatim-declarations-literals.types | 95 +++++++++++++++++++ .../verbatim-declarations-literals.ts | 29 ++++++ 4 files changed, 278 insertions(+) create mode 100644 tests/baselines/reference/verbatim-declarations-literals.js create mode 100644 tests/baselines/reference/verbatim-declarations-literals.symbols create mode 100644 tests/baselines/reference/verbatim-declarations-literals.types create mode 100644 tests/cases/compiler/verbatim-declarations-literals.ts diff --git a/tests/baselines/reference/verbatim-declarations-literals.js b/tests/baselines/reference/verbatim-declarations-literals.js new file mode 100644 index 0000000000000..626d32b8ec585 --- /dev/null +++ b/tests/baselines/reference/verbatim-declarations-literals.js @@ -0,0 +1,78 @@ +//// [tests/cases/compiler/verbatim-declarations-literals.ts] //// + +//// [verbatim-declarations-literals.ts] +enum E { "some value" = 1 }; +const e: typeof E["some value"] = E["some value"]; + +declare function f3(a: T, b: T): T; +const x3 = f3("abc", "def"); // "abc" | "def" + +const octal = 0o16; +const octalParen = ((0o16)); +const octalIndirect = octal; + +const hex = 0x10; +const hexParen = ((0x10)); +const hexIndirect = hex; + +const seps = 1_000_000; +const sepsParen = (1_000_000); +const sepsIndirect = seps; + +const singleQuote = 'x' +const singleQuoteParen = (('x')) +const singleQuoteIndirect = singleQuote; + +const noSubstTemplate = `Test` +const noSubstTemplateParen = (`Test`) +const noSubstTemplateIndirect = noSubstTemplate; + + +//// [verbatim-declarations-literals.js] +"use strict"; +var E; +(function (E) { + E[E["some value"] = 1] = "some value"; +})(E || (E = {})); +; +const e = E["some value"]; +const x3 = f3("abc", "def"); // "abc" | "def" +const octal = 0o16; +const octalParen = ((0o16)); +const octalIndirect = octal; +const hex = 0x10; +const hexParen = ((0x10)); +const hexIndirect = hex; +const seps = 1_000_000; +const sepsParen = (1_000_000); +const sepsIndirect = seps; +const singleQuote = 'x'; +const singleQuoteParen = (('x')); +const singleQuoteIndirect = singleQuote; +const noSubstTemplate = `Test`; +const noSubstTemplateParen = (`Test`); +const noSubstTemplateIndirect = noSubstTemplate; + + +//// [verbatim-declarations-literals.d.ts] +declare enum E { + "some value" = 1 +} +declare const e = E["some value"]; +declare function f3(a: T, b: T): T; +declare const x3: string; +declare const octal = 14; +declare const octalParen = 14; +declare const octalIndirect = 14; +declare const hex = 16; +declare const hexParen = 16; +declare const hexIndirect = 16; +declare const seps = 1000000; +declare const sepsParen = 1000000; +declare const sepsIndirect = 1000000; +declare const singleQuote = "x"; +declare const singleQuoteParen = "x"; +declare const singleQuoteIndirect = "x"; +declare const noSubstTemplate = "Test"; +declare const noSubstTemplateParen = "Test"; +declare const noSubstTemplateIndirect = "Test"; diff --git a/tests/baselines/reference/verbatim-declarations-literals.symbols b/tests/baselines/reference/verbatim-declarations-literals.symbols new file mode 100644 index 0000000000000..ad632f461cdbe --- /dev/null +++ b/tests/baselines/reference/verbatim-declarations-literals.symbols @@ -0,0 +1,76 @@ +//// [tests/cases/compiler/verbatim-declarations-literals.ts] //// + +=== verbatim-declarations-literals.ts === +enum E { "some value" = 1 }; +>E : Symbol(E, Decl(verbatim-declarations-literals.ts, 0, 0)) +>"some value" : Symbol(E["some value"], Decl(verbatim-declarations-literals.ts, 0, 8)) + +const e: typeof E["some value"] = E["some value"]; +>e : Symbol(e, Decl(verbatim-declarations-literals.ts, 1, 5)) +>E : Symbol(E, Decl(verbatim-declarations-literals.ts, 0, 0)) +>E : Symbol(E, Decl(verbatim-declarations-literals.ts, 0, 0)) +>"some value" : Symbol(E["some value"], Decl(verbatim-declarations-literals.ts, 0, 8)) + +declare function f3(a: T, b: T): T; +>f3 : Symbol(f3, Decl(verbatim-declarations-literals.ts, 1, 50)) +>T : Symbol(T, Decl(verbatim-declarations-literals.ts, 3, 20)) +>a : Symbol(a, Decl(verbatim-declarations-literals.ts, 3, 23)) +>T : Symbol(T, Decl(verbatim-declarations-literals.ts, 3, 20)) +>b : Symbol(b, Decl(verbatim-declarations-literals.ts, 3, 28)) +>T : Symbol(T, Decl(verbatim-declarations-literals.ts, 3, 20)) +>T : Symbol(T, Decl(verbatim-declarations-literals.ts, 3, 20)) + +const x3 = f3("abc", "def"); // "abc" | "def" +>x3 : Symbol(x3, Decl(verbatim-declarations-literals.ts, 4, 5)) +>f3 : Symbol(f3, Decl(verbatim-declarations-literals.ts, 1, 50)) + +const octal = 0o16; +>octal : Symbol(octal, Decl(verbatim-declarations-literals.ts, 6, 5)) + +const octalParen = ((0o16)); +>octalParen : Symbol(octalParen, Decl(verbatim-declarations-literals.ts, 7, 5)) + +const octalIndirect = octal; +>octalIndirect : Symbol(octalIndirect, Decl(verbatim-declarations-literals.ts, 8, 5)) +>octal : Symbol(octal, Decl(verbatim-declarations-literals.ts, 6, 5)) + +const hex = 0x10; +>hex : Symbol(hex, Decl(verbatim-declarations-literals.ts, 10, 5)) + +const hexParen = ((0x10)); +>hexParen : Symbol(hexParen, Decl(verbatim-declarations-literals.ts, 11, 5)) + +const hexIndirect = hex; +>hexIndirect : Symbol(hexIndirect, Decl(verbatim-declarations-literals.ts, 12, 5)) +>hex : Symbol(hex, Decl(verbatim-declarations-literals.ts, 10, 5)) + +const seps = 1_000_000; +>seps : Symbol(seps, Decl(verbatim-declarations-literals.ts, 14, 5)) + +const sepsParen = (1_000_000); +>sepsParen : Symbol(sepsParen, Decl(verbatim-declarations-literals.ts, 15, 5)) + +const sepsIndirect = seps; +>sepsIndirect : Symbol(sepsIndirect, Decl(verbatim-declarations-literals.ts, 16, 5)) +>seps : Symbol(seps, Decl(verbatim-declarations-literals.ts, 14, 5)) + +const singleQuote = 'x' +>singleQuote : Symbol(singleQuote, Decl(verbatim-declarations-literals.ts, 18, 5)) + +const singleQuoteParen = (('x')) +>singleQuoteParen : Symbol(singleQuoteParen, Decl(verbatim-declarations-literals.ts, 19, 5)) + +const singleQuoteIndirect = singleQuote; +>singleQuoteIndirect : Symbol(singleQuoteIndirect, Decl(verbatim-declarations-literals.ts, 20, 5)) +>singleQuote : Symbol(singleQuote, Decl(verbatim-declarations-literals.ts, 18, 5)) + +const noSubstTemplate = `Test` +>noSubstTemplate : Symbol(noSubstTemplate, Decl(verbatim-declarations-literals.ts, 22, 5)) + +const noSubstTemplateParen = (`Test`) +>noSubstTemplateParen : Symbol(noSubstTemplateParen, Decl(verbatim-declarations-literals.ts, 23, 5)) + +const noSubstTemplateIndirect = noSubstTemplate; +>noSubstTemplateIndirect : Symbol(noSubstTemplateIndirect, Decl(verbatim-declarations-literals.ts, 24, 5)) +>noSubstTemplate : Symbol(noSubstTemplate, Decl(verbatim-declarations-literals.ts, 22, 5)) + diff --git a/tests/baselines/reference/verbatim-declarations-literals.types b/tests/baselines/reference/verbatim-declarations-literals.types new file mode 100644 index 0000000000000..2e9a2a11f8b55 --- /dev/null +++ b/tests/baselines/reference/verbatim-declarations-literals.types @@ -0,0 +1,95 @@ +//// [tests/cases/compiler/verbatim-declarations-literals.ts] //// + +=== verbatim-declarations-literals.ts === +enum E { "some value" = 1 }; +>E : E +>"some value" : (typeof E)["some value"] +>1 : 1 + +const e: typeof E["some value"] = E["some value"]; +>e : (typeof E)["some value"] +>E : typeof E +>E["some value"] : E +>E : typeof E +>"some value" : "some value" + +declare function f3(a: T, b: T): T; +>f3 : (a: T, b: T) => T +>a : T +>b : T + +const x3 = f3("abc", "def"); // "abc" | "def" +>x3 : "abc" | "def" +>f3("abc", "def") : "abc" | "def" +>f3 : (a: T, b: T) => T +>"abc" : "abc" +>"def" : "def" + +const octal = 0o16; +>octal : 14 +>0o16 : 14 + +const octalParen = ((0o16)); +>octalParen : 14 +>((0o16)) : 14 +>(0o16) : 14 +>0o16 : 14 + +const octalIndirect = octal; +>octalIndirect : 14 +>octal : 14 + +const hex = 0x10; +>hex : 16 +>0x10 : 16 + +const hexParen = ((0x10)); +>hexParen : 16 +>((0x10)) : 16 +>(0x10) : 16 +>0x10 : 16 + +const hexIndirect = hex; +>hexIndirect : 16 +>hex : 16 + +const seps = 1_000_000; +>seps : 1000000 +>1_000_000 : 1000000 + +const sepsParen = (1_000_000); +>sepsParen : 1000000 +>(1_000_000) : 1000000 +>1_000_000 : 1000000 + +const sepsIndirect = seps; +>sepsIndirect : 1000000 +>seps : 1000000 + +const singleQuote = 'x' +>singleQuote : "x" +>'x' : "x" + +const singleQuoteParen = (('x')) +>singleQuoteParen : "x" +>(('x')) : "x" +>('x') : "x" +>'x' : "x" + +const singleQuoteIndirect = singleQuote; +>singleQuoteIndirect : "x" +>singleQuote : "x" + +const noSubstTemplate = `Test` +>noSubstTemplate : "Test" +>`Test` : "Test" + +const noSubstTemplateParen = (`Test`) +>noSubstTemplateParen : "Test" +>(`Test`) : "Test" +>`Test` : "Test" + +const noSubstTemplateIndirect = noSubstTemplate; +>noSubstTemplateIndirect : "Test" +>noSubstTemplate : "Test" + diff --git a/tests/cases/compiler/verbatim-declarations-literals.ts b/tests/cases/compiler/verbatim-declarations-literals.ts new file mode 100644 index 0000000000000..a5930ce502d16 --- /dev/null +++ b/tests/cases/compiler/verbatim-declarations-literals.ts @@ -0,0 +1,29 @@ +// @strict: true +// @declaration: true +// @target: esnext + +enum E { "some value" = 1 }; +const e: typeof E["some value"] = E["some value"]; + +declare function f3(a: T, b: T): T; +const x3 = f3("abc", "def"); // "abc" | "def" + +const octal = 0o16; +const octalParen = ((0o16)); +const octalIndirect = octal; + +const hex = 0x10; +const hexParen = ((0x10)); +const hexIndirect = hex; + +const seps = 1_000_000; +const sepsParen = (1_000_000); +const sepsIndirect = seps; + +const singleQuote = 'x' +const singleQuoteParen = (('x')) +const singleQuoteIndirect = singleQuote; + +const noSubstTemplate = `Test` +const noSubstTemplateParen = (`Test`) +const noSubstTemplateIndirect = noSubstTemplate; From 0f53db0ddd6052311b313d3b50648bc0baebc53e Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Fri, 8 Mar 2024 13:06:30 +0000 Subject: [PATCH 2/4] Fix widened type in declarations files. --- src/compiler/checker.ts | 5 ++++- tests/baselines/reference/ambientConstLiterals.js | 4 ++-- tests/baselines/reference/strictFunctionTypes1.js | 2 +- .../baselines/reference/stringLiteralTypesOverloads02.js | 8 ++++---- .../baselines/reference/verbatim-declarations-literals.js | 2 +- 5 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index f175b6806551b..090ec44ea0ea1 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -48324,8 +48324,11 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { // Get type of the symbol if this is the valid symbol otherwise get type at location const symbol = getSymbolOfDeclaration(declaration); let type = symbol && !(symbol.flags & (SymbolFlags.TypeLiteral | SymbolFlags.Signature)) - ? getWidenedLiteralType(getTypeOfSymbol(symbol)) + ? getTypeOfSymbol(symbol) : errorType; + if (!isReadonlySymbol(symbol)) { + type = getWidenedLiteralType(type); + } if ( type.flags & TypeFlags.UniqueESSymbol && type.symbol === symbol diff --git a/tests/baselines/reference/ambientConstLiterals.js b/tests/baselines/reference/ambientConstLiterals.js index 8b35d43487203..230df0414e773 100644 --- a/tests/baselines/reference/ambientConstLiterals.js +++ b/tests/baselines/reference/ambientConstLiterals.js @@ -74,5 +74,5 @@ declare const c9: { declare const c10: number[]; declare const c11: string; declare const c12: number; -declare const c13: string; -declare const c14: number; +declare const c13: "abc" | "def"; +declare const c14: 123 | 456; diff --git a/tests/baselines/reference/strictFunctionTypes1.js b/tests/baselines/reference/strictFunctionTypes1.js index 25769522a4898..a32f4bdacf139 100644 --- a/tests/baselines/reference/strictFunctionTypes1.js +++ b/tests/baselines/reference/strictFunctionTypes1.js @@ -82,7 +82,7 @@ declare function fs(x: string): void; declare function fx(f: (x: "def") => void): void; declare const x1: (x: string) => void; declare const x2 = "abc"; -declare const x3: string; +declare const x3: "def" | "abc"; declare const x4: Func; declare const never: never; declare const x10: string; diff --git a/tests/baselines/reference/stringLiteralTypesOverloads02.js b/tests/baselines/reference/stringLiteralTypesOverloads02.js index cf6e285b9049b..216a42aec80e2 100644 --- a/tests/baselines/reference/stringLiteralTypesOverloads02.js +++ b/tests/baselines/reference/stringLiteralTypesOverloads02.js @@ -104,9 +104,9 @@ declare namespace Consts1 { declare const string = "string"; declare const number = "number"; declare const boolean = "boolean"; -declare const stringOrNumber: string; -declare const stringOrBoolean: string; -declare const booleanOrNumber: string; -declare const stringOrBooleanOrNumber: string; +declare const stringOrNumber: "string" | "number"; +declare const stringOrBoolean: "string" | "boolean"; +declare const booleanOrNumber: "number" | "boolean"; +declare const stringOrBooleanOrNumber: "string" | "number" | "boolean"; declare namespace Consts2 { } diff --git a/tests/baselines/reference/verbatim-declarations-literals.js b/tests/baselines/reference/verbatim-declarations-literals.js index 626d32b8ec585..d4f8d30e8e2fe 100644 --- a/tests/baselines/reference/verbatim-declarations-literals.js +++ b/tests/baselines/reference/verbatim-declarations-literals.js @@ -60,7 +60,7 @@ declare enum E { } declare const e = E["some value"]; declare function f3(a: T, b: T): T; -declare const x3: string; +declare const x3: "abc" | "def"; declare const octal = 14; declare const octalParen = 14; declare const octalIndirect = 14; From 75507b97c11bbebd2735f65a226c39413721a05e Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Fri, 8 Mar 2024 13:21:05 +0000 Subject: [PATCH 3/4] Do not print initializer if node already has a type annotation. --- src/compiler/transformers/declarations.ts | 12 ++++++---- ...in-another-file-through-indirect-import.js | 24 ++++++++----------- ...s-global-through-export-in-another-file.js | 24 ++++++++----------- .../verbatim-declarations-literals.js | 2 +- 4 files changed, 29 insertions(+), 33 deletions(-) diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index e4163f67d8762..48716a83dcf91 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -41,6 +41,7 @@ import { EnumDeclaration, ExportAssignment, ExportDeclaration, + Expression, ExpressionWithTypeArguments, factory, FileReference, @@ -666,7 +667,7 @@ export function transformDeclarations(context: TransformationContext) { elem.dotDotDotToken, elem.propertyName, filterBindingPatternInitializers(elem.name), - shouldPrintWithInitializer(elem) ? elem.initializer : undefined, + /*initializer*/ undefined, ); } } @@ -692,8 +693,11 @@ export function transformDeclarations(context: TransformationContext) { return newParam; } - function shouldPrintWithInitializer(node: Node) { - return canHaveLiteralInitializer(node) && resolver.isLiteralConstDeclaration(getParseTreeNode(node) as CanHaveLiteralInitializer); // TODO: Make safe + function shouldPrintWithInitializer(node: Node): node is CanHaveLiteralInitializer & { initializer: Expression; } { + return canHaveLiteralInitializer(node) + && !node.type + && !!node.initializer + && resolver.isLiteralConstDeclaration(getParseTreeNode(node) as CanHaveLiteralInitializer); // TODO: Make safe } function ensureNoInitializer(node: CanHaveLiteralInitializer) { @@ -1937,7 +1941,7 @@ function getTypeAnnotationFromAccessor(accessor: AccessorDeclaration): TypeNode } type CanHaveLiteralInitializer = VariableDeclaration | PropertyDeclaration | PropertySignature | ParameterDeclaration; -function canHaveLiteralInitializer(node: Node): boolean { +function canHaveLiteralInitializer(node: Node): node is CanHaveLiteralInitializer { switch (node.kind) { case SyntaxKind.PropertyDeclaration: case SyntaxKind.PropertySignature: diff --git a/tests/baselines/reference/tsc/incremental/change-to-type-that-gets-used-as-global-through-export-in-another-file-through-indirect-import.js b/tests/baselines/reference/tsc/incremental/change-to-type-that-gets-used-as-global-through-export-in-another-file-through-indirect-import.js index 7d16ecf63b7fa..7d88ea73922d2 100644 --- a/tests/baselines/reference/tsc/incremental/change-to-type-that-gets-used-as-global-through-export-in-another-file-through-indirect-import.js +++ b/tests/baselines/reference/tsc/incremental/change-to-type-that-gets-used-as-global-through-export-in-another-file-through-indirect-import.js @@ -43,7 +43,7 @@ exitCode:: ExitStatus.Success //// [/src/project/class1.d.ts] -declare const a = 1; +declare const a: MagicNumber; //// [/src/project/class1.js] @@ -75,7 +75,7 @@ Object.defineProperty(exports, "ConstantNumber", { enumerable: true, get: functi //// [/src/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./class1.ts","./constants.ts","./reexport.ts","./types.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"4085502068-const a: MagicNumber = 1;\nconsole.log(a);","signature":"-3664763344-declare const a = 1;\n","affectsGlobalScope":true},{"version":"-2659799048-export default 1;","signature":"-183154784-declare const _default: 1;\nexport default _default;\n"},{"version":"-1476032387-export { default as ConstantNumber } from \"./constants\"","signature":"-1081498782-export { default as ConstantNumber } from \"./constants\";\n"},{"version":"2093085814-type MagicNumber = typeof import('./reexport').ConstantNumber","affectsGlobalScope":true}],"root":[[2,5]],"options":{"composite":true},"fileIdsList":[[3],[4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5],"latestChangedDtsFile":"./reexport.d.ts"},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./class1.ts","./constants.ts","./reexport.ts","./types.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"4085502068-const a: MagicNumber = 1;\nconsole.log(a);","signature":"-2630403130-declare const a: MagicNumber;\n","affectsGlobalScope":true},{"version":"-2659799048-export default 1;","signature":"-183154784-declare const _default: 1;\nexport default _default;\n"},{"version":"-1476032387-export { default as ConstantNumber } from \"./constants\"","signature":"-1081498782-export { default as ConstantNumber } from \"./constants\";\n"},{"version":"2093085814-type MagicNumber = typeof import('./reexport').ConstantNumber","affectsGlobalScope":true}],"root":[[2,5]],"options":{"composite":true},"fileIdsList":[[3],[4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5],"latestChangedDtsFile":"./reexport.d.ts"},"version":"FakeTSVersion"} //// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -108,11 +108,11 @@ Object.defineProperty(exports, "ConstantNumber", { enumerable: true, get: functi "./class1.ts": { "original": { "version": "4085502068-const a: MagicNumber = 1;\nconsole.log(a);", - "signature": "-3664763344-declare const a = 1;\n", + "signature": "-2630403130-declare const a: MagicNumber;\n", "affectsGlobalScope": true }, "version": "4085502068-const a: MagicNumber = 1;\nconsole.log(a);", - "signature": "-3664763344-declare const a = 1;\n", + "signature": "-2630403130-declare const a: MagicNumber;\n", "affectsGlobalScope": true }, "./constants.ts": { @@ -184,7 +184,7 @@ Object.defineProperty(exports, "ConstantNumber", { enumerable: true, get: functi "latestChangedDtsFile": "./reexport.d.ts" }, "version": "FakeTSVersion", - "size": 1395 + "size": 1404 } @@ -209,10 +209,6 @@ Found 1 error in src/project/class1.ts:1 exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated -//// [/src/project/class1.d.ts] -declare const a = 2; - - //// [/src/project/constants.d.ts] declare const _default: 2; export default _default; @@ -226,7 +222,7 @@ exports.default = 2; //// [/src/project/reexport.js] file written with same contents //// [/src/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./class1.ts","./constants.ts","./reexport.ts","./types.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"4085502068-const a: MagicNumber = 1;\nconsole.log(a);","signature":"-3664762255-declare const a = 2;\n","affectsGlobalScope":true},{"version":"-2659799015-export default 2;","signature":"-10876795135-declare const _default: 2;\nexport default _default;\n"},{"version":"-1476032387-export { default as ConstantNumber } from \"./constants\"","signature":"-1081498782-export { default as ConstantNumber } from \"./constants\";\n"},{"version":"2093085814-type MagicNumber = typeof import('./reexport').ConstantNumber","affectsGlobalScope":true}],"root":[[2,5]],"options":{"composite":true},"fileIdsList":[[3],[4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,[2,[{"file":"./class1.ts","start":6,"length":1,"code":2322,"category":1,"messageText":"Type '1' is not assignable to type '2'."}]],3,4,5],"latestChangedDtsFile":"./class1.d.ts"},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./class1.ts","./constants.ts","./reexport.ts","./types.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"4085502068-const a: MagicNumber = 1;\nconsole.log(a);","signature":"-2630403130-declare const a: MagicNumber;\n","affectsGlobalScope":true},{"version":"-2659799015-export default 2;","signature":"-10876795135-declare const _default: 2;\nexport default _default;\n"},{"version":"-1476032387-export { default as ConstantNumber } from \"./constants\"","signature":"-1081498782-export { default as ConstantNumber } from \"./constants\";\n"},{"version":"2093085814-type MagicNumber = typeof import('./reexport').ConstantNumber","affectsGlobalScope":true}],"root":[[2,5]],"options":{"composite":true},"fileIdsList":[[3],[4]],"referencedMap":[[4,1],[5,2]],"exportedModulesMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,[2,[{"file":"./class1.ts","start":6,"length":1,"code":2322,"category":1,"messageText":"Type '1' is not assignable to type '2'."}]],3,4,5],"latestChangedDtsFile":"./constants.d.ts"},"version":"FakeTSVersion"} //// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -259,11 +255,11 @@ exports.default = 2; "./class1.ts": { "original": { "version": "4085502068-const a: MagicNumber = 1;\nconsole.log(a);", - "signature": "-3664762255-declare const a = 2;\n", + "signature": "-2630403130-declare const a: MagicNumber;\n", "affectsGlobalScope": true }, "version": "4085502068-const a: MagicNumber = 1;\nconsole.log(a);", - "signature": "-3664762255-declare const a = 2;\n", + "signature": "-2630403130-declare const a: MagicNumber;\n", "affectsGlobalScope": true }, "./constants.ts": { @@ -344,9 +340,9 @@ exports.default = 2; "./reexport.ts", "./types.d.ts" ], - "latestChangedDtsFile": "./class1.d.ts" + "latestChangedDtsFile": "./constants.d.ts" }, "version": "FakeTSVersion", - "size": 1524 + "size": 1536 } diff --git a/tests/baselines/reference/tsc/incremental/change-to-type-that-gets-used-as-global-through-export-in-another-file.js b/tests/baselines/reference/tsc/incremental/change-to-type-that-gets-used-as-global-through-export-in-another-file.js index b5eb6f4f775f5..a192402edefd4 100644 --- a/tests/baselines/reference/tsc/incremental/change-to-type-that-gets-used-as-global-through-export-in-another-file.js +++ b/tests/baselines/reference/tsc/incremental/change-to-type-that-gets-used-as-global-through-export-in-another-file.js @@ -40,7 +40,7 @@ exitCode:: ExitStatus.Success //// [/src/project/class1.d.ts] -declare const a = 1; +declare const a: MagicNumber; //// [/src/project/class1.js] @@ -60,7 +60,7 @@ exports.default = 1; //// [/src/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./class1.ts","./constants.ts","./types.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"4085502068-const a: MagicNumber = 1;\nconsole.log(a);","signature":"-3664763344-declare const a = 1;\n","affectsGlobalScope":true},{"version":"-2659799048-export default 1;","signature":"-183154784-declare const _default: 1;\nexport default _default;\n"},{"version":"-2080821236-type MagicNumber = typeof import('./constants').default","affectsGlobalScope":true}],"root":[[2,4]],"options":{"composite":true},"fileIdsList":[[3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,2,3,4],"latestChangedDtsFile":"./constants.d.ts"},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./class1.ts","./constants.ts","./types.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"4085502068-const a: MagicNumber = 1;\nconsole.log(a);","signature":"-2630403130-declare const a: MagicNumber;\n","affectsGlobalScope":true},{"version":"-2659799048-export default 1;","signature":"-183154784-declare const _default: 1;\nexport default _default;\n"},{"version":"-2080821236-type MagicNumber = typeof import('./constants').default","affectsGlobalScope":true}],"root":[[2,4]],"options":{"composite":true},"fileIdsList":[[3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,2,3,4],"latestChangedDtsFile":"./constants.d.ts"},"version":"FakeTSVersion"} //// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -89,11 +89,11 @@ exports.default = 1; "./class1.ts": { "original": { "version": "4085502068-const a: MagicNumber = 1;\nconsole.log(a);", - "signature": "-3664763344-declare const a = 1;\n", + "signature": "-2630403130-declare const a: MagicNumber;\n", "affectsGlobalScope": true }, "version": "4085502068-const a: MagicNumber = 1;\nconsole.log(a);", - "signature": "-3664763344-declare const a = 1;\n", + "signature": "-2630403130-declare const a: MagicNumber;\n", "affectsGlobalScope": true }, "./constants.ts": { @@ -149,7 +149,7 @@ exports.default = 1; "latestChangedDtsFile": "./constants.d.ts" }, "version": "FakeTSVersion", - "size": 1186 + "size": 1195 } @@ -174,10 +174,6 @@ Found 1 error in src/project/class1.ts:1 exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated -//// [/src/project/class1.d.ts] -declare const a = 2; - - //// [/src/project/constants.d.ts] declare const _default: 2; export default _default; @@ -190,7 +186,7 @@ exports.default = 2; //// [/src/project/tsconfig.tsbuildinfo] -{"program":{"fileNames":["../../lib/lib.d.ts","./class1.ts","./constants.ts","./types.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"4085502068-const a: MagicNumber = 1;\nconsole.log(a);","signature":"-3664762255-declare const a = 2;\n","affectsGlobalScope":true},{"version":"-2659799015-export default 2;","signature":"-10876795135-declare const _default: 2;\nexport default _default;\n"},{"version":"-2080821236-type MagicNumber = typeof import('./constants').default","affectsGlobalScope":true}],"root":[[2,4]],"options":{"composite":true},"fileIdsList":[[3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,[2,[{"file":"./class1.ts","start":6,"length":1,"code":2322,"category":1,"messageText":"Type '1' is not assignable to type '2'."}]],3,4],"latestChangedDtsFile":"./class1.d.ts"},"version":"FakeTSVersion"} +{"program":{"fileNames":["../../lib/lib.d.ts","./class1.ts","./constants.ts","./types.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"4085502068-const a: MagicNumber = 1;\nconsole.log(a);","signature":"-2630403130-declare const a: MagicNumber;\n","affectsGlobalScope":true},{"version":"-2659799015-export default 2;","signature":"-10876795135-declare const _default: 2;\nexport default _default;\n"},{"version":"-2080821236-type MagicNumber = typeof import('./constants').default","affectsGlobalScope":true}],"root":[[2,4]],"options":{"composite":true},"fileIdsList":[[3]],"referencedMap":[[4,1]],"exportedModulesMap":[[4,1]],"semanticDiagnosticsPerFile":[1,[2,[{"file":"./class1.ts","start":6,"length":1,"code":2322,"category":1,"messageText":"Type '1' is not assignable to type '2'."}]],3,4],"latestChangedDtsFile":"./constants.d.ts"},"version":"FakeTSVersion"} //// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -219,11 +215,11 @@ exports.default = 2; "./class1.ts": { "original": { "version": "4085502068-const a: MagicNumber = 1;\nconsole.log(a);", - "signature": "-3664762255-declare const a = 2;\n", + "signature": "-2630403130-declare const a: MagicNumber;\n", "affectsGlobalScope": true }, "version": "4085502068-const a: MagicNumber = 1;\nconsole.log(a);", - "signature": "-3664762255-declare const a = 2;\n", + "signature": "-2630403130-declare const a: MagicNumber;\n", "affectsGlobalScope": true }, "./constants.ts": { @@ -288,9 +284,9 @@ exports.default = 2; "./constants.ts", "./types.d.ts" ], - "latestChangedDtsFile": "./class1.d.ts" + "latestChangedDtsFile": "./constants.d.ts" }, "version": "FakeTSVersion", - "size": 1314 + "size": 1326 } diff --git a/tests/baselines/reference/verbatim-declarations-literals.js b/tests/baselines/reference/verbatim-declarations-literals.js index d4f8d30e8e2fe..84945a4d2e938 100644 --- a/tests/baselines/reference/verbatim-declarations-literals.js +++ b/tests/baselines/reference/verbatim-declarations-literals.js @@ -58,7 +58,7 @@ const noSubstTemplateIndirect = noSubstTemplate; declare enum E { "some value" = 1 } -declare const e = E["some value"]; +declare const e: typeof E["some value"]; declare function f3(a: T, b: T): T; declare const x3: "abc" | "def"; declare const octal = 14; From da5b1043e4edd19747337661fb4b49d8ef365b71 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Fri, 8 Mar 2024 13:28:10 +0000 Subject: [PATCH 4/4] Preserve initalizer nodes if they are primitive literals. --- src/compiler/transformers/declarations.ts | 5 +- src/compiler/types.ts | 9 ++ src/compiler/utilities.ts | 43 ++++++++ .../classStaticBlock25(target=es2022).js.map | 4 +- ...StaticBlock25(target=es2022).sourcemap.txt | 32 +++--- .../classStaticBlock25(target=esnext).js.map | 4 +- ...StaticBlock25(target=esnext).sourcemap.txt | 32 +++--- ...declarationEmitClassMemberNameConflict2.js | 2 +- .../declarationEmitConstantNoWidening.js | 2 +- tests/baselines/reference/fakeInfinity1.js | 2 +- .../reference/strictPropertyInitialization.js | 2 +- .../modules-and-globals-mixed-in-amd.js | 98 ++++++++++------- .../prepend-reports-deprecation-error.js | 64 ++++++----- ...e-resolution-finds-original-source-file.js | 100 +++++++++++------- ...t-options-with-incremental-with-outFile.js | 2 +- .../different-options-with-incremental.js | 4 +- .../different-options-with-outFile.js | 2 +- .../tsbuild/commandLine/different-options.js | 4 +- .../outFile/baseline-sectioned-sourcemaps.js | 34 +++--- .../tsbuild/outFile/clean-projects.js | 2 +- .../outFile/cleans-till-project-specified.js | 2 +- .../non-module-projects-without-prepend.js | 2 +- ...al-flag-changes-between-non-dts-changes.js | 2 +- ...-in-tsbuildinfo-doesnt-match-ts-version.js | 2 +- ...erated-when-incremental-is-set-to-false.js | 2 +- ...-buildInfo-absence-results-in-new-build.js | 2 +- ...roject-is-not-composite-but-incremental.js | 17 +-- ...t-composite-but-uses-project-references.js | 17 +-- ...final-project-specifies-tsBuildInfoFile.js | 17 +-- ...ot-change-but-its-modified-time-changes.js | 2 +- .../always-builds-under-with-force-option.js | 2 +- .../building-using-buildReferencedProject.js | 2 +- ...uilding-using-getNextInvalidatedProject.js | 2 +- ...rectly-when-declarationDir-is-specified.js | 2 +- ...ilds-correctly-when-outDir-is-specified.js | 2 +- ...composite-or-doesnt-have-any-references.js | 2 +- .../sample1/builds-till-project-specified.js | 2 +- .../can-detect-when-and-what-to-rebuild.js | 2 +- ...t-in-not-build-order-doesnt-throw-error.js | 2 +- .../sample1/cleans-till-project-specified.js | 2 +- ...ojects-if-upstream-projects-have-errors.js | 2 +- ...vent-if-version-doesnt-match-ts-version.js | 2 +- .../reference/tsbuild/sample1/explainFiles.js | 2 +- ...it-would-skip-builds-during-a-dry-build.js | 2 +- .../sample1/invalidates-projects-correctly.js | 2 +- .../tsbuild/sample1/listEmittedFiles.js | 2 +- .../reference/tsbuild/sample1/listFiles.js | 2 +- ...-in-tsbuildinfo-doesnt-match-ts-version.js | 2 +- ...uilds-from-start-if-force-option-is-set.js | 2 +- ...uilds-when-extended-config-file-changes.js | 2 +- .../sample1/removes-all-files-it-built.js | 2 +- .../reference/tsbuild/sample1/sample.js | 19 ++-- .../sample1/when-declarationMap-changes.js | 2 +- .../when-esModuleInterop-option-changes.js | 2 +- ...ot-change-but-its-modified-time-changes.js | 2 +- .../when-logic-specifies-tsBuildInfoFile.js | 19 ++-- .../creates-solution-in-watch-mode.js | 2 +- .../incremental-updates-in-verbose-mode.js | 2 +- .../when-preserveWatchOutput-is-not-used.js | 2 +- ...veWatchOutput-is-passed-on-command-line.js | 2 +- ...r-recompilation-because-of-program-emit.js | 4 +- ...-references-watches-only-those-projects.js | 2 +- ...tches-config-files-that-are-not-present.js | 2 +- ...le-is-added,-and-its-subsequent-updates.js | 6 +- ...hanges-and-reports-found-errors-message.js | 2 +- ...not-start-build-of-referencing-projects.js | 2 +- ...t-options-with-incremental-with-outFile.js | 2 +- .../different-options-with-incremental.js | 4 +- .../different-options-with-outFile.js | 2 +- .../tsc/incremental/different-options.js | 4 +- ...hen-declarationMap-changes-with-outFile.js | 2 +- .../when-declarationMap-changes.js | 4 +- .../on-sample-project.js | 2 +- ...n-declarationMap-changes-for-dependency.js | 2 +- .../using-referenced-project-built.js | 2 +- .../ancestor-and-project-ref-management.js | 2 +- ...ssfully-find-references-with-out-option.js | 2 +- ...oes-not-error-on-container-only-project.js | 2 +- .../verbatim-declarations-literals.js | 20 ++-- 79 files changed, 405 insertions(+), 269 deletions(-) diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index 48716a83dcf91..ae132ab4e85fb 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -127,6 +127,7 @@ import { isModifier, isModuleDeclaration, isOmittedExpression, + isPrimitiveLiteralValue, isPrivateIdentifier, isSemicolonClassElement, isSetAccessorDeclaration, @@ -208,6 +209,7 @@ import { TypeParameterDeclaration, TypeReferenceNode, unescapeLeadingUnderscores, + unwrapParenthesizedExpression, VariableDeclaration, VariableDeclarationList, VariableStatement, @@ -702,7 +704,8 @@ export function transformDeclarations(context: TransformationContext) { function ensureNoInitializer(node: CanHaveLiteralInitializer) { if (shouldPrintWithInitializer(node)) { - return resolver.createLiteralConstValue(getParseTreeNode(node) as CanHaveLiteralInitializer, symbolTracker); // TODO: Make safe + const unwrappedInitializer = unwrapParenthesizedExpression(node.initializer); + return isPrimitiveLiteralValue(unwrappedInitializer) ? unwrappedInitializer : resolver.createLiteralConstValue(getParseTreeNode(node, canHaveLiteralInitializer)!, symbolTracker); } return undefined; } diff --git a/src/compiler/types.ts b/src/compiler/types.ts index bc6d608584359..69ad8c6805a18 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -1376,6 +1376,15 @@ export type HasIllegalModifiers = | MissingDeclaration | NamespaceExportDeclaration; +/** @internal */ +export type PrimitiveLiteral = + | BooleanLiteral + | NumericLiteral + | StringLiteral + | NoSubstitutionTemplateLiteral + | BigIntLiteral + | PrefixUnaryExpression; + /** * Declarations that can contain other declarations. Corresponds with `ContainerFlags.IsContainer` in binder.ts. * diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 6bbc51a4ad121..d3b0034a2b3bc 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -444,6 +444,7 @@ import { Pattern, PostfixUnaryExpression, PrefixUnaryExpression, + PrimitiveLiteral, PrinterOptions, PrintHandlers, PrivateIdentifier, @@ -2343,6 +2344,14 @@ export function isLet(node: Node): boolean { return (getCombinedNodeFlags(node) & NodeFlags.BlockScoped) === NodeFlags.Let; } +/** @internal */ +export function isVarConstLike(node: VariableDeclaration | VariableDeclarationList) { + const blockScopeKind = getCombinedNodeFlags(node) & NodeFlags.BlockScoped; + return blockScopeKind === NodeFlags.Const || + blockScopeKind === NodeFlags.Using || + blockScopeKind === NodeFlags.AwaitUsing; +} + /** @internal */ export function isSuperCall(n: Node): n is SuperCall { return n.kind === SyntaxKind.CallExpression && (n as CallExpression).expression.kind === SyntaxKind.SuperKeyword; @@ -10639,3 +10648,37 @@ export function replaceFirstStar(s: string, replacement: string): string { export function getNameFromImportAttribute(node: ImportAttribute) { return isIdentifier(node.name) ? node.name.escapedText : escapeLeadingUnderscores(node.name.text); } + +/** @internal */ +export function isPrimitiveLiteralValue(node: Expression): node is PrimitiveLiteral { + Debug.type(node); + switch (node.kind) { + case SyntaxKind.TrueKeyword: + case SyntaxKind.FalseKeyword: + case SyntaxKind.NumericLiteral: + case SyntaxKind.StringLiteral: + case SyntaxKind.NoSubstitutionTemplateLiteral: + case SyntaxKind.BigIntLiteral: + return true; + case SyntaxKind.PrefixUnaryExpression: + if (node.operator === SyntaxKind.MinusToken) { + return node.operand.kind === SyntaxKind.NumericLiteral || + node.operand.kind === SyntaxKind.BigIntLiteral; + } + if (node.operator === SyntaxKind.PlusToken) { + return node.operand.kind === SyntaxKind.NumericLiteral; + } + return false; + default: + assertType(node); + return false; + } +} + +/** @internal */ +export function unwrapParenthesizedExpression(o: Expression) { + while (o.kind === SyntaxKind.ParenthesizedExpression) { + o = (o as ParenthesizedExpression).expression; + } + return o; +} diff --git a/tests/baselines/reference/classStaticBlock25(target=es2022).js.map b/tests/baselines/reference/classStaticBlock25(target=es2022).js.map index f3bccac8cb86f..c9d4b5ae8bee7 100644 --- a/tests/baselines/reference/classStaticBlock25(target=es2022).js.map +++ b/tests/baselines/reference/classStaticBlock25(target=es2022).js.map @@ -3,5 +3,5 @@ //// https://sokra.github.io/source-map-visualization#base64,Y29uc3QgYSA9IDE7DQpjb25zdCBiID0gMjsNCmNsYXNzIEMgew0KICAgIHN0YXRpYyB7DQogICAgICAgIGNvbnN0IGEgPSAxMTsNCiAgICAgICAgYTsNCiAgICAgICAgYjsNCiAgICB9DQogICAgc3RhdGljIHsNCiAgICAgICAgY29uc3QgYSA9IDExOw0KICAgICAgICBhOw0KICAgICAgICBiOw0KICAgIH0NCn0NCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWNsYXNzU3RhdGljQmxvY2syNS5qcy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2xhc3NTdGF0aWNCbG9jazI1LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiY2xhc3NTdGF0aWNCbG9jazI1LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE1BQU0sQ0FBQyxHQUFHLENBQUMsQ0FBQztBQUNaLE1BQU0sQ0FBQyxHQUFHLENBQUMsQ0FBQztBQUVaLE1BQU0sQ0FBQztJQUNIO1FBQ0ksTUFBTSxDQUFDLEdBQUcsRUFBRSxDQUFDO1FBRWIsQ0FBQyxDQUFDO1FBQ0YsQ0FBQyxDQUFDO0lBQ04sQ0FBQztJQUVEO1FBQ0ksTUFBTSxDQUFDLEdBQUcsRUFBRSxDQUFDO1FBRWIsQ0FBQyxDQUFDO1FBQ0YsQ0FBQyxDQUFDO0lBQ04sQ0FBQztDQUNKIn0=,Y29uc3QgYSA9IDE7CmNvbnN0IGIgPSAyOwoKY2xhc3MgQyB7CiAgICBzdGF0aWMgewogICAgICAgIGNvbnN0IGEgPSAxMTsKCiAgICAgICAgYTsKICAgICAgICBiOwogICAgfQoKICAgIHN0YXRpYyB7CiAgICAgICAgY29uc3QgYSA9IDExOwoKICAgICAgICBhOwogICAgICAgIGI7CiAgICB9Cn0K //// [classStaticBlock25.d.ts.map] -{"version":3,"file":"classStaticBlock25.d.ts","sourceRoot":"","sources":["classStaticBlock25.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,CAAC,IAAI,CAAC;AACZ,QAAA,MAAM,CAAC,IAAI,CAAC;AAEZ,cAAM,CAAC;CAcN"} -//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCBhID0gMTsNCmRlY2xhcmUgY29uc3QgYiA9IDI7DQpkZWNsYXJlIGNsYXNzIEMgew0KfQ0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9Y2xhc3NTdGF0aWNCbG9jazI1LmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2xhc3NTdGF0aWNCbG9jazI1LmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJjbGFzc1N0YXRpY0Jsb2NrMjUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsUUFBQSxNQUFNLENBQUMsSUFBSSxDQUFDO0FBQ1osUUFBQSxNQUFNLENBQUMsSUFBSSxDQUFDO0FBRVosY0FBTSxDQUFDO0NBY04ifQ==,Y29uc3QgYSA9IDE7CmNvbnN0IGIgPSAyOwoKY2xhc3MgQyB7CiAgICBzdGF0aWMgewogICAgICAgIGNvbnN0IGEgPSAxMTsKCiAgICAgICAgYTsKICAgICAgICBiOwogICAgfQoKICAgIHN0YXRpYyB7CiAgICAgICAgY29uc3QgYSA9IDExOwoKICAgICAgICBhOwogICAgICAgIGI7CiAgICB9Cn0K +{"version":3,"file":"classStaticBlock25.d.ts","sourceRoot":"","sources":["classStaticBlock25.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,CAAC,GAAG,CAAC,CAAC;AACZ,QAAA,MAAM,CAAC,GAAG,CAAC,CAAC;AAEZ,cAAM,CAAC;CAcN"} +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCBhID0gMTsNCmRlY2xhcmUgY29uc3QgYiA9IDI7DQpkZWNsYXJlIGNsYXNzIEMgew0KfQ0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9Y2xhc3NTdGF0aWNCbG9jazI1LmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2xhc3NTdGF0aWNCbG9jazI1LmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJjbGFzc1N0YXRpY0Jsb2NrMjUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsUUFBQSxNQUFNLENBQUMsR0FBRyxDQUFDLENBQUM7QUFDWixRQUFBLE1BQU0sQ0FBQyxHQUFHLENBQUMsQ0FBQztBQUVaLGNBQU0sQ0FBQztDQWNOIn0=,Y29uc3QgYSA9IDE7CmNvbnN0IGIgPSAyOwoKY2xhc3MgQyB7CiAgICBzdGF0aWMgewogICAgICAgIGNvbnN0IGEgPSAxMTsKCiAgICAgICAgYTsKICAgICAgICBiOwogICAgfQoKICAgIHN0YXRpYyB7CiAgICAgICAgY29uc3QgYSA9IDExOwoKICAgICAgICBhOwogICAgICAgIGI7CiAgICB9Cn0K diff --git a/tests/baselines/reference/classStaticBlock25(target=es2022).sourcemap.txt b/tests/baselines/reference/classStaticBlock25(target=es2022).sourcemap.txt index f2f548f460210..a9bb758a160f1 100644 --- a/tests/baselines/reference/classStaticBlock25(target=es2022).sourcemap.txt +++ b/tests/baselines/reference/classStaticBlock25(target=es2022).sourcemap.txt @@ -214,42 +214,48 @@ sourceFile:classStaticBlock25.ts 2 >^^^^^^^^ 3 > ^^^^^^ 4 > ^ -5 > ^^^^ -6 > ^ -7 > ^-> +5 > ^^^ +6 > ^ +7 > ^ +8 > ^-> 1 > 2 > 3 > const 4 > a -5 > = 1 -6 > ; +5 > = +6 > 1 +7 > ; 1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) 2 >Emitted(1, 9) Source(1, 1) + SourceIndex(0) 3 >Emitted(1, 15) Source(1, 7) + SourceIndex(0) 4 >Emitted(1, 16) Source(1, 8) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 12) + SourceIndex(0) -6 >Emitted(1, 21) Source(1, 13) + SourceIndex(0) +5 >Emitted(1, 19) Source(1, 11) + SourceIndex(0) +6 >Emitted(1, 20) Source(1, 12) + SourceIndex(0) +7 >Emitted(1, 21) Source(1, 13) + SourceIndex(0) --- >>>declare const b = 2; 1-> 2 >^^^^^^^^ 3 > ^^^^^^ 4 > ^ -5 > ^^^^ -6 > ^ +5 > ^^^ +6 > ^ +7 > ^ 1-> > 2 > 3 > const 4 > b -5 > = 2 -6 > ; +5 > = +6 > 2 +7 > ; 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) 2 >Emitted(2, 9) Source(2, 1) + SourceIndex(0) 3 >Emitted(2, 15) Source(2, 7) + SourceIndex(0) 4 >Emitted(2, 16) Source(2, 8) + SourceIndex(0) -5 >Emitted(2, 20) Source(2, 12) + SourceIndex(0) -6 >Emitted(2, 21) Source(2, 13) + SourceIndex(0) +5 >Emitted(2, 19) Source(2, 11) + SourceIndex(0) +6 >Emitted(2, 20) Source(2, 12) + SourceIndex(0) +7 >Emitted(2, 21) Source(2, 13) + SourceIndex(0) --- >>>declare class C { 1 > diff --git a/tests/baselines/reference/classStaticBlock25(target=esnext).js.map b/tests/baselines/reference/classStaticBlock25(target=esnext).js.map index f3bccac8cb86f..c9d4b5ae8bee7 100644 --- a/tests/baselines/reference/classStaticBlock25(target=esnext).js.map +++ b/tests/baselines/reference/classStaticBlock25(target=esnext).js.map @@ -3,5 +3,5 @@ //// https://sokra.github.io/source-map-visualization#base64,Y29uc3QgYSA9IDE7DQpjb25zdCBiID0gMjsNCmNsYXNzIEMgew0KICAgIHN0YXRpYyB7DQogICAgICAgIGNvbnN0IGEgPSAxMTsNCiAgICAgICAgYTsNCiAgICAgICAgYjsNCiAgICB9DQogICAgc3RhdGljIHsNCiAgICAgICAgY29uc3QgYSA9IDExOw0KICAgICAgICBhOw0KICAgICAgICBiOw0KICAgIH0NCn0NCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWNsYXNzU3RhdGljQmxvY2syNS5qcy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2xhc3NTdGF0aWNCbG9jazI1LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiY2xhc3NTdGF0aWNCbG9jazI1LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE1BQU0sQ0FBQyxHQUFHLENBQUMsQ0FBQztBQUNaLE1BQU0sQ0FBQyxHQUFHLENBQUMsQ0FBQztBQUVaLE1BQU0sQ0FBQztJQUNIO1FBQ0ksTUFBTSxDQUFDLEdBQUcsRUFBRSxDQUFDO1FBRWIsQ0FBQyxDQUFDO1FBQ0YsQ0FBQyxDQUFDO0lBQ04sQ0FBQztJQUVEO1FBQ0ksTUFBTSxDQUFDLEdBQUcsRUFBRSxDQUFDO1FBRWIsQ0FBQyxDQUFDO1FBQ0YsQ0FBQyxDQUFDO0lBQ04sQ0FBQztDQUNKIn0=,Y29uc3QgYSA9IDE7CmNvbnN0IGIgPSAyOwoKY2xhc3MgQyB7CiAgICBzdGF0aWMgewogICAgICAgIGNvbnN0IGEgPSAxMTsKCiAgICAgICAgYTsKICAgICAgICBiOwogICAgfQoKICAgIHN0YXRpYyB7CiAgICAgICAgY29uc3QgYSA9IDExOwoKICAgICAgICBhOwogICAgICAgIGI7CiAgICB9Cn0K //// [classStaticBlock25.d.ts.map] -{"version":3,"file":"classStaticBlock25.d.ts","sourceRoot":"","sources":["classStaticBlock25.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,CAAC,IAAI,CAAC;AACZ,QAAA,MAAM,CAAC,IAAI,CAAC;AAEZ,cAAM,CAAC;CAcN"} -//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCBhID0gMTsNCmRlY2xhcmUgY29uc3QgYiA9IDI7DQpkZWNsYXJlIGNsYXNzIEMgew0KfQ0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9Y2xhc3NTdGF0aWNCbG9jazI1LmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2xhc3NTdGF0aWNCbG9jazI1LmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJjbGFzc1N0YXRpY0Jsb2NrMjUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsUUFBQSxNQUFNLENBQUMsSUFBSSxDQUFDO0FBQ1osUUFBQSxNQUFNLENBQUMsSUFBSSxDQUFDO0FBRVosY0FBTSxDQUFDO0NBY04ifQ==,Y29uc3QgYSA9IDE7CmNvbnN0IGIgPSAyOwoKY2xhc3MgQyB7CiAgICBzdGF0aWMgewogICAgICAgIGNvbnN0IGEgPSAxMTsKCiAgICAgICAgYTsKICAgICAgICBiOwogICAgfQoKICAgIHN0YXRpYyB7CiAgICAgICAgY29uc3QgYSA9IDExOwoKICAgICAgICBhOwogICAgICAgIGI7CiAgICB9Cn0K +{"version":3,"file":"classStaticBlock25.d.ts","sourceRoot":"","sources":["classStaticBlock25.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,CAAC,GAAG,CAAC,CAAC;AACZ,QAAA,MAAM,CAAC,GAAG,CAAC,CAAC;AAEZ,cAAM,CAAC;CAcN"} +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCBhID0gMTsNCmRlY2xhcmUgY29uc3QgYiA9IDI7DQpkZWNsYXJlIGNsYXNzIEMgew0KfQ0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9Y2xhc3NTdGF0aWNCbG9jazI1LmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2xhc3NTdGF0aWNCbG9jazI1LmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJjbGFzc1N0YXRpY0Jsb2NrMjUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsUUFBQSxNQUFNLENBQUMsR0FBRyxDQUFDLENBQUM7QUFDWixRQUFBLE1BQU0sQ0FBQyxHQUFHLENBQUMsQ0FBQztBQUVaLGNBQU0sQ0FBQztDQWNOIn0=,Y29uc3QgYSA9IDE7CmNvbnN0IGIgPSAyOwoKY2xhc3MgQyB7CiAgICBzdGF0aWMgewogICAgICAgIGNvbnN0IGEgPSAxMTsKCiAgICAgICAgYTsKICAgICAgICBiOwogICAgfQoKICAgIHN0YXRpYyB7CiAgICAgICAgY29uc3QgYSA9IDExOwoKICAgICAgICBhOwogICAgICAgIGI7CiAgICB9Cn0K diff --git a/tests/baselines/reference/classStaticBlock25(target=esnext).sourcemap.txt b/tests/baselines/reference/classStaticBlock25(target=esnext).sourcemap.txt index f2f548f460210..a9bb758a160f1 100644 --- a/tests/baselines/reference/classStaticBlock25(target=esnext).sourcemap.txt +++ b/tests/baselines/reference/classStaticBlock25(target=esnext).sourcemap.txt @@ -214,42 +214,48 @@ sourceFile:classStaticBlock25.ts 2 >^^^^^^^^ 3 > ^^^^^^ 4 > ^ -5 > ^^^^ -6 > ^ -7 > ^-> +5 > ^^^ +6 > ^ +7 > ^ +8 > ^-> 1 > 2 > 3 > const 4 > a -5 > = 1 -6 > ; +5 > = +6 > 1 +7 > ; 1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) 2 >Emitted(1, 9) Source(1, 1) + SourceIndex(0) 3 >Emitted(1, 15) Source(1, 7) + SourceIndex(0) 4 >Emitted(1, 16) Source(1, 8) + SourceIndex(0) -5 >Emitted(1, 20) Source(1, 12) + SourceIndex(0) -6 >Emitted(1, 21) Source(1, 13) + SourceIndex(0) +5 >Emitted(1, 19) Source(1, 11) + SourceIndex(0) +6 >Emitted(1, 20) Source(1, 12) + SourceIndex(0) +7 >Emitted(1, 21) Source(1, 13) + SourceIndex(0) --- >>>declare const b = 2; 1-> 2 >^^^^^^^^ 3 > ^^^^^^ 4 > ^ -5 > ^^^^ -6 > ^ +5 > ^^^ +6 > ^ +7 > ^ 1-> > 2 > 3 > const 4 > b -5 > = 2 -6 > ; +5 > = +6 > 2 +7 > ; 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) 2 >Emitted(2, 9) Source(2, 1) + SourceIndex(0) 3 >Emitted(2, 15) Source(2, 7) + SourceIndex(0) 4 >Emitted(2, 16) Source(2, 8) + SourceIndex(0) -5 >Emitted(2, 20) Source(2, 12) + SourceIndex(0) -6 >Emitted(2, 21) Source(2, 13) + SourceIndex(0) +5 >Emitted(2, 19) Source(2, 11) + SourceIndex(0) +6 >Emitted(2, 20) Source(2, 12) + SourceIndex(0) +7 >Emitted(2, 21) Source(2, 13) + SourceIndex(0) --- >>>declare class C { 1 > diff --git a/tests/baselines/reference/declarationEmitClassMemberNameConflict2.js b/tests/baselines/reference/declarationEmitClassMemberNameConflict2.js index 8ecf384c0b594..7bcb803bd9a6b 100644 --- a/tests/baselines/reference/declarationEmitClassMemberNameConflict2.js +++ b/tests/baselines/reference/declarationEmitClassMemberNameConflict2.js @@ -46,7 +46,7 @@ var Foo = /** @class */ (function () { //// [declarationEmitClassMemberNameConflict2.d.ts] -declare const Bar = "bar"; +declare const Bar = 'bar'; declare enum Hello { World = 0 } diff --git a/tests/baselines/reference/declarationEmitConstantNoWidening.js b/tests/baselines/reference/declarationEmitConstantNoWidening.js index 6f50e13b01be3..594502ef56770 100644 --- a/tests/baselines/reference/declarationEmitConstantNoWidening.js +++ b/tests/baselines/reference/declarationEmitConstantNoWidening.js @@ -21,7 +21,7 @@ exports.Bar = Bar; //// [declarationEmitConstantNoWidening.d.ts] -export declare const FOO = "FOO"; +export declare const FOO = 'FOO'; export declare class Bar { readonly type = "FOO"; } diff --git a/tests/baselines/reference/fakeInfinity1.js b/tests/baselines/reference/fakeInfinity1.js index c28497a9fa3a0..ce65e79c41edb 100644 --- a/tests/baselines/reference/fakeInfinity1.js +++ b/tests/baselines/reference/fakeInfinity1.js @@ -43,4 +43,4 @@ export type NegativeInfinity = -1e999; export type TypeOfInfinity = typeof Infinity; export type TypeOfNaN = typeof NaN; export type Oops = 123456789123456789123456789123456789123456789123456789; -export declare const oops = 1.2345678912345678e+53; +export declare const oops = 123456789123456789123456789123456789123456789123456789; diff --git a/tests/baselines/reference/strictPropertyInitialization.js b/tests/baselines/reference/strictPropertyInitialization.js index 78e5bafc49429..6ad38399642d9 100644 --- a/tests/baselines/reference/strictPropertyInitialization.js +++ b/tests/baselines/reference/strictPropertyInitialization.js @@ -351,7 +351,7 @@ declare class C11 { a: number; constructor(); } -declare const a = "a"; +declare const a = 'a'; declare const b: unique symbol; declare class C12 { [a]: number; diff --git a/tests/baselines/reference/tsbuild/amdModulesWithOut/modules-and-globals-mixed-in-amd.js b/tests/baselines/reference/tsbuild/amdModulesWithOut/modules-and-globals-mixed-in-amd.js index 9d4cb1df205f5..543704918cf2e 100644 --- a/tests/baselines/reference/tsbuild/amdModulesWithOut/modules-and-globals-mixed-in-amd.js +++ b/tests/baselines/reference/tsbuild/amdModulesWithOut/modules-and-globals-mixed-in-amd.js @@ -99,7 +99,7 @@ declare const myVar = 30; //# sourceMappingURL=module.d.ts.map //// [/src/app/module.d.ts.map] -{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["file3.ts","file4.ts"],"names":[],"mappings":";IAAA,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;;ACApB,QAAA,MAAM,KAAK,KAAK,CAAC"} +{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["file3.ts","file4.ts"],"names":[],"mappings":";IAAA,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC;;ACApB,QAAA,MAAM,KAAK,GAAG,EAAE,CAAC"} //// [/src/app/module.d.ts.map.baseline.txt] =================================================================== @@ -119,22 +119,25 @@ sourceFile:file3.ts 3 > ^ 4 > ^^^^^^ 5 > ^ -6 > ^^^^^ -7 > ^ +6 > ^^^ +7 > ^^ +8 > ^ 1 > 2 > export 3 > 4 > const 5 > z -6 > = 30 -7 > ; +6 > = +7 > 30 +8 > ; 1 >Emitted(2, 5) Source(1, 1) + SourceIndex(0) 2 >Emitted(2, 11) Source(1, 7) + SourceIndex(0) 3 >Emitted(2, 12) Source(1, 8) + SourceIndex(0) 4 >Emitted(2, 18) Source(1, 14) + SourceIndex(0) 5 >Emitted(2, 19) Source(1, 15) + SourceIndex(0) -6 >Emitted(2, 24) Source(1, 20) + SourceIndex(0) -7 >Emitted(2, 25) Source(1, 21) + SourceIndex(0) +6 >Emitted(2, 22) Source(1, 18) + SourceIndex(0) +7 >Emitted(2, 24) Source(1, 20) + SourceIndex(0) +8 >Emitted(2, 25) Source(1, 21) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/src/app/module.d.ts @@ -146,21 +149,24 @@ sourceFile:file4.ts 2 >^^^^^^^^ 3 > ^^^^^^ 4 > ^^^^^ -5 > ^^^^^ -6 > ^ -7 > ^^^^^^^^^^-> +5 > ^^^ +6 > ^^ +7 > ^ +8 > ^^^^^^^^^^-> 1 > 2 > 3 > const 4 > myVar -5 > = 30 -6 > ; +5 > = +6 > 30 +7 > ; 1 >Emitted(4, 1) Source(1, 1) + SourceIndex(1) 2 >Emitted(4, 9) Source(1, 1) + SourceIndex(1) 3 >Emitted(4, 15) Source(1, 7) + SourceIndex(1) 4 >Emitted(4, 20) Source(1, 12) + SourceIndex(1) -5 >Emitted(4, 25) Source(1, 17) + SourceIndex(1) -6 >Emitted(4, 26) Source(1, 18) + SourceIndex(1) +5 >Emitted(4, 23) Source(1, 15) + SourceIndex(1) +6 >Emitted(4, 25) Source(1, 17) + SourceIndex(1) +7 >Emitted(4, 26) Source(1, 18) + SourceIndex(1) --- >>>//# sourceMappingURL=module.d.ts.map @@ -296,7 +302,7 @@ declare const globalConst = 10; //# sourceMappingURL=module.d.ts.map //// [/src/lib/module.d.ts.map] -{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["file0.ts","file1.ts","file2.ts","global.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,MAAM,KAAK,CAAC;;ICAlB,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;;;ICApB,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;;ACApB,QAAA,MAAM,WAAW,KAAK,CAAC"} +{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["file0.ts","file1.ts","file2.ts","global.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,MAAM,GAAG,EAAE,CAAC;;ICAlB,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC;;;ICApB,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC;;ACApB,QAAA,MAAM,WAAW,GAAG,EAAE,CAAC"} //// [/src/lib/module.d.ts.map.baseline.txt] =================================================================== @@ -314,20 +320,23 @@ sourceFile:file0.ts 2 >^^^^^^^^ 3 > ^^^^^^ 4 > ^^^^^^ -5 > ^^^^^ -6 > ^ +5 > ^^^ +6 > ^^ +7 > ^ 1 > 2 > 3 > const 4 > myGlob -5 > = 20 -6 > ; +5 > = +6 > 20 +7 > ; 1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) 2 >Emitted(1, 9) Source(1, 1) + SourceIndex(0) 3 >Emitted(1, 15) Source(1, 7) + SourceIndex(0) 4 >Emitted(1, 21) Source(1, 13) + SourceIndex(0) -5 >Emitted(1, 26) Source(1, 18) + SourceIndex(0) -6 >Emitted(1, 27) Source(1, 19) + SourceIndex(0) +5 >Emitted(1, 24) Source(1, 16) + SourceIndex(0) +6 >Emitted(1, 26) Source(1, 18) + SourceIndex(0) +7 >Emitted(1, 27) Source(1, 19) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/src/lib/module.d.ts @@ -340,22 +349,25 @@ sourceFile:file1.ts 3 > ^ 4 > ^^^^^^ 5 > ^ -6 > ^^^^^ -7 > ^ +6 > ^^^ +7 > ^^ +8 > ^ 1 > 2 > export 3 > 4 > const 5 > x -6 > = 10 -7 > ; +6 > = +7 > 10 +8 > ; 1 >Emitted(3, 5) Source(1, 1) + SourceIndex(1) 2 >Emitted(3, 11) Source(1, 7) + SourceIndex(1) 3 >Emitted(3, 12) Source(1, 8) + SourceIndex(1) 4 >Emitted(3, 18) Source(1, 14) + SourceIndex(1) 5 >Emitted(3, 19) Source(1, 15) + SourceIndex(1) -6 >Emitted(3, 24) Source(1, 20) + SourceIndex(1) -7 >Emitted(3, 25) Source(1, 21) + SourceIndex(1) +6 >Emitted(3, 22) Source(1, 18) + SourceIndex(1) +7 >Emitted(3, 24) Source(1, 20) + SourceIndex(1) +8 >Emitted(3, 25) Source(1, 21) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:/src/lib/module.d.ts @@ -369,22 +381,25 @@ sourceFile:file2.ts 3 > ^ 4 > ^^^^^^ 5 > ^ -6 > ^^^^^ -7 > ^ +6 > ^^^ +7 > ^^ +8 > ^ 1 > 2 > export 3 > 4 > const 5 > y -6 > = 20 -7 > ; +6 > = +7 > 20 +8 > ; 1 >Emitted(6, 5) Source(1, 1) + SourceIndex(2) 2 >Emitted(6, 11) Source(1, 7) + SourceIndex(2) 3 >Emitted(6, 12) Source(1, 8) + SourceIndex(2) 4 >Emitted(6, 18) Source(1, 14) + SourceIndex(2) 5 >Emitted(6, 19) Source(1, 15) + SourceIndex(2) -6 >Emitted(6, 24) Source(1, 20) + SourceIndex(2) -7 >Emitted(6, 25) Source(1, 21) + SourceIndex(2) +6 >Emitted(6, 22) Source(1, 18) + SourceIndex(2) +7 >Emitted(6, 24) Source(1, 20) + SourceIndex(2) +8 >Emitted(6, 25) Source(1, 21) + SourceIndex(2) --- ------------------------------------------------------------------- emittedFile:/src/lib/module.d.ts @@ -396,21 +411,24 @@ sourceFile:global.ts 2 >^^^^^^^^ 3 > ^^^^^^ 4 > ^^^^^^^^^^^ -5 > ^^^^^ -6 > ^ -7 > ^^^^-> +5 > ^^^ +6 > ^^ +7 > ^ +8 > ^^^^-> 1 > 2 > 3 > const 4 > globalConst -5 > = 10 -6 > ; +5 > = +6 > 10 +7 > ; 1 >Emitted(8, 1) Source(1, 1) + SourceIndex(3) 2 >Emitted(8, 9) Source(1, 1) + SourceIndex(3) 3 >Emitted(8, 15) Source(1, 7) + SourceIndex(3) 4 >Emitted(8, 26) Source(1, 18) + SourceIndex(3) -5 >Emitted(8, 31) Source(1, 23) + SourceIndex(3) -6 >Emitted(8, 32) Source(1, 24) + SourceIndex(3) +5 >Emitted(8, 29) Source(1, 21) + SourceIndex(3) +6 >Emitted(8, 31) Source(1, 23) + SourceIndex(3) +7 >Emitted(8, 32) Source(1, 24) + SourceIndex(3) --- >>>//# sourceMappingURL=module.d.ts.map diff --git a/tests/baselines/reference/tsbuild/amdModulesWithOut/prepend-reports-deprecation-error.js b/tests/baselines/reference/tsbuild/amdModulesWithOut/prepend-reports-deprecation-error.js index e2370d49b9551..63a6afdc7faf9 100644 --- a/tests/baselines/reference/tsbuild/amdModulesWithOut/prepend-reports-deprecation-error.js +++ b/tests/baselines/reference/tsbuild/amdModulesWithOut/prepend-reports-deprecation-error.js @@ -118,7 +118,7 @@ declare const globalConst = 10; //# sourceMappingURL=module.d.ts.map //// [/src/lib/module.d.ts.map] -{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["file0.ts","file1.ts","file2.ts","global.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,MAAM,KAAK,CAAC;;ICAlB,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;;;ICApB,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;;ACApB,QAAA,MAAM,WAAW,KAAK,CAAC"} +{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["file0.ts","file1.ts","file2.ts","global.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,MAAM,GAAG,EAAE,CAAC;;ICAlB,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC;;;ICApB,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC;;ACApB,QAAA,MAAM,WAAW,GAAG,EAAE,CAAC"} //// [/src/lib/module.d.ts.map.baseline.txt] =================================================================== @@ -136,20 +136,23 @@ sourceFile:file0.ts 2 >^^^^^^^^ 3 > ^^^^^^ 4 > ^^^^^^ -5 > ^^^^^ -6 > ^ +5 > ^^^ +6 > ^^ +7 > ^ 1 > 2 > 3 > const 4 > myGlob -5 > = 20 -6 > ; +5 > = +6 > 20 +7 > ; 1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) 2 >Emitted(1, 9) Source(1, 1) + SourceIndex(0) 3 >Emitted(1, 15) Source(1, 7) + SourceIndex(0) 4 >Emitted(1, 21) Source(1, 13) + SourceIndex(0) -5 >Emitted(1, 26) Source(1, 18) + SourceIndex(0) -6 >Emitted(1, 27) Source(1, 19) + SourceIndex(0) +5 >Emitted(1, 24) Source(1, 16) + SourceIndex(0) +6 >Emitted(1, 26) Source(1, 18) + SourceIndex(0) +7 >Emitted(1, 27) Source(1, 19) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/src/lib/module.d.ts @@ -162,22 +165,25 @@ sourceFile:file1.ts 3 > ^ 4 > ^^^^^^ 5 > ^ -6 > ^^^^^ -7 > ^ +6 > ^^^ +7 > ^^ +8 > ^ 1 > 2 > export 3 > 4 > const 5 > x -6 > = 10 -7 > ; +6 > = +7 > 10 +8 > ; 1 >Emitted(3, 5) Source(1, 1) + SourceIndex(1) 2 >Emitted(3, 11) Source(1, 7) + SourceIndex(1) 3 >Emitted(3, 12) Source(1, 8) + SourceIndex(1) 4 >Emitted(3, 18) Source(1, 14) + SourceIndex(1) 5 >Emitted(3, 19) Source(1, 15) + SourceIndex(1) -6 >Emitted(3, 24) Source(1, 20) + SourceIndex(1) -7 >Emitted(3, 25) Source(1, 21) + SourceIndex(1) +6 >Emitted(3, 22) Source(1, 18) + SourceIndex(1) +7 >Emitted(3, 24) Source(1, 20) + SourceIndex(1) +8 >Emitted(3, 25) Source(1, 21) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:/src/lib/module.d.ts @@ -191,22 +197,25 @@ sourceFile:file2.ts 3 > ^ 4 > ^^^^^^ 5 > ^ -6 > ^^^^^ -7 > ^ +6 > ^^^ +7 > ^^ +8 > ^ 1 > 2 > export 3 > 4 > const 5 > y -6 > = 20 -7 > ; +6 > = +7 > 20 +8 > ; 1 >Emitted(6, 5) Source(1, 1) + SourceIndex(2) 2 >Emitted(6, 11) Source(1, 7) + SourceIndex(2) 3 >Emitted(6, 12) Source(1, 8) + SourceIndex(2) 4 >Emitted(6, 18) Source(1, 14) + SourceIndex(2) 5 >Emitted(6, 19) Source(1, 15) + SourceIndex(2) -6 >Emitted(6, 24) Source(1, 20) + SourceIndex(2) -7 >Emitted(6, 25) Source(1, 21) + SourceIndex(2) +6 >Emitted(6, 22) Source(1, 18) + SourceIndex(2) +7 >Emitted(6, 24) Source(1, 20) + SourceIndex(2) +8 >Emitted(6, 25) Source(1, 21) + SourceIndex(2) --- ------------------------------------------------------------------- emittedFile:/src/lib/module.d.ts @@ -218,21 +227,24 @@ sourceFile:global.ts 2 >^^^^^^^^ 3 > ^^^^^^ 4 > ^^^^^^^^^^^ -5 > ^^^^^ -6 > ^ -7 > ^^^^-> +5 > ^^^ +6 > ^^ +7 > ^ +8 > ^^^^-> 1 > 2 > 3 > const 4 > globalConst -5 > = 10 -6 > ; +5 > = +6 > 10 +7 > ; 1 >Emitted(8, 1) Source(1, 1) + SourceIndex(3) 2 >Emitted(8, 9) Source(1, 1) + SourceIndex(3) 3 >Emitted(8, 15) Source(1, 7) + SourceIndex(3) 4 >Emitted(8, 26) Source(1, 18) + SourceIndex(3) -5 >Emitted(8, 31) Source(1, 23) + SourceIndex(3) -6 >Emitted(8, 32) Source(1, 24) + SourceIndex(3) +5 >Emitted(8, 29) Source(1, 21) + SourceIndex(3) +6 >Emitted(8, 31) Source(1, 23) + SourceIndex(3) +7 >Emitted(8, 32) Source(1, 24) + SourceIndex(3) --- >>>//# sourceMappingURL=module.d.ts.map diff --git a/tests/baselines/reference/tsbuild/amdModulesWithOut/when-the-module-resolution-finds-original-source-file.js b/tests/baselines/reference/tsbuild/amdModulesWithOut/when-the-module-resolution-finds-original-source-file.js index a8659bff008d1..ec361121d5fc3 100644 --- a/tests/baselines/reference/tsbuild/amdModulesWithOut/when-the-module-resolution-finds-original-source-file.js +++ b/tests/baselines/reference/tsbuild/amdModulesWithOut/when-the-module-resolution-finds-original-source-file.js @@ -99,7 +99,7 @@ declare const myVar = 30; //# sourceMappingURL=module.d.ts.map //// [/src/app/module.d.ts.map] -{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["file3.ts","file4.ts"],"names":[],"mappings":";IAAA,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;;ACApB,QAAA,MAAM,KAAK,KAAK,CAAC"} +{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["file3.ts","file4.ts"],"names":[],"mappings":";IAAA,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC;;ACApB,QAAA,MAAM,KAAK,GAAG,EAAE,CAAC"} //// [/src/app/module.d.ts.map.baseline.txt] =================================================================== @@ -119,22 +119,25 @@ sourceFile:file3.ts 3 > ^ 4 > ^^^^^^ 5 > ^ -6 > ^^^^^ -7 > ^ +6 > ^^^ +7 > ^^ +8 > ^ 1 > 2 > export 3 > 4 > const 5 > z -6 > = 30 -7 > ; +6 > = +7 > 30 +8 > ; 1 >Emitted(2, 5) Source(1, 1) + SourceIndex(0) 2 >Emitted(2, 11) Source(1, 7) + SourceIndex(0) 3 >Emitted(2, 12) Source(1, 8) + SourceIndex(0) 4 >Emitted(2, 18) Source(1, 14) + SourceIndex(0) 5 >Emitted(2, 19) Source(1, 15) + SourceIndex(0) -6 >Emitted(2, 24) Source(1, 20) + SourceIndex(0) -7 >Emitted(2, 25) Source(1, 21) + SourceIndex(0) +6 >Emitted(2, 22) Source(1, 18) + SourceIndex(0) +7 >Emitted(2, 24) Source(1, 20) + SourceIndex(0) +8 >Emitted(2, 25) Source(1, 21) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/src/app/module.d.ts @@ -146,21 +149,24 @@ sourceFile:file4.ts 2 >^^^^^^^^ 3 > ^^^^^^ 4 > ^^^^^ -5 > ^^^^^ -6 > ^ -7 > ^^^^^^^^^^-> +5 > ^^^ +6 > ^^ +7 > ^ +8 > ^^^^^^^^^^-> 1 > 2 > 3 > const 4 > myVar -5 > = 30 -6 > ; +5 > = +6 > 30 +7 > ; 1 >Emitted(4, 1) Source(1, 1) + SourceIndex(1) 2 >Emitted(4, 9) Source(1, 1) + SourceIndex(1) 3 >Emitted(4, 15) Source(1, 7) + SourceIndex(1) 4 >Emitted(4, 20) Source(1, 12) + SourceIndex(1) -5 >Emitted(4, 25) Source(1, 17) + SourceIndex(1) -6 >Emitted(4, 26) Source(1, 18) + SourceIndex(1) +5 >Emitted(4, 23) Source(1, 15) + SourceIndex(1) +6 >Emitted(4, 25) Source(1, 17) + SourceIndex(1) +7 >Emitted(4, 26) Source(1, 18) + SourceIndex(1) --- >>>//# sourceMappingURL=module.d.ts.map @@ -296,7 +302,7 @@ declare const globalConst = 10; //# sourceMappingURL=module.d.ts.map //// [/src/module.d.ts.map] -{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["lib/file0.ts","lib/file1.ts","lib/file2.ts","lib/global.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,MAAM,KAAK,CAAC;;ICAlB,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;;;ICApB,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;;ACApB,QAAA,MAAM,WAAW,KAAK,CAAC"} +{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["lib/file0.ts","lib/file1.ts","lib/file2.ts","lib/global.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,MAAM,GAAG,EAAE,CAAC;;ICAlB,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC;;;ICApB,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC;;ACApB,QAAA,MAAM,WAAW,GAAG,EAAE,CAAC"} //// [/src/module.d.ts.map.baseline.txt] =================================================================== @@ -314,21 +320,24 @@ sourceFile:lib/file0.ts 2 >^^^^^^^^ 3 > ^^^^^^ 4 > ^^^^^^ -5 > ^^^^^ -6 > ^ -7 > ^^-> +5 > ^^^ +6 > ^^ +7 > ^ +8 > ^^-> 1 > 2 > 3 > const 4 > myGlob -5 > = 20 -6 > ; +5 > = +6 > 20 +7 > ; 1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) 2 >Emitted(1, 9) Source(1, 1) + SourceIndex(0) 3 >Emitted(1, 15) Source(1, 7) + SourceIndex(0) 4 >Emitted(1, 21) Source(1, 13) + SourceIndex(0) -5 >Emitted(1, 26) Source(1, 18) + SourceIndex(0) -6 >Emitted(1, 27) Source(1, 19) + SourceIndex(0) +5 >Emitted(1, 24) Source(1, 16) + SourceIndex(0) +6 >Emitted(1, 26) Source(1, 18) + SourceIndex(0) +7 >Emitted(1, 27) Source(1, 19) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/src/module.d.ts @@ -341,22 +350,25 @@ sourceFile:lib/file1.ts 3 > ^ 4 > ^^^^^^ 5 > ^ -6 > ^^^^^ -7 > ^ +6 > ^^^ +7 > ^^ +8 > ^ 1-> 2 > export 3 > 4 > const 5 > x -6 > = 10 -7 > ; +6 > = +7 > 10 +8 > ; 1->Emitted(3, 5) Source(1, 1) + SourceIndex(1) 2 >Emitted(3, 11) Source(1, 7) + SourceIndex(1) 3 >Emitted(3, 12) Source(1, 8) + SourceIndex(1) 4 >Emitted(3, 18) Source(1, 14) + SourceIndex(1) 5 >Emitted(3, 19) Source(1, 15) + SourceIndex(1) -6 >Emitted(3, 24) Source(1, 20) + SourceIndex(1) -7 >Emitted(3, 25) Source(1, 21) + SourceIndex(1) +6 >Emitted(3, 22) Source(1, 18) + SourceIndex(1) +7 >Emitted(3, 24) Source(1, 20) + SourceIndex(1) +8 >Emitted(3, 25) Source(1, 21) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:/src/module.d.ts @@ -370,22 +382,25 @@ sourceFile:lib/file2.ts 3 > ^ 4 > ^^^^^^ 5 > ^ -6 > ^^^^^ -7 > ^ +6 > ^^^ +7 > ^^ +8 > ^ 1 > 2 > export 3 > 4 > const 5 > y -6 > = 20 -7 > ; +6 > = +7 > 20 +8 > ; 1 >Emitted(6, 5) Source(1, 1) + SourceIndex(2) 2 >Emitted(6, 11) Source(1, 7) + SourceIndex(2) 3 >Emitted(6, 12) Source(1, 8) + SourceIndex(2) 4 >Emitted(6, 18) Source(1, 14) + SourceIndex(2) 5 >Emitted(6, 19) Source(1, 15) + SourceIndex(2) -6 >Emitted(6, 24) Source(1, 20) + SourceIndex(2) -7 >Emitted(6, 25) Source(1, 21) + SourceIndex(2) +6 >Emitted(6, 22) Source(1, 18) + SourceIndex(2) +7 >Emitted(6, 24) Source(1, 20) + SourceIndex(2) +8 >Emitted(6, 25) Source(1, 21) + SourceIndex(2) --- ------------------------------------------------------------------- emittedFile:/src/module.d.ts @@ -397,21 +412,24 @@ sourceFile:lib/global.ts 2 >^^^^^^^^ 3 > ^^^^^^ 4 > ^^^^^^^^^^^ -5 > ^^^^^ -6 > ^ -7 > ^^^^-> +5 > ^^^ +6 > ^^ +7 > ^ +8 > ^^^^-> 1 > 2 > 3 > const 4 > globalConst -5 > = 10 -6 > ; +5 > = +6 > 10 +7 > ; 1 >Emitted(8, 1) Source(1, 1) + SourceIndex(3) 2 >Emitted(8, 9) Source(1, 1) + SourceIndex(3) 3 >Emitted(8, 15) Source(1, 7) + SourceIndex(3) 4 >Emitted(8, 26) Source(1, 18) + SourceIndex(3) -5 >Emitted(8, 31) Source(1, 23) + SourceIndex(3) -6 >Emitted(8, 32) Source(1, 24) + SourceIndex(3) +5 >Emitted(8, 29) Source(1, 21) + SourceIndex(3) +6 >Emitted(8, 31) Source(1, 23) + SourceIndex(3) +7 >Emitted(8, 32) Source(1, 24) + SourceIndex(3) --- >>>//# sourceMappingURL=module.d.ts.map diff --git a/tests/baselines/reference/tsbuild/commandLine/different-options-with-incremental-with-outFile.js b/tests/baselines/reference/tsbuild/commandLine/different-options-with-incremental-with-outFile.js index 5f0b2e03fe3cd..8877fce7bc62a 100644 --- a/tests/baselines/reference/tsbuild/commandLine/different-options-with-incremental-with-outFile.js +++ b/tests/baselines/reference/tsbuild/commandLine/different-options-with-incremental-with-outFile.js @@ -536,7 +536,7 @@ declare module "d" { //# sourceMappingURL=outFile.d.ts.map //// [/src/outFile.d.ts.map] -{"version":3,"file":"outFile.d.ts","sourceRoot":"","sources":["project/a.ts","project/b.ts","project/c.ts","project/d.ts"],"names":[],"mappings":";IAAA,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;;;ICApB,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;;;ICAI,MAAM,CAAC,MAAM,CAAC,KAAI,CAAC;;;ICAnB,MAAM,CAAC,MAAM,CAAC,KAAI,CAAC"} +{"version":3,"file":"outFile.d.ts","sourceRoot":"","sources":["project/a.ts","project/b.ts","project/c.ts","project/d.ts"],"names":[],"mappings":";IAAA,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC;;;ICApB,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC;;;ICAI,MAAM,CAAC,MAAM,CAAC,KAAI,CAAC;;;ICAnB,MAAM,CAAC,MAAM,CAAC,KAAI,CAAC"} //// [/src/outFile.tsbuildinfo] {"program":{"fileNames":["../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-18487752940-export const a = 10;const aLocal = 10;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"declaration":true,"declarationMap":true,"module":2,"outFile":"./outFile.js"}},"version":"FakeTSVersion"} diff --git a/tests/baselines/reference/tsbuild/commandLine/different-options-with-incremental.js b/tests/baselines/reference/tsbuild/commandLine/different-options-with-incremental.js index 10d9e7314b3f4..49a5028634f38 100644 --- a/tests/baselines/reference/tsbuild/commandLine/different-options-with-incremental.js +++ b/tests/baselines/reference/tsbuild/commandLine/different-options-with-incremental.js @@ -743,14 +743,14 @@ export declare const a = 10; //# sourceMappingURL=a.d.ts.map //// [/src/project/a.d.ts.map] -{"version":3,"file":"a.d.ts","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,CAAC,KAAK,CAAC"} +{"version":3,"file":"a.d.ts","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,CAAC,GAAG,EAAE,CAAC"} //// [/src/project/b.d.ts] export declare const b = 10; //# sourceMappingURL=b.d.ts.map //// [/src/project/b.d.ts.map] -{"version":3,"file":"b.d.ts","sourceRoot":"","sources":["b.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,CAAC,KAAK,CAAC"} +{"version":3,"file":"b.d.ts","sourceRoot":"","sources":["b.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,CAAC,GAAG,EAAE,CAAC"} //// [/src/project/c.d.ts] export declare const c = 10; diff --git a/tests/baselines/reference/tsbuild/commandLine/different-options-with-outFile.js b/tests/baselines/reference/tsbuild/commandLine/different-options-with-outFile.js index 70e1163cc7a51..e75278538a050 100644 --- a/tests/baselines/reference/tsbuild/commandLine/different-options-with-outFile.js +++ b/tests/baselines/reference/tsbuild/commandLine/different-options-with-outFile.js @@ -491,7 +491,7 @@ declare module "d" { //# sourceMappingURL=outFile.d.ts.map //// [/src/outFile.d.ts.map] -{"version":3,"file":"outFile.d.ts","sourceRoot":"","sources":["project/a.ts","project/b.ts","project/c.ts","project/d.ts"],"names":[],"mappings":";IAAA,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;;;ICApB,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;;;ICAI,MAAM,CAAC,MAAM,CAAC,KAAI,CAAC;;;ICAnB,MAAM,CAAC,MAAM,CAAC,KAAI,CAAC"} +{"version":3,"file":"outFile.d.ts","sourceRoot":"","sources":["project/a.ts","project/b.ts","project/c.ts","project/d.ts"],"names":[],"mappings":";IAAA,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC;;;ICApB,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC;;;ICAI,MAAM,CAAC,MAAM,CAAC,KAAI,CAAC;;;ICAnB,MAAM,CAAC,MAAM,CAAC,KAAI,CAAC"} //// [/src/outFile.tsbuildinfo] {"program":{"fileNames":["../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-18487752940-export const a = 10;const aLocal = 10;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"composite":true,"declaration":true,"declarationMap":true,"module":2,"outFile":"./outFile.js"},"outSignature":"-25657667359-declare module \"a\" {\n export const a = 10;\n}\ndeclare module \"b\" {\n export const b = 10;\n}\ndeclare module \"c\" {\n export const c = 10;\n}\ndeclare module \"d\" {\n export const d = 10;\n}\n","latestChangedDtsFile":"./outFile.d.ts"},"version":"FakeTSVersion"} diff --git a/tests/baselines/reference/tsbuild/commandLine/different-options.js b/tests/baselines/reference/tsbuild/commandLine/different-options.js index d5ccb469bb358..1ee36e72ca1c1 100644 --- a/tests/baselines/reference/tsbuild/commandLine/different-options.js +++ b/tests/baselines/reference/tsbuild/commandLine/different-options.js @@ -670,14 +670,14 @@ export declare const a = 10; //# sourceMappingURL=a.d.ts.map //// [/src/project/a.d.ts.map] -{"version":3,"file":"a.d.ts","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,CAAC,KAAK,CAAC"} +{"version":3,"file":"a.d.ts","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,CAAC,GAAG,EAAE,CAAC"} //// [/src/project/b.d.ts] export declare const b = 10; //# sourceMappingURL=b.d.ts.map //// [/src/project/b.d.ts.map] -{"version":3,"file":"b.d.ts","sourceRoot":"","sources":["b.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,CAAC,KAAK,CAAC"} +{"version":3,"file":"b.d.ts","sourceRoot":"","sources":["b.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,CAAC,GAAG,EAAE,CAAC"} //// [/src/project/c.d.ts] export declare const c = 10; diff --git a/tests/baselines/reference/tsbuild/outFile/baseline-sectioned-sourcemaps.js b/tests/baselines/reference/tsbuild/outFile/baseline-sectioned-sourcemaps.js index c73edeeab60df..44af291f074d1 100644 --- a/tests/baselines/reference/tsbuild/outFile/baseline-sectioned-sourcemaps.js +++ b/tests/baselines/reference/tsbuild/outFile/baseline-sectioned-sourcemaps.js @@ -627,7 +627,7 @@ declare function f(): string; //# sourceMappingURL=first-output.d.ts.map //// [/src/first/bin/first-output.d.ts.map] -{"version":3,"file":"first-output.d.ts","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AAAA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,iBAAiB,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;AERD,iBAAS,CAAC,WAET"} +{"version":3,"file":"first-output.d.ts","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AAAA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,GAAG,cAAc,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;AERD,iBAAS,CAAC,WAET"} //// [/src/first/bin/first-output.d.ts.map.baseline.txt] =================================================================== @@ -681,22 +681,25 @@ sourceFile:../first_PART1.ts 2 >^^^^^^^^ 3 > ^^^^^^ 4 > ^ -5 > ^^^^^^^^^^^^^^^^^ -6 > ^ +5 > ^^^ +6 > ^^^^^^^^^^^^^^ +7 > ^ 1-> > > 2 > 3 > const 4 > s -5 > = "Hello, world" -6 > ; +5 > = +6 > "Hello, world" +7 > ; 1->Emitted(4, 1) Source(5, 1) + SourceIndex(0) 2 >Emitted(4, 9) Source(5, 1) + SourceIndex(0) 3 >Emitted(4, 15) Source(5, 7) + SourceIndex(0) 4 >Emitted(4, 16) Source(5, 8) + SourceIndex(0) -5 >Emitted(4, 33) Source(5, 25) + SourceIndex(0) -6 >Emitted(4, 34) Source(5, 26) + SourceIndex(0) +5 >Emitted(4, 19) Source(5, 11) + SourceIndex(0) +6 >Emitted(4, 33) Source(5, 25) + SourceIndex(0) +7 >Emitted(4, 34) Source(5, 26) + SourceIndex(0) --- >>>interface NoJsForHereEither { 1 > @@ -1196,7 +1199,7 @@ declare function f(): string; //# sourceMappingURL=first-output.d.ts.map //// [/src/first/bin/first-output.d.ts.map] -{"version":3,"file":"first-output.d.ts","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AAAA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,gBAAgB,CAAC;AAExB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;AERD,iBAAS,CAAC,WAET"} +{"version":3,"file":"first-output.d.ts","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AAAA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,GAAG,aAAa,CAAC;AAExB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;AERD,iBAAS,CAAC,WAET"} //// [/src/first/bin/first-output.d.ts.map.baseline.txt] =================================================================== @@ -1250,22 +1253,25 @@ sourceFile:../first_PART1.ts 2 >^^^^^^^^ 3 > ^^^^^^ 4 > ^ -5 > ^^^^^^^^^^^^^^^^ -6 > ^ +5 > ^^^ +6 > ^^^^^^^^^^^^^ +7 > ^ 1-> > > 2 > 3 > const 4 > s -5 > = "Hola, world" -6 > ; +5 > = +6 > "Hola, world" +7 > ; 1->Emitted(4, 1) Source(5, 1) + SourceIndex(0) 2 >Emitted(4, 9) Source(5, 1) + SourceIndex(0) 3 >Emitted(4, 15) Source(5, 7) + SourceIndex(0) 4 >Emitted(4, 16) Source(5, 8) + SourceIndex(0) -5 >Emitted(4, 32) Source(5, 24) + SourceIndex(0) -6 >Emitted(4, 33) Source(5, 25) + SourceIndex(0) +5 >Emitted(4, 19) Source(5, 11) + SourceIndex(0) +6 >Emitted(4, 32) Source(5, 24) + SourceIndex(0) +7 >Emitted(4, 33) Source(5, 25) + SourceIndex(0) --- >>>interface NoJsForHereEither { 1 > diff --git a/tests/baselines/reference/tsbuild/outFile/clean-projects.js b/tests/baselines/reference/tsbuild/outFile/clean-projects.js index 37b14ba24cac8..385c428567fde 100644 --- a/tests/baselines/reference/tsbuild/outFile/clean-projects.js +++ b/tests/baselines/reference/tsbuild/outFile/clean-projects.js @@ -105,7 +105,7 @@ declare function f(): string; //# sourceMappingURL=first-output.d.ts.map //// [/src/first/bin/first-output.d.ts.map] -{"version":3,"file":"first-output.d.ts","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AAAA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,iBAAiB,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;AERD,iBAAS,CAAC,WAET"} +{"version":3,"file":"first-output.d.ts","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AAAA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,GAAG,cAAc,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;AERD,iBAAS,CAAC,WAET"} //// [/src/first/bin/first-output.js] var s = "Hello, world"; diff --git a/tests/baselines/reference/tsbuild/outFile/cleans-till-project-specified.js b/tests/baselines/reference/tsbuild/outFile/cleans-till-project-specified.js index 17de0e161b806..2bd1b1c69c8aa 100644 --- a/tests/baselines/reference/tsbuild/outFile/cleans-till-project-specified.js +++ b/tests/baselines/reference/tsbuild/outFile/cleans-till-project-specified.js @@ -104,7 +104,7 @@ declare function f(): string; //# sourceMappingURL=first-output.d.ts.map //// [/src/first/bin/first-output.d.ts.map] -{"version":3,"file":"first-output.d.ts","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AAAA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,iBAAiB,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;AERD,iBAAS,CAAC,WAET"} +{"version":3,"file":"first-output.d.ts","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AAAA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,GAAG,cAAc,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;AERD,iBAAS,CAAC,WAET"} //// [/src/first/bin/first-output.js] var s = "Hello, world"; diff --git a/tests/baselines/reference/tsbuild/outFile/non-module-projects-without-prepend.js b/tests/baselines/reference/tsbuild/outFile/non-module-projects-without-prepend.js index 126d05075904b..49e3120fb0129 100644 --- a/tests/baselines/reference/tsbuild/outFile/non-module-projects-without-prepend.js +++ b/tests/baselines/reference/tsbuild/outFile/non-module-projects-without-prepend.js @@ -163,7 +163,7 @@ interface NoJsForHereEither { //# sourceMappingURL=first_PART1.d.ts.map //// [/src/first/first_PART1.d.ts.map] -{"version":3,"file":"first_PART1.d.ts","sourceRoot":"","sources":["first_PART1.ts"],"names":[],"mappings":"AAAA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,iBAAiB,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb"} +{"version":3,"file":"first_PART1.d.ts","sourceRoot":"","sources":["first_PART1.ts"],"names":[],"mappings":"AAAA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,GAAG,cAAc,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb"} //// [/src/first/first_PART1.js] var s = "Hello, world"; diff --git a/tests/baselines/reference/tsbuild/outFile/rebuilds-completely-when-command-line-incremental-flag-changes-between-non-dts-changes.js b/tests/baselines/reference/tsbuild/outFile/rebuilds-completely-when-command-line-incremental-flag-changes-between-non-dts-changes.js index 36234a5e967ea..e95e00af66b9a 100644 --- a/tests/baselines/reference/tsbuild/outFile/rebuilds-completely-when-command-line-incremental-flag-changes-between-non-dts-changes.js +++ b/tests/baselines/reference/tsbuild/outFile/rebuilds-completely-when-command-line-incremental-flag-changes-between-non-dts-changes.js @@ -242,7 +242,7 @@ declare function f(): string; //# sourceMappingURL=first-output.d.ts.map //// [/src/first/bin/first-output.d.ts.map] -{"version":3,"file":"first-output.d.ts","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AAAA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,iBAAiB,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;AERD,iBAAS,CAAC,WAET"} +{"version":3,"file":"first-output.d.ts","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AAAA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,GAAG,cAAc,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;AERD,iBAAS,CAAC,WAET"} //// [/src/first/bin/first-output.js] var s = "Hello, world"; diff --git a/tests/baselines/reference/tsbuild/outFile/rebuilds-completely-when-version-in-tsbuildinfo-doesnt-match-ts-version.js b/tests/baselines/reference/tsbuild/outFile/rebuilds-completely-when-version-in-tsbuildinfo-doesnt-match-ts-version.js index 05ad3c130c315..b6b6e8fe55ba6 100644 --- a/tests/baselines/reference/tsbuild/outFile/rebuilds-completely-when-version-in-tsbuildinfo-doesnt-match-ts-version.js +++ b/tests/baselines/reference/tsbuild/outFile/rebuilds-completely-when-version-in-tsbuildinfo-doesnt-match-ts-version.js @@ -104,7 +104,7 @@ declare function f(): string; //# sourceMappingURL=first-output.d.ts.map //// [/src/first/bin/first-output.d.ts.map] -{"version":3,"file":"first-output.d.ts","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AAAA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,iBAAiB,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;AERD,iBAAS,CAAC,WAET"} +{"version":3,"file":"first-output.d.ts","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AAAA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,GAAG,cAAc,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;AERD,iBAAS,CAAC,WAET"} //// [/src/first/bin/first-output.js] var s = "Hello, world"; diff --git a/tests/baselines/reference/tsbuild/outFile/tsbuildinfo-is-not-generated-when-incremental-is-set-to-false.js b/tests/baselines/reference/tsbuild/outFile/tsbuildinfo-is-not-generated-when-incremental-is-set-to-false.js index d503f5665be21..f5b7c50ccc8ec 100644 --- a/tests/baselines/reference/tsbuild/outFile/tsbuildinfo-is-not-generated-when-incremental-is-set-to-false.js +++ b/tests/baselines/reference/tsbuild/outFile/tsbuildinfo-is-not-generated-when-incremental-is-set-to-false.js @@ -242,7 +242,7 @@ declare function f(): string; //# sourceMappingURL=first-output.d.ts.map //// [/src/first/bin/first-output.d.ts.map] -{"version":3,"file":"first-output.d.ts","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AAAA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,iBAAiB,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;AERD,iBAAS,CAAC,WAET"} +{"version":3,"file":"first-output.d.ts","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AAAA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,GAAG,cAAc,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;AERD,iBAAS,CAAC,WAET"} //// [/src/first/bin/first-output.js] var s = "Hello, world"; diff --git a/tests/baselines/reference/tsbuild/outFile/verify-buildInfo-absence-results-in-new-build.js b/tests/baselines/reference/tsbuild/outFile/verify-buildInfo-absence-results-in-new-build.js index de13deb4e963a..3dda980794483 100644 --- a/tests/baselines/reference/tsbuild/outFile/verify-buildInfo-absence-results-in-new-build.js +++ b/tests/baselines/reference/tsbuild/outFile/verify-buildInfo-absence-results-in-new-build.js @@ -105,7 +105,7 @@ declare function f(): string; //# sourceMappingURL=first-output.d.ts.map //// [/src/first/bin/first-output.d.ts.map] -{"version":3,"file":"first-output.d.ts","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AAAA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,iBAAiB,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;AERD,iBAAS,CAAC,WAET"} +{"version":3,"file":"first-output.d.ts","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AAAA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,GAAG,cAAc,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;AERD,iBAAS,CAAC,WAET"} //// [/src/first/bin/first-output.js] var s = "Hello, world"; diff --git a/tests/baselines/reference/tsbuild/outFile/when-final-project-is-not-composite-but-incremental.js b/tests/baselines/reference/tsbuild/outFile/when-final-project-is-not-composite-but-incremental.js index d1c0e0efa5e8f..a2cf0707f721c 100644 --- a/tests/baselines/reference/tsbuild/outFile/when-final-project-is-not-composite-but-incremental.js +++ b/tests/baselines/reference/tsbuild/outFile/when-final-project-is-not-composite-but-incremental.js @@ -593,7 +593,7 @@ declare function f(): string; //# sourceMappingURL=first-output.d.ts.map //// [/src/first/bin/first-output.d.ts.map] -{"version":3,"file":"first-output.d.ts","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AAAA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,iBAAiB,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;AERD,iBAAS,CAAC,WAET"} +{"version":3,"file":"first-output.d.ts","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AAAA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,GAAG,cAAc,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;AERD,iBAAS,CAAC,WAET"} //// [/src/first/bin/first-output.d.ts.map.baseline.txt] =================================================================== @@ -647,22 +647,25 @@ sourceFile:../first_PART1.ts 2 >^^^^^^^^ 3 > ^^^^^^ 4 > ^ -5 > ^^^^^^^^^^^^^^^^^ -6 > ^ +5 > ^^^ +6 > ^^^^^^^^^^^^^^ +7 > ^ 1-> > > 2 > 3 > const 4 > s -5 > = "Hello, world" -6 > ; +5 > = +6 > "Hello, world" +7 > ; 1->Emitted(4, 1) Source(5, 1) + SourceIndex(0) 2 >Emitted(4, 9) Source(5, 1) + SourceIndex(0) 3 >Emitted(4, 15) Source(5, 7) + SourceIndex(0) 4 >Emitted(4, 16) Source(5, 8) + SourceIndex(0) -5 >Emitted(4, 33) Source(5, 25) + SourceIndex(0) -6 >Emitted(4, 34) Source(5, 26) + SourceIndex(0) +5 >Emitted(4, 19) Source(5, 11) + SourceIndex(0) +6 >Emitted(4, 33) Source(5, 25) + SourceIndex(0) +7 >Emitted(4, 34) Source(5, 26) + SourceIndex(0) --- >>>interface NoJsForHereEither { 1 > diff --git a/tests/baselines/reference/tsbuild/outFile/when-final-project-is-not-composite-but-uses-project-references.js b/tests/baselines/reference/tsbuild/outFile/when-final-project-is-not-composite-but-uses-project-references.js index 01e26e7db1fd8..b7e13ecd0ed40 100644 --- a/tests/baselines/reference/tsbuild/outFile/when-final-project-is-not-composite-but-uses-project-references.js +++ b/tests/baselines/reference/tsbuild/outFile/when-final-project-is-not-composite-but-uses-project-references.js @@ -593,7 +593,7 @@ declare function f(): string; //# sourceMappingURL=first-output.d.ts.map //// [/src/first/bin/first-output.d.ts.map] -{"version":3,"file":"first-output.d.ts","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AAAA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,iBAAiB,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;AERD,iBAAS,CAAC,WAET"} +{"version":3,"file":"first-output.d.ts","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AAAA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,GAAG,cAAc,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;AERD,iBAAS,CAAC,WAET"} //// [/src/first/bin/first-output.d.ts.map.baseline.txt] =================================================================== @@ -647,22 +647,25 @@ sourceFile:../first_PART1.ts 2 >^^^^^^^^ 3 > ^^^^^^ 4 > ^ -5 > ^^^^^^^^^^^^^^^^^ -6 > ^ +5 > ^^^ +6 > ^^^^^^^^^^^^^^ +7 > ^ 1-> > > 2 > 3 > const 4 > s -5 > = "Hello, world" -6 > ; +5 > = +6 > "Hello, world" +7 > ; 1->Emitted(4, 1) Source(5, 1) + SourceIndex(0) 2 >Emitted(4, 9) Source(5, 1) + SourceIndex(0) 3 >Emitted(4, 15) Source(5, 7) + SourceIndex(0) 4 >Emitted(4, 16) Source(5, 8) + SourceIndex(0) -5 >Emitted(4, 33) Source(5, 25) + SourceIndex(0) -6 >Emitted(4, 34) Source(5, 26) + SourceIndex(0) +5 >Emitted(4, 19) Source(5, 11) + SourceIndex(0) +6 >Emitted(4, 33) Source(5, 25) + SourceIndex(0) +7 >Emitted(4, 34) Source(5, 26) + SourceIndex(0) --- >>>interface NoJsForHereEither { 1 > diff --git a/tests/baselines/reference/tsbuild/outFile/when-final-project-specifies-tsBuildInfoFile.js b/tests/baselines/reference/tsbuild/outFile/when-final-project-specifies-tsBuildInfoFile.js index 4a7842b695de1..c0238f63acca1 100644 --- a/tests/baselines/reference/tsbuild/outFile/when-final-project-specifies-tsBuildInfoFile.js +++ b/tests/baselines/reference/tsbuild/outFile/when-final-project-specifies-tsBuildInfoFile.js @@ -594,7 +594,7 @@ declare function f(): string; //# sourceMappingURL=first-output.d.ts.map //// [/src/first/bin/first-output.d.ts.map] -{"version":3,"file":"first-output.d.ts","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AAAA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,iBAAiB,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;AERD,iBAAS,CAAC,WAET"} +{"version":3,"file":"first-output.d.ts","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AAAA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,GAAG,cAAc,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;AERD,iBAAS,CAAC,WAET"} //// [/src/first/bin/first-output.d.ts.map.baseline.txt] =================================================================== @@ -648,22 +648,25 @@ sourceFile:../first_PART1.ts 2 >^^^^^^^^ 3 > ^^^^^^ 4 > ^ -5 > ^^^^^^^^^^^^^^^^^ -6 > ^ +5 > ^^^ +6 > ^^^^^^^^^^^^^^ +7 > ^ 1-> > > 2 > 3 > const 4 > s -5 > = "Hello, world" -6 > ; +5 > = +6 > "Hello, world" +7 > ; 1->Emitted(4, 1) Source(5, 1) + SourceIndex(0) 2 >Emitted(4, 9) Source(5, 1) + SourceIndex(0) 3 >Emitted(4, 15) Source(5, 7) + SourceIndex(0) 4 >Emitted(4, 16) Source(5, 8) + SourceIndex(0) -5 >Emitted(4, 33) Source(5, 25) + SourceIndex(0) -6 >Emitted(4, 34) Source(5, 26) + SourceIndex(0) +5 >Emitted(4, 19) Source(5, 11) + SourceIndex(0) +6 >Emitted(4, 33) Source(5, 25) + SourceIndex(0) +7 >Emitted(4, 34) Source(5, 26) + SourceIndex(0) --- >>>interface NoJsForHereEither { 1 > diff --git a/tests/baselines/reference/tsbuild/outFile/when-input-file-text-does-not-change-but-its-modified-time-changes.js b/tests/baselines/reference/tsbuild/outFile/when-input-file-text-does-not-change-but-its-modified-time-changes.js index 36e58a0608de9..2c31c3e7a7c06 100644 --- a/tests/baselines/reference/tsbuild/outFile/when-input-file-text-does-not-change-but-its-modified-time-changes.js +++ b/tests/baselines/reference/tsbuild/outFile/when-input-file-text-does-not-change-but-its-modified-time-changes.js @@ -242,7 +242,7 @@ declare function f(): string; //# sourceMappingURL=first-output.d.ts.map //// [/src/first/bin/first-output.d.ts.map] -{"version":3,"file":"first-output.d.ts","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AAAA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,iBAAiB,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;AERD,iBAAS,CAAC,WAET"} +{"version":3,"file":"first-output.d.ts","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AAAA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,GAAG,cAAc,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;AERD,iBAAS,CAAC,WAET"} //// [/src/first/bin/first-output.js] var s = "Hello, world"; diff --git a/tests/baselines/reference/tsbuild/sample1/always-builds-under-with-force-option.js b/tests/baselines/reference/tsbuild/sample1/always-builds-under-with-force-option.js index 2f0bcf8d75a19..4d9bd8611337f 100644 --- a/tests/baselines/reference/tsbuild/sample1/always-builds-under-with-force-option.js +++ b/tests/baselines/reference/tsbuild/sample1/always-builds-under-with-force-option.js @@ -106,7 +106,7 @@ export declare const World = "hello"; //# sourceMappingURL=anotherModule.d.ts.map //// [/user/username/projects/sample1/core/anotherModule.d.ts.map] -{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,GAAG,OAAO,CAAC"} //// [/user/username/projects/sample1/core/anotherModule.js] "use strict"; diff --git a/tests/baselines/reference/tsbuild/sample1/building-using-buildReferencedProject.js b/tests/baselines/reference/tsbuild/sample1/building-using-buildReferencedProject.js index 1f8ee41ea5a2c..a9836b46b7b4a 100644 --- a/tests/baselines/reference/tsbuild/sample1/building-using-buildReferencedProject.js +++ b/tests/baselines/reference/tsbuild/sample1/building-using-buildReferencedProject.js @@ -117,7 +117,7 @@ export declare const World = "hello"; //# sourceMappingURL=anotherModule.d.ts.map //// [/user/username/projects/sample1/core/anotherModule.d.ts.map] -{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,GAAG,OAAO,CAAC"} //// [/user/username/projects/sample1/core/anotherModule.js] "use strict"; diff --git a/tests/baselines/reference/tsbuild/sample1/building-using-getNextInvalidatedProject.js b/tests/baselines/reference/tsbuild/sample1/building-using-getNextInvalidatedProject.js index 494308edb29dc..d4cd675963b80 100644 --- a/tests/baselines/reference/tsbuild/sample1/building-using-getNextInvalidatedProject.js +++ b/tests/baselines/reference/tsbuild/sample1/building-using-getNextInvalidatedProject.js @@ -104,7 +104,7 @@ exports.World = "hello"; //// [/user/username/projects/sample1/core/anotherModule.d.ts.map] -{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,GAAG,OAAO,CAAC"} //// [/user/username/projects/sample1/core/anotherModule.d.ts] export declare const World = "hello"; diff --git a/tests/baselines/reference/tsbuild/sample1/builds-correctly-when-declarationDir-is-specified.js b/tests/baselines/reference/tsbuild/sample1/builds-correctly-when-declarationDir-is-specified.js index 14bdf9eee05f5..3d5e503ae5a53 100644 --- a/tests/baselines/reference/tsbuild/sample1/builds-correctly-when-declarationDir-is-specified.js +++ b/tests/baselines/reference/tsbuild/sample1/builds-correctly-when-declarationDir-is-specified.js @@ -105,7 +105,7 @@ export declare const World = "hello"; //# sourceMappingURL=anotherModule.d.ts.map //// [/user/username/projects/sample1/core/anotherModule.d.ts.map] -{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,GAAG,OAAO,CAAC"} //// [/user/username/projects/sample1/core/anotherModule.js] "use strict"; diff --git a/tests/baselines/reference/tsbuild/sample1/builds-correctly-when-outDir-is-specified.js b/tests/baselines/reference/tsbuild/sample1/builds-correctly-when-outDir-is-specified.js index 678882ec25ebc..7b0e944055766 100644 --- a/tests/baselines/reference/tsbuild/sample1/builds-correctly-when-outDir-is-specified.js +++ b/tests/baselines/reference/tsbuild/sample1/builds-correctly-when-outDir-is-specified.js @@ -105,7 +105,7 @@ export declare const World = "hello"; //# sourceMappingURL=anotherModule.d.ts.map //// [/user/username/projects/sample1/core/anotherModule.d.ts.map] -{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,GAAG,OAAO,CAAC"} //// [/user/username/projects/sample1/core/anotherModule.js] "use strict"; diff --git a/tests/baselines/reference/tsbuild/sample1/builds-correctly-when-project-is-not-composite-or-doesnt-have-any-references.js b/tests/baselines/reference/tsbuild/sample1/builds-correctly-when-project-is-not-composite-or-doesnt-have-any-references.js index 43c207d11658e..8867e53f5609e 100644 --- a/tests/baselines/reference/tsbuild/sample1/builds-correctly-when-project-is-not-composite-or-doesnt-have-any-references.js +++ b/tests/baselines/reference/tsbuild/sample1/builds-correctly-when-project-is-not-composite-or-doesnt-have-any-references.js @@ -113,7 +113,7 @@ export declare const World = "hello"; //# sourceMappingURL=anotherModule.d.ts.map //// [/user/username/projects/sample1/core/anotherModule.d.ts.map] -{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,GAAG,OAAO,CAAC"} //// [/user/username/projects/sample1/core/anotherModule.js] "use strict"; diff --git a/tests/baselines/reference/tsbuild/sample1/builds-till-project-specified.js b/tests/baselines/reference/tsbuild/sample1/builds-till-project-specified.js index 6ef298318b121..19eb743c30d1d 100644 --- a/tests/baselines/reference/tsbuild/sample1/builds-till-project-specified.js +++ b/tests/baselines/reference/tsbuild/sample1/builds-till-project-specified.js @@ -105,7 +105,7 @@ export declare const World = "hello"; //# sourceMappingURL=anotherModule.d.ts.map //// [/user/username/projects/sample1/core/anotherModule.d.ts.map] -{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,GAAG,OAAO,CAAC"} //// [/user/username/projects/sample1/core/anotherModule.js] "use strict"; diff --git a/tests/baselines/reference/tsbuild/sample1/can-detect-when-and-what-to-rebuild.js b/tests/baselines/reference/tsbuild/sample1/can-detect-when-and-what-to-rebuild.js index 8f9c47bdb23f8..6bf6603da2943 100644 --- a/tests/baselines/reference/tsbuild/sample1/can-detect-when-and-what-to-rebuild.js +++ b/tests/baselines/reference/tsbuild/sample1/can-detect-when-and-what-to-rebuild.js @@ -20,7 +20,7 @@ export declare const World = "hello"; //# sourceMappingURL=anotherModule.d.ts.map //// [/user/username/projects/sample1/core/anotherModule.d.ts.map] -{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,GAAG,OAAO,CAAC"} //// [/user/username/projects/sample1/core/anotherModule.js] "use strict"; diff --git a/tests/baselines/reference/tsbuild/sample1/cleaning-project-in-not-build-order-doesnt-throw-error.js b/tests/baselines/reference/tsbuild/sample1/cleaning-project-in-not-build-order-doesnt-throw-error.js index f85d2bb6659b7..03e7c05c22218 100644 --- a/tests/baselines/reference/tsbuild/sample1/cleaning-project-in-not-build-order-doesnt-throw-error.js +++ b/tests/baselines/reference/tsbuild/sample1/cleaning-project-in-not-build-order-doesnt-throw-error.js @@ -19,7 +19,7 @@ export declare const World = "hello"; //# sourceMappingURL=anotherModule.d.ts.map //// [/user/username/projects/sample1/core/anotherModule.d.ts.map] -{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,GAAG,OAAO,CAAC"} //// [/user/username/projects/sample1/core/anotherModule.js] "use strict"; diff --git a/tests/baselines/reference/tsbuild/sample1/cleans-till-project-specified.js b/tests/baselines/reference/tsbuild/sample1/cleans-till-project-specified.js index 8ba2e1061db98..ce2acb292f567 100644 --- a/tests/baselines/reference/tsbuild/sample1/cleans-till-project-specified.js +++ b/tests/baselines/reference/tsbuild/sample1/cleans-till-project-specified.js @@ -19,7 +19,7 @@ export declare const World = "hello"; //# sourceMappingURL=anotherModule.d.ts.map //// [/user/username/projects/sample1/core/anotherModule.d.ts.map] -{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,GAAG,OAAO,CAAC"} //// [/user/username/projects/sample1/core/anotherModule.js] "use strict"; diff --git a/tests/baselines/reference/tsbuild/sample1/does-not-build-downstream-projects-if-upstream-projects-have-errors.js b/tests/baselines/reference/tsbuild/sample1/does-not-build-downstream-projects-if-upstream-projects-have-errors.js index 499b379c0daf4..86df4effb5200 100644 --- a/tests/baselines/reference/tsbuild/sample1/does-not-build-downstream-projects-if-upstream-projects-have-errors.js +++ b/tests/baselines/reference/tsbuild/sample1/does-not-build-downstream-projects-if-upstream-projects-have-errors.js @@ -131,7 +131,7 @@ export declare const World = "hello"; //# sourceMappingURL=anotherModule.d.ts.map //// [/user/username/projects/sample1/core/anotherModule.d.ts.map] -{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,GAAG,OAAO,CAAC"} //// [/user/username/projects/sample1/core/anotherModule.js] "use strict"; diff --git a/tests/baselines/reference/tsbuild/sample1/does-not-rebuild-if-there-is-no-program-and-bundle-in-the-ts-build-info-event-if-version-doesnt-match-ts-version.js b/tests/baselines/reference/tsbuild/sample1/does-not-rebuild-if-there-is-no-program-and-bundle-in-the-ts-build-info-event-if-version-doesnt-match-ts-version.js index 7ed1c51874b43..93551527b6e9e 100644 --- a/tests/baselines/reference/tsbuild/sample1/does-not-rebuild-if-there-is-no-program-and-bundle-in-the-ts-build-info-event-if-version-doesnt-match-ts-version.js +++ b/tests/baselines/reference/tsbuild/sample1/does-not-rebuild-if-there-is-no-program-and-bundle-in-the-ts-build-info-event-if-version-doesnt-match-ts-version.js @@ -19,7 +19,7 @@ export declare const World = "hello"; //# sourceMappingURL=anotherModule.d.ts.map //// [/user/username/projects/sample1/core/anotherModule.d.ts.map] -{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,GAAG,OAAO,CAAC"} //// [/user/username/projects/sample1/core/anotherModule.js] "use strict"; diff --git a/tests/baselines/reference/tsbuild/sample1/explainFiles.js b/tests/baselines/reference/tsbuild/sample1/explainFiles.js index af00dc984bb75..dab6999cf077c 100644 --- a/tests/baselines/reference/tsbuild/sample1/explainFiles.js +++ b/tests/baselines/reference/tsbuild/sample1/explainFiles.js @@ -155,7 +155,7 @@ export declare const World = "hello"; //# sourceMappingURL=anotherModule.d.ts.map //// [/user/username/projects/sample1/core/anotherModule.d.ts.map] -{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,GAAG,OAAO,CAAC"} //// [/user/username/projects/sample1/core/anotherModule.js] "use strict"; diff --git a/tests/baselines/reference/tsbuild/sample1/indicates-that-it-would-skip-builds-during-a-dry-build.js b/tests/baselines/reference/tsbuild/sample1/indicates-that-it-would-skip-builds-during-a-dry-build.js index d90d36bad006c..5fbe40be80de8 100644 --- a/tests/baselines/reference/tsbuild/sample1/indicates-that-it-would-skip-builds-during-a-dry-build.js +++ b/tests/baselines/reference/tsbuild/sample1/indicates-that-it-would-skip-builds-during-a-dry-build.js @@ -20,7 +20,7 @@ export declare const World = "hello"; //# sourceMappingURL=anotherModule.d.ts.map //// [/user/username/projects/sample1/core/anotherModule.d.ts.map] -{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,GAAG,OAAO,CAAC"} //// [/user/username/projects/sample1/core/anotherModule.js] "use strict"; diff --git a/tests/baselines/reference/tsbuild/sample1/invalidates-projects-correctly.js b/tests/baselines/reference/tsbuild/sample1/invalidates-projects-correctly.js index 7789275c4fa01..129a78a35a0f3 100644 --- a/tests/baselines/reference/tsbuild/sample1/invalidates-projects-correctly.js +++ b/tests/baselines/reference/tsbuild/sample1/invalidates-projects-correctly.js @@ -99,7 +99,7 @@ exports.World = "hello"; //// [/user/username/projects/sample1/core/anotherModule.d.ts.map] -{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,GAAG,OAAO,CAAC"} //// [/user/username/projects/sample1/core/anotherModule.d.ts] export declare const World = "hello"; diff --git a/tests/baselines/reference/tsbuild/sample1/listEmittedFiles.js b/tests/baselines/reference/tsbuild/sample1/listEmittedFiles.js index 3872eebef86e8..4de3ab6217025 100644 --- a/tests/baselines/reference/tsbuild/sample1/listEmittedFiles.js +++ b/tests/baselines/reference/tsbuild/sample1/listEmittedFiles.js @@ -120,7 +120,7 @@ export declare const World = "hello"; //# sourceMappingURL=anotherModule.d.ts.map //// [/user/username/projects/sample1/core/anotherModule.d.ts.map] -{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,GAAG,OAAO,CAAC"} //// [/user/username/projects/sample1/core/anotherModule.js] "use strict"; diff --git a/tests/baselines/reference/tsbuild/sample1/listFiles.js b/tests/baselines/reference/tsbuild/sample1/listFiles.js index d2a172d60296b..5bad1d4869983 100644 --- a/tests/baselines/reference/tsbuild/sample1/listFiles.js +++ b/tests/baselines/reference/tsbuild/sample1/listFiles.js @@ -119,7 +119,7 @@ export declare const World = "hello"; //# sourceMappingURL=anotherModule.d.ts.map //// [/user/username/projects/sample1/core/anotherModule.d.ts.map] -{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,GAAG,OAAO,CAAC"} //// [/user/username/projects/sample1/core/anotherModule.js] "use strict"; diff --git a/tests/baselines/reference/tsbuild/sample1/rebuilds-completely-when-version-in-tsbuildinfo-doesnt-match-ts-version.js b/tests/baselines/reference/tsbuild/sample1/rebuilds-completely-when-version-in-tsbuildinfo-doesnt-match-ts-version.js index e0704eaa8ddc2..d01b973a38c2a 100644 --- a/tests/baselines/reference/tsbuild/sample1/rebuilds-completely-when-version-in-tsbuildinfo-doesnt-match-ts-version.js +++ b/tests/baselines/reference/tsbuild/sample1/rebuilds-completely-when-version-in-tsbuildinfo-doesnt-match-ts-version.js @@ -19,7 +19,7 @@ export declare const World = "hello"; //# sourceMappingURL=anotherModule.d.ts.map //// [/user/username/projects/sample1/core/anotherModule.d.ts.map] -{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,GAAG,OAAO,CAAC"} //// [/user/username/projects/sample1/core/anotherModule.js] "use strict"; diff --git a/tests/baselines/reference/tsbuild/sample1/rebuilds-from-start-if-force-option-is-set.js b/tests/baselines/reference/tsbuild/sample1/rebuilds-from-start-if-force-option-is-set.js index d16da96620b73..8efb9782efccf 100644 --- a/tests/baselines/reference/tsbuild/sample1/rebuilds-from-start-if-force-option-is-set.js +++ b/tests/baselines/reference/tsbuild/sample1/rebuilds-from-start-if-force-option-is-set.js @@ -20,7 +20,7 @@ export declare const World = "hello"; //# sourceMappingURL=anotherModule.d.ts.map //// [/user/username/projects/sample1/core/anotherModule.d.ts.map] -{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,GAAG,OAAO,CAAC"} //// [/user/username/projects/sample1/core/anotherModule.js] "use strict"; diff --git a/tests/baselines/reference/tsbuild/sample1/rebuilds-when-extended-config-file-changes.js b/tests/baselines/reference/tsbuild/sample1/rebuilds-when-extended-config-file-changes.js index 4b4c3846bffbe..18c3fde6c9a76 100644 --- a/tests/baselines/reference/tsbuild/sample1/rebuilds-when-extended-config-file-changes.js +++ b/tests/baselines/reference/tsbuild/sample1/rebuilds-when-extended-config-file-changes.js @@ -130,7 +130,7 @@ export declare const World = "hello"; //# sourceMappingURL=anotherModule.d.ts.map //// [/user/username/projects/sample1/core/anotherModule.d.ts.map] -{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,GAAG,OAAO,CAAC"} //// [/user/username/projects/sample1/core/anotherModule.js] "use strict"; diff --git a/tests/baselines/reference/tsbuild/sample1/removes-all-files-it-built.js b/tests/baselines/reference/tsbuild/sample1/removes-all-files-it-built.js index 29a8d60890a8e..e9682f26998aa 100644 --- a/tests/baselines/reference/tsbuild/sample1/removes-all-files-it-built.js +++ b/tests/baselines/reference/tsbuild/sample1/removes-all-files-it-built.js @@ -20,7 +20,7 @@ export declare const World = "hello"; //# sourceMappingURL=anotherModule.d.ts.map //// [/user/username/projects/sample1/core/anotherModule.d.ts.map] -{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,GAAG,OAAO,CAAC"} //// [/user/username/projects/sample1/core/anotherModule.js] "use strict"; diff --git a/tests/baselines/reference/tsbuild/sample1/sample.js b/tests/baselines/reference/tsbuild/sample1/sample.js index 9e2d8c7fa04c6..7d6086945144e 100644 --- a/tests/baselines/reference/tsbuild/sample1/sample.js +++ b/tests/baselines/reference/tsbuild/sample1/sample.js @@ -135,7 +135,7 @@ export declare const World = "hello"; //# sourceMappingURL=anotherModule.d.ts.map //// [/user/username/projects/sample1/core/anotherModule.d.ts.map] -{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,GAAG,OAAO,CAAC"} //// [/user/username/projects/sample1/core/anothermodule.d.ts.map.baseline.txt] =================================================================== @@ -153,21 +153,24 @@ sourceFile:anotherModule.ts 2 >^^^^^^^^^^^^^^^ 3 > ^^^^^^ 4 > ^^^^^ -5 > ^^^^^^^^^^ -6 > ^ -7 > ^^^^^-> +5 > ^^^ +6 > ^^^^^^^ +7 > ^ +8 > ^^^^^-> 1 > 2 >export 3 > const 4 > World -5 > = "hello" -6 > ; +5 > = +6 > "hello" +7 > ; 1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) 2 >Emitted(1, 16) Source(1, 8) + SourceIndex(0) 3 >Emitted(1, 22) Source(1, 14) + SourceIndex(0) 4 >Emitted(1, 27) Source(1, 19) + SourceIndex(0) -5 >Emitted(1, 37) Source(1, 29) + SourceIndex(0) -6 >Emitted(1, 38) Source(1, 30) + SourceIndex(0) +5 >Emitted(1, 30) Source(1, 22) + SourceIndex(0) +6 >Emitted(1, 37) Source(1, 29) + SourceIndex(0) +7 >Emitted(1, 38) Source(1, 30) + SourceIndex(0) --- >>>//# sourceMappingURL=anotherModule.d.ts.map diff --git a/tests/baselines/reference/tsbuild/sample1/when-declarationMap-changes.js b/tests/baselines/reference/tsbuild/sample1/when-declarationMap-changes.js index a4638c605d28e..ab0a128d0c13a 100644 --- a/tests/baselines/reference/tsbuild/sample1/when-declarationMap-changes.js +++ b/tests/baselines/reference/tsbuild/sample1/when-declarationMap-changes.js @@ -123,7 +123,7 @@ export declare const World = "hello"; //# sourceMappingURL=anotherModule.d.ts.map //// [/user/username/projects/sample1/core/anotherModule.d.ts.map] -{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,GAAG,OAAO,CAAC"} //// [/user/username/projects/sample1/core/anotherModule.js] "use strict"; diff --git a/tests/baselines/reference/tsbuild/sample1/when-esModuleInterop-option-changes.js b/tests/baselines/reference/tsbuild/sample1/when-esModuleInterop-option-changes.js index 50bbb530933b6..0af2ddc699580 100644 --- a/tests/baselines/reference/tsbuild/sample1/when-esModuleInterop-option-changes.js +++ b/tests/baselines/reference/tsbuild/sample1/when-esModuleInterop-option-changes.js @@ -124,7 +124,7 @@ export declare const World = "hello"; //# sourceMappingURL=anotherModule.d.ts.map //// [/user/username/projects/sample1/core/anotherModule.d.ts.map] -{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,GAAG,OAAO,CAAC"} //// [/user/username/projects/sample1/core/anotherModule.js] "use strict"; diff --git a/tests/baselines/reference/tsbuild/sample1/when-input-file-text-does-not-change-but-its-modified-time-changes.js b/tests/baselines/reference/tsbuild/sample1/when-input-file-text-does-not-change-but-its-modified-time-changes.js index fee7ea16c4639..594e102c7bbeb 100644 --- a/tests/baselines/reference/tsbuild/sample1/when-input-file-text-does-not-change-but-its-modified-time-changes.js +++ b/tests/baselines/reference/tsbuild/sample1/when-input-file-text-does-not-change-but-its-modified-time-changes.js @@ -123,7 +123,7 @@ export declare const World = "hello"; //# sourceMappingURL=anotherModule.d.ts.map //// [/user/username/projects/sample1/core/anotherModule.d.ts.map] -{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,GAAG,OAAO,CAAC"} //// [/user/username/projects/sample1/core/anotherModule.js] "use strict"; diff --git a/tests/baselines/reference/tsbuild/sample1/when-logic-specifies-tsBuildInfoFile.js b/tests/baselines/reference/tsbuild/sample1/when-logic-specifies-tsBuildInfoFile.js index 2cef5fe7eca40..2858911e0ee2e 100644 --- a/tests/baselines/reference/tsbuild/sample1/when-logic-specifies-tsBuildInfoFile.js +++ b/tests/baselines/reference/tsbuild/sample1/when-logic-specifies-tsBuildInfoFile.js @@ -136,7 +136,7 @@ export declare const World = "hello"; //# sourceMappingURL=anotherModule.d.ts.map //// [/user/username/projects/sample1/core/anotherModule.d.ts.map] -{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,GAAG,OAAO,CAAC"} //// [/user/username/projects/sample1/core/anothermodule.d.ts.map.baseline.txt] =================================================================== @@ -154,21 +154,24 @@ sourceFile:anotherModule.ts 2 >^^^^^^^^^^^^^^^ 3 > ^^^^^^ 4 > ^^^^^ -5 > ^^^^^^^^^^ -6 > ^ -7 > ^^^^^-> +5 > ^^^ +6 > ^^^^^^^ +7 > ^ +8 > ^^^^^-> 1 > 2 >export 3 > const 4 > World -5 > = "hello" -6 > ; +5 > = +6 > "hello" +7 > ; 1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) 2 >Emitted(1, 16) Source(1, 8) + SourceIndex(0) 3 >Emitted(1, 22) Source(1, 14) + SourceIndex(0) 4 >Emitted(1, 27) Source(1, 19) + SourceIndex(0) -5 >Emitted(1, 37) Source(1, 29) + SourceIndex(0) -6 >Emitted(1, 38) Source(1, 30) + SourceIndex(0) +5 >Emitted(1, 30) Source(1, 22) + SourceIndex(0) +6 >Emitted(1, 37) Source(1, 29) + SourceIndex(0) +7 >Emitted(1, 38) Source(1, 30) + SourceIndex(0) --- >>>//# sourceMappingURL=anotherModule.d.ts.map diff --git a/tests/baselines/reference/tsbuildWatch/programUpdates/creates-solution-in-watch-mode.js b/tests/baselines/reference/tsbuildWatch/programUpdates/creates-solution-in-watch-mode.js index d4d9a66b8d8e5..739d3ceb02b1f 100644 --- a/tests/baselines/reference/tsbuildWatch/programUpdates/creates-solution-in-watch-mode.js +++ b/tests/baselines/reference/tsbuildWatch/programUpdates/creates-solution-in-watch-mode.js @@ -110,7 +110,7 @@ exports.World = "hello"; //// [/user/username/projects/sample1/core/anotherModule.d.ts.map] -{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,GAAG,OAAO,CAAC"} //// [/user/username/projects/sample1/core/anotherModule.d.ts] export declare const World = "hello"; diff --git a/tests/baselines/reference/tsbuildWatch/programUpdates/incremental-updates-in-verbose-mode.js b/tests/baselines/reference/tsbuildWatch/programUpdates/incremental-updates-in-verbose-mode.js index 0b33f30cc713a..5e490c4a701ef 100644 --- a/tests/baselines/reference/tsbuildWatch/programUpdates/incremental-updates-in-verbose-mode.js +++ b/tests/baselines/reference/tsbuildWatch/programUpdates/incremental-updates-in-verbose-mode.js @@ -127,7 +127,7 @@ exports.World = "hello"; //// [/user/username/projects/sample1/core/anotherModule.d.ts.map] -{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,GAAG,OAAO,CAAC"} //// [/user/username/projects/sample1/core/anotherModule.d.ts] export declare const World = "hello"; diff --git a/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/when-preserveWatchOutput-is-not-used.js b/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/when-preserveWatchOutput-is-not-used.js index af3fde1e19fc0..d172e0baa6dc5 100644 --- a/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/when-preserveWatchOutput-is-not-used.js +++ b/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/when-preserveWatchOutput-is-not-used.js @@ -110,7 +110,7 @@ exports.World = "hello"; //// [/user/username/projects/sample1/core/anotherModule.d.ts.map] -{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,GAAG,OAAO,CAAC"} //// [/user/username/projects/sample1/core/anotherModule.d.ts] export declare const World = "hello"; diff --git a/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/when-preserveWatchOutput-is-passed-on-command-line.js b/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/when-preserveWatchOutput-is-passed-on-command-line.js index 2a033153111c2..4ba8b0edba4e0 100644 --- a/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/when-preserveWatchOutput-is-passed-on-command-line.js +++ b/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/when-preserveWatchOutput-is-passed-on-command-line.js @@ -109,7 +109,7 @@ exports.World = "hello"; //// [/user/username/projects/sample1/core/anotherModule.d.ts.map] -{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,GAAG,OAAO,CAAC"} //// [/user/username/projects/sample1/core/anotherModule.d.ts] export declare const World = "hello"; diff --git a/tests/baselines/reference/tsbuildWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit.js b/tests/baselines/reference/tsbuildWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit.js index bc25b98c416c8..51367997b93f0 100644 --- a/tests/baselines/reference/tsbuildWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit.js +++ b/tests/baselines/reference/tsbuildWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit.js @@ -117,7 +117,7 @@ exports.World = "hello"; //// [/user/username/projects/sample1/core/anotherModule.d.ts.map] -{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,GAAG,OAAO,CAAC"} //// [/user/username/projects/sample1/core/anotherModule.d.ts] export declare const World = "hello"; @@ -406,7 +406,7 @@ exports.y = 10; //// [/user/username/projects/sample1/core/file3.d.ts.map] -{"version":3,"file":"file3.d.ts","sourceRoot":"","sources":["file3.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,CAAC,KAAK,CAAC"} +{"version":3,"file":"file3.d.ts","sourceRoot":"","sources":["file3.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,CAAC,GAAG,EAAE,CAAC"} //// [/user/username/projects/sample1/core/file3.d.ts] export declare const y = 10; diff --git a/tests/baselines/reference/tsbuildWatch/programUpdates/verify-building-references-watches-only-those-projects.js b/tests/baselines/reference/tsbuildWatch/programUpdates/verify-building-references-watches-only-those-projects.js index b1d0f62c3cf50..c0db221f0acf4 100644 --- a/tests/baselines/reference/tsbuildWatch/programUpdates/verify-building-references-watches-only-those-projects.js +++ b/tests/baselines/reference/tsbuildWatch/programUpdates/verify-building-references-watches-only-those-projects.js @@ -110,7 +110,7 @@ exports.World = "hello"; //// [/user/username/projects/sample1/core/anotherModule.d.ts.map] -{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,GAAG,OAAO,CAAC"} //// [/user/username/projects/sample1/core/anotherModule.d.ts] export declare const World = "hello"; diff --git a/tests/baselines/reference/tsbuildWatch/programUpdates/watches-config-files-that-are-not-present.js b/tests/baselines/reference/tsbuildWatch/programUpdates/watches-config-files-that-are-not-present.js index 9b0eb98042624..9a65beb8a0894 100644 --- a/tests/baselines/reference/tsbuildWatch/programUpdates/watches-config-files-that-are-not-present.js +++ b/tests/baselines/reference/tsbuildWatch/programUpdates/watches-config-files-that-are-not-present.js @@ -96,7 +96,7 @@ exports.World = "hello"; //// [/user/username/projects/sample1/core/anotherModule.d.ts.map] -{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,GAAG,OAAO,CAAC"} //// [/user/username/projects/sample1/core/anotherModule.d.ts] export declare const World = "hello"; diff --git a/tests/baselines/reference/tsbuildWatch/programUpdates/with-simple-project-reference-graph/builds-when-new-file-is-added,-and-its-subsequent-updates.js b/tests/baselines/reference/tsbuildWatch/programUpdates/with-simple-project-reference-graph/builds-when-new-file-is-added,-and-its-subsequent-updates.js index 71a21f941fb32..226f9aca21b50 100644 --- a/tests/baselines/reference/tsbuildWatch/programUpdates/with-simple-project-reference-graph/builds-when-new-file-is-added,-and-its-subsequent-updates.js +++ b/tests/baselines/reference/tsbuildWatch/programUpdates/with-simple-project-reference-graph/builds-when-new-file-is-added,-and-its-subsequent-updates.js @@ -110,7 +110,7 @@ exports.World = "hello"; //// [/user/username/projects/sample1/core/anotherModule.d.ts.map] -{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,GAAG,OAAO,CAAC"} //// [/user/username/projects/sample1/core/anotherModule.d.ts] export declare const World = "hello"; @@ -678,7 +678,7 @@ exports.newFileConst = 30; //// [/user/username/projects/sample1/core/newfile.d.ts.map] -{"version":3,"file":"newfile.d.ts","sourceRoot":"","sources":["newfile.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,KAAK,CAAC"} +{"version":3,"file":"newfile.d.ts","sourceRoot":"","sources":["newfile.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,GAAG,EAAE,CAAC"} //// [/user/username/projects/sample1/core/newfile.d.ts] export declare const newFileConst = 30; @@ -937,7 +937,7 @@ exports.someClass2 = someClass2; //// [/user/username/projects/sample1/core/newfile.d.ts.map] -{"version":3,"file":"newfile.d.ts","sourceRoot":"","sources":["newfile.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,KAAK,CAAC;AAC/B,qBAAa,UAAU;CAAI"} +{"version":3,"file":"newfile.d.ts","sourceRoot":"","sources":["newfile.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,GAAG,EAAE,CAAC;AAC/B,qBAAa,UAAU;CAAI"} //// [/user/username/projects/sample1/core/newfile.d.ts] export declare const newFileConst = 30; diff --git a/tests/baselines/reference/tsbuildWatch/programUpdates/with-simple-project-reference-graph/change-builds-changes-and-reports-found-errors-message.js b/tests/baselines/reference/tsbuildWatch/programUpdates/with-simple-project-reference-graph/change-builds-changes-and-reports-found-errors-message.js index ccc04ee7275b1..5ebb1a8847200 100644 --- a/tests/baselines/reference/tsbuildWatch/programUpdates/with-simple-project-reference-graph/change-builds-changes-and-reports-found-errors-message.js +++ b/tests/baselines/reference/tsbuildWatch/programUpdates/with-simple-project-reference-graph/change-builds-changes-and-reports-found-errors-message.js @@ -110,7 +110,7 @@ exports.World = "hello"; //// [/user/username/projects/sample1/core/anotherModule.d.ts.map] -{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,GAAG,OAAO,CAAC"} //// [/user/username/projects/sample1/core/anotherModule.d.ts] export declare const World = "hello"; diff --git a/tests/baselines/reference/tsbuildWatch/programUpdates/with-simple-project-reference-graph/non-local-change-does-not-start-build-of-referencing-projects.js b/tests/baselines/reference/tsbuildWatch/programUpdates/with-simple-project-reference-graph/non-local-change-does-not-start-build-of-referencing-projects.js index 41042117e194e..e2e1a76f8bc8f 100644 --- a/tests/baselines/reference/tsbuildWatch/programUpdates/with-simple-project-reference-graph/non-local-change-does-not-start-build-of-referencing-projects.js +++ b/tests/baselines/reference/tsbuildWatch/programUpdates/with-simple-project-reference-graph/non-local-change-does-not-start-build-of-referencing-projects.js @@ -110,7 +110,7 @@ exports.World = "hello"; //// [/user/username/projects/sample1/core/anotherModule.d.ts.map] -{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,GAAG,OAAO,CAAC"} //// [/user/username/projects/sample1/core/anotherModule.d.ts] export declare const World = "hello"; diff --git a/tests/baselines/reference/tsc/incremental/different-options-with-incremental-with-outFile.js b/tests/baselines/reference/tsc/incremental/different-options-with-incremental-with-outFile.js index 8fdc4924f846d..1b38b63f7838f 100644 --- a/tests/baselines/reference/tsc/incremental/different-options-with-incremental-with-outFile.js +++ b/tests/baselines/reference/tsc/incremental/different-options-with-incremental-with-outFile.js @@ -506,7 +506,7 @@ declare module "d" { //# sourceMappingURL=outFile.d.ts.map //// [/src/outFile.d.ts.map] -{"version":3,"file":"outFile.d.ts","sourceRoot":"","sources":["project/a.ts","project/b.ts","project/c.ts","project/d.ts"],"names":[],"mappings":";IAAA,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;;;ICApB,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;;;ICAI,MAAM,CAAC,MAAM,CAAC,KAAI,CAAC;;;ICAnB,MAAM,CAAC,MAAM,CAAC,KAAI,CAAC"} +{"version":3,"file":"outFile.d.ts","sourceRoot":"","sources":["project/a.ts","project/b.ts","project/c.ts","project/d.ts"],"names":[],"mappings":";IAAA,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC;;;ICApB,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC;;;ICAI,MAAM,CAAC,MAAM,CAAC,KAAI,CAAC;;;ICAnB,MAAM,CAAC,MAAM,CAAC,KAAI,CAAC"} //// [/src/outFile.tsbuildinfo] {"program":{"fileNames":["../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-18487752940-export const a = 10;const aLocal = 10;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"declaration":true,"declarationMap":true,"module":2,"outFile":"./outFile.js"}},"version":"FakeTSVersion"} diff --git a/tests/baselines/reference/tsc/incremental/different-options-with-incremental.js b/tests/baselines/reference/tsc/incremental/different-options-with-incremental.js index cdd2c8fe0e335..0e8dc1860c651 100644 --- a/tests/baselines/reference/tsc/incremental/different-options-with-incremental.js +++ b/tests/baselines/reference/tsc/incremental/different-options-with-incremental.js @@ -713,14 +713,14 @@ export declare const a = 10; //# sourceMappingURL=a.d.ts.map //// [/src/project/a.d.ts.map] -{"version":3,"file":"a.d.ts","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,CAAC,KAAK,CAAC"} +{"version":3,"file":"a.d.ts","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,CAAC,GAAG,EAAE,CAAC"} //// [/src/project/b.d.ts] export declare const b = 10; //# sourceMappingURL=b.d.ts.map //// [/src/project/b.d.ts.map] -{"version":3,"file":"b.d.ts","sourceRoot":"","sources":["b.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,CAAC,KAAK,CAAC"} +{"version":3,"file":"b.d.ts","sourceRoot":"","sources":["b.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,CAAC,GAAG,EAAE,CAAC"} //// [/src/project/c.d.ts] export declare const c = 10; diff --git a/tests/baselines/reference/tsc/incremental/different-options-with-outFile.js b/tests/baselines/reference/tsc/incremental/different-options-with-outFile.js index 5a63c62a53519..b3b3a0a83857f 100644 --- a/tests/baselines/reference/tsc/incremental/different-options-with-outFile.js +++ b/tests/baselines/reference/tsc/incremental/different-options-with-outFile.js @@ -506,7 +506,7 @@ declare module "d" { //# sourceMappingURL=outFile.d.ts.map //// [/src/outFile.d.ts.map] -{"version":3,"file":"outFile.d.ts","sourceRoot":"","sources":["project/a.ts","project/b.ts","project/c.ts","project/d.ts"],"names":[],"mappings":";IAAA,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;;;ICApB,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;;;ICAI,MAAM,CAAC,MAAM,CAAC,KAAI,CAAC;;;ICAnB,MAAM,CAAC,MAAM,CAAC,KAAI,CAAC"} +{"version":3,"file":"outFile.d.ts","sourceRoot":"","sources":["project/a.ts","project/b.ts","project/c.ts","project/d.ts"],"names":[],"mappings":";IAAA,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC;;;ICApB,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC;;;ICAI,MAAM,CAAC,MAAM,CAAC,KAAI,CAAC;;;ICAnB,MAAM,CAAC,MAAM,CAAC,KAAI,CAAC"} //// [/src/outFile.tsbuildinfo] {"program":{"fileNames":["../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-18487752940-export const a = 10;const aLocal = 10;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"composite":true,"declaration":true,"declarationMap":true,"module":2,"outFile":"./outFile.js"},"outSignature":"-25657667359-declare module \"a\" {\n export const a = 10;\n}\ndeclare module \"b\" {\n export const b = 10;\n}\ndeclare module \"c\" {\n export const c = 10;\n}\ndeclare module \"d\" {\n export const d = 10;\n}\n","latestChangedDtsFile":"./outFile.d.ts"},"version":"FakeTSVersion"} diff --git a/tests/baselines/reference/tsc/incremental/different-options.js b/tests/baselines/reference/tsc/incremental/different-options.js index ec8a6948c4850..d0803cab50557 100644 --- a/tests/baselines/reference/tsc/incremental/different-options.js +++ b/tests/baselines/reference/tsc/incremental/different-options.js @@ -681,14 +681,14 @@ export declare const a = 10; //# sourceMappingURL=a.d.ts.map //// [/src/project/a.d.ts.map] -{"version":3,"file":"a.d.ts","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,CAAC,KAAK,CAAC"} +{"version":3,"file":"a.d.ts","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,CAAC,GAAG,EAAE,CAAC"} //// [/src/project/b.d.ts] export declare const b = 10; //# sourceMappingURL=b.d.ts.map //// [/src/project/b.d.ts.map] -{"version":3,"file":"b.d.ts","sourceRoot":"","sources":["b.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,CAAC,KAAK,CAAC"} +{"version":3,"file":"b.d.ts","sourceRoot":"","sources":["b.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,CAAC,GAAG,EAAE,CAAC"} //// [/src/project/c.d.ts] export declare const c = 10; diff --git a/tests/baselines/reference/tsc/incremental/when-declarationMap-changes-with-outFile.js b/tests/baselines/reference/tsc/incremental/when-declarationMap-changes-with-outFile.js index 82fc73e8c15e5..bb77f53f92c24 100644 --- a/tests/baselines/reference/tsc/incremental/when-declarationMap-changes-with-outFile.js +++ b/tests/baselines/reference/tsc/incremental/when-declarationMap-changes-with-outFile.js @@ -129,7 +129,7 @@ declare const y = 10; //# sourceMappingURL=outFile.d.ts.map //// [/src/outFile.d.ts.map] -{"version":3,"file":"outFile.d.ts","sourceRoot":"","sources":["project/a.ts","project/b.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,CAAC,KAAK,CAAC;ACAb,QAAA,MAAM,CAAC,KAAK,CAAC"} +{"version":3,"file":"outFile.d.ts","sourceRoot":"","sources":["project/a.ts","project/b.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,CAAC,GAAG,EAAE,CAAC;ACAb,QAAA,MAAM,CAAC,GAAG,EAAE,CAAC"} //// [/src/outFile.tsbuildinfo] {"program":{"fileNames":["../lib/lib.d.ts","./project/a.ts","./project/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","5029505981-const x = 10;","2026006654-const y = 10;"],"root":[2,3],"options":{"composite":true,"declaration":true,"declarationMap":true,"noEmitOnError":true,"outFile":"./outFile.js"},"outSignature":"-2781996726-declare const x = 10;\ndeclare const y = 10;\n","latestChangedDtsFile":"./outFile.d.ts"},"version":"FakeTSVersion"} diff --git a/tests/baselines/reference/tsc/incremental/when-declarationMap-changes.js b/tests/baselines/reference/tsc/incremental/when-declarationMap-changes.js index de2715a3eaf26..e6ea19de433b0 100644 --- a/tests/baselines/reference/tsc/incremental/when-declarationMap-changes.js +++ b/tests/baselines/reference/tsc/incremental/when-declarationMap-changes.js @@ -269,7 +269,7 @@ declare const x = 10; //# sourceMappingURL=a.d.ts.map //// [/src/project/a.d.ts.map] -{"version":3,"file":"a.d.ts","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,CAAC,KAAK,CAAC"} +{"version":3,"file":"a.d.ts","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,CAAC,GAAG,EAAE,CAAC"} //// [/src/project/a.js] file written with same contents //// [/src/project/b.d.ts] @@ -277,7 +277,7 @@ declare const y = 10; //# sourceMappingURL=b.d.ts.map //// [/src/project/b.d.ts.map] -{"version":3,"file":"b.d.ts","sourceRoot":"","sources":["b.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,CAAC,KAAK,CAAC"} +{"version":3,"file":"b.d.ts","sourceRoot":"","sources":["b.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,CAAC,GAAG,EAAE,CAAC"} //// [/src/project/b.js] file written with same contents //// [/src/project/tsconfig.tsbuildinfo] diff --git a/tests/baselines/reference/tscWatch/projectsWithReferences/on-sample-project.js b/tests/baselines/reference/tscWatch/projectsWithReferences/on-sample-project.js index 4930012b4f9de..fc46748761615 100644 --- a/tests/baselines/reference/tscWatch/projectsWithReferences/on-sample-project.js +++ b/tests/baselines/reference/tscWatch/projectsWithReferences/on-sample-project.js @@ -100,7 +100,7 @@ exports.World = "hello"; //// [/user/username/projects/sample1/core/anotherModule.d.ts.map] -{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,GAAG,OAAO,CAAC"} //// [/user/username/projects/sample1/core/anotherModule.d.ts] export declare const World = "hello"; diff --git a/tests/baselines/reference/tscWatch/projectsWithReferences/when-declarationMap-changes-for-dependency.js b/tests/baselines/reference/tscWatch/projectsWithReferences/when-declarationMap-changes-for-dependency.js index 2010896535d8b..335716a33b76e 100644 --- a/tests/baselines/reference/tscWatch/projectsWithReferences/when-declarationMap-changes-for-dependency.js +++ b/tests/baselines/reference/tscWatch/projectsWithReferences/when-declarationMap-changes-for-dependency.js @@ -100,7 +100,7 @@ exports.World = "hello"; //// [/user/username/projects/sample1/core/anotherModule.d.ts.map] -{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,GAAG,OAAO,CAAC"} //// [/user/username/projects/sample1/core/anotherModule.d.ts] export declare const World = "hello"; diff --git a/tests/baselines/reference/tsserver/moduleResolution/using-referenced-project-built.js b/tests/baselines/reference/tsserver/moduleResolution/using-referenced-project-built.js index 0c7732786f0b5..90ca36506c19e 100644 --- a/tests/baselines/reference/tsserver/moduleResolution/using-referenced-project-built.js +++ b/tests/baselines/reference/tsserver/moduleResolution/using-referenced-project-built.js @@ -119,7 +119,7 @@ export const FOO = "bar"; //// [/home/src/projects/project/packages/package-a/build/subfolder/index.d.ts.map] -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/subfolder/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,GAAG,QAAQ,CAAC"} +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/subfolder/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,GAAG,GAAG,KAAK,CAAC"} //// [/home/src/projects/project/packages/package-a/build/subfolder/index.d.ts] export declare const FOO = "bar"; diff --git a/tests/baselines/reference/tsserver/projectReferences/ancestor-and-project-ref-management.js b/tests/baselines/reference/tsserver/projectReferences/ancestor-and-project-ref-management.js index 18077655cdbde..9877710ea3a4b 100644 --- a/tests/baselines/reference/tsserver/projectReferences/ancestor-and-project-ref-management.js +++ b/tests/baselines/reference/tsserver/projectReferences/ancestor-and-project-ref-management.js @@ -106,7 +106,7 @@ var container; //// [/user/username/projects/container/built/local/lib.d.ts.map] -{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":"AAAA,kBAAU,SAAS,CAAC;IACT,MAAM,OAAO,KAAK,CAAC;CAC7B"} +{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":"AAAA,kBAAU,SAAS,CAAC;IACT,MAAM,OAAO,GAAG,EAAE,CAAC;CAC7B"} //// [/user/username/projects/container/built/local/lib.d.ts] declare namespace container { diff --git a/tests/baselines/reference/tsserver/projectReferences/can-successfully-find-references-with-out-option.js b/tests/baselines/reference/tsserver/projectReferences/can-successfully-find-references-with-out-option.js index 5011c85fc8a50..a400e38916147 100644 --- a/tests/baselines/reference/tsserver/projectReferences/can-successfully-find-references-with-out-option.js +++ b/tests/baselines/reference/tsserver/projectReferences/can-successfully-find-references-with-out-option.js @@ -103,7 +103,7 @@ var container; //// [/user/username/projects/container/built/local/lib.d.ts.map] -{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":"AAAA,kBAAU,SAAS,CAAC;IACT,MAAM,OAAO,KAAK,CAAC;CAC7B"} +{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":"AAAA,kBAAU,SAAS,CAAC;IACT,MAAM,OAAO,GAAG,EAAE,CAAC;CAC7B"} //// [/user/username/projects/container/built/local/lib.d.ts] declare namespace container { diff --git a/tests/baselines/reference/tsserver/projectReferences/does-not-error-on-container-only-project.js b/tests/baselines/reference/tsserver/projectReferences/does-not-error-on-container-only-project.js index d9ab6ffcde09e..3edc10f3b02fc 100644 --- a/tests/baselines/reference/tsserver/projectReferences/does-not-error-on-container-only-project.js +++ b/tests/baselines/reference/tsserver/projectReferences/does-not-error-on-container-only-project.js @@ -103,7 +103,7 @@ var container; //// [/user/username/projects/container/built/local/lib.d.ts.map] -{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":"AAAA,kBAAU,SAAS,CAAC;IACT,MAAM,OAAO,KAAK,CAAC;CAC7B"} +{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":"AAAA,kBAAU,SAAS,CAAC;IACT,MAAM,OAAO,GAAG,EAAE,CAAC;CAC7B"} //// [/user/username/projects/container/built/local/lib.d.ts] declare namespace container { diff --git a/tests/baselines/reference/verbatim-declarations-literals.js b/tests/baselines/reference/verbatim-declarations-literals.js index 84945a4d2e938..e90f38faa5c64 100644 --- a/tests/baselines/reference/verbatim-declarations-literals.js +++ b/tests/baselines/reference/verbatim-declarations-literals.js @@ -61,18 +61,18 @@ declare enum E { declare const e: typeof E["some value"]; declare function f3(a: T, b: T): T; declare const x3: "abc" | "def"; -declare const octal = 14; -declare const octalParen = 14; +declare const octal = 0o16; +declare const octalParen = 0o16; declare const octalIndirect = 14; -declare const hex = 16; -declare const hexParen = 16; +declare const hex = 0x10; +declare const hexParen = 0x10; declare const hexIndirect = 16; -declare const seps = 1000000; -declare const sepsParen = 1000000; +declare const seps = 1_000_000; +declare const sepsParen = 1_000_000; declare const sepsIndirect = 1000000; -declare const singleQuote = "x"; -declare const singleQuoteParen = "x"; +declare const singleQuote = 'x'; +declare const singleQuoteParen = 'x'; declare const singleQuoteIndirect = "x"; -declare const noSubstTemplate = "Test"; -declare const noSubstTemplateParen = "Test"; +declare const noSubstTemplate = `Test`; +declare const noSubstTemplateParen = `Test`; declare const noSubstTemplateIndirect = "Test";