From 48f038067eded268d6a2894e4978890959ee2d9b Mon Sep 17 00:00:00 2001 From: Andrew Branch Date: Wed, 24 Apr 2019 11:35:18 -0700 Subject: [PATCH 01/45] Add crashing test --- tests/cases/compiler/noImplicitAnyLoopCrash.ts | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 tests/cases/compiler/noImplicitAnyLoopCrash.ts diff --git a/tests/cases/compiler/noImplicitAnyLoopCrash.ts b/tests/cases/compiler/noImplicitAnyLoopCrash.ts new file mode 100644 index 00000000000..d4380276506 --- /dev/null +++ b/tests/cases/compiler/noImplicitAnyLoopCrash.ts @@ -0,0 +1,5 @@ +// @noImplicitAny: true +let foo = () => {}; // if you remove or change foo definition to not a function, bug disappears +let bar; // if you add type annotation here, bug disappears +while (1) // if you remove while, bug disappears + bar = ~foo(...bar); // if you remove unary or spread operator, bug disappears \ No newline at end of file From 89497fcac9bc5fddda798f31c052695e84fa58da Mon Sep 17 00:00:00 2001 From: Andrew Branch Date: Wed, 24 Apr 2019 14:15:58 -0700 Subject: [PATCH 02/45] =?UTF-8?q?Don=E2=80=99t=20use=20checkExpressionCach?= =?UTF-8?q?ed=20when=20checking=20spread=20element=20inside=20a=20loop?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/compiler/checker.ts | 2 +- .../noImplicitAnyLoopCrash.errors.txt | 18 ++++++++++++++++ .../reference/noImplicitAnyLoopCrash.js | 14 +++++++++++++ .../reference/noImplicitAnyLoopCrash.symbols | 14 +++++++++++++ .../reference/noImplicitAnyLoopCrash.types | 21 +++++++++++++++++++ .../cases/compiler/noImplicitAnyLoopCrash.ts | 9 ++++---- 6 files changed, 73 insertions(+), 5 deletions(-) create mode 100644 tests/baselines/reference/noImplicitAnyLoopCrash.errors.txt create mode 100644 tests/baselines/reference/noImplicitAnyLoopCrash.js create mode 100644 tests/baselines/reference/noImplicitAnyLoopCrash.symbols create mode 100644 tests/baselines/reference/noImplicitAnyLoopCrash.types diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 22a658a0f7a..d53253e6558 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -20708,7 +20708,7 @@ namespace ts { // of the argument is a tuple type, spread the tuple elements into the argument list. We can // call checkExpressionCached because spread expressions never have a contextual type. const spreadArgument = args[length - 1]; - const type = checkExpressionCached(spreadArgument.expression); + const type = flowLoopCount ? checkExpression(spreadArgument.expression) : checkExpressionCached(spreadArgument.expression); if (isTupleType(type)) { const typeArguments = (type).typeArguments || emptyArray; const restIndex = type.target.hasRestElement ? typeArguments.length - 1 : -1; diff --git a/tests/baselines/reference/noImplicitAnyLoopCrash.errors.txt b/tests/baselines/reference/noImplicitAnyLoopCrash.errors.txt new file mode 100644 index 00000000000..2937f133749 --- /dev/null +++ b/tests/baselines/reference/noImplicitAnyLoopCrash.errors.txt @@ -0,0 +1,18 @@ +tests/cases/compiler/noImplicitAnyLoopCrash.ts(4,16): error TS2556: Expected 0 arguments, but got 1 or more. +tests/cases/compiler/noImplicitAnyLoopCrash.ts(4,19): error TS2461: Type 'number' is not an array type. +tests/cases/compiler/noImplicitAnyLoopCrash.ts(4,19): error TS2461: Type 'undefined' is not an array type. + + +==== tests/cases/compiler/noImplicitAnyLoopCrash.ts (3 errors) ==== + let foo = () => {}; + let bar; + while (1) { + bar = ~foo(...bar); + ~~~~~~ +!!! error TS2556: Expected 0 arguments, but got 1 or more. + ~~~ +!!! error TS2461: Type 'number' is not an array type. + ~~~ +!!! error TS2461: Type 'undefined' is not an array type. + } + \ No newline at end of file diff --git a/tests/baselines/reference/noImplicitAnyLoopCrash.js b/tests/baselines/reference/noImplicitAnyLoopCrash.js new file mode 100644 index 00000000000..36f8a7470b2 --- /dev/null +++ b/tests/baselines/reference/noImplicitAnyLoopCrash.js @@ -0,0 +1,14 @@ +//// [noImplicitAnyLoopCrash.ts] +let foo = () => {}; +let bar; +while (1) { + bar = ~foo(...bar); +} + + +//// [noImplicitAnyLoopCrash.js] +var foo = function () { }; +var bar; +while (1) { + bar = ~foo.apply(void 0, bar); +} diff --git a/tests/baselines/reference/noImplicitAnyLoopCrash.symbols b/tests/baselines/reference/noImplicitAnyLoopCrash.symbols new file mode 100644 index 00000000000..1bac6fac5ab --- /dev/null +++ b/tests/baselines/reference/noImplicitAnyLoopCrash.symbols @@ -0,0 +1,14 @@ +=== tests/cases/compiler/noImplicitAnyLoopCrash.ts === +let foo = () => {}; +>foo : Symbol(foo, Decl(noImplicitAnyLoopCrash.ts, 0, 3)) + +let bar; +>bar : Symbol(bar, Decl(noImplicitAnyLoopCrash.ts, 1, 3)) + +while (1) { + bar = ~foo(...bar); +>bar : Symbol(bar, Decl(noImplicitAnyLoopCrash.ts, 1, 3)) +>foo : Symbol(foo, Decl(noImplicitAnyLoopCrash.ts, 0, 3)) +>bar : Symbol(bar, Decl(noImplicitAnyLoopCrash.ts, 1, 3)) +} + diff --git a/tests/baselines/reference/noImplicitAnyLoopCrash.types b/tests/baselines/reference/noImplicitAnyLoopCrash.types new file mode 100644 index 00000000000..2e698c0673e --- /dev/null +++ b/tests/baselines/reference/noImplicitAnyLoopCrash.types @@ -0,0 +1,21 @@ +=== tests/cases/compiler/noImplicitAnyLoopCrash.ts === +let foo = () => {}; +>foo : () => void +>() => {} : () => void + +let bar; +>bar : any + +while (1) { +>1 : 1 + + bar = ~foo(...bar); +>bar = ~foo(...bar) : number +>bar : any +>~foo(...bar) : number +>foo(...bar) : void +>foo : () => void +>...bar : any +>bar : number +} + diff --git a/tests/cases/compiler/noImplicitAnyLoopCrash.ts b/tests/cases/compiler/noImplicitAnyLoopCrash.ts index d4380276506..1df8a27a92d 100644 --- a/tests/cases/compiler/noImplicitAnyLoopCrash.ts +++ b/tests/cases/compiler/noImplicitAnyLoopCrash.ts @@ -1,5 +1,6 @@ // @noImplicitAny: true -let foo = () => {}; // if you remove or change foo definition to not a function, bug disappears -let bar; // if you add type annotation here, bug disappears -while (1) // if you remove while, bug disappears - bar = ~foo(...bar); // if you remove unary or spread operator, bug disappears \ No newline at end of file +let foo = () => {}; +let bar; +while (1) { + bar = ~foo(...bar); +} From 72f30a830825b6c4d9d5428e4eeb8eb8745680ae Mon Sep 17 00:00:00 2001 From: Andrew Branch Date: Thu, 25 Apr 2019 11:35:10 -0700 Subject: [PATCH 03/45] Add test for quoted constructors --- .../quotedConstructors.ts | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 tests/cases/conformance/classes/constructorDeclarations/quotedConstructors.ts diff --git a/tests/cases/conformance/classes/constructorDeclarations/quotedConstructors.ts b/tests/cases/conformance/classes/constructorDeclarations/quotedConstructors.ts new file mode 100644 index 00000000000..e0564ba73ec --- /dev/null +++ b/tests/cases/conformance/classes/constructorDeclarations/quotedConstructors.ts @@ -0,0 +1,23 @@ +class C { + x: number; + "constructor"() { + this.x = 0; + } +} +(new C).constructor(); // Error + +class D { + x: number; + 'constructor'() { + this.x = 0; + } +} +(new C).constructor(); // Error + +class E { + x: number; + ['constructor']() { + this.x = 0; + } +} +(new E).constructor(); From c5e6913edea3da168929732c8ee0ba75de0f661c Mon Sep 17 00:00:00 2001 From: Andrew Branch Date: Thu, 25 Apr 2019 15:44:23 -0700 Subject: [PATCH 04/45] Add grammar error on quoted constructors for TS 3.5 --- src/compiler/checker.ts | 3 +++ src/compiler/diagnosticMessages.json | 6 ++++- .../quotedConstructors.ts | 24 +++++++------------ 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index ce56db4b962..da002607ed8 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -31468,6 +31468,9 @@ namespace ts { return grammarErrorAtPos(node, node.end - 1, ";".length, Diagnostics._0_expected, "{"); } } + else if (isClassLike(node.parent) && isStringLiteral(node.name) && node.name.text === "constructor" && (!compilerOptions.target || compilerOptions.target < ScriptTarget.ES5)) { + return grammarErrorOnNode(node.name, Diagnostics.Quoted_constructors_have_previously_been_interpreted_as_methods_which_is_incorrect_In_TypeScript_3_6_they_will_be_correctly_parsed_as_constructors_In_the_meantime_consider_using_constructor_to_write_a_constructor_or_constructor_to_write_a_method); + } if (checkGrammarForGenerator(node)) { return true; } diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index a78e89f42be..34d093caea2 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -2959,7 +2959,7 @@ "category": "Error", "code": 4104 }, - + "The current host does not support the '{0}' option.": { "category": "Error", "code": 5001 @@ -4954,5 +4954,9 @@ "No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer." :{ "category": "Error", "code": 18004 + }, + "Quoted constructors have previously been interpreted as methods, which is incorrect. In TypeScript 3.6, they will be correctly parsed as constructors. In the meantime, consider using 'constructor()' to write a constructor, or '[\"constructor\"]()' to write a method.": { + "category": "Error", + "code": 96000 } } diff --git a/tests/cases/conformance/classes/constructorDeclarations/quotedConstructors.ts b/tests/cases/conformance/classes/constructorDeclarations/quotedConstructors.ts index e0564ba73ec..3ab45c72810 100644 --- a/tests/cases/conformance/classes/constructorDeclarations/quotedConstructors.ts +++ b/tests/cases/conformance/classes/constructorDeclarations/quotedConstructors.ts @@ -1,23 +1,17 @@ class C { - x: number; - "constructor"() { - this.x = 0; - } + "constructor"() {} // Error in 3.5 } -(new C).constructor(); // Error class D { - x: number; - 'constructor'() { - this.x = 0; - } + 'constructor'() {} // Error in 3.5 } -(new C).constructor(); // Error class E { - x: number; - ['constructor']() { - this.x = 0; - } + ['constructor']() {} } -(new E).constructor(); + +new class { + "constructor"() {} // Error in 3.5 +}; + +var o = { "constructor"() {} }; From b1b0a821f21f6619ca4464361668dcc49a386b31 Mon Sep 17 00:00:00 2001 From: Andrew Branch Date: Thu, 25 Apr 2019 15:56:24 -0700 Subject: [PATCH 05/45] Add baselines --- .../reference/quotedConstructors.errors.txt | 30 ++++++++++++ .../baselines/reference/quotedConstructors.js | 46 +++++++++++++++++++ .../reference/quotedConstructors.symbols | 33 +++++++++++++ .../reference/quotedConstructors.types | 37 +++++++++++++++ 4 files changed, 146 insertions(+) create mode 100644 tests/baselines/reference/quotedConstructors.errors.txt create mode 100644 tests/baselines/reference/quotedConstructors.js create mode 100644 tests/baselines/reference/quotedConstructors.symbols create mode 100644 tests/baselines/reference/quotedConstructors.types diff --git a/tests/baselines/reference/quotedConstructors.errors.txt b/tests/baselines/reference/quotedConstructors.errors.txt new file mode 100644 index 00000000000..609bff8fdfc --- /dev/null +++ b/tests/baselines/reference/quotedConstructors.errors.txt @@ -0,0 +1,30 @@ +tests/cases/conformance/classes/constructorDeclarations/quotedConstructors.ts(2,5): error TS96000: Quoted constructors have previously been interpreted as methods, which is incorrect. In TypeScript 3.6, they will be correctly parsed as constructors. In the meantime, consider using 'constructor()' to write a constructor, or '["constructor"]()' to write a method. +tests/cases/conformance/classes/constructorDeclarations/quotedConstructors.ts(6,5): error TS96000: Quoted constructors have previously been interpreted as methods, which is incorrect. In TypeScript 3.6, they will be correctly parsed as constructors. In the meantime, consider using 'constructor()' to write a constructor, or '["constructor"]()' to write a method. +tests/cases/conformance/classes/constructorDeclarations/quotedConstructors.ts(14,5): error TS96000: Quoted constructors have previously been interpreted as methods, which is incorrect. In TypeScript 3.6, they will be correctly parsed as constructors. In the meantime, consider using 'constructor()' to write a constructor, or '["constructor"]()' to write a method. + + +==== tests/cases/conformance/classes/constructorDeclarations/quotedConstructors.ts (3 errors) ==== + class C { + "constructor"() {} // Error in 3.5 + ~~~~~~~~~~~~~ +!!! error TS96000: Quoted constructors have previously been interpreted as methods, which is incorrect. In TypeScript 3.6, they will be correctly parsed as constructors. In the meantime, consider using 'constructor()' to write a constructor, or '["constructor"]()' to write a method. + } + + class D { + 'constructor'() {} // Error in 3.5 + ~~~~~~~~~~~~~ +!!! error TS96000: Quoted constructors have previously been interpreted as methods, which is incorrect. In TypeScript 3.6, they will be correctly parsed as constructors. In the meantime, consider using 'constructor()' to write a constructor, or '["constructor"]()' to write a method. + } + + class E { + ['constructor']() {} + } + + new class { + "constructor"() {} // Error in 3.5 + ~~~~~~~~~~~~~ +!!! error TS96000: Quoted constructors have previously been interpreted as methods, which is incorrect. In TypeScript 3.6, they will be correctly parsed as constructors. In the meantime, consider using 'constructor()' to write a constructor, or '["constructor"]()' to write a method. + }; + + var o = { "constructor"() {} }; + \ No newline at end of file diff --git a/tests/baselines/reference/quotedConstructors.js b/tests/baselines/reference/quotedConstructors.js new file mode 100644 index 00000000000..c9a662e6af5 --- /dev/null +++ b/tests/baselines/reference/quotedConstructors.js @@ -0,0 +1,46 @@ +//// [quotedConstructors.ts] +class C { + "constructor"() {} // Error in 3.5 +} + +class D { + 'constructor'() {} // Error in 3.5 +} + +class E { + ['constructor']() {} +} + +new class { + "constructor"() {} // Error in 3.5 +}; + +var o = { "constructor"() {} }; + + +//// [quotedConstructors.js] +var C = /** @class */ (function () { + function C() { + } + C.prototype["constructor"] = function () { }; // Error in 3.5 + return C; +}()); +var D = /** @class */ (function () { + function D() { + } + D.prototype['constructor'] = function () { }; // Error in 3.5 + return D; +}()); +var E = /** @class */ (function () { + function E() { + } + E.prototype['constructor'] = function () { }; + return E; +}()); +new /** @class */ (function () { + function class_1() { + } + class_1.prototype["constructor"] = function () { }; // Error in 3.5 + return class_1; +}()); +var o = { "constructor": function () { } }; diff --git a/tests/baselines/reference/quotedConstructors.symbols b/tests/baselines/reference/quotedConstructors.symbols new file mode 100644 index 00000000000..be68e484847 --- /dev/null +++ b/tests/baselines/reference/quotedConstructors.symbols @@ -0,0 +1,33 @@ +=== tests/cases/conformance/classes/constructorDeclarations/quotedConstructors.ts === +class C { +>C : Symbol(C, Decl(quotedConstructors.ts, 0, 0)) + + "constructor"() {} // Error in 3.5 +>"constructor" : Symbol(C["constructor"], Decl(quotedConstructors.ts, 0, 9)) +} + +class D { +>D : Symbol(D, Decl(quotedConstructors.ts, 2, 1)) + + 'constructor'() {} // Error in 3.5 +>'constructor' : Symbol(D['constructor'], Decl(quotedConstructors.ts, 4, 9)) +} + +class E { +>E : Symbol(E, Decl(quotedConstructors.ts, 6, 1)) + + ['constructor']() {} +>['constructor'] : Symbol(E['constructor'], Decl(quotedConstructors.ts, 8, 9)) +>'constructor' : Symbol(E['constructor'], Decl(quotedConstructors.ts, 8, 9)) +} + +new class { + "constructor"() {} // Error in 3.5 +>"constructor" : Symbol((Anonymous class)["constructor"], Decl(quotedConstructors.ts, 12, 11)) + +}; + +var o = { "constructor"() {} }; +>o : Symbol(o, Decl(quotedConstructors.ts, 16, 3)) +>"constructor" : Symbol("constructor", Decl(quotedConstructors.ts, 16, 9)) + diff --git a/tests/baselines/reference/quotedConstructors.types b/tests/baselines/reference/quotedConstructors.types new file mode 100644 index 00000000000..907a2152a80 --- /dev/null +++ b/tests/baselines/reference/quotedConstructors.types @@ -0,0 +1,37 @@ +=== tests/cases/conformance/classes/constructorDeclarations/quotedConstructors.ts === +class C { +>C : C + + "constructor"() {} // Error in 3.5 +>"constructor" : () => void +} + +class D { +>D : D + + 'constructor'() {} // Error in 3.5 +>'constructor' : () => void +} + +class E { +>E : E + + ['constructor']() {} +>['constructor'] : () => void +>'constructor' : "constructor" +} + +new class { +>new class { "constructor"() {} // Error in 3.5} : (Anonymous class) +>class { "constructor"() {} // Error in 3.5} : typeof (Anonymous class) + + "constructor"() {} // Error in 3.5 +>"constructor" : () => void + +}; + +var o = { "constructor"() {} }; +>o : { "constructor"(): void; } +>{ "constructor"() {} } : { "constructor"(): void; } +>"constructor" : () => void + From 9f601ff154c4f2cca0053b996db86679dd2f6d2e Mon Sep 17 00:00:00 2001 From: Andrew Branch Date: Thu, 25 Apr 2019 16:15:00 -0700 Subject: [PATCH 06/45] Change error code --- src/compiler/diagnosticMessages.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 34d093caea2..417f8004d73 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -4957,6 +4957,6 @@ }, "Quoted constructors have previously been interpreted as methods, which is incorrect. In TypeScript 3.6, they will be correctly parsed as constructors. In the meantime, consider using 'constructor()' to write a constructor, or '[\"constructor\"]()' to write a method.": { "category": "Error", - "code": 96000 + "code": 18005 } } From e81fa2198d4663b679681aceabfbf2011b876814 Mon Sep 17 00:00:00 2001 From: Andrew Branch Date: Thu, 25 Apr 2019 17:30:41 -0700 Subject: [PATCH 07/45] Emit error on class fields named "constructor" --- src/compiler/checker.ts | 3 +++ src/compiler/diagnosticMessages.json | 4 ++++ .../propertyNamedConstructor.errors.txt | 14 +++++++++++ .../reference/propertyNamedConstructor.js | 23 +++++++++++++++++++ .../propertyNamedConstructor.symbols | 16 +++++++++++++ .../reference/propertyNamedConstructor.types | 18 +++++++++++++++ .../propertyNamedConstructor.ts | 7 ++++++ 7 files changed, 85 insertions(+) create mode 100644 tests/baselines/reference/propertyNamedConstructor.errors.txt create mode 100644 tests/baselines/reference/propertyNamedConstructor.js create mode 100644 tests/baselines/reference/propertyNamedConstructor.symbols create mode 100644 tests/baselines/reference/propertyNamedConstructor.types create mode 100644 tests/cases/conformance/classes/propertyMemberDeclarations/propertyNamedConstructor.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index da002607ed8..082254ce20e 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -31789,6 +31789,9 @@ namespace ts { function checkGrammarProperty(node: PropertyDeclaration | PropertySignature) { if (isClassLike(node.parent)) { + if (isStringLiteral(node.name) && node.name.text === "constructor") { + return grammarErrorOnNode(node.name, Diagnostics.Classes_may_not_have_a_field_named_constructor); + } if (checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_a_class_property_declaration_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type)) { return true; } diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 417f8004d73..c44f4f8b20f 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -4958,5 +4958,9 @@ "Quoted constructors have previously been interpreted as methods, which is incorrect. In TypeScript 3.6, they will be correctly parsed as constructors. In the meantime, consider using 'constructor()' to write a constructor, or '[\"constructor\"]()' to write a method.": { "category": "Error", "code": 18005 + }, + "Classes may not have a field named 'constructor'.": { + "category": "Error", + "code": 18006 } } diff --git a/tests/baselines/reference/propertyNamedConstructor.errors.txt b/tests/baselines/reference/propertyNamedConstructor.errors.txt new file mode 100644 index 00000000000..e275131a50c --- /dev/null +++ b/tests/baselines/reference/propertyNamedConstructor.errors.txt @@ -0,0 +1,14 @@ +tests/cases/conformance/classes/propertyMemberDeclarations/propertyNamedConstructor.ts(2,3): error TS18006: Classes may not have a field named 'constructor'. + + +==== tests/cases/conformance/classes/propertyMemberDeclarations/propertyNamedConstructor.ts (1 errors) ==== + class X1 { + "constructor" = 3; // Error + ~~~~~~~~~~~~~ +!!! error TS18006: Classes may not have a field named 'constructor'. + } + + class X2 { + ["constructor"] = 3; + } + \ No newline at end of file diff --git a/tests/baselines/reference/propertyNamedConstructor.js b/tests/baselines/reference/propertyNamedConstructor.js new file mode 100644 index 00000000000..8b7752ab6d5 --- /dev/null +++ b/tests/baselines/reference/propertyNamedConstructor.js @@ -0,0 +1,23 @@ +//// [propertyNamedConstructor.ts] +class X1 { + "constructor" = 3; // Error +} + +class X2 { + ["constructor"] = 3; +} + + +//// [propertyNamedConstructor.js] +var X1 = /** @class */ (function () { + function X1() { + this["constructor"] = 3; // Error + } + return X1; +}()); +var X2 = /** @class */ (function () { + function X2() { + this["constructor"] = 3; + } + return X2; +}()); diff --git a/tests/baselines/reference/propertyNamedConstructor.symbols b/tests/baselines/reference/propertyNamedConstructor.symbols new file mode 100644 index 00000000000..b8a028d8444 --- /dev/null +++ b/tests/baselines/reference/propertyNamedConstructor.symbols @@ -0,0 +1,16 @@ +=== tests/cases/conformance/classes/propertyMemberDeclarations/propertyNamedConstructor.ts === +class X1 { +>X1 : Symbol(X1, Decl(propertyNamedConstructor.ts, 0, 0)) + + "constructor" = 3; // Error +>"constructor" : Symbol(X1["constructor"], Decl(propertyNamedConstructor.ts, 0, 10)) +} + +class X2 { +>X2 : Symbol(X2, Decl(propertyNamedConstructor.ts, 2, 1)) + + ["constructor"] = 3; +>["constructor"] : Symbol(X2["constructor"], Decl(propertyNamedConstructor.ts, 4, 10)) +>"constructor" : Symbol(X2["constructor"], Decl(propertyNamedConstructor.ts, 4, 10)) +} + diff --git a/tests/baselines/reference/propertyNamedConstructor.types b/tests/baselines/reference/propertyNamedConstructor.types new file mode 100644 index 00000000000..6b90f31e917 --- /dev/null +++ b/tests/baselines/reference/propertyNamedConstructor.types @@ -0,0 +1,18 @@ +=== tests/cases/conformance/classes/propertyMemberDeclarations/propertyNamedConstructor.ts === +class X1 { +>X1 : X1 + + "constructor" = 3; // Error +>"constructor" : number +>3 : 3 +} + +class X2 { +>X2 : X2 + + ["constructor"] = 3; +>["constructor"] : number +>"constructor" : "constructor" +>3 : 3 +} + diff --git a/tests/cases/conformance/classes/propertyMemberDeclarations/propertyNamedConstructor.ts b/tests/cases/conformance/classes/propertyMemberDeclarations/propertyNamedConstructor.ts new file mode 100644 index 00000000000..49c53a9894f --- /dev/null +++ b/tests/cases/conformance/classes/propertyMemberDeclarations/propertyNamedConstructor.ts @@ -0,0 +1,7 @@ +class X1 { + "constructor" = 3; // Error +} + +class X2 { + ["constructor"] = 3; +} From 0eb286274d7306512162ee350f76527f638fcafa Mon Sep 17 00:00:00 2001 From: Andrew Branch Date: Thu, 25 Apr 2019 17:31:25 -0700 Subject: [PATCH 08/45] Update error code in baseline --- .../reference/quotedConstructors.errors.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/baselines/reference/quotedConstructors.errors.txt b/tests/baselines/reference/quotedConstructors.errors.txt index 609bff8fdfc..9e70452ff40 100644 --- a/tests/baselines/reference/quotedConstructors.errors.txt +++ b/tests/baselines/reference/quotedConstructors.errors.txt @@ -1,19 +1,19 @@ -tests/cases/conformance/classes/constructorDeclarations/quotedConstructors.ts(2,5): error TS96000: Quoted constructors have previously been interpreted as methods, which is incorrect. In TypeScript 3.6, they will be correctly parsed as constructors. In the meantime, consider using 'constructor()' to write a constructor, or '["constructor"]()' to write a method. -tests/cases/conformance/classes/constructorDeclarations/quotedConstructors.ts(6,5): error TS96000: Quoted constructors have previously been interpreted as methods, which is incorrect. In TypeScript 3.6, they will be correctly parsed as constructors. In the meantime, consider using 'constructor()' to write a constructor, or '["constructor"]()' to write a method. -tests/cases/conformance/classes/constructorDeclarations/quotedConstructors.ts(14,5): error TS96000: Quoted constructors have previously been interpreted as methods, which is incorrect. In TypeScript 3.6, they will be correctly parsed as constructors. In the meantime, consider using 'constructor()' to write a constructor, or '["constructor"]()' to write a method. +tests/cases/conformance/classes/constructorDeclarations/quotedConstructors.ts(2,5): error TS18005: Quoted constructors have previously been interpreted as methods, which is incorrect. In TypeScript 3.6, they will be correctly parsed as constructors. In the meantime, consider using 'constructor()' to write a constructor, or '["constructor"]()' to write a method. +tests/cases/conformance/classes/constructorDeclarations/quotedConstructors.ts(6,5): error TS18005: Quoted constructors have previously been interpreted as methods, which is incorrect. In TypeScript 3.6, they will be correctly parsed as constructors. In the meantime, consider using 'constructor()' to write a constructor, or '["constructor"]()' to write a method. +tests/cases/conformance/classes/constructorDeclarations/quotedConstructors.ts(14,5): error TS18005: Quoted constructors have previously been interpreted as methods, which is incorrect. In TypeScript 3.6, they will be correctly parsed as constructors. In the meantime, consider using 'constructor()' to write a constructor, or '["constructor"]()' to write a method. ==== tests/cases/conformance/classes/constructorDeclarations/quotedConstructors.ts (3 errors) ==== class C { "constructor"() {} // Error in 3.5 ~~~~~~~~~~~~~ -!!! error TS96000: Quoted constructors have previously been interpreted as methods, which is incorrect. In TypeScript 3.6, they will be correctly parsed as constructors. In the meantime, consider using 'constructor()' to write a constructor, or '["constructor"]()' to write a method. +!!! error TS18005: Quoted constructors have previously been interpreted as methods, which is incorrect. In TypeScript 3.6, they will be correctly parsed as constructors. In the meantime, consider using 'constructor()' to write a constructor, or '["constructor"]()' to write a method. } class D { 'constructor'() {} // Error in 3.5 ~~~~~~~~~~~~~ -!!! error TS96000: Quoted constructors have previously been interpreted as methods, which is incorrect. In TypeScript 3.6, they will be correctly parsed as constructors. In the meantime, consider using 'constructor()' to write a constructor, or '["constructor"]()' to write a method. +!!! error TS18005: Quoted constructors have previously been interpreted as methods, which is incorrect. In TypeScript 3.6, they will be correctly parsed as constructors. In the meantime, consider using 'constructor()' to write a constructor, or '["constructor"]()' to write a method. } class E { @@ -23,7 +23,7 @@ tests/cases/conformance/classes/constructorDeclarations/quotedConstructors.ts(14 new class { "constructor"() {} // Error in 3.5 ~~~~~~~~~~~~~ -!!! error TS96000: Quoted constructors have previously been interpreted as methods, which is incorrect. In TypeScript 3.6, they will be correctly parsed as constructors. In the meantime, consider using 'constructor()' to write a constructor, or '["constructor"]()' to write a method. +!!! error TS18005: Quoted constructors have previously been interpreted as methods, which is incorrect. In TypeScript 3.6, they will be correctly parsed as constructors. In the meantime, consider using 'constructor()' to write a constructor, or '["constructor"]()' to write a method. }; var o = { "constructor"() {} }; From 67a9029fdfe3b10c31130f066a1e85a3a5613902 Mon Sep 17 00:00:00 2001 From: Andrew Branch Date: Thu, 25 Apr 2019 17:35:21 -0700 Subject: [PATCH 09/45] Update existing baseline --- tests/baselines/reference/convertKeywordsYes.errors.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/baselines/reference/convertKeywordsYes.errors.txt b/tests/baselines/reference/convertKeywordsYes.errors.txt index 7218e1fd12c..e142e6de03d 100644 --- a/tests/baselines/reference/convertKeywordsYes.errors.txt +++ b/tests/baselines/reference/convertKeywordsYes.errors.txt @@ -1,3 +1,4 @@ +tests/cases/compiler/convertKeywordsYes.ts(175,12): error TS18006: Classes may not have a field named 'constructor'. tests/cases/compiler/convertKeywordsYes.ts(292,11): error TS1213: Identifier expected. 'implements' is a reserved word in strict mode. Class definitions are automatically in strict mode. tests/cases/compiler/convertKeywordsYes.ts(293,11): error TS1213: Identifier expected. 'interface' is a reserved word in strict mode. Class definitions are automatically in strict mode. tests/cases/compiler/convertKeywordsYes.ts(294,11): error TS1213: Identifier expected. 'let' is a reserved word in strict mode. Class definitions are automatically in strict mode. @@ -9,7 +10,7 @@ tests/cases/compiler/convertKeywordsYes.ts(301,11): error TS1213: Identifier exp tests/cases/compiler/convertKeywordsYes.ts(303,11): error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. -==== tests/cases/compiler/convertKeywordsYes.ts (9 errors) ==== +==== tests/cases/compiler/convertKeywordsYes.ts (10 errors) ==== // reserved ES5 future in strict mode var constructor = 0; @@ -185,6 +186,8 @@ tests/cases/compiler/convertKeywordsYes.ts(303,11): error TS1213: Identifier exp class bigClass { public "constructor" = 0; + ~~~~~~~~~~~~~ +!!! error TS18006: Classes may not have a field named 'constructor'. public any = 0; public boolean = 0; public implements = 0; From 0759bc67a471ddd8c47dd652d836e96eb1be4819 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sat, 27 Apr 2019 16:19:50 -0700 Subject: [PATCH 10/45] Fix inference to indexed access type containing substitution type --- src/compiler/checker.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 8ee0a4c0519..970f020f5f9 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -14860,6 +14860,14 @@ namespace ts { target = removeTypesFromUnionOrIntersection(target, matchingTypes); } } + else if (target.flags & TypeFlags.Substitution) { + target = (target as SubstitutionType).typeVariable; + } + else if (target.flags & TypeFlags.IndexedAccess && ( + (target).objectType.flags & TypeFlags.Substitution || + (target).indexType.flags & TypeFlags.Substitution)) { + target = getIndexedAccessType(getActualTypeVariable((target).objectType), getActualTypeVariable((target).indexType)); + } if (target.flags & TypeFlags.TypeVariable) { // If target is a type parameter, make an inference, unless the source type contains // the anyFunctionType (the wildcard type that's used to avoid contextually typing functions). @@ -14921,9 +14929,6 @@ namespace ts { } } } - else if (target.flags & TypeFlags.Substitution) { - inferFromTypes(source, (target as SubstitutionType).typeVariable); - } if (getObjectFlags(source) & ObjectFlags.Reference && getObjectFlags(target) & ObjectFlags.Reference && (source).target === (target).target) { // If source and target are references to the same generic type, infer from type arguments const sourceTypes = (source).typeArguments || emptyArray; From 4f38aa88c2eb917b92d0d4081f2752a3212e66f5 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sat, 27 Apr 2019 16:22:11 -0700 Subject: [PATCH 11/45] Add regression test --- .../substitutionTypesInIndexedAccessTypes.ts | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 tests/cases/compiler/substitutionTypesInIndexedAccessTypes.ts diff --git a/tests/cases/compiler/substitutionTypesInIndexedAccessTypes.ts b/tests/cases/compiler/substitutionTypesInIndexedAccessTypes.ts new file mode 100644 index 00000000000..4a89ea37595 --- /dev/null +++ b/tests/cases/compiler/substitutionTypesInIndexedAccessTypes.ts @@ -0,0 +1,20 @@ +// @strict: true + +// Repro from #31086 + +type UserArgs = { + select?: boolean +}; + +type Subset = { [key in keyof T]: key extends keyof U ? T[key] : never }; + +declare function withBoundary(args?: Subset): T; +declare function withoutBoundary(args?: T): T; + +const boundaryResult = withBoundary({ + select: true, +}); + +const withoutBoundaryResult = withoutBoundary({ + select: true, +}); From ed75e1d07e54ed42696a8a3b973014591f5e066b Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sat, 27 Apr 2019 16:22:20 -0700 Subject: [PATCH 12/45] Accept new baselines --- .../substitutionTypesInIndexedAccessTypes.js | 30 ++++++++++ ...stitutionTypesInIndexedAccessTypes.symbols | 58 +++++++++++++++++++ ...ubstitutionTypesInIndexedAccessTypes.types | 46 +++++++++++++++ 3 files changed, 134 insertions(+) create mode 100644 tests/baselines/reference/substitutionTypesInIndexedAccessTypes.js create mode 100644 tests/baselines/reference/substitutionTypesInIndexedAccessTypes.symbols create mode 100644 tests/baselines/reference/substitutionTypesInIndexedAccessTypes.types diff --git a/tests/baselines/reference/substitutionTypesInIndexedAccessTypes.js b/tests/baselines/reference/substitutionTypesInIndexedAccessTypes.js new file mode 100644 index 00000000000..c8a8ad5f227 --- /dev/null +++ b/tests/baselines/reference/substitutionTypesInIndexedAccessTypes.js @@ -0,0 +1,30 @@ +//// [substitutionTypesInIndexedAccessTypes.ts] +// Repro from #31086 + +type UserArgs = { + select?: boolean +}; + +type Subset = { [key in keyof T]: key extends keyof U ? T[key] : never }; + +declare function withBoundary(args?: Subset): T; +declare function withoutBoundary(args?: T): T; + +const boundaryResult = withBoundary({ + select: true, +}); + +const withoutBoundaryResult = withoutBoundary({ + select: true, +}); + + +//// [substitutionTypesInIndexedAccessTypes.js] +"use strict"; +// Repro from #31086 +var boundaryResult = withBoundary({ + select: true +}); +var withoutBoundaryResult = withoutBoundary({ + select: true +}); diff --git a/tests/baselines/reference/substitutionTypesInIndexedAccessTypes.symbols b/tests/baselines/reference/substitutionTypesInIndexedAccessTypes.symbols new file mode 100644 index 00000000000..a0633c2320e --- /dev/null +++ b/tests/baselines/reference/substitutionTypesInIndexedAccessTypes.symbols @@ -0,0 +1,58 @@ +=== tests/cases/compiler/substitutionTypesInIndexedAccessTypes.ts === +// Repro from #31086 + +type UserArgs = { +>UserArgs : Symbol(UserArgs, Decl(substitutionTypesInIndexedAccessTypes.ts, 0, 0)) + + select?: boolean +>select : Symbol(select, Decl(substitutionTypesInIndexedAccessTypes.ts, 2, 17)) + +}; + +type Subset = { [key in keyof T]: key extends keyof U ? T[key] : never }; +>Subset : Symbol(Subset, Decl(substitutionTypesInIndexedAccessTypes.ts, 4, 2)) +>T : Symbol(T, Decl(substitutionTypesInIndexedAccessTypes.ts, 6, 12)) +>U : Symbol(U, Decl(substitutionTypesInIndexedAccessTypes.ts, 6, 14)) +>key : Symbol(key, Decl(substitutionTypesInIndexedAccessTypes.ts, 6, 23)) +>T : Symbol(T, Decl(substitutionTypesInIndexedAccessTypes.ts, 6, 12)) +>key : Symbol(key, Decl(substitutionTypesInIndexedAccessTypes.ts, 6, 23)) +>U : Symbol(U, Decl(substitutionTypesInIndexedAccessTypes.ts, 6, 14)) +>T : Symbol(T, Decl(substitutionTypesInIndexedAccessTypes.ts, 6, 12)) +>key : Symbol(key, Decl(substitutionTypesInIndexedAccessTypes.ts, 6, 23)) + +declare function withBoundary(args?: Subset): T; +>withBoundary : Symbol(withBoundary, Decl(substitutionTypesInIndexedAccessTypes.ts, 6, 79)) +>T : Symbol(T, Decl(substitutionTypesInIndexedAccessTypes.ts, 8, 30)) +>UserArgs : Symbol(UserArgs, Decl(substitutionTypesInIndexedAccessTypes.ts, 0, 0)) +>args : Symbol(args, Decl(substitutionTypesInIndexedAccessTypes.ts, 8, 50)) +>Subset : Symbol(Subset, Decl(substitutionTypesInIndexedAccessTypes.ts, 4, 2)) +>T : Symbol(T, Decl(substitutionTypesInIndexedAccessTypes.ts, 8, 30)) +>UserArgs : Symbol(UserArgs, Decl(substitutionTypesInIndexedAccessTypes.ts, 0, 0)) +>T : Symbol(T, Decl(substitutionTypesInIndexedAccessTypes.ts, 8, 30)) + +declare function withoutBoundary(args?: T): T; +>withoutBoundary : Symbol(withoutBoundary, Decl(substitutionTypesInIndexedAccessTypes.ts, 8, 81)) +>T : Symbol(T, Decl(substitutionTypesInIndexedAccessTypes.ts, 9, 33)) +>UserArgs : Symbol(UserArgs, Decl(substitutionTypesInIndexedAccessTypes.ts, 0, 0)) +>args : Symbol(args, Decl(substitutionTypesInIndexedAccessTypes.ts, 9, 53)) +>T : Symbol(T, Decl(substitutionTypesInIndexedAccessTypes.ts, 9, 33)) +>T : Symbol(T, Decl(substitutionTypesInIndexedAccessTypes.ts, 9, 33)) + +const boundaryResult = withBoundary({ +>boundaryResult : Symbol(boundaryResult, Decl(substitutionTypesInIndexedAccessTypes.ts, 11, 5)) +>withBoundary : Symbol(withBoundary, Decl(substitutionTypesInIndexedAccessTypes.ts, 6, 79)) + + select: true, +>select : Symbol(select, Decl(substitutionTypesInIndexedAccessTypes.ts, 11, 37)) + +}); + +const withoutBoundaryResult = withoutBoundary({ +>withoutBoundaryResult : Symbol(withoutBoundaryResult, Decl(substitutionTypesInIndexedAccessTypes.ts, 15, 5)) +>withoutBoundary : Symbol(withoutBoundary, Decl(substitutionTypesInIndexedAccessTypes.ts, 8, 81)) + + select: true, +>select : Symbol(select, Decl(substitutionTypesInIndexedAccessTypes.ts, 15, 47)) + +}); + diff --git a/tests/baselines/reference/substitutionTypesInIndexedAccessTypes.types b/tests/baselines/reference/substitutionTypesInIndexedAccessTypes.types new file mode 100644 index 00000000000..df7e4af01e6 --- /dev/null +++ b/tests/baselines/reference/substitutionTypesInIndexedAccessTypes.types @@ -0,0 +1,46 @@ +=== tests/cases/compiler/substitutionTypesInIndexedAccessTypes.ts === +// Repro from #31086 + +type UserArgs = { +>UserArgs : UserArgs + + select?: boolean +>select : boolean | undefined + +}; + +type Subset = { [key in keyof T]: key extends keyof U ? T[key] : never }; +>Subset : Subset + +declare function withBoundary(args?: Subset): T; +>withBoundary : (args?: Subset | undefined) => T +>args : Subset | undefined + +declare function withoutBoundary(args?: T): T; +>withoutBoundary : (args?: T | undefined) => T +>args : T | undefined + +const boundaryResult = withBoundary({ +>boundaryResult : { select: true; } +>withBoundary({ select: true,}) : { select: true; } +>withBoundary : (args?: Subset | undefined) => T +>{ select: true,} : { select: true; } + + select: true, +>select : true +>true : true + +}); + +const withoutBoundaryResult = withoutBoundary({ +>withoutBoundaryResult : { select: true; } +>withoutBoundary({ select: true,}) : { select: true; } +>withoutBoundary : (args?: T | undefined) => T +>{ select: true,} : { select: true; } + + select: true, +>select : true +>true : true + +}); + From 80d8e660d790f6f9b6a864bef575139248ed9061 Mon Sep 17 00:00:00 2001 From: Nicholas Yang Date: Thu, 31 Jan 2019 17:44:19 -0500 Subject: [PATCH 13/45] Added a Object.prototype.propertyIsEnumerable check to __rest to prevent enumerable symbols from sneaking through. --- src/compiler/transformers/destructuring.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/compiler/transformers/destructuring.ts b/src/compiler/transformers/destructuring.ts index b5e829ee683..404fde2bfec 100644 --- a/src/compiler/transformers/destructuring.ts +++ b/src/compiler/transformers/destructuring.ts @@ -521,8 +521,10 @@ namespace ts { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; };` }; From 9b32742f22346f2adf1adc34d2475b784364f199 Mon Sep 17 00:00:00 2001 From: Nicholas Yang Date: Thu, 31 Jan 2019 22:11:26 -0500 Subject: [PATCH 14/45] Modified __rest output in test baselines. --- .../baselines/reference/asyncFunctionTempVariableScoping.js | 6 ++++-- .../destructuringAssignmentWithStrictNullChecks.js | 6 ++++-- .../destructuringInitializerContextualTypeFromContext.js | 6 ++++-- .../destructuringObjectBindingPatternAndAssignment5.js | 6 ++++-- ...orLoopWithDestructuringDoesNotElideFollowingStatement.js | 6 ++++-- tests/baselines/reference/genericIsNeverEmptyObject.js | 6 ++++-- tests/baselines/reference/genericObjectRest.js | 6 ++++-- tests/baselines/reference/literalTypeWidening.js | 6 ++++-- tests/baselines/reference/mappedTypeConstraints.js | 6 ++++-- tests/baselines/reference/nonPrimitiveAccessProperty.js | 6 ++++-- .../objectBindingPattern_restElementWithPropertyName.js | 6 ++++-- tests/baselines/reference/objectRest.js | 6 ++++-- tests/baselines/reference/objectRestAssignment.js | 6 ++++-- tests/baselines/reference/objectRestForOf.js | 6 ++++-- tests/baselines/reference/objectRestNegative.js | 6 ++++-- tests/baselines/reference/objectRestParameter.js | 6 ++++-- tests/baselines/reference/objectRestParameterES5.js | 6 ++++-- tests/baselines/reference/objectRestReadonly.js | 6 ++++-- .../parameterInitializerBeforeDestructuringEmit.js | 6 ++++-- tests/baselines/reference/restIntersection.js | 6 ++++-- tests/baselines/reference/restInvalidArgumentType.js | 6 ++++-- .../baselines/reference/restParameterWithBindingPattern3.js | 6 ++++-- tests/baselines/reference/restUnion.js | 6 ++++-- tests/baselines/reference/restUnion2.js | 6 ++++-- tests/baselines/reference/restUnion3.js | 6 ++++-- .../baselines/reference/trailingCommasInBindingPatterns.js | 6 ++++-- tests/baselines/reference/unknownType1.js | 6 ++++-- tests/baselines/reference/unusedLocalsAndObjectSpread.js | 6 ++++-- tests/baselines/reference/unusedLocalsAndObjectSpread2.js | 6 ++++-- 29 files changed, 116 insertions(+), 58 deletions(-) diff --git a/tests/baselines/reference/asyncFunctionTempVariableScoping.js b/tests/baselines/reference/asyncFunctionTempVariableScoping.js index c237e03e0f6..51a589e8526 100644 --- a/tests/baselines/reference/asyncFunctionTempVariableScoping.js +++ b/tests/baselines/reference/asyncFunctionTempVariableScoping.js @@ -45,8 +45,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; var _this = this; diff --git a/tests/baselines/reference/destructuringAssignmentWithStrictNullChecks.js b/tests/baselines/reference/destructuringAssignmentWithStrictNullChecks.js index 52bac6e2391..3c21233ea8e 100644 --- a/tests/baselines/reference/destructuringAssignmentWithStrictNullChecks.js +++ b/tests/baselines/reference/destructuringAssignmentWithStrictNullChecks.js @@ -9,8 +9,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; var bar; diff --git a/tests/baselines/reference/destructuringInitializerContextualTypeFromContext.js b/tests/baselines/reference/destructuringInitializerContextualTypeFromContext.js index 1215d343df0..f297eb31dfc 100644 --- a/tests/baselines/reference/destructuringInitializerContextualTypeFromContext.js +++ b/tests/baselines/reference/destructuringInitializerContextualTypeFromContext.js @@ -43,8 +43,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; var Parent = function (_a) { diff --git a/tests/baselines/reference/destructuringObjectBindingPatternAndAssignment5.js b/tests/baselines/reference/destructuringObjectBindingPatternAndAssignment5.js index 4eb341b0561..e1b13dc239a 100644 --- a/tests/baselines/reference/destructuringObjectBindingPatternAndAssignment5.js +++ b/tests/baselines/reference/destructuringObjectBindingPatternAndAssignment5.js @@ -12,8 +12,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; function a() { diff --git a/tests/baselines/reference/forLoopWithDestructuringDoesNotElideFollowingStatement.js b/tests/baselines/reference/forLoopWithDestructuringDoesNotElideFollowingStatement.js index fb2316426ee..5ba3c5e545d 100644 --- a/tests/baselines/reference/forLoopWithDestructuringDoesNotElideFollowingStatement.js +++ b/tests/baselines/reference/forLoopWithDestructuringDoesNotElideFollowingStatement.js @@ -9,8 +9,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; var array = [{ a: 0, b: 1 }]; diff --git a/tests/baselines/reference/genericIsNeverEmptyObject.js b/tests/baselines/reference/genericIsNeverEmptyObject.js index d914813ed99..ef53c353007 100644 --- a/tests/baselines/reference/genericIsNeverEmptyObject.js +++ b/tests/baselines/reference/genericIsNeverEmptyObject.js @@ -29,8 +29,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; function test(obj) { diff --git a/tests/baselines/reference/genericObjectRest.js b/tests/baselines/reference/genericObjectRest.js index 33de97a3d5f..d7b395e7d01 100644 --- a/tests/baselines/reference/genericObjectRest.js +++ b/tests/baselines/reference/genericObjectRest.js @@ -35,8 +35,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; const a = 'a'; diff --git a/tests/baselines/reference/literalTypeWidening.js b/tests/baselines/reference/literalTypeWidening.js index 93655fe0fc9..42dbacdd4ca 100644 --- a/tests/baselines/reference/literalTypeWidening.js +++ b/tests/baselines/reference/literalTypeWidening.js @@ -156,8 +156,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; exports.__esModule = true; diff --git a/tests/baselines/reference/mappedTypeConstraints.js b/tests/baselines/reference/mappedTypeConstraints.js index 0565af1c6ec..7a969a33269 100644 --- a/tests/baselines/reference/mappedTypeConstraints.js +++ b/tests/baselines/reference/mappedTypeConstraints.js @@ -42,8 +42,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; function f0(obj) { diff --git a/tests/baselines/reference/nonPrimitiveAccessProperty.js b/tests/baselines/reference/nonPrimitiveAccessProperty.js index abfe2605e32..834149360b0 100644 --- a/tests/baselines/reference/nonPrimitiveAccessProperty.js +++ b/tests/baselines/reference/nonPrimitiveAccessProperty.js @@ -13,8 +13,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; var a; diff --git a/tests/baselines/reference/objectBindingPattern_restElementWithPropertyName.js b/tests/baselines/reference/objectBindingPattern_restElementWithPropertyName.js index a63527b8c35..fa92c7409c0 100644 --- a/tests/baselines/reference/objectBindingPattern_restElementWithPropertyName.js +++ b/tests/baselines/reference/objectBindingPattern_restElementWithPropertyName.js @@ -8,8 +8,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; var b = __rest({}, []); diff --git a/tests/baselines/reference/objectRest.js b/tests/baselines/reference/objectRest.js index c9d6a2a7d2b..04fe41d7ed3 100644 --- a/tests/baselines/reference/objectRest.js +++ b/tests/baselines/reference/objectRest.js @@ -53,8 +53,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; var _a, _b, _c, _d, _e; diff --git a/tests/baselines/reference/objectRestAssignment.js b/tests/baselines/reference/objectRestAssignment.js index 711e5de42c0..88fa2d18989 100644 --- a/tests/baselines/reference/objectRestAssignment.js +++ b/tests/baselines/reference/objectRestAssignment.js @@ -20,8 +20,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; var _a, _b, _c; diff --git a/tests/baselines/reference/objectRestForOf.js b/tests/baselines/reference/objectRestForOf.js index 7ff72db06e5..a995281b72e 100644 --- a/tests/baselines/reference/objectRestForOf.js +++ b/tests/baselines/reference/objectRestForOf.js @@ -20,8 +20,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; let array; diff --git a/tests/baselines/reference/objectRestNegative.js b/tests/baselines/reference/objectRestNegative.js index 915e0a0e867..fad2efd4eaa 100644 --- a/tests/baselines/reference/objectRestNegative.js +++ b/tests/baselines/reference/objectRestNegative.js @@ -24,8 +24,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; var o = { a: 1, b: 'no' }; diff --git a/tests/baselines/reference/objectRestParameter.js b/tests/baselines/reference/objectRestParameter.js index a73e9b77b38..52740d916b6 100644 --- a/tests/baselines/reference/objectRestParameter.js +++ b/tests/baselines/reference/objectRestParameter.js @@ -27,8 +27,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; function cloneAgain(_a) { diff --git a/tests/baselines/reference/objectRestParameterES5.js b/tests/baselines/reference/objectRestParameterES5.js index 7f81d6d736c..bdcf24f5032 100644 --- a/tests/baselines/reference/objectRestParameterES5.js +++ b/tests/baselines/reference/objectRestParameterES5.js @@ -27,8 +27,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; function cloneAgain(_a) { diff --git a/tests/baselines/reference/objectRestReadonly.js b/tests/baselines/reference/objectRestReadonly.js index a940dbf52cc..9bc561fa5b5 100644 --- a/tests/baselines/reference/objectRestReadonly.js +++ b/tests/baselines/reference/objectRestReadonly.js @@ -23,8 +23,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; var obj = { diff --git a/tests/baselines/reference/parameterInitializerBeforeDestructuringEmit.js b/tests/baselines/reference/parameterInitializerBeforeDestructuringEmit.js index 91a5484b6ee..ffee9029d30 100644 --- a/tests/baselines/reference/parameterInitializerBeforeDestructuringEmit.js +++ b/tests/baselines/reference/parameterInitializerBeforeDestructuringEmit.js @@ -26,8 +26,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; function foobar(_a) { diff --git a/tests/baselines/reference/restIntersection.js b/tests/baselines/reference/restIntersection.js index d1f9aa3094c..b225b132880 100644 --- a/tests/baselines/reference/restIntersection.js +++ b/tests/baselines/reference/restIntersection.js @@ -11,8 +11,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; var intersection; diff --git a/tests/baselines/reference/restInvalidArgumentType.js b/tests/baselines/reference/restInvalidArgumentType.js index 75b52a8c6e8..a591da4a929 100644 --- a/tests/baselines/reference/restInvalidArgumentType.js +++ b/tests/baselines/reference/restInvalidArgumentType.js @@ -61,8 +61,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; var E; diff --git a/tests/baselines/reference/restParameterWithBindingPattern3.js b/tests/baselines/reference/restParameterWithBindingPattern3.js index 00342e7f741..87652a5302c 100644 --- a/tests/baselines/reference/restParameterWithBindingPattern3.js +++ b/tests/baselines/reference/restParameterWithBindingPattern3.js @@ -15,8 +15,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; function a() { diff --git a/tests/baselines/reference/restUnion.js b/tests/baselines/reference/restUnion.js index 09a6243d2a9..80d52281173 100644 --- a/tests/baselines/reference/restUnion.js +++ b/tests/baselines/reference/restUnion.js @@ -21,8 +21,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; var union; diff --git a/tests/baselines/reference/restUnion2.js b/tests/baselines/reference/restUnion2.js index 437ea780193..21ae81b3381 100644 --- a/tests/baselines/reference/restUnion2.js +++ b/tests/baselines/reference/restUnion2.js @@ -15,8 +15,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; var rest2; diff --git a/tests/baselines/reference/restUnion3.js b/tests/baselines/reference/restUnion3.js index 0dbfc425754..bbb60ae1dae 100644 --- a/tests/baselines/reference/restUnion3.js +++ b/tests/baselines/reference/restUnion3.js @@ -15,8 +15,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; var rest4; diff --git a/tests/baselines/reference/trailingCommasInBindingPatterns.js b/tests/baselines/reference/trailingCommasInBindingPatterns.js index 0c51acc8af8..4b828873d4d 100644 --- a/tests/baselines/reference/trailingCommasInBindingPatterns.js +++ b/tests/baselines/reference/trailingCommasInBindingPatterns.js @@ -19,8 +19,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; var a = [].slice(0); diff --git a/tests/baselines/reference/unknownType1.js b/tests/baselines/reference/unknownType1.js index b7e40954359..febf595aa5b 100644 --- a/tests/baselines/reference/unknownType1.js +++ b/tests/baselines/reference/unknownType1.js @@ -201,8 +201,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; // Only equality operators are allowed with unknown diff --git a/tests/baselines/reference/unusedLocalsAndObjectSpread.js b/tests/baselines/reference/unusedLocalsAndObjectSpread.js index c9329f369d1..8eea55ca1f8 100644 --- a/tests/baselines/reference/unusedLocalsAndObjectSpread.js +++ b/tests/baselines/reference/unusedLocalsAndObjectSpread.js @@ -36,8 +36,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; function one() { diff --git a/tests/baselines/reference/unusedLocalsAndObjectSpread2.js b/tests/baselines/reference/unusedLocalsAndObjectSpread2.js index 39061c7431c..b2be424b146 100644 --- a/tests/baselines/reference/unusedLocalsAndObjectSpread2.js +++ b/tests/baselines/reference/unusedLocalsAndObjectSpread2.js @@ -23,8 +23,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; exports.__esModule = true; From 39321a55d84a532349225e32785ff3e4f37d7541 Mon Sep 17 00:00:00 2001 From: Nicholas Yang Date: Sat, 23 Mar 2019 16:32:10 -0400 Subject: [PATCH 15/45] Adjusted tests to correct baseline with new __rest --- .../multiple-emitHelpers-in-all-projects.js | 458 ++++----- .../multiple-emitHelpers-in-all-projects.js | 254 ++--- .../multiple-emitHelpers-in-all-projects.js | 426 ++++---- .../emitHelpers-in-all-projects.js | 452 ++++----- .../emitHelpers-in-all-projects.js | 484 +++++----- ...tHelpers-in-only-one-dependency-project.js | 306 +++--- .../multiple-emitHelpers-in-all-projects.js | 716 +++++++------- ...tiple-emitHelpers-in-different-projects.js | 522 +++++----- .../emitHelpers-in-all-projects.js | 316 +++--- ...tHelpers-in-only-one-dependency-project.js | 426 ++++---- .../multiple-emitHelpers-in-all-projects.js | 472 ++++----- ...tiple-emitHelpers-in-different-projects.js | 342 +++---- .../emitHelpers-in-all-projects.js | 616 ++++++------ ...tHelpers-in-only-one-dependency-project.js | 454 ++++----- .../multiple-emitHelpers-in-all-projects.js | 912 +++++++++--------- ...tiple-emitHelpers-in-different-projects.js | 490 +++++----- 16 files changed, 3910 insertions(+), 3736 deletions(-) diff --git a/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-declaration-doesnt-change/multiple-emitHelpers-in-all-projects.js b/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-declaration-doesnt-change/multiple-emitHelpers-in-all-projects.js index 82831036ffb..34285f33593 100644 --- a/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-declaration-doesnt-change/multiple-emitHelpers-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-declaration-doesnt-change/multiple-emitHelpers-in-all-projects.js @@ -24,8 +24,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; var myGlob = 20; @@ -70,7 +72,7 @@ appfile4Spread.apply(void 0, __spread([10, 20, 30])); //# sourceMappingURL=module.js.map //// [/src/app/module.js.map] -{"version":3,"file":"module.js","sourceRoot":"","sources":["../lib/file0.ts","../lib/file1.ts","../lib/file2.ts","../lib/global.ts","file3.ts","file4.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAM,MAAM,GAAG,EAAE,CAAC;AAClB,SAAS,cAAc;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AAC3C,cAAc,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;;;;ICFnB,QAAA,CAAC,GAAG,EAAE,CAAC;IAAA,SAAS,eAAe;QAC5C,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;IAChD,CAAC;IAAA,OAAO,CAAC,GAAG,CAAC,SAAC,CAAC,CAAC;;;;;ICFH,QAAA,CAAC,GAAG,EAAE,CAAC;;ACApB,IAAM,WAAW,GAAG,EAAE,CAAC;;;;ICAV,QAAA,CAAC,GAAG,EAAE,CAAC;IACM,SAAS,eAAe;QAClD,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;IAChD,CAAC;;ACHD,IAAM,KAAK,GAAG,EAAE,CAAC;AACjB,SAAS,cAAc;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AAC3C,cAAc,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE"} +{"version":3,"file":"module.js","sourceRoot":"","sources":["../lib/file0.ts","../lib/file1.ts","../lib/file2.ts","../lib/global.ts","file3.ts","file4.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAM,MAAM,GAAG,EAAE,CAAC;AAClB,SAAS,cAAc;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AAC3C,cAAc,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;;;;ICFnB,QAAA,CAAC,GAAG,EAAE,CAAC;IAAA,SAAS,eAAe;QAC5C,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;IAChD,CAAC;IAAA,OAAO,CAAC,GAAG,CAAC,SAAC,CAAC,CAAC;;;;;ICFH,QAAA,CAAC,GAAG,EAAE,CAAC;;ACApB,IAAM,WAAW,GAAG,EAAE,CAAC;;;;ICAV,QAAA,CAAC,GAAG,EAAE,CAAC;IACM,SAAS,eAAe;QAClD,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;IAChD,CAAC;;ACHD,IAAM,KAAK,GAAG,EAAE,CAAC;AACjB,SAAS,cAAc;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AAC3C,cAAc,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE"} //// [/src/app/module.js.map.baseline.txt] =================================================================== @@ -108,8 +110,10 @@ sourceFile:../lib/file0.ts >>> for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") ->>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) ->>> t[p[i]] = s[p[i]]; +>>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> t[p[i]] = s[p[i]]; +>>> } >>> return t; >>>}; >>>var myGlob = 20; @@ -126,12 +130,12 @@ sourceFile:../lib/file0.ts 4 > = 5 > 20 6 > ; -1 >Emitted(30, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(30, 5) Source(1, 7) + SourceIndex(0) -3 >Emitted(30, 11) Source(1, 13) + SourceIndex(0) -4 >Emitted(30, 14) Source(1, 16) + SourceIndex(0) -5 >Emitted(30, 16) Source(1, 18) + SourceIndex(0) -6 >Emitted(30, 17) Source(1, 19) + SourceIndex(0) +1 >Emitted(32, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(32, 5) Source(1, 7) + SourceIndex(0) +3 >Emitted(32, 11) Source(1, 13) + SourceIndex(0) +4 >Emitted(32, 14) Source(1, 16) + SourceIndex(0) +5 >Emitted(32, 16) Source(1, 18) + SourceIndex(0) +6 >Emitted(32, 17) Source(1, 19) + SourceIndex(0) --- >>>function libfile0Spread() { 1-> @@ -141,9 +145,9 @@ sourceFile:../lib/file0.ts > 2 >function 3 > libfile0Spread -1->Emitted(31, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(31, 10) Source(2, 10) + SourceIndex(0) -3 >Emitted(31, 24) Source(2, 24) + SourceIndex(0) +1->Emitted(33, 1) Source(2, 1) + SourceIndex(0) +2 >Emitted(33, 10) Source(2, 10) + SourceIndex(0) +3 >Emitted(33, 24) Source(2, 24) + SourceIndex(0) --- >>> var b = []; 1 >^^^^ @@ -151,8 +155,8 @@ sourceFile:../lib/file0.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >( 2 > ...b: number[] -1 >Emitted(32, 5) Source(2, 25) + SourceIndex(0) -2 >Emitted(32, 16) Source(2, 39) + SourceIndex(0) +1 >Emitted(34, 5) Source(2, 25) + SourceIndex(0) +2 >Emitted(34, 16) Source(2, 39) + SourceIndex(0) --- >>> for (var _i = 0; _i < arguments.length; _i++) { 1->^^^^^^^^^ @@ -167,20 +171,20 @@ sourceFile:../lib/file0.ts 4 > ...b: number[] 5 > 6 > ...b: number[] -1->Emitted(33, 10) Source(2, 25) + SourceIndex(0) -2 >Emitted(33, 20) Source(2, 39) + SourceIndex(0) -3 >Emitted(33, 22) Source(2, 25) + SourceIndex(0) -4 >Emitted(33, 43) Source(2, 39) + SourceIndex(0) -5 >Emitted(33, 45) Source(2, 25) + SourceIndex(0) -6 >Emitted(33, 49) Source(2, 39) + SourceIndex(0) +1->Emitted(35, 10) Source(2, 25) + SourceIndex(0) +2 >Emitted(35, 20) Source(2, 39) + SourceIndex(0) +3 >Emitted(35, 22) Source(2, 25) + SourceIndex(0) +4 >Emitted(35, 43) Source(2, 39) + SourceIndex(0) +5 >Emitted(35, 45) Source(2, 25) + SourceIndex(0) +6 >Emitted(35, 49) Source(2, 39) + SourceIndex(0) --- >>> b[_i] = arguments[_i]; 1 >^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^ 1 > 2 > ...b: number[] -1 >Emitted(34, 9) Source(2, 25) + SourceIndex(0) -2 >Emitted(34, 31) Source(2, 39) + SourceIndex(0) +1 >Emitted(36, 9) Source(2, 25) + SourceIndex(0) +2 >Emitted(36, 31) Source(2, 39) + SourceIndex(0) --- >>> } >>>} @@ -189,8 +193,8 @@ sourceFile:../lib/file0.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >) { 2 >} -1 >Emitted(36, 1) Source(2, 43) + SourceIndex(0) -2 >Emitted(36, 2) Source(2, 44) + SourceIndex(0) +1 >Emitted(38, 1) Source(2, 43) + SourceIndex(0) +2 >Emitted(38, 2) Source(2, 44) + SourceIndex(0) --- >>>libfile0Spread.apply(void 0, __spread([10, 20, 30])); 1-> @@ -217,17 +221,17 @@ sourceFile:../lib/file0.ts 9 > 30 10> ] 11> ); -1->Emitted(37, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(37, 15) Source(3, 15) + SourceIndex(0) -3 >Emitted(37, 39) Source(3, 19) + SourceIndex(0) -4 >Emitted(37, 40) Source(3, 20) + SourceIndex(0) -5 >Emitted(37, 42) Source(3, 22) + SourceIndex(0) -6 >Emitted(37, 44) Source(3, 24) + SourceIndex(0) -7 >Emitted(37, 46) Source(3, 26) + SourceIndex(0) -8 >Emitted(37, 48) Source(3, 28) + SourceIndex(0) -9 >Emitted(37, 50) Source(3, 30) + SourceIndex(0) -10>Emitted(37, 51) Source(3, 31) + SourceIndex(0) -11>Emitted(37, 54) Source(3, 33) + SourceIndex(0) +1->Emitted(39, 1) Source(3, 1) + SourceIndex(0) +2 >Emitted(39, 15) Source(3, 15) + SourceIndex(0) +3 >Emitted(39, 39) Source(3, 19) + SourceIndex(0) +4 >Emitted(39, 40) Source(3, 20) + SourceIndex(0) +5 >Emitted(39, 42) Source(3, 22) + SourceIndex(0) +6 >Emitted(39, 44) Source(3, 24) + SourceIndex(0) +7 >Emitted(39, 46) Source(3, 26) + SourceIndex(0) +8 >Emitted(39, 48) Source(3, 28) + SourceIndex(0) +9 >Emitted(39, 50) Source(3, 30) + SourceIndex(0) +10>Emitted(39, 51) Source(3, 31) + SourceIndex(0) +11>Emitted(39, 54) Source(3, 33) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/src/app/module.js @@ -250,12 +254,12 @@ sourceFile:../lib/file1.ts 4 > = 5 > 10 6 > ; -1->Emitted(41, 5) Source(1, 14) + SourceIndex(1) -2 >Emitted(41, 13) Source(1, 14) + SourceIndex(1) -3 >Emitted(41, 14) Source(1, 15) + SourceIndex(1) -4 >Emitted(41, 17) Source(1, 18) + SourceIndex(1) -5 >Emitted(41, 19) Source(1, 20) + SourceIndex(1) -6 >Emitted(41, 20) Source(1, 21) + SourceIndex(1) +1->Emitted(43, 5) Source(1, 14) + SourceIndex(1) +2 >Emitted(43, 13) Source(1, 14) + SourceIndex(1) +3 >Emitted(43, 14) Source(1, 15) + SourceIndex(1) +4 >Emitted(43, 17) Source(1, 18) + SourceIndex(1) +5 >Emitted(43, 19) Source(1, 20) + SourceIndex(1) +6 >Emitted(43, 20) Source(1, 21) + SourceIndex(1) --- >>> function forlibfile1Rest() { 1->^^^^ @@ -265,9 +269,9 @@ sourceFile:../lib/file1.ts 1-> 2 > function 3 > forlibfile1Rest -1->Emitted(42, 5) Source(1, 21) + SourceIndex(1) -2 >Emitted(42, 14) Source(1, 30) + SourceIndex(1) -3 >Emitted(42, 29) Source(1, 45) + SourceIndex(1) +1->Emitted(44, 5) Source(1, 21) + SourceIndex(1) +2 >Emitted(44, 14) Source(1, 30) + SourceIndex(1) +3 >Emitted(44, 29) Source(1, 45) + SourceIndex(1) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^^^^^ @@ -287,14 +291,14 @@ sourceFile:../lib/file1.ts 6 > , 7 > ...rest } = { a: 10, b: 30, yy: 30 } 8 > ; -1->Emitted(43, 9) Source(2, 1) + SourceIndex(1) -2 >Emitted(43, 13) Source(2, 7) + SourceIndex(1) -3 >Emitted(43, 42) Source(2, 48) + SourceIndex(1) -4 >Emitted(43, 44) Source(2, 9) + SourceIndex(1) -5 >Emitted(43, 52) Source(2, 10) + SourceIndex(1) -6 >Emitted(43, 54) Source(2, 12) + SourceIndex(1) -7 >Emitted(43, 78) Source(2, 48) + SourceIndex(1) -8 >Emitted(43, 79) Source(2, 49) + SourceIndex(1) +1->Emitted(45, 9) Source(2, 1) + SourceIndex(1) +2 >Emitted(45, 13) Source(2, 7) + SourceIndex(1) +3 >Emitted(45, 42) Source(2, 48) + SourceIndex(1) +4 >Emitted(45, 44) Source(2, 9) + SourceIndex(1) +5 >Emitted(45, 52) Source(2, 10) + SourceIndex(1) +6 >Emitted(45, 54) Source(2, 12) + SourceIndex(1) +7 >Emitted(45, 78) Source(2, 48) + SourceIndex(1) +8 >Emitted(45, 79) Source(2, 49) + SourceIndex(1) --- >>> } 1 >^^^^ @@ -303,8 +307,8 @@ sourceFile:../lib/file1.ts 1 > > 2 > } -1 >Emitted(44, 5) Source(3, 1) + SourceIndex(1) -2 >Emitted(44, 6) Source(3, 2) + SourceIndex(1) +1 >Emitted(46, 5) Source(3, 1) + SourceIndex(1) +2 >Emitted(46, 6) Source(3, 2) + SourceIndex(1) --- >>> console.log(exports.x); 1->^^^^ @@ -323,14 +327,14 @@ sourceFile:../lib/file1.ts 6 > x 7 > ) 8 > ; -1->Emitted(45, 5) Source(3, 2) + SourceIndex(1) -2 >Emitted(45, 12) Source(3, 9) + SourceIndex(1) -3 >Emitted(45, 13) Source(3, 10) + SourceIndex(1) -4 >Emitted(45, 16) Source(3, 13) + SourceIndex(1) -5 >Emitted(45, 17) Source(3, 14) + SourceIndex(1) -6 >Emitted(45, 26) Source(3, 15) + SourceIndex(1) -7 >Emitted(45, 27) Source(3, 16) + SourceIndex(1) -8 >Emitted(45, 28) Source(3, 17) + SourceIndex(1) +1->Emitted(47, 5) Source(3, 2) + SourceIndex(1) +2 >Emitted(47, 12) Source(3, 9) + SourceIndex(1) +3 >Emitted(47, 13) Source(3, 10) + SourceIndex(1) +4 >Emitted(47, 16) Source(3, 13) + SourceIndex(1) +5 >Emitted(47, 17) Source(3, 14) + SourceIndex(1) +6 >Emitted(47, 26) Source(3, 15) + SourceIndex(1) +7 >Emitted(47, 27) Source(3, 16) + SourceIndex(1) +8 >Emitted(47, 28) Source(3, 17) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:/src/app/module.js @@ -353,12 +357,12 @@ sourceFile:../lib/file2.ts 4 > = 5 > 20 6 > ; -1 >Emitted(50, 5) Source(1, 14) + SourceIndex(2) -2 >Emitted(50, 13) Source(1, 14) + SourceIndex(2) -3 >Emitted(50, 14) Source(1, 15) + SourceIndex(2) -4 >Emitted(50, 17) Source(1, 18) + SourceIndex(2) -5 >Emitted(50, 19) Source(1, 20) + SourceIndex(2) -6 >Emitted(50, 20) Source(1, 21) + SourceIndex(2) +1 >Emitted(52, 5) Source(1, 14) + SourceIndex(2) +2 >Emitted(52, 13) Source(1, 14) + SourceIndex(2) +3 >Emitted(52, 14) Source(1, 15) + SourceIndex(2) +4 >Emitted(52, 17) Source(1, 18) + SourceIndex(2) +5 >Emitted(52, 19) Source(1, 20) + SourceIndex(2) +6 >Emitted(52, 20) Source(1, 21) + SourceIndex(2) --- ------------------------------------------------------------------- emittedFile:/src/app/module.js @@ -379,12 +383,12 @@ sourceFile:../lib/global.ts 4 > = 5 > 10 6 > ; -1 >Emitted(52, 1) Source(1, 1) + SourceIndex(3) -2 >Emitted(52, 5) Source(1, 7) + SourceIndex(3) -3 >Emitted(52, 16) Source(1, 18) + SourceIndex(3) -4 >Emitted(52, 19) Source(1, 21) + SourceIndex(3) -5 >Emitted(52, 21) Source(1, 23) + SourceIndex(3) -6 >Emitted(52, 22) Source(1, 24) + SourceIndex(3) +1 >Emitted(54, 1) Source(1, 1) + SourceIndex(3) +2 >Emitted(54, 5) Source(1, 7) + SourceIndex(3) +3 >Emitted(54, 16) Source(1, 18) + SourceIndex(3) +4 >Emitted(54, 19) Source(1, 21) + SourceIndex(3) +5 >Emitted(54, 21) Source(1, 23) + SourceIndex(3) +6 >Emitted(54, 22) Source(1, 24) + SourceIndex(3) --- ------------------------------------------------------------------- emittedFile:/src/app/module.js @@ -407,12 +411,12 @@ sourceFile:file3.ts 4 > = 5 > 30 6 > ; -1->Emitted(56, 5) Source(1, 14) + SourceIndex(4) -2 >Emitted(56, 13) Source(1, 14) + SourceIndex(4) -3 >Emitted(56, 14) Source(1, 15) + SourceIndex(4) -4 >Emitted(56, 17) Source(1, 18) + SourceIndex(4) -5 >Emitted(56, 19) Source(1, 20) + SourceIndex(4) -6 >Emitted(56, 20) Source(1, 21) + SourceIndex(4) +1->Emitted(58, 5) Source(1, 14) + SourceIndex(4) +2 >Emitted(58, 13) Source(1, 14) + SourceIndex(4) +3 >Emitted(58, 14) Source(1, 15) + SourceIndex(4) +4 >Emitted(58, 17) Source(1, 18) + SourceIndex(4) +5 >Emitted(58, 19) Source(1, 20) + SourceIndex(4) +6 >Emitted(58, 20) Source(1, 21) + SourceIndex(4) --- >>> function forappfile3Rest() { 1->^^^^ @@ -423,9 +427,9 @@ sourceFile:file3.ts >import { x } from "file1"; 2 > function 3 > forappfile3Rest -1->Emitted(57, 5) Source(2, 27) + SourceIndex(4) -2 >Emitted(57, 14) Source(2, 36) + SourceIndex(4) -3 >Emitted(57, 29) Source(2, 51) + SourceIndex(4) +1->Emitted(59, 5) Source(2, 27) + SourceIndex(4) +2 >Emitted(59, 14) Source(2, 36) + SourceIndex(4) +3 >Emitted(59, 29) Source(2, 51) + SourceIndex(4) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^^^^^ @@ -445,14 +449,14 @@ sourceFile:file3.ts 6 > , 7 > ...rest } = { a: 10, b: 30, yy: 30 } 8 > ; -1->Emitted(58, 9) Source(3, 1) + SourceIndex(4) -2 >Emitted(58, 13) Source(3, 7) + SourceIndex(4) -3 >Emitted(58, 42) Source(3, 48) + SourceIndex(4) -4 >Emitted(58, 44) Source(3, 9) + SourceIndex(4) -5 >Emitted(58, 52) Source(3, 10) + SourceIndex(4) -6 >Emitted(58, 54) Source(3, 12) + SourceIndex(4) -7 >Emitted(58, 78) Source(3, 48) + SourceIndex(4) -8 >Emitted(58, 79) Source(3, 49) + SourceIndex(4) +1->Emitted(60, 9) Source(3, 1) + SourceIndex(4) +2 >Emitted(60, 13) Source(3, 7) + SourceIndex(4) +3 >Emitted(60, 42) Source(3, 48) + SourceIndex(4) +4 >Emitted(60, 44) Source(3, 9) + SourceIndex(4) +5 >Emitted(60, 52) Source(3, 10) + SourceIndex(4) +6 >Emitted(60, 54) Source(3, 12) + SourceIndex(4) +7 >Emitted(60, 78) Source(3, 48) + SourceIndex(4) +8 >Emitted(60, 79) Source(3, 49) + SourceIndex(4) --- >>> } 1 >^^^^ @@ -460,8 +464,8 @@ sourceFile:file3.ts 1 > > 2 > } -1 >Emitted(59, 5) Source(4, 1) + SourceIndex(4) -2 >Emitted(59, 6) Source(4, 2) + SourceIndex(4) +1 >Emitted(61, 5) Source(4, 1) + SourceIndex(4) +2 >Emitted(61, 6) Source(4, 2) + SourceIndex(4) --- ------------------------------------------------------------------- emittedFile:/src/app/module.js @@ -482,12 +486,12 @@ sourceFile:file4.ts 4 > = 5 > 30 6 > ; -1 >Emitted(61, 1) Source(1, 1) + SourceIndex(5) -2 >Emitted(61, 5) Source(1, 7) + SourceIndex(5) -3 >Emitted(61, 10) Source(1, 12) + SourceIndex(5) -4 >Emitted(61, 13) Source(1, 15) + SourceIndex(5) -5 >Emitted(61, 15) Source(1, 17) + SourceIndex(5) -6 >Emitted(61, 16) Source(1, 18) + SourceIndex(5) +1 >Emitted(63, 1) Source(1, 1) + SourceIndex(5) +2 >Emitted(63, 5) Source(1, 7) + SourceIndex(5) +3 >Emitted(63, 10) Source(1, 12) + SourceIndex(5) +4 >Emitted(63, 13) Source(1, 15) + SourceIndex(5) +5 >Emitted(63, 15) Source(1, 17) + SourceIndex(5) +6 >Emitted(63, 16) Source(1, 18) + SourceIndex(5) --- >>>function appfile4Spread() { 1-> @@ -497,9 +501,9 @@ sourceFile:file4.ts > 2 >function 3 > appfile4Spread -1->Emitted(62, 1) Source(2, 1) + SourceIndex(5) -2 >Emitted(62, 10) Source(2, 10) + SourceIndex(5) -3 >Emitted(62, 24) Source(2, 24) + SourceIndex(5) +1->Emitted(64, 1) Source(2, 1) + SourceIndex(5) +2 >Emitted(64, 10) Source(2, 10) + SourceIndex(5) +3 >Emitted(64, 24) Source(2, 24) + SourceIndex(5) --- >>> var b = []; 1 >^^^^ @@ -507,8 +511,8 @@ sourceFile:file4.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >( 2 > ...b: number[] -1 >Emitted(63, 5) Source(2, 25) + SourceIndex(5) -2 >Emitted(63, 16) Source(2, 39) + SourceIndex(5) +1 >Emitted(65, 5) Source(2, 25) + SourceIndex(5) +2 >Emitted(65, 16) Source(2, 39) + SourceIndex(5) --- >>> for (var _i = 0; _i < arguments.length; _i++) { 1->^^^^^^^^^ @@ -523,20 +527,20 @@ sourceFile:file4.ts 4 > ...b: number[] 5 > 6 > ...b: number[] -1->Emitted(64, 10) Source(2, 25) + SourceIndex(5) -2 >Emitted(64, 20) Source(2, 39) + SourceIndex(5) -3 >Emitted(64, 22) Source(2, 25) + SourceIndex(5) -4 >Emitted(64, 43) Source(2, 39) + SourceIndex(5) -5 >Emitted(64, 45) Source(2, 25) + SourceIndex(5) -6 >Emitted(64, 49) Source(2, 39) + SourceIndex(5) +1->Emitted(66, 10) Source(2, 25) + SourceIndex(5) +2 >Emitted(66, 20) Source(2, 39) + SourceIndex(5) +3 >Emitted(66, 22) Source(2, 25) + SourceIndex(5) +4 >Emitted(66, 43) Source(2, 39) + SourceIndex(5) +5 >Emitted(66, 45) Source(2, 25) + SourceIndex(5) +6 >Emitted(66, 49) Source(2, 39) + SourceIndex(5) --- >>> b[_i] = arguments[_i]; 1 >^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^ 1 > 2 > ...b: number[] -1 >Emitted(65, 9) Source(2, 25) + SourceIndex(5) -2 >Emitted(65, 31) Source(2, 39) + SourceIndex(5) +1 >Emitted(67, 9) Source(2, 25) + SourceIndex(5) +2 >Emitted(67, 31) Source(2, 39) + SourceIndex(5) --- >>> } >>>} @@ -545,8 +549,8 @@ sourceFile:file4.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >) { 2 >} -1 >Emitted(67, 1) Source(2, 43) + SourceIndex(5) -2 >Emitted(67, 2) Source(2, 44) + SourceIndex(5) +1 >Emitted(69, 1) Source(2, 43) + SourceIndex(5) +2 >Emitted(69, 2) Source(2, 44) + SourceIndex(5) --- >>>appfile4Spread.apply(void 0, __spread([10, 20, 30])); 1-> @@ -572,17 +576,17 @@ sourceFile:file4.ts 9 > 30 10> ] 11> ); -1->Emitted(68, 1) Source(3, 1) + SourceIndex(5) -2 >Emitted(68, 15) Source(3, 15) + SourceIndex(5) -3 >Emitted(68, 39) Source(3, 19) + SourceIndex(5) -4 >Emitted(68, 40) Source(3, 20) + SourceIndex(5) -5 >Emitted(68, 42) Source(3, 22) + SourceIndex(5) -6 >Emitted(68, 44) Source(3, 24) + SourceIndex(5) -7 >Emitted(68, 46) Source(3, 26) + SourceIndex(5) -8 >Emitted(68, 48) Source(3, 28) + SourceIndex(5) -9 >Emitted(68, 50) Source(3, 30) + SourceIndex(5) -10>Emitted(68, 51) Source(3, 31) + SourceIndex(5) -11>Emitted(68, 54) Source(3, 33) + SourceIndex(5) +1->Emitted(70, 1) Source(3, 1) + SourceIndex(5) +2 >Emitted(70, 15) Source(3, 15) + SourceIndex(5) +3 >Emitted(70, 39) Source(3, 19) + SourceIndex(5) +4 >Emitted(70, 40) Source(3, 20) + SourceIndex(5) +5 >Emitted(70, 42) Source(3, 22) + SourceIndex(5) +6 >Emitted(70, 44) Source(3, 24) + SourceIndex(5) +7 >Emitted(70, 46) Source(3, 26) + SourceIndex(5) +8 >Emitted(70, 48) Source(3, 28) + SourceIndex(5) +9 >Emitted(70, 50) Source(3, 30) + SourceIndex(5) +10>Emitted(70, 51) Source(3, 31) + SourceIndex(5) +11>Emitted(70, 54) Source(3, 33) + SourceIndex(5) --- >>>//# sourceMappingURL=module.js.map @@ -610,26 +614,26 @@ sourceFile:file4.ts }, { "pos": 678, - "end": 1093, + "end": 1170, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 1095, - "end": 1850, + "pos": 1172, + "end": 1927, "kind": "prepend", "data": "/src/lib/module.js", "texts": [ { - "pos": 1095, - "end": 1850, + "pos": 1172, + "end": 1927, "kind": "text" } ] }, { - "pos": 1850, - "end": 2368, + "pos": 1927, + "end": 2445, "kind": "text" } ], @@ -695,20 +699,22 @@ var __spread = (this && this.__spread) || function () { return ar; }; ---------------------------------------------------------------------- -emitHelpers: (678-1093):: typescript:rest +emitHelpers: (678-1170):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; ---------------------------------------------------------------------- -prepend: (1095-1850):: /src/lib/module.js texts:: 1 +prepend: (1172-1927):: /src/lib/module.js texts:: 1 >>-------------------------------------------------------------------- -text: (1095-1850) +text: (1172-1927) var myGlob = 20; function libfile0Spread() { var b = []; @@ -734,7 +740,7 @@ define("file2", ["require", "exports"], function (require, exports) { var globalConst = 10; ---------------------------------------------------------------------- -text: (1850-2368) +text: (1927-2445) define("file3", ["require", "exports"], function (require, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -810,8 +816,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; var myGlob = 20; @@ -840,7 +848,7 @@ var globalConst = 10; //# sourceMappingURL=module.js.map //// [/src/lib/module.js.map] -{"version":3,"file":"module.js","sourceRoot":"","sources":["file0.ts","file1.ts","file2.ts","global.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAM,MAAM,GAAG,EAAE,CAAC;AAClB,SAAS,cAAc;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AAC3C,cAAc,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;;;;ICFnB,QAAA,CAAC,GAAG,EAAE,CAAC;IAAA,SAAS,eAAe;QAC5C,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;IAChD,CAAC;IAAA,OAAO,CAAC,GAAG,CAAC,SAAC,CAAC,CAAC;;;;;ICFH,QAAA,CAAC,GAAG,EAAE,CAAC;;ACApB,IAAM,WAAW,GAAG,EAAE,CAAC"} +{"version":3,"file":"module.js","sourceRoot":"","sources":["file0.ts","file1.ts","file2.ts","global.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAM,MAAM,GAAG,EAAE,CAAC;AAClB,SAAS,cAAc;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AAC3C,cAAc,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;;;;ICFnB,QAAA,CAAC,GAAG,EAAE,CAAC;IAAA,SAAS,eAAe;QAC5C,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;IAChD,CAAC;IAAA,OAAO,CAAC,GAAG,CAAC,SAAC,CAAC,CAAC;;;;;ICFH,QAAA,CAAC,GAAG,EAAE,CAAC;;ACApB,IAAM,WAAW,GAAG,EAAE,CAAC"} //// [/src/lib/module.js.map.baseline.txt] =================================================================== @@ -878,8 +886,10 @@ sourceFile:file0.ts >>> for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") ->>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) ->>> t[p[i]] = s[p[i]]; +>>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> t[p[i]] = s[p[i]]; +>>> } >>> return t; >>>}; >>>var myGlob = 20; @@ -896,12 +906,12 @@ sourceFile:file0.ts 4 > = 5 > 20 6 > ; -1 >Emitted(30, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(30, 5) Source(1, 7) + SourceIndex(0) -3 >Emitted(30, 11) Source(1, 13) + SourceIndex(0) -4 >Emitted(30, 14) Source(1, 16) + SourceIndex(0) -5 >Emitted(30, 16) Source(1, 18) + SourceIndex(0) -6 >Emitted(30, 17) Source(1, 19) + SourceIndex(0) +1 >Emitted(32, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(32, 5) Source(1, 7) + SourceIndex(0) +3 >Emitted(32, 11) Source(1, 13) + SourceIndex(0) +4 >Emitted(32, 14) Source(1, 16) + SourceIndex(0) +5 >Emitted(32, 16) Source(1, 18) + SourceIndex(0) +6 >Emitted(32, 17) Source(1, 19) + SourceIndex(0) --- >>>function libfile0Spread() { 1-> @@ -911,9 +921,9 @@ sourceFile:file0.ts > 2 >function 3 > libfile0Spread -1->Emitted(31, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(31, 10) Source(2, 10) + SourceIndex(0) -3 >Emitted(31, 24) Source(2, 24) + SourceIndex(0) +1->Emitted(33, 1) Source(2, 1) + SourceIndex(0) +2 >Emitted(33, 10) Source(2, 10) + SourceIndex(0) +3 >Emitted(33, 24) Source(2, 24) + SourceIndex(0) --- >>> var b = []; 1 >^^^^ @@ -921,8 +931,8 @@ sourceFile:file0.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >( 2 > ...b: number[] -1 >Emitted(32, 5) Source(2, 25) + SourceIndex(0) -2 >Emitted(32, 16) Source(2, 39) + SourceIndex(0) +1 >Emitted(34, 5) Source(2, 25) + SourceIndex(0) +2 >Emitted(34, 16) Source(2, 39) + SourceIndex(0) --- >>> for (var _i = 0; _i < arguments.length; _i++) { 1->^^^^^^^^^ @@ -937,20 +947,20 @@ sourceFile:file0.ts 4 > ...b: number[] 5 > 6 > ...b: number[] -1->Emitted(33, 10) Source(2, 25) + SourceIndex(0) -2 >Emitted(33, 20) Source(2, 39) + SourceIndex(0) -3 >Emitted(33, 22) Source(2, 25) + SourceIndex(0) -4 >Emitted(33, 43) Source(2, 39) + SourceIndex(0) -5 >Emitted(33, 45) Source(2, 25) + SourceIndex(0) -6 >Emitted(33, 49) Source(2, 39) + SourceIndex(0) +1->Emitted(35, 10) Source(2, 25) + SourceIndex(0) +2 >Emitted(35, 20) Source(2, 39) + SourceIndex(0) +3 >Emitted(35, 22) Source(2, 25) + SourceIndex(0) +4 >Emitted(35, 43) Source(2, 39) + SourceIndex(0) +5 >Emitted(35, 45) Source(2, 25) + SourceIndex(0) +6 >Emitted(35, 49) Source(2, 39) + SourceIndex(0) --- >>> b[_i] = arguments[_i]; 1 >^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^ 1 > 2 > ...b: number[] -1 >Emitted(34, 9) Source(2, 25) + SourceIndex(0) -2 >Emitted(34, 31) Source(2, 39) + SourceIndex(0) +1 >Emitted(36, 9) Source(2, 25) + SourceIndex(0) +2 >Emitted(36, 31) Source(2, 39) + SourceIndex(0) --- >>> } >>>} @@ -959,8 +969,8 @@ sourceFile:file0.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >) { 2 >} -1 >Emitted(36, 1) Source(2, 43) + SourceIndex(0) -2 >Emitted(36, 2) Source(2, 44) + SourceIndex(0) +1 >Emitted(38, 1) Source(2, 43) + SourceIndex(0) +2 >Emitted(38, 2) Source(2, 44) + SourceIndex(0) --- >>>libfile0Spread.apply(void 0, __spread([10, 20, 30])); 1-> @@ -987,17 +997,17 @@ sourceFile:file0.ts 9 > 30 10> ] 11> ); -1->Emitted(37, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(37, 15) Source(3, 15) + SourceIndex(0) -3 >Emitted(37, 39) Source(3, 19) + SourceIndex(0) -4 >Emitted(37, 40) Source(3, 20) + SourceIndex(0) -5 >Emitted(37, 42) Source(3, 22) + SourceIndex(0) -6 >Emitted(37, 44) Source(3, 24) + SourceIndex(0) -7 >Emitted(37, 46) Source(3, 26) + SourceIndex(0) -8 >Emitted(37, 48) Source(3, 28) + SourceIndex(0) -9 >Emitted(37, 50) Source(3, 30) + SourceIndex(0) -10>Emitted(37, 51) Source(3, 31) + SourceIndex(0) -11>Emitted(37, 54) Source(3, 33) + SourceIndex(0) +1->Emitted(39, 1) Source(3, 1) + SourceIndex(0) +2 >Emitted(39, 15) Source(3, 15) + SourceIndex(0) +3 >Emitted(39, 39) Source(3, 19) + SourceIndex(0) +4 >Emitted(39, 40) Source(3, 20) + SourceIndex(0) +5 >Emitted(39, 42) Source(3, 22) + SourceIndex(0) +6 >Emitted(39, 44) Source(3, 24) + SourceIndex(0) +7 >Emitted(39, 46) Source(3, 26) + SourceIndex(0) +8 >Emitted(39, 48) Source(3, 28) + SourceIndex(0) +9 >Emitted(39, 50) Source(3, 30) + SourceIndex(0) +10>Emitted(39, 51) Source(3, 31) + SourceIndex(0) +11>Emitted(39, 54) Source(3, 33) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/src/lib/module.js @@ -1020,12 +1030,12 @@ sourceFile:file1.ts 4 > = 5 > 10 6 > ; -1->Emitted(41, 5) Source(1, 14) + SourceIndex(1) -2 >Emitted(41, 13) Source(1, 14) + SourceIndex(1) -3 >Emitted(41, 14) Source(1, 15) + SourceIndex(1) -4 >Emitted(41, 17) Source(1, 18) + SourceIndex(1) -5 >Emitted(41, 19) Source(1, 20) + SourceIndex(1) -6 >Emitted(41, 20) Source(1, 21) + SourceIndex(1) +1->Emitted(43, 5) Source(1, 14) + SourceIndex(1) +2 >Emitted(43, 13) Source(1, 14) + SourceIndex(1) +3 >Emitted(43, 14) Source(1, 15) + SourceIndex(1) +4 >Emitted(43, 17) Source(1, 18) + SourceIndex(1) +5 >Emitted(43, 19) Source(1, 20) + SourceIndex(1) +6 >Emitted(43, 20) Source(1, 21) + SourceIndex(1) --- >>> function forlibfile1Rest() { 1->^^^^ @@ -1035,9 +1045,9 @@ sourceFile:file1.ts 1-> 2 > function 3 > forlibfile1Rest -1->Emitted(42, 5) Source(1, 21) + SourceIndex(1) -2 >Emitted(42, 14) Source(1, 30) + SourceIndex(1) -3 >Emitted(42, 29) Source(1, 45) + SourceIndex(1) +1->Emitted(44, 5) Source(1, 21) + SourceIndex(1) +2 >Emitted(44, 14) Source(1, 30) + SourceIndex(1) +3 >Emitted(44, 29) Source(1, 45) + SourceIndex(1) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^^^^^ @@ -1057,14 +1067,14 @@ sourceFile:file1.ts 6 > , 7 > ...rest } = { a: 10, b: 30, yy: 30 } 8 > ; -1->Emitted(43, 9) Source(2, 1) + SourceIndex(1) -2 >Emitted(43, 13) Source(2, 7) + SourceIndex(1) -3 >Emitted(43, 42) Source(2, 48) + SourceIndex(1) -4 >Emitted(43, 44) Source(2, 9) + SourceIndex(1) -5 >Emitted(43, 52) Source(2, 10) + SourceIndex(1) -6 >Emitted(43, 54) Source(2, 12) + SourceIndex(1) -7 >Emitted(43, 78) Source(2, 48) + SourceIndex(1) -8 >Emitted(43, 79) Source(2, 49) + SourceIndex(1) +1->Emitted(45, 9) Source(2, 1) + SourceIndex(1) +2 >Emitted(45, 13) Source(2, 7) + SourceIndex(1) +3 >Emitted(45, 42) Source(2, 48) + SourceIndex(1) +4 >Emitted(45, 44) Source(2, 9) + SourceIndex(1) +5 >Emitted(45, 52) Source(2, 10) + SourceIndex(1) +6 >Emitted(45, 54) Source(2, 12) + SourceIndex(1) +7 >Emitted(45, 78) Source(2, 48) + SourceIndex(1) +8 >Emitted(45, 79) Source(2, 49) + SourceIndex(1) --- >>> } 1 >^^^^ @@ -1073,8 +1083,8 @@ sourceFile:file1.ts 1 > > 2 > } -1 >Emitted(44, 5) Source(3, 1) + SourceIndex(1) -2 >Emitted(44, 6) Source(3, 2) + SourceIndex(1) +1 >Emitted(46, 5) Source(3, 1) + SourceIndex(1) +2 >Emitted(46, 6) Source(3, 2) + SourceIndex(1) --- >>> console.log(exports.x); 1->^^^^ @@ -1093,14 +1103,14 @@ sourceFile:file1.ts 6 > x 7 > ) 8 > ; -1->Emitted(45, 5) Source(3, 2) + SourceIndex(1) -2 >Emitted(45, 12) Source(3, 9) + SourceIndex(1) -3 >Emitted(45, 13) Source(3, 10) + SourceIndex(1) -4 >Emitted(45, 16) Source(3, 13) + SourceIndex(1) -5 >Emitted(45, 17) Source(3, 14) + SourceIndex(1) -6 >Emitted(45, 26) Source(3, 15) + SourceIndex(1) -7 >Emitted(45, 27) Source(3, 16) + SourceIndex(1) -8 >Emitted(45, 28) Source(3, 17) + SourceIndex(1) +1->Emitted(47, 5) Source(3, 2) + SourceIndex(1) +2 >Emitted(47, 12) Source(3, 9) + SourceIndex(1) +3 >Emitted(47, 13) Source(3, 10) + SourceIndex(1) +4 >Emitted(47, 16) Source(3, 13) + SourceIndex(1) +5 >Emitted(47, 17) Source(3, 14) + SourceIndex(1) +6 >Emitted(47, 26) Source(3, 15) + SourceIndex(1) +7 >Emitted(47, 27) Source(3, 16) + SourceIndex(1) +8 >Emitted(47, 28) Source(3, 17) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:/src/lib/module.js @@ -1123,12 +1133,12 @@ sourceFile:file2.ts 4 > = 5 > 20 6 > ; -1 >Emitted(50, 5) Source(1, 14) + SourceIndex(2) -2 >Emitted(50, 13) Source(1, 14) + SourceIndex(2) -3 >Emitted(50, 14) Source(1, 15) + SourceIndex(2) -4 >Emitted(50, 17) Source(1, 18) + SourceIndex(2) -5 >Emitted(50, 19) Source(1, 20) + SourceIndex(2) -6 >Emitted(50, 20) Source(1, 21) + SourceIndex(2) +1 >Emitted(52, 5) Source(1, 14) + SourceIndex(2) +2 >Emitted(52, 13) Source(1, 14) + SourceIndex(2) +3 >Emitted(52, 14) Source(1, 15) + SourceIndex(2) +4 >Emitted(52, 17) Source(1, 18) + SourceIndex(2) +5 >Emitted(52, 19) Source(1, 20) + SourceIndex(2) +6 >Emitted(52, 20) Source(1, 21) + SourceIndex(2) --- ------------------------------------------------------------------- emittedFile:/src/lib/module.js @@ -1149,12 +1159,12 @@ sourceFile:global.ts 4 > = 5 > 10 6 > ; -1 >Emitted(52, 1) Source(1, 1) + SourceIndex(3) -2 >Emitted(52, 5) Source(1, 7) + SourceIndex(3) -3 >Emitted(52, 16) Source(1, 18) + SourceIndex(3) -4 >Emitted(52, 19) Source(1, 21) + SourceIndex(3) -5 >Emitted(52, 21) Source(1, 23) + SourceIndex(3) -6 >Emitted(52, 22) Source(1, 24) + SourceIndex(3) +1 >Emitted(54, 1) Source(1, 1) + SourceIndex(3) +2 >Emitted(54, 5) Source(1, 7) + SourceIndex(3) +3 >Emitted(54, 16) Source(1, 18) + SourceIndex(3) +4 >Emitted(54, 19) Source(1, 21) + SourceIndex(3) +5 >Emitted(54, 21) Source(1, 23) + SourceIndex(3) +6 >Emitted(54, 22) Source(1, 24) + SourceIndex(3) --- >>>//# sourceMappingURL=module.js.map @@ -1184,13 +1194,13 @@ sourceFile:global.ts }, { "pos": 678, - "end": 1093, + "end": 1170, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 1095, - "end": 1850, + "pos": 1172, + "end": 1927, "kind": "text" } ], @@ -1243,18 +1253,20 @@ var __spread = (this && this.__spread) || function () { return ar; }; ---------------------------------------------------------------------- -emitHelpers: (678-1093):: typescript:rest +emitHelpers: (678-1170):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; ---------------------------------------------------------------------- -text: (1095-1850) +text: (1172-1927) var myGlob = 20; function libfile0Spread() { var b = []; diff --git a/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-headers-change-without-dts-changes/multiple-emitHelpers-in-all-projects.js b/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-headers-change-without-dts-changes/multiple-emitHelpers-in-all-projects.js index b8d83f88a6f..6fe32f3b11e 100644 --- a/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-headers-change-without-dts-changes/multiple-emitHelpers-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-headers-change-without-dts-changes/multiple-emitHelpers-in-all-projects.js @@ -24,8 +24,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; var myGlob = 20; @@ -67,7 +69,7 @@ appfile4Spread.apply(void 0, __spread([10, 20, 30])); //# sourceMappingURL=module.js.map //// [/src/app/module.js.map] -{"version":3,"file":"module.js","sourceRoot":"","sources":["../lib/file0.ts","../lib/file1.ts","../lib/file2.ts","../lib/global.ts","file3.ts","file4.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAM,MAAM,GAAG,EAAE,CAAC;AAClB,SAAS,cAAc;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AAC3C,cAAc,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;;;;ICFnB,QAAA,CAAC,GAAG,EAAE,CAAC;IAAA,SAAS,eAAe,KAAK,CAAC;;;;;ICArC,QAAA,CAAC,GAAG,EAAE,CAAC;;ACApB,IAAM,WAAW,GAAG,EAAE,CAAC;;;;ICAV,QAAA,CAAC,GAAG,EAAE,CAAC;IACM,SAAS,eAAe;QAClD,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;IAChD,CAAC;;ACHD,IAAM,KAAK,GAAG,EAAE,CAAC;AACjB,SAAS,cAAc;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AAC3C,cAAc,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE"} +{"version":3,"file":"module.js","sourceRoot":"","sources":["../lib/file0.ts","../lib/file1.ts","../lib/file2.ts","../lib/global.ts","file3.ts","file4.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAM,MAAM,GAAG,EAAE,CAAC;AAClB,SAAS,cAAc;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AAC3C,cAAc,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;;;;ICFnB,QAAA,CAAC,GAAG,EAAE,CAAC;IAAA,SAAS,eAAe,KAAK,CAAC;;;;;ICArC,QAAA,CAAC,GAAG,EAAE,CAAC;;ACApB,IAAM,WAAW,GAAG,EAAE,CAAC;;;;ICAV,QAAA,CAAC,GAAG,EAAE,CAAC;IACM,SAAS,eAAe;QAClD,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;IAChD,CAAC;;ACHD,IAAM,KAAK,GAAG,EAAE,CAAC;AACjB,SAAS,cAAc;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AAC3C,cAAc,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE"} //// [/src/app/module.js.map.baseline.txt] =================================================================== @@ -105,8 +107,10 @@ sourceFile:../lib/file0.ts >>> for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") ->>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) ->>> t[p[i]] = s[p[i]]; +>>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> t[p[i]] = s[p[i]]; +>>> } >>> return t; >>>}; >>>var myGlob = 20; @@ -123,12 +127,12 @@ sourceFile:../lib/file0.ts 4 > = 5 > 20 6 > ; -1 >Emitted(30, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(30, 5) Source(1, 7) + SourceIndex(0) -3 >Emitted(30, 11) Source(1, 13) + SourceIndex(0) -4 >Emitted(30, 14) Source(1, 16) + SourceIndex(0) -5 >Emitted(30, 16) Source(1, 18) + SourceIndex(0) -6 >Emitted(30, 17) Source(1, 19) + SourceIndex(0) +1 >Emitted(32, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(32, 5) Source(1, 7) + SourceIndex(0) +3 >Emitted(32, 11) Source(1, 13) + SourceIndex(0) +4 >Emitted(32, 14) Source(1, 16) + SourceIndex(0) +5 >Emitted(32, 16) Source(1, 18) + SourceIndex(0) +6 >Emitted(32, 17) Source(1, 19) + SourceIndex(0) --- >>>function libfile0Spread() { 1-> @@ -138,9 +142,9 @@ sourceFile:../lib/file0.ts > 2 >function 3 > libfile0Spread -1->Emitted(31, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(31, 10) Source(2, 10) + SourceIndex(0) -3 >Emitted(31, 24) Source(2, 24) + SourceIndex(0) +1->Emitted(33, 1) Source(2, 1) + SourceIndex(0) +2 >Emitted(33, 10) Source(2, 10) + SourceIndex(0) +3 >Emitted(33, 24) Source(2, 24) + SourceIndex(0) --- >>> var b = []; 1 >^^^^ @@ -148,8 +152,8 @@ sourceFile:../lib/file0.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >( 2 > ...b: number[] -1 >Emitted(32, 5) Source(2, 25) + SourceIndex(0) -2 >Emitted(32, 16) Source(2, 39) + SourceIndex(0) +1 >Emitted(34, 5) Source(2, 25) + SourceIndex(0) +2 >Emitted(34, 16) Source(2, 39) + SourceIndex(0) --- >>> for (var _i = 0; _i < arguments.length; _i++) { 1->^^^^^^^^^ @@ -164,20 +168,20 @@ sourceFile:../lib/file0.ts 4 > ...b: number[] 5 > 6 > ...b: number[] -1->Emitted(33, 10) Source(2, 25) + SourceIndex(0) -2 >Emitted(33, 20) Source(2, 39) + SourceIndex(0) -3 >Emitted(33, 22) Source(2, 25) + SourceIndex(0) -4 >Emitted(33, 43) Source(2, 39) + SourceIndex(0) -5 >Emitted(33, 45) Source(2, 25) + SourceIndex(0) -6 >Emitted(33, 49) Source(2, 39) + SourceIndex(0) +1->Emitted(35, 10) Source(2, 25) + SourceIndex(0) +2 >Emitted(35, 20) Source(2, 39) + SourceIndex(0) +3 >Emitted(35, 22) Source(2, 25) + SourceIndex(0) +4 >Emitted(35, 43) Source(2, 39) + SourceIndex(0) +5 >Emitted(35, 45) Source(2, 25) + SourceIndex(0) +6 >Emitted(35, 49) Source(2, 39) + SourceIndex(0) --- >>> b[_i] = arguments[_i]; 1 >^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^ 1 > 2 > ...b: number[] -1 >Emitted(34, 9) Source(2, 25) + SourceIndex(0) -2 >Emitted(34, 31) Source(2, 39) + SourceIndex(0) +1 >Emitted(36, 9) Source(2, 25) + SourceIndex(0) +2 >Emitted(36, 31) Source(2, 39) + SourceIndex(0) --- >>> } >>>} @@ -186,8 +190,8 @@ sourceFile:../lib/file0.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >) { 2 >} -1 >Emitted(36, 1) Source(2, 43) + SourceIndex(0) -2 >Emitted(36, 2) Source(2, 44) + SourceIndex(0) +1 >Emitted(38, 1) Source(2, 43) + SourceIndex(0) +2 >Emitted(38, 2) Source(2, 44) + SourceIndex(0) --- >>>libfile0Spread.apply(void 0, __spread([10, 20, 30])); 1-> @@ -214,17 +218,17 @@ sourceFile:../lib/file0.ts 9 > 30 10> ] 11> ); -1->Emitted(37, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(37, 15) Source(3, 15) + SourceIndex(0) -3 >Emitted(37, 39) Source(3, 19) + SourceIndex(0) -4 >Emitted(37, 40) Source(3, 20) + SourceIndex(0) -5 >Emitted(37, 42) Source(3, 22) + SourceIndex(0) -6 >Emitted(37, 44) Source(3, 24) + SourceIndex(0) -7 >Emitted(37, 46) Source(3, 26) + SourceIndex(0) -8 >Emitted(37, 48) Source(3, 28) + SourceIndex(0) -9 >Emitted(37, 50) Source(3, 30) + SourceIndex(0) -10>Emitted(37, 51) Source(3, 31) + SourceIndex(0) -11>Emitted(37, 54) Source(3, 33) + SourceIndex(0) +1->Emitted(39, 1) Source(3, 1) + SourceIndex(0) +2 >Emitted(39, 15) Source(3, 15) + SourceIndex(0) +3 >Emitted(39, 39) Source(3, 19) + SourceIndex(0) +4 >Emitted(39, 40) Source(3, 20) + SourceIndex(0) +5 >Emitted(39, 42) Source(3, 22) + SourceIndex(0) +6 >Emitted(39, 44) Source(3, 24) + SourceIndex(0) +7 >Emitted(39, 46) Source(3, 26) + SourceIndex(0) +8 >Emitted(39, 48) Source(3, 28) + SourceIndex(0) +9 >Emitted(39, 50) Source(3, 30) + SourceIndex(0) +10>Emitted(39, 51) Source(3, 31) + SourceIndex(0) +11>Emitted(39, 54) Source(3, 33) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/src/app/module.js @@ -247,12 +251,12 @@ sourceFile:../lib/file1.ts 4 > = 5 > 10 6 > ; -1->Emitted(41, 5) Source(1, 14) + SourceIndex(1) -2 >Emitted(41, 13) Source(1, 14) + SourceIndex(1) -3 >Emitted(41, 14) Source(1, 15) + SourceIndex(1) -4 >Emitted(41, 17) Source(1, 18) + SourceIndex(1) -5 >Emitted(41, 19) Source(1, 20) + SourceIndex(1) -6 >Emitted(41, 20) Source(1, 21) + SourceIndex(1) +1->Emitted(43, 5) Source(1, 14) + SourceIndex(1) +2 >Emitted(43, 13) Source(1, 14) + SourceIndex(1) +3 >Emitted(43, 14) Source(1, 15) + SourceIndex(1) +4 >Emitted(43, 17) Source(1, 18) + SourceIndex(1) +5 >Emitted(43, 19) Source(1, 20) + SourceIndex(1) +6 >Emitted(43, 20) Source(1, 21) + SourceIndex(1) --- >>> function forlibfile1Rest() { } 1->^^^^ @@ -265,11 +269,11 @@ sourceFile:../lib/file1.ts 3 > forlibfile1Rest 4 > () { 5 > } -1->Emitted(42, 5) Source(1, 21) + SourceIndex(1) -2 >Emitted(42, 14) Source(1, 30) + SourceIndex(1) -3 >Emitted(42, 29) Source(1, 45) + SourceIndex(1) -4 >Emitted(42, 34) Source(1, 50) + SourceIndex(1) -5 >Emitted(42, 35) Source(1, 51) + SourceIndex(1) +1->Emitted(44, 5) Source(1, 21) + SourceIndex(1) +2 >Emitted(44, 14) Source(1, 30) + SourceIndex(1) +3 >Emitted(44, 29) Source(1, 45) + SourceIndex(1) +4 >Emitted(44, 34) Source(1, 50) + SourceIndex(1) +5 >Emitted(44, 35) Source(1, 51) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:/src/app/module.js @@ -292,12 +296,12 @@ sourceFile:../lib/file2.ts 4 > = 5 > 20 6 > ; -1 >Emitted(47, 5) Source(1, 14) + SourceIndex(2) -2 >Emitted(47, 13) Source(1, 14) + SourceIndex(2) -3 >Emitted(47, 14) Source(1, 15) + SourceIndex(2) -4 >Emitted(47, 17) Source(1, 18) + SourceIndex(2) -5 >Emitted(47, 19) Source(1, 20) + SourceIndex(2) -6 >Emitted(47, 20) Source(1, 21) + SourceIndex(2) +1 >Emitted(49, 5) Source(1, 14) + SourceIndex(2) +2 >Emitted(49, 13) Source(1, 14) + SourceIndex(2) +3 >Emitted(49, 14) Source(1, 15) + SourceIndex(2) +4 >Emitted(49, 17) Source(1, 18) + SourceIndex(2) +5 >Emitted(49, 19) Source(1, 20) + SourceIndex(2) +6 >Emitted(49, 20) Source(1, 21) + SourceIndex(2) --- ------------------------------------------------------------------- emittedFile:/src/app/module.js @@ -318,12 +322,12 @@ sourceFile:../lib/global.ts 4 > = 5 > 10 6 > ; -1 >Emitted(49, 1) Source(1, 1) + SourceIndex(3) -2 >Emitted(49, 5) Source(1, 7) + SourceIndex(3) -3 >Emitted(49, 16) Source(1, 18) + SourceIndex(3) -4 >Emitted(49, 19) Source(1, 21) + SourceIndex(3) -5 >Emitted(49, 21) Source(1, 23) + SourceIndex(3) -6 >Emitted(49, 22) Source(1, 24) + SourceIndex(3) +1 >Emitted(51, 1) Source(1, 1) + SourceIndex(3) +2 >Emitted(51, 5) Source(1, 7) + SourceIndex(3) +3 >Emitted(51, 16) Source(1, 18) + SourceIndex(3) +4 >Emitted(51, 19) Source(1, 21) + SourceIndex(3) +5 >Emitted(51, 21) Source(1, 23) + SourceIndex(3) +6 >Emitted(51, 22) Source(1, 24) + SourceIndex(3) --- ------------------------------------------------------------------- emittedFile:/src/app/module.js @@ -346,12 +350,12 @@ sourceFile:file3.ts 4 > = 5 > 30 6 > ; -1->Emitted(53, 5) Source(1, 14) + SourceIndex(4) -2 >Emitted(53, 13) Source(1, 14) + SourceIndex(4) -3 >Emitted(53, 14) Source(1, 15) + SourceIndex(4) -4 >Emitted(53, 17) Source(1, 18) + SourceIndex(4) -5 >Emitted(53, 19) Source(1, 20) + SourceIndex(4) -6 >Emitted(53, 20) Source(1, 21) + SourceIndex(4) +1->Emitted(55, 5) Source(1, 14) + SourceIndex(4) +2 >Emitted(55, 13) Source(1, 14) + SourceIndex(4) +3 >Emitted(55, 14) Source(1, 15) + SourceIndex(4) +4 >Emitted(55, 17) Source(1, 18) + SourceIndex(4) +5 >Emitted(55, 19) Source(1, 20) + SourceIndex(4) +6 >Emitted(55, 20) Source(1, 21) + SourceIndex(4) --- >>> function forappfile3Rest() { 1->^^^^ @@ -362,9 +366,9 @@ sourceFile:file3.ts >import { x } from "file1"; 2 > function 3 > forappfile3Rest -1->Emitted(54, 5) Source(2, 27) + SourceIndex(4) -2 >Emitted(54, 14) Source(2, 36) + SourceIndex(4) -3 >Emitted(54, 29) Source(2, 51) + SourceIndex(4) +1->Emitted(56, 5) Source(2, 27) + SourceIndex(4) +2 >Emitted(56, 14) Source(2, 36) + SourceIndex(4) +3 >Emitted(56, 29) Source(2, 51) + SourceIndex(4) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^^^^^ @@ -384,14 +388,14 @@ sourceFile:file3.ts 6 > , 7 > ...rest } = { a: 10, b: 30, yy: 30 } 8 > ; -1->Emitted(55, 9) Source(3, 1) + SourceIndex(4) -2 >Emitted(55, 13) Source(3, 7) + SourceIndex(4) -3 >Emitted(55, 42) Source(3, 48) + SourceIndex(4) -4 >Emitted(55, 44) Source(3, 9) + SourceIndex(4) -5 >Emitted(55, 52) Source(3, 10) + SourceIndex(4) -6 >Emitted(55, 54) Source(3, 12) + SourceIndex(4) -7 >Emitted(55, 78) Source(3, 48) + SourceIndex(4) -8 >Emitted(55, 79) Source(3, 49) + SourceIndex(4) +1->Emitted(57, 9) Source(3, 1) + SourceIndex(4) +2 >Emitted(57, 13) Source(3, 7) + SourceIndex(4) +3 >Emitted(57, 42) Source(3, 48) + SourceIndex(4) +4 >Emitted(57, 44) Source(3, 9) + SourceIndex(4) +5 >Emitted(57, 52) Source(3, 10) + SourceIndex(4) +6 >Emitted(57, 54) Source(3, 12) + SourceIndex(4) +7 >Emitted(57, 78) Source(3, 48) + SourceIndex(4) +8 >Emitted(57, 79) Source(3, 49) + SourceIndex(4) --- >>> } 1 >^^^^ @@ -399,8 +403,8 @@ sourceFile:file3.ts 1 > > 2 > } -1 >Emitted(56, 5) Source(4, 1) + SourceIndex(4) -2 >Emitted(56, 6) Source(4, 2) + SourceIndex(4) +1 >Emitted(58, 5) Source(4, 1) + SourceIndex(4) +2 >Emitted(58, 6) Source(4, 2) + SourceIndex(4) --- ------------------------------------------------------------------- emittedFile:/src/app/module.js @@ -421,12 +425,12 @@ sourceFile:file4.ts 4 > = 5 > 30 6 > ; -1 >Emitted(58, 1) Source(1, 1) + SourceIndex(5) -2 >Emitted(58, 5) Source(1, 7) + SourceIndex(5) -3 >Emitted(58, 10) Source(1, 12) + SourceIndex(5) -4 >Emitted(58, 13) Source(1, 15) + SourceIndex(5) -5 >Emitted(58, 15) Source(1, 17) + SourceIndex(5) -6 >Emitted(58, 16) Source(1, 18) + SourceIndex(5) +1 >Emitted(60, 1) Source(1, 1) + SourceIndex(5) +2 >Emitted(60, 5) Source(1, 7) + SourceIndex(5) +3 >Emitted(60, 10) Source(1, 12) + SourceIndex(5) +4 >Emitted(60, 13) Source(1, 15) + SourceIndex(5) +5 >Emitted(60, 15) Source(1, 17) + SourceIndex(5) +6 >Emitted(60, 16) Source(1, 18) + SourceIndex(5) --- >>>function appfile4Spread() { 1-> @@ -436,9 +440,9 @@ sourceFile:file4.ts > 2 >function 3 > appfile4Spread -1->Emitted(59, 1) Source(2, 1) + SourceIndex(5) -2 >Emitted(59, 10) Source(2, 10) + SourceIndex(5) -3 >Emitted(59, 24) Source(2, 24) + SourceIndex(5) +1->Emitted(61, 1) Source(2, 1) + SourceIndex(5) +2 >Emitted(61, 10) Source(2, 10) + SourceIndex(5) +3 >Emitted(61, 24) Source(2, 24) + SourceIndex(5) --- >>> var b = []; 1 >^^^^ @@ -446,8 +450,8 @@ sourceFile:file4.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >( 2 > ...b: number[] -1 >Emitted(60, 5) Source(2, 25) + SourceIndex(5) -2 >Emitted(60, 16) Source(2, 39) + SourceIndex(5) +1 >Emitted(62, 5) Source(2, 25) + SourceIndex(5) +2 >Emitted(62, 16) Source(2, 39) + SourceIndex(5) --- >>> for (var _i = 0; _i < arguments.length; _i++) { 1->^^^^^^^^^ @@ -462,20 +466,20 @@ sourceFile:file4.ts 4 > ...b: number[] 5 > 6 > ...b: number[] -1->Emitted(61, 10) Source(2, 25) + SourceIndex(5) -2 >Emitted(61, 20) Source(2, 39) + SourceIndex(5) -3 >Emitted(61, 22) Source(2, 25) + SourceIndex(5) -4 >Emitted(61, 43) Source(2, 39) + SourceIndex(5) -5 >Emitted(61, 45) Source(2, 25) + SourceIndex(5) -6 >Emitted(61, 49) Source(2, 39) + SourceIndex(5) +1->Emitted(63, 10) Source(2, 25) + SourceIndex(5) +2 >Emitted(63, 20) Source(2, 39) + SourceIndex(5) +3 >Emitted(63, 22) Source(2, 25) + SourceIndex(5) +4 >Emitted(63, 43) Source(2, 39) + SourceIndex(5) +5 >Emitted(63, 45) Source(2, 25) + SourceIndex(5) +6 >Emitted(63, 49) Source(2, 39) + SourceIndex(5) --- >>> b[_i] = arguments[_i]; 1 >^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^ 1 > 2 > ...b: number[] -1 >Emitted(62, 9) Source(2, 25) + SourceIndex(5) -2 >Emitted(62, 31) Source(2, 39) + SourceIndex(5) +1 >Emitted(64, 9) Source(2, 25) + SourceIndex(5) +2 >Emitted(64, 31) Source(2, 39) + SourceIndex(5) --- >>> } >>>} @@ -484,8 +488,8 @@ sourceFile:file4.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >) { 2 >} -1 >Emitted(64, 1) Source(2, 43) + SourceIndex(5) -2 >Emitted(64, 2) Source(2, 44) + SourceIndex(5) +1 >Emitted(66, 1) Source(2, 43) + SourceIndex(5) +2 >Emitted(66, 2) Source(2, 44) + SourceIndex(5) --- >>>appfile4Spread.apply(void 0, __spread([10, 20, 30])); 1-> @@ -511,17 +515,17 @@ sourceFile:file4.ts 9 > 30 10> ] 11> ); -1->Emitted(65, 1) Source(3, 1) + SourceIndex(5) -2 >Emitted(65, 15) Source(3, 15) + SourceIndex(5) -3 >Emitted(65, 39) Source(3, 19) + SourceIndex(5) -4 >Emitted(65, 40) Source(3, 20) + SourceIndex(5) -5 >Emitted(65, 42) Source(3, 22) + SourceIndex(5) -6 >Emitted(65, 44) Source(3, 24) + SourceIndex(5) -7 >Emitted(65, 46) Source(3, 26) + SourceIndex(5) -8 >Emitted(65, 48) Source(3, 28) + SourceIndex(5) -9 >Emitted(65, 50) Source(3, 30) + SourceIndex(5) -10>Emitted(65, 51) Source(3, 31) + SourceIndex(5) -11>Emitted(65, 54) Source(3, 33) + SourceIndex(5) +1->Emitted(67, 1) Source(3, 1) + SourceIndex(5) +2 >Emitted(67, 15) Source(3, 15) + SourceIndex(5) +3 >Emitted(67, 39) Source(3, 19) + SourceIndex(5) +4 >Emitted(67, 40) Source(3, 20) + SourceIndex(5) +5 >Emitted(67, 42) Source(3, 22) + SourceIndex(5) +6 >Emitted(67, 44) Source(3, 24) + SourceIndex(5) +7 >Emitted(67, 46) Source(3, 26) + SourceIndex(5) +8 >Emitted(67, 48) Source(3, 28) + SourceIndex(5) +9 >Emitted(67, 50) Source(3, 30) + SourceIndex(5) +10>Emitted(67, 51) Source(3, 31) + SourceIndex(5) +11>Emitted(67, 54) Source(3, 33) + SourceIndex(5) --- >>>//# sourceMappingURL=module.js.map @@ -549,26 +553,26 @@ sourceFile:file4.ts }, { "pos": 678, - "end": 1093, + "end": 1170, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 1095, - "end": 1736, + "pos": 1172, + "end": 1813, "kind": "prepend", "data": "/src/lib/module.js", "texts": [ { - "pos": 1095, - "end": 1736, + "pos": 1172, + "end": 1813, "kind": "text" } ] }, { - "pos": 1736, - "end": 2254, + "pos": 1813, + "end": 2331, "kind": "text" } ], @@ -634,20 +638,22 @@ var __spread = (this && this.__spread) || function () { return ar; }; ---------------------------------------------------------------------- -emitHelpers: (678-1093):: typescript:rest +emitHelpers: (678-1170):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; ---------------------------------------------------------------------- -prepend: (1095-1736):: /src/lib/module.js texts:: 1 +prepend: (1172-1813):: /src/lib/module.js texts:: 1 >>-------------------------------------------------------------------- -text: (1095-1736) +text: (1172-1813) var myGlob = 20; function libfile0Spread() { var b = []; @@ -670,7 +676,7 @@ define("file2", ["require", "exports"], function (require, exports) { var globalConst = 10; ---------------------------------------------------------------------- -text: (1736-2254) +text: (1813-2331) define("file3", ["require", "exports"], function (require, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/tsbuild/amdModulesWithOut/initial-Build/multiple-emitHelpers-in-all-projects.js b/tests/baselines/reference/tsbuild/amdModulesWithOut/initial-Build/multiple-emitHelpers-in-all-projects.js index 3a832c191c0..d8a20bac2e8 100644 --- a/tests/baselines/reference/tsbuild/amdModulesWithOut/initial-Build/multiple-emitHelpers-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/amdModulesWithOut/initial-Build/multiple-emitHelpers-in-all-projects.js @@ -285,8 +285,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; var myGlob = 20; @@ -330,7 +332,7 @@ appfile4Spread.apply(void 0, __spread([10, 20, 30])); //# sourceMappingURL=module.js.map //// [/src/app/module.js.map] -{"version":3,"file":"module.js","sourceRoot":"","sources":["../lib/file0.ts","../lib/file1.ts","../lib/file2.ts","../lib/global.ts","file3.ts","file4.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAM,MAAM,GAAG,EAAE,CAAC;AAClB,SAAS,cAAc;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AAC3C,cAAc,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;;;;ICFnB,QAAA,CAAC,GAAG,EAAE,CAAC;IAAA,SAAS,eAAe;QAC5C,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;IAChD,CAAC;;;;;ICFY,QAAA,CAAC,GAAG,EAAE,CAAC;;ACApB,IAAM,WAAW,GAAG,EAAE,CAAC;;;;ICAV,QAAA,CAAC,GAAG,EAAE,CAAC;IACM,SAAS,eAAe;QAClD,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;IAChD,CAAC;;ACHD,IAAM,KAAK,GAAG,EAAE,CAAC;AACjB,SAAS,cAAc;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AAC3C,cAAc,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE"} +{"version":3,"file":"module.js","sourceRoot":"","sources":["../lib/file0.ts","../lib/file1.ts","../lib/file2.ts","../lib/global.ts","file3.ts","file4.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAM,MAAM,GAAG,EAAE,CAAC;AAClB,SAAS,cAAc;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AAC3C,cAAc,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;;;;ICFnB,QAAA,CAAC,GAAG,EAAE,CAAC;IAAA,SAAS,eAAe;QAC5C,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;IAChD,CAAC;;;;;ICFY,QAAA,CAAC,GAAG,EAAE,CAAC;;ACApB,IAAM,WAAW,GAAG,EAAE,CAAC;;;;ICAV,QAAA,CAAC,GAAG,EAAE,CAAC;IACM,SAAS,eAAe;QAClD,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;IAChD,CAAC;;ACHD,IAAM,KAAK,GAAG,EAAE,CAAC;AACjB,SAAS,cAAc;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AAC3C,cAAc,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE"} //// [/src/app/module.js.map.baseline.txt] =================================================================== @@ -368,8 +370,10 @@ sourceFile:../lib/file0.ts >>> for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") ->>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) ->>> t[p[i]] = s[p[i]]; +>>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> t[p[i]] = s[p[i]]; +>>> } >>> return t; >>>}; >>>var myGlob = 20; @@ -386,12 +390,12 @@ sourceFile:../lib/file0.ts 4 > = 5 > 20 6 > ; -1 >Emitted(30, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(30, 5) Source(1, 7) + SourceIndex(0) -3 >Emitted(30, 11) Source(1, 13) + SourceIndex(0) -4 >Emitted(30, 14) Source(1, 16) + SourceIndex(0) -5 >Emitted(30, 16) Source(1, 18) + SourceIndex(0) -6 >Emitted(30, 17) Source(1, 19) + SourceIndex(0) +1 >Emitted(32, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(32, 5) Source(1, 7) + SourceIndex(0) +3 >Emitted(32, 11) Source(1, 13) + SourceIndex(0) +4 >Emitted(32, 14) Source(1, 16) + SourceIndex(0) +5 >Emitted(32, 16) Source(1, 18) + SourceIndex(0) +6 >Emitted(32, 17) Source(1, 19) + SourceIndex(0) --- >>>function libfile0Spread() { 1-> @@ -401,9 +405,9 @@ sourceFile:../lib/file0.ts > 2 >function 3 > libfile0Spread -1->Emitted(31, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(31, 10) Source(2, 10) + SourceIndex(0) -3 >Emitted(31, 24) Source(2, 24) + SourceIndex(0) +1->Emitted(33, 1) Source(2, 1) + SourceIndex(0) +2 >Emitted(33, 10) Source(2, 10) + SourceIndex(0) +3 >Emitted(33, 24) Source(2, 24) + SourceIndex(0) --- >>> var b = []; 1 >^^^^ @@ -411,8 +415,8 @@ sourceFile:../lib/file0.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >( 2 > ...b: number[] -1 >Emitted(32, 5) Source(2, 25) + SourceIndex(0) -2 >Emitted(32, 16) Source(2, 39) + SourceIndex(0) +1 >Emitted(34, 5) Source(2, 25) + SourceIndex(0) +2 >Emitted(34, 16) Source(2, 39) + SourceIndex(0) --- >>> for (var _i = 0; _i < arguments.length; _i++) { 1->^^^^^^^^^ @@ -427,20 +431,20 @@ sourceFile:../lib/file0.ts 4 > ...b: number[] 5 > 6 > ...b: number[] -1->Emitted(33, 10) Source(2, 25) + SourceIndex(0) -2 >Emitted(33, 20) Source(2, 39) + SourceIndex(0) -3 >Emitted(33, 22) Source(2, 25) + SourceIndex(0) -4 >Emitted(33, 43) Source(2, 39) + SourceIndex(0) -5 >Emitted(33, 45) Source(2, 25) + SourceIndex(0) -6 >Emitted(33, 49) Source(2, 39) + SourceIndex(0) +1->Emitted(35, 10) Source(2, 25) + SourceIndex(0) +2 >Emitted(35, 20) Source(2, 39) + SourceIndex(0) +3 >Emitted(35, 22) Source(2, 25) + SourceIndex(0) +4 >Emitted(35, 43) Source(2, 39) + SourceIndex(0) +5 >Emitted(35, 45) Source(2, 25) + SourceIndex(0) +6 >Emitted(35, 49) Source(2, 39) + SourceIndex(0) --- >>> b[_i] = arguments[_i]; 1 >^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^ 1 > 2 > ...b: number[] -1 >Emitted(34, 9) Source(2, 25) + SourceIndex(0) -2 >Emitted(34, 31) Source(2, 39) + SourceIndex(0) +1 >Emitted(36, 9) Source(2, 25) + SourceIndex(0) +2 >Emitted(36, 31) Source(2, 39) + SourceIndex(0) --- >>> } >>>} @@ -449,8 +453,8 @@ sourceFile:../lib/file0.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >) { 2 >} -1 >Emitted(36, 1) Source(2, 43) + SourceIndex(0) -2 >Emitted(36, 2) Source(2, 44) + SourceIndex(0) +1 >Emitted(38, 1) Source(2, 43) + SourceIndex(0) +2 >Emitted(38, 2) Source(2, 44) + SourceIndex(0) --- >>>libfile0Spread.apply(void 0, __spread([10, 20, 30])); 1-> @@ -477,17 +481,17 @@ sourceFile:../lib/file0.ts 9 > 30 10> ] 11> ); -1->Emitted(37, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(37, 15) Source(3, 15) + SourceIndex(0) -3 >Emitted(37, 39) Source(3, 19) + SourceIndex(0) -4 >Emitted(37, 40) Source(3, 20) + SourceIndex(0) -5 >Emitted(37, 42) Source(3, 22) + SourceIndex(0) -6 >Emitted(37, 44) Source(3, 24) + SourceIndex(0) -7 >Emitted(37, 46) Source(3, 26) + SourceIndex(0) -8 >Emitted(37, 48) Source(3, 28) + SourceIndex(0) -9 >Emitted(37, 50) Source(3, 30) + SourceIndex(0) -10>Emitted(37, 51) Source(3, 31) + SourceIndex(0) -11>Emitted(37, 54) Source(3, 33) + SourceIndex(0) +1->Emitted(39, 1) Source(3, 1) + SourceIndex(0) +2 >Emitted(39, 15) Source(3, 15) + SourceIndex(0) +3 >Emitted(39, 39) Source(3, 19) + SourceIndex(0) +4 >Emitted(39, 40) Source(3, 20) + SourceIndex(0) +5 >Emitted(39, 42) Source(3, 22) + SourceIndex(0) +6 >Emitted(39, 44) Source(3, 24) + SourceIndex(0) +7 >Emitted(39, 46) Source(3, 26) + SourceIndex(0) +8 >Emitted(39, 48) Source(3, 28) + SourceIndex(0) +9 >Emitted(39, 50) Source(3, 30) + SourceIndex(0) +10>Emitted(39, 51) Source(3, 31) + SourceIndex(0) +11>Emitted(39, 54) Source(3, 33) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/src/app/module.js @@ -510,12 +514,12 @@ sourceFile:../lib/file1.ts 4 > = 5 > 10 6 > ; -1->Emitted(41, 5) Source(1, 14) + SourceIndex(1) -2 >Emitted(41, 13) Source(1, 14) + SourceIndex(1) -3 >Emitted(41, 14) Source(1, 15) + SourceIndex(1) -4 >Emitted(41, 17) Source(1, 18) + SourceIndex(1) -5 >Emitted(41, 19) Source(1, 20) + SourceIndex(1) -6 >Emitted(41, 20) Source(1, 21) + SourceIndex(1) +1->Emitted(43, 5) Source(1, 14) + SourceIndex(1) +2 >Emitted(43, 13) Source(1, 14) + SourceIndex(1) +3 >Emitted(43, 14) Source(1, 15) + SourceIndex(1) +4 >Emitted(43, 17) Source(1, 18) + SourceIndex(1) +5 >Emitted(43, 19) Source(1, 20) + SourceIndex(1) +6 >Emitted(43, 20) Source(1, 21) + SourceIndex(1) --- >>> function forlibfile1Rest() { 1->^^^^ @@ -525,9 +529,9 @@ sourceFile:../lib/file1.ts 1-> 2 > function 3 > forlibfile1Rest -1->Emitted(42, 5) Source(1, 21) + SourceIndex(1) -2 >Emitted(42, 14) Source(1, 30) + SourceIndex(1) -3 >Emitted(42, 29) Source(1, 45) + SourceIndex(1) +1->Emitted(44, 5) Source(1, 21) + SourceIndex(1) +2 >Emitted(44, 14) Source(1, 30) + SourceIndex(1) +3 >Emitted(44, 29) Source(1, 45) + SourceIndex(1) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^^^^^ @@ -547,14 +551,14 @@ sourceFile:../lib/file1.ts 6 > , 7 > ...rest } = { a: 10, b: 30, yy: 30 } 8 > ; -1->Emitted(43, 9) Source(2, 1) + SourceIndex(1) -2 >Emitted(43, 13) Source(2, 7) + SourceIndex(1) -3 >Emitted(43, 42) Source(2, 48) + SourceIndex(1) -4 >Emitted(43, 44) Source(2, 9) + SourceIndex(1) -5 >Emitted(43, 52) Source(2, 10) + SourceIndex(1) -6 >Emitted(43, 54) Source(2, 12) + SourceIndex(1) -7 >Emitted(43, 78) Source(2, 48) + SourceIndex(1) -8 >Emitted(43, 79) Source(2, 49) + SourceIndex(1) +1->Emitted(45, 9) Source(2, 1) + SourceIndex(1) +2 >Emitted(45, 13) Source(2, 7) + SourceIndex(1) +3 >Emitted(45, 42) Source(2, 48) + SourceIndex(1) +4 >Emitted(45, 44) Source(2, 9) + SourceIndex(1) +5 >Emitted(45, 52) Source(2, 10) + SourceIndex(1) +6 >Emitted(45, 54) Source(2, 12) + SourceIndex(1) +7 >Emitted(45, 78) Source(2, 48) + SourceIndex(1) +8 >Emitted(45, 79) Source(2, 49) + SourceIndex(1) --- >>> } 1 >^^^^ @@ -562,8 +566,8 @@ sourceFile:../lib/file1.ts 1 > > 2 > } -1 >Emitted(44, 5) Source(3, 1) + SourceIndex(1) -2 >Emitted(44, 6) Source(3, 2) + SourceIndex(1) +1 >Emitted(46, 5) Source(3, 1) + SourceIndex(1) +2 >Emitted(46, 6) Source(3, 2) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:/src/app/module.js @@ -586,12 +590,12 @@ sourceFile:../lib/file2.ts 4 > = 5 > 20 6 > ; -1 >Emitted(49, 5) Source(1, 14) + SourceIndex(2) -2 >Emitted(49, 13) Source(1, 14) + SourceIndex(2) -3 >Emitted(49, 14) Source(1, 15) + SourceIndex(2) -4 >Emitted(49, 17) Source(1, 18) + SourceIndex(2) -5 >Emitted(49, 19) Source(1, 20) + SourceIndex(2) -6 >Emitted(49, 20) Source(1, 21) + SourceIndex(2) +1 >Emitted(51, 5) Source(1, 14) + SourceIndex(2) +2 >Emitted(51, 13) Source(1, 14) + SourceIndex(2) +3 >Emitted(51, 14) Source(1, 15) + SourceIndex(2) +4 >Emitted(51, 17) Source(1, 18) + SourceIndex(2) +5 >Emitted(51, 19) Source(1, 20) + SourceIndex(2) +6 >Emitted(51, 20) Source(1, 21) + SourceIndex(2) --- ------------------------------------------------------------------- emittedFile:/src/app/module.js @@ -612,12 +616,12 @@ sourceFile:../lib/global.ts 4 > = 5 > 10 6 > ; -1 >Emitted(51, 1) Source(1, 1) + SourceIndex(3) -2 >Emitted(51, 5) Source(1, 7) + SourceIndex(3) -3 >Emitted(51, 16) Source(1, 18) + SourceIndex(3) -4 >Emitted(51, 19) Source(1, 21) + SourceIndex(3) -5 >Emitted(51, 21) Source(1, 23) + SourceIndex(3) -6 >Emitted(51, 22) Source(1, 24) + SourceIndex(3) +1 >Emitted(53, 1) Source(1, 1) + SourceIndex(3) +2 >Emitted(53, 5) Source(1, 7) + SourceIndex(3) +3 >Emitted(53, 16) Source(1, 18) + SourceIndex(3) +4 >Emitted(53, 19) Source(1, 21) + SourceIndex(3) +5 >Emitted(53, 21) Source(1, 23) + SourceIndex(3) +6 >Emitted(53, 22) Source(1, 24) + SourceIndex(3) --- ------------------------------------------------------------------- emittedFile:/src/app/module.js @@ -640,12 +644,12 @@ sourceFile:file3.ts 4 > = 5 > 30 6 > ; -1->Emitted(55, 5) Source(1, 14) + SourceIndex(4) -2 >Emitted(55, 13) Source(1, 14) + SourceIndex(4) -3 >Emitted(55, 14) Source(1, 15) + SourceIndex(4) -4 >Emitted(55, 17) Source(1, 18) + SourceIndex(4) -5 >Emitted(55, 19) Source(1, 20) + SourceIndex(4) -6 >Emitted(55, 20) Source(1, 21) + SourceIndex(4) +1->Emitted(57, 5) Source(1, 14) + SourceIndex(4) +2 >Emitted(57, 13) Source(1, 14) + SourceIndex(4) +3 >Emitted(57, 14) Source(1, 15) + SourceIndex(4) +4 >Emitted(57, 17) Source(1, 18) + SourceIndex(4) +5 >Emitted(57, 19) Source(1, 20) + SourceIndex(4) +6 >Emitted(57, 20) Source(1, 21) + SourceIndex(4) --- >>> function forappfile3Rest() { 1->^^^^ @@ -656,9 +660,9 @@ sourceFile:file3.ts >import { x } from "file1"; 2 > function 3 > forappfile3Rest -1->Emitted(56, 5) Source(2, 27) + SourceIndex(4) -2 >Emitted(56, 14) Source(2, 36) + SourceIndex(4) -3 >Emitted(56, 29) Source(2, 51) + SourceIndex(4) +1->Emitted(58, 5) Source(2, 27) + SourceIndex(4) +2 >Emitted(58, 14) Source(2, 36) + SourceIndex(4) +3 >Emitted(58, 29) Source(2, 51) + SourceIndex(4) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^^^^^ @@ -678,14 +682,14 @@ sourceFile:file3.ts 6 > , 7 > ...rest } = { a: 10, b: 30, yy: 30 } 8 > ; -1->Emitted(57, 9) Source(3, 1) + SourceIndex(4) -2 >Emitted(57, 13) Source(3, 7) + SourceIndex(4) -3 >Emitted(57, 42) Source(3, 48) + SourceIndex(4) -4 >Emitted(57, 44) Source(3, 9) + SourceIndex(4) -5 >Emitted(57, 52) Source(3, 10) + SourceIndex(4) -6 >Emitted(57, 54) Source(3, 12) + SourceIndex(4) -7 >Emitted(57, 78) Source(3, 48) + SourceIndex(4) -8 >Emitted(57, 79) Source(3, 49) + SourceIndex(4) +1->Emitted(59, 9) Source(3, 1) + SourceIndex(4) +2 >Emitted(59, 13) Source(3, 7) + SourceIndex(4) +3 >Emitted(59, 42) Source(3, 48) + SourceIndex(4) +4 >Emitted(59, 44) Source(3, 9) + SourceIndex(4) +5 >Emitted(59, 52) Source(3, 10) + SourceIndex(4) +6 >Emitted(59, 54) Source(3, 12) + SourceIndex(4) +7 >Emitted(59, 78) Source(3, 48) + SourceIndex(4) +8 >Emitted(59, 79) Source(3, 49) + SourceIndex(4) --- >>> } 1 >^^^^ @@ -693,8 +697,8 @@ sourceFile:file3.ts 1 > > 2 > } -1 >Emitted(58, 5) Source(4, 1) + SourceIndex(4) -2 >Emitted(58, 6) Source(4, 2) + SourceIndex(4) +1 >Emitted(60, 5) Source(4, 1) + SourceIndex(4) +2 >Emitted(60, 6) Source(4, 2) + SourceIndex(4) --- ------------------------------------------------------------------- emittedFile:/src/app/module.js @@ -715,12 +719,12 @@ sourceFile:file4.ts 4 > = 5 > 30 6 > ; -1 >Emitted(60, 1) Source(1, 1) + SourceIndex(5) -2 >Emitted(60, 5) Source(1, 7) + SourceIndex(5) -3 >Emitted(60, 10) Source(1, 12) + SourceIndex(5) -4 >Emitted(60, 13) Source(1, 15) + SourceIndex(5) -5 >Emitted(60, 15) Source(1, 17) + SourceIndex(5) -6 >Emitted(60, 16) Source(1, 18) + SourceIndex(5) +1 >Emitted(62, 1) Source(1, 1) + SourceIndex(5) +2 >Emitted(62, 5) Source(1, 7) + SourceIndex(5) +3 >Emitted(62, 10) Source(1, 12) + SourceIndex(5) +4 >Emitted(62, 13) Source(1, 15) + SourceIndex(5) +5 >Emitted(62, 15) Source(1, 17) + SourceIndex(5) +6 >Emitted(62, 16) Source(1, 18) + SourceIndex(5) --- >>>function appfile4Spread() { 1-> @@ -730,9 +734,9 @@ sourceFile:file4.ts > 2 >function 3 > appfile4Spread -1->Emitted(61, 1) Source(2, 1) + SourceIndex(5) -2 >Emitted(61, 10) Source(2, 10) + SourceIndex(5) -3 >Emitted(61, 24) Source(2, 24) + SourceIndex(5) +1->Emitted(63, 1) Source(2, 1) + SourceIndex(5) +2 >Emitted(63, 10) Source(2, 10) + SourceIndex(5) +3 >Emitted(63, 24) Source(2, 24) + SourceIndex(5) --- >>> var b = []; 1 >^^^^ @@ -740,8 +744,8 @@ sourceFile:file4.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >( 2 > ...b: number[] -1 >Emitted(62, 5) Source(2, 25) + SourceIndex(5) -2 >Emitted(62, 16) Source(2, 39) + SourceIndex(5) +1 >Emitted(64, 5) Source(2, 25) + SourceIndex(5) +2 >Emitted(64, 16) Source(2, 39) + SourceIndex(5) --- >>> for (var _i = 0; _i < arguments.length; _i++) { 1->^^^^^^^^^ @@ -756,20 +760,20 @@ sourceFile:file4.ts 4 > ...b: number[] 5 > 6 > ...b: number[] -1->Emitted(63, 10) Source(2, 25) + SourceIndex(5) -2 >Emitted(63, 20) Source(2, 39) + SourceIndex(5) -3 >Emitted(63, 22) Source(2, 25) + SourceIndex(5) -4 >Emitted(63, 43) Source(2, 39) + SourceIndex(5) -5 >Emitted(63, 45) Source(2, 25) + SourceIndex(5) -6 >Emitted(63, 49) Source(2, 39) + SourceIndex(5) +1->Emitted(65, 10) Source(2, 25) + SourceIndex(5) +2 >Emitted(65, 20) Source(2, 39) + SourceIndex(5) +3 >Emitted(65, 22) Source(2, 25) + SourceIndex(5) +4 >Emitted(65, 43) Source(2, 39) + SourceIndex(5) +5 >Emitted(65, 45) Source(2, 25) + SourceIndex(5) +6 >Emitted(65, 49) Source(2, 39) + SourceIndex(5) --- >>> b[_i] = arguments[_i]; 1 >^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^ 1 > 2 > ...b: number[] -1 >Emitted(64, 9) Source(2, 25) + SourceIndex(5) -2 >Emitted(64, 31) Source(2, 39) + SourceIndex(5) +1 >Emitted(66, 9) Source(2, 25) + SourceIndex(5) +2 >Emitted(66, 31) Source(2, 39) + SourceIndex(5) --- >>> } >>>} @@ -778,8 +782,8 @@ sourceFile:file4.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >) { 2 >} -1 >Emitted(66, 1) Source(2, 43) + SourceIndex(5) -2 >Emitted(66, 2) Source(2, 44) + SourceIndex(5) +1 >Emitted(68, 1) Source(2, 43) + SourceIndex(5) +2 >Emitted(68, 2) Source(2, 44) + SourceIndex(5) --- >>>appfile4Spread.apply(void 0, __spread([10, 20, 30])); 1-> @@ -805,17 +809,17 @@ sourceFile:file4.ts 9 > 30 10> ] 11> ); -1->Emitted(67, 1) Source(3, 1) + SourceIndex(5) -2 >Emitted(67, 15) Source(3, 15) + SourceIndex(5) -3 >Emitted(67, 39) Source(3, 19) + SourceIndex(5) -4 >Emitted(67, 40) Source(3, 20) + SourceIndex(5) -5 >Emitted(67, 42) Source(3, 22) + SourceIndex(5) -6 >Emitted(67, 44) Source(3, 24) + SourceIndex(5) -7 >Emitted(67, 46) Source(3, 26) + SourceIndex(5) -8 >Emitted(67, 48) Source(3, 28) + SourceIndex(5) -9 >Emitted(67, 50) Source(3, 30) + SourceIndex(5) -10>Emitted(67, 51) Source(3, 31) + SourceIndex(5) -11>Emitted(67, 54) Source(3, 33) + SourceIndex(5) +1->Emitted(69, 1) Source(3, 1) + SourceIndex(5) +2 >Emitted(69, 15) Source(3, 15) + SourceIndex(5) +3 >Emitted(69, 39) Source(3, 19) + SourceIndex(5) +4 >Emitted(69, 40) Source(3, 20) + SourceIndex(5) +5 >Emitted(69, 42) Source(3, 22) + SourceIndex(5) +6 >Emitted(69, 44) Source(3, 24) + SourceIndex(5) +7 >Emitted(69, 46) Source(3, 26) + SourceIndex(5) +8 >Emitted(69, 48) Source(3, 28) + SourceIndex(5) +9 >Emitted(69, 50) Source(3, 30) + SourceIndex(5) +10>Emitted(69, 51) Source(3, 31) + SourceIndex(5) +11>Emitted(69, 54) Source(3, 33) + SourceIndex(5) --- >>>//# sourceMappingURL=module.js.map @@ -843,26 +847,26 @@ sourceFile:file4.ts }, { "pos": 678, - "end": 1093, + "end": 1170, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 1095, - "end": 1821, + "pos": 1172, + "end": 1898, "kind": "prepend", "data": "/src/lib/module.js", "texts": [ { - "pos": 1095, - "end": 1821, + "pos": 1172, + "end": 1898, "kind": "text" } ] }, { - "pos": 1821, - "end": 2339, + "pos": 1898, + "end": 2416, "kind": "text" } ], @@ -928,20 +932,22 @@ var __spread = (this && this.__spread) || function () { return ar; }; ---------------------------------------------------------------------- -emitHelpers: (678-1093):: typescript:rest +emitHelpers: (678-1170):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; ---------------------------------------------------------------------- -prepend: (1095-1821):: /src/lib/module.js texts:: 1 +prepend: (1172-1898):: /src/lib/module.js texts:: 1 >>-------------------------------------------------------------------- -text: (1095-1821) +text: (1172-1898) var myGlob = 20; function libfile0Spread() { var b = []; @@ -966,7 +972,7 @@ define("file2", ["require", "exports"], function (require, exports) { var globalConst = 10; ---------------------------------------------------------------------- -text: (1821-2339) +text: (1898-2416) define("file3", ["require", "exports"], function (require, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -1227,8 +1233,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; var myGlob = 20; @@ -1256,7 +1264,7 @@ var globalConst = 10; //# sourceMappingURL=module.js.map //// [/src/lib/module.js.map] -{"version":3,"file":"module.js","sourceRoot":"","sources":["file0.ts","file1.ts","file2.ts","global.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAM,MAAM,GAAG,EAAE,CAAC;AAClB,SAAS,cAAc;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AAC3C,cAAc,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;;;;ICFnB,QAAA,CAAC,GAAG,EAAE,CAAC;IAAA,SAAS,eAAe;QAC5C,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;IAChD,CAAC;;;;;ICFY,QAAA,CAAC,GAAG,EAAE,CAAC;;ACApB,IAAM,WAAW,GAAG,EAAE,CAAC"} +{"version":3,"file":"module.js","sourceRoot":"","sources":["file0.ts","file1.ts","file2.ts","global.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAM,MAAM,GAAG,EAAE,CAAC;AAClB,SAAS,cAAc;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AAC3C,cAAc,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;;;;ICFnB,QAAA,CAAC,GAAG,EAAE,CAAC;IAAA,SAAS,eAAe;QAC5C,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;IAChD,CAAC;;;;;ICFY,QAAA,CAAC,GAAG,EAAE,CAAC;;ACApB,IAAM,WAAW,GAAG,EAAE,CAAC"} //// [/src/lib/module.js.map.baseline.txt] =================================================================== @@ -1294,8 +1302,10 @@ sourceFile:file0.ts >>> for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") ->>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) ->>> t[p[i]] = s[p[i]]; +>>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> t[p[i]] = s[p[i]]; +>>> } >>> return t; >>>}; >>>var myGlob = 20; @@ -1312,12 +1322,12 @@ sourceFile:file0.ts 4 > = 5 > 20 6 > ; -1 >Emitted(30, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(30, 5) Source(1, 7) + SourceIndex(0) -3 >Emitted(30, 11) Source(1, 13) + SourceIndex(0) -4 >Emitted(30, 14) Source(1, 16) + SourceIndex(0) -5 >Emitted(30, 16) Source(1, 18) + SourceIndex(0) -6 >Emitted(30, 17) Source(1, 19) + SourceIndex(0) +1 >Emitted(32, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(32, 5) Source(1, 7) + SourceIndex(0) +3 >Emitted(32, 11) Source(1, 13) + SourceIndex(0) +4 >Emitted(32, 14) Source(1, 16) + SourceIndex(0) +5 >Emitted(32, 16) Source(1, 18) + SourceIndex(0) +6 >Emitted(32, 17) Source(1, 19) + SourceIndex(0) --- >>>function libfile0Spread() { 1-> @@ -1327,9 +1337,9 @@ sourceFile:file0.ts > 2 >function 3 > libfile0Spread -1->Emitted(31, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(31, 10) Source(2, 10) + SourceIndex(0) -3 >Emitted(31, 24) Source(2, 24) + SourceIndex(0) +1->Emitted(33, 1) Source(2, 1) + SourceIndex(0) +2 >Emitted(33, 10) Source(2, 10) + SourceIndex(0) +3 >Emitted(33, 24) Source(2, 24) + SourceIndex(0) --- >>> var b = []; 1 >^^^^ @@ -1337,8 +1347,8 @@ sourceFile:file0.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >( 2 > ...b: number[] -1 >Emitted(32, 5) Source(2, 25) + SourceIndex(0) -2 >Emitted(32, 16) Source(2, 39) + SourceIndex(0) +1 >Emitted(34, 5) Source(2, 25) + SourceIndex(0) +2 >Emitted(34, 16) Source(2, 39) + SourceIndex(0) --- >>> for (var _i = 0; _i < arguments.length; _i++) { 1->^^^^^^^^^ @@ -1353,20 +1363,20 @@ sourceFile:file0.ts 4 > ...b: number[] 5 > 6 > ...b: number[] -1->Emitted(33, 10) Source(2, 25) + SourceIndex(0) -2 >Emitted(33, 20) Source(2, 39) + SourceIndex(0) -3 >Emitted(33, 22) Source(2, 25) + SourceIndex(0) -4 >Emitted(33, 43) Source(2, 39) + SourceIndex(0) -5 >Emitted(33, 45) Source(2, 25) + SourceIndex(0) -6 >Emitted(33, 49) Source(2, 39) + SourceIndex(0) +1->Emitted(35, 10) Source(2, 25) + SourceIndex(0) +2 >Emitted(35, 20) Source(2, 39) + SourceIndex(0) +3 >Emitted(35, 22) Source(2, 25) + SourceIndex(0) +4 >Emitted(35, 43) Source(2, 39) + SourceIndex(0) +5 >Emitted(35, 45) Source(2, 25) + SourceIndex(0) +6 >Emitted(35, 49) Source(2, 39) + SourceIndex(0) --- >>> b[_i] = arguments[_i]; 1 >^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^ 1 > 2 > ...b: number[] -1 >Emitted(34, 9) Source(2, 25) + SourceIndex(0) -2 >Emitted(34, 31) Source(2, 39) + SourceIndex(0) +1 >Emitted(36, 9) Source(2, 25) + SourceIndex(0) +2 >Emitted(36, 31) Source(2, 39) + SourceIndex(0) --- >>> } >>>} @@ -1375,8 +1385,8 @@ sourceFile:file0.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >) { 2 >} -1 >Emitted(36, 1) Source(2, 43) + SourceIndex(0) -2 >Emitted(36, 2) Source(2, 44) + SourceIndex(0) +1 >Emitted(38, 1) Source(2, 43) + SourceIndex(0) +2 >Emitted(38, 2) Source(2, 44) + SourceIndex(0) --- >>>libfile0Spread.apply(void 0, __spread([10, 20, 30])); 1-> @@ -1403,17 +1413,17 @@ sourceFile:file0.ts 9 > 30 10> ] 11> ); -1->Emitted(37, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(37, 15) Source(3, 15) + SourceIndex(0) -3 >Emitted(37, 39) Source(3, 19) + SourceIndex(0) -4 >Emitted(37, 40) Source(3, 20) + SourceIndex(0) -5 >Emitted(37, 42) Source(3, 22) + SourceIndex(0) -6 >Emitted(37, 44) Source(3, 24) + SourceIndex(0) -7 >Emitted(37, 46) Source(3, 26) + SourceIndex(0) -8 >Emitted(37, 48) Source(3, 28) + SourceIndex(0) -9 >Emitted(37, 50) Source(3, 30) + SourceIndex(0) -10>Emitted(37, 51) Source(3, 31) + SourceIndex(0) -11>Emitted(37, 54) Source(3, 33) + SourceIndex(0) +1->Emitted(39, 1) Source(3, 1) + SourceIndex(0) +2 >Emitted(39, 15) Source(3, 15) + SourceIndex(0) +3 >Emitted(39, 39) Source(3, 19) + SourceIndex(0) +4 >Emitted(39, 40) Source(3, 20) + SourceIndex(0) +5 >Emitted(39, 42) Source(3, 22) + SourceIndex(0) +6 >Emitted(39, 44) Source(3, 24) + SourceIndex(0) +7 >Emitted(39, 46) Source(3, 26) + SourceIndex(0) +8 >Emitted(39, 48) Source(3, 28) + SourceIndex(0) +9 >Emitted(39, 50) Source(3, 30) + SourceIndex(0) +10>Emitted(39, 51) Source(3, 31) + SourceIndex(0) +11>Emitted(39, 54) Source(3, 33) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/src/lib/module.js @@ -1436,12 +1446,12 @@ sourceFile:file1.ts 4 > = 5 > 10 6 > ; -1->Emitted(41, 5) Source(1, 14) + SourceIndex(1) -2 >Emitted(41, 13) Source(1, 14) + SourceIndex(1) -3 >Emitted(41, 14) Source(1, 15) + SourceIndex(1) -4 >Emitted(41, 17) Source(1, 18) + SourceIndex(1) -5 >Emitted(41, 19) Source(1, 20) + SourceIndex(1) -6 >Emitted(41, 20) Source(1, 21) + SourceIndex(1) +1->Emitted(43, 5) Source(1, 14) + SourceIndex(1) +2 >Emitted(43, 13) Source(1, 14) + SourceIndex(1) +3 >Emitted(43, 14) Source(1, 15) + SourceIndex(1) +4 >Emitted(43, 17) Source(1, 18) + SourceIndex(1) +5 >Emitted(43, 19) Source(1, 20) + SourceIndex(1) +6 >Emitted(43, 20) Source(1, 21) + SourceIndex(1) --- >>> function forlibfile1Rest() { 1->^^^^ @@ -1451,9 +1461,9 @@ sourceFile:file1.ts 1-> 2 > function 3 > forlibfile1Rest -1->Emitted(42, 5) Source(1, 21) + SourceIndex(1) -2 >Emitted(42, 14) Source(1, 30) + SourceIndex(1) -3 >Emitted(42, 29) Source(1, 45) + SourceIndex(1) +1->Emitted(44, 5) Source(1, 21) + SourceIndex(1) +2 >Emitted(44, 14) Source(1, 30) + SourceIndex(1) +3 >Emitted(44, 29) Source(1, 45) + SourceIndex(1) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^^^^^ @@ -1473,14 +1483,14 @@ sourceFile:file1.ts 6 > , 7 > ...rest } = { a: 10, b: 30, yy: 30 } 8 > ; -1->Emitted(43, 9) Source(2, 1) + SourceIndex(1) -2 >Emitted(43, 13) Source(2, 7) + SourceIndex(1) -3 >Emitted(43, 42) Source(2, 48) + SourceIndex(1) -4 >Emitted(43, 44) Source(2, 9) + SourceIndex(1) -5 >Emitted(43, 52) Source(2, 10) + SourceIndex(1) -6 >Emitted(43, 54) Source(2, 12) + SourceIndex(1) -7 >Emitted(43, 78) Source(2, 48) + SourceIndex(1) -8 >Emitted(43, 79) Source(2, 49) + SourceIndex(1) +1->Emitted(45, 9) Source(2, 1) + SourceIndex(1) +2 >Emitted(45, 13) Source(2, 7) + SourceIndex(1) +3 >Emitted(45, 42) Source(2, 48) + SourceIndex(1) +4 >Emitted(45, 44) Source(2, 9) + SourceIndex(1) +5 >Emitted(45, 52) Source(2, 10) + SourceIndex(1) +6 >Emitted(45, 54) Source(2, 12) + SourceIndex(1) +7 >Emitted(45, 78) Source(2, 48) + SourceIndex(1) +8 >Emitted(45, 79) Source(2, 49) + SourceIndex(1) --- >>> } 1 >^^^^ @@ -1488,8 +1498,8 @@ sourceFile:file1.ts 1 > > 2 > } -1 >Emitted(44, 5) Source(3, 1) + SourceIndex(1) -2 >Emitted(44, 6) Source(3, 2) + SourceIndex(1) +1 >Emitted(46, 5) Source(3, 1) + SourceIndex(1) +2 >Emitted(46, 6) Source(3, 2) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:/src/lib/module.js @@ -1512,12 +1522,12 @@ sourceFile:file2.ts 4 > = 5 > 20 6 > ; -1 >Emitted(49, 5) Source(1, 14) + SourceIndex(2) -2 >Emitted(49, 13) Source(1, 14) + SourceIndex(2) -3 >Emitted(49, 14) Source(1, 15) + SourceIndex(2) -4 >Emitted(49, 17) Source(1, 18) + SourceIndex(2) -5 >Emitted(49, 19) Source(1, 20) + SourceIndex(2) -6 >Emitted(49, 20) Source(1, 21) + SourceIndex(2) +1 >Emitted(51, 5) Source(1, 14) + SourceIndex(2) +2 >Emitted(51, 13) Source(1, 14) + SourceIndex(2) +3 >Emitted(51, 14) Source(1, 15) + SourceIndex(2) +4 >Emitted(51, 17) Source(1, 18) + SourceIndex(2) +5 >Emitted(51, 19) Source(1, 20) + SourceIndex(2) +6 >Emitted(51, 20) Source(1, 21) + SourceIndex(2) --- ------------------------------------------------------------------- emittedFile:/src/lib/module.js @@ -1538,12 +1548,12 @@ sourceFile:global.ts 4 > = 5 > 10 6 > ; -1 >Emitted(51, 1) Source(1, 1) + SourceIndex(3) -2 >Emitted(51, 5) Source(1, 7) + SourceIndex(3) -3 >Emitted(51, 16) Source(1, 18) + SourceIndex(3) -4 >Emitted(51, 19) Source(1, 21) + SourceIndex(3) -5 >Emitted(51, 21) Source(1, 23) + SourceIndex(3) -6 >Emitted(51, 22) Source(1, 24) + SourceIndex(3) +1 >Emitted(53, 1) Source(1, 1) + SourceIndex(3) +2 >Emitted(53, 5) Source(1, 7) + SourceIndex(3) +3 >Emitted(53, 16) Source(1, 18) + SourceIndex(3) +4 >Emitted(53, 19) Source(1, 21) + SourceIndex(3) +5 >Emitted(53, 21) Source(1, 23) + SourceIndex(3) +6 >Emitted(53, 22) Source(1, 24) + SourceIndex(3) --- >>>//# sourceMappingURL=module.js.map @@ -1573,13 +1583,13 @@ sourceFile:global.ts }, { "pos": 678, - "end": 1093, + "end": 1170, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 1095, - "end": 1821, + "pos": 1172, + "end": 1898, "kind": "text" } ], @@ -1632,18 +1642,20 @@ var __spread = (this && this.__spread) || function () { return ar; }; ---------------------------------------------------------------------- -emitHelpers: (678-1093):: typescript:rest +emitHelpers: (678-1170):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; ---------------------------------------------------------------------- -text: (1095-1821) +text: (1172-1898) var myGlob = 20; function libfile0Spread() { var b = []; diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/emitHelpers-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/emitHelpers-in-all-projects.js index 197e1621012..fd3ea4a1390 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/emitHelpers-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/emitHelpers-in-all-projects.js @@ -168,8 +168,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; var s = "Hola, world"; @@ -184,7 +186,7 @@ function f() { //# sourceMappingURL=first-output.js.map //// [/src/first/bin/first-output.js.map] -{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":";;;;;;;;;AAIA,IAAM,CAAC,GAAG,aAAa,CAAC;AAMxB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB;IAChC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;ACbD,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC"} +{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":";;;;;;;;;;;AAIA,IAAM,CAAC,GAAG,aAAa,CAAC;AAMxB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB;IAChC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;ACbD,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC"} //// [/src/first/bin/first-output.js.map.baseline.txt] =================================================================== @@ -202,8 +204,10 @@ sourceFile:../first_PART1.ts >>> for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") ->>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) ->>> t[p[i]] = s[p[i]]; +>>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> t[p[i]] = s[p[i]]; +>>> } >>> return t; >>>}; >>>var s = "Hola, world"; @@ -223,12 +227,12 @@ sourceFile:../first_PART1.ts 4 > = 5 > "Hola, world" 6 > ; -1 >Emitted(10, 1) Source(5, 1) + SourceIndex(0) -2 >Emitted(10, 5) Source(5, 7) + SourceIndex(0) -3 >Emitted(10, 6) Source(5, 8) + SourceIndex(0) -4 >Emitted(10, 9) Source(5, 11) + SourceIndex(0) -5 >Emitted(10, 22) Source(5, 24) + SourceIndex(0) -6 >Emitted(10, 23) Source(5, 25) + SourceIndex(0) +1 >Emitted(12, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(12, 5) Source(5, 7) + SourceIndex(0) +3 >Emitted(12, 6) Source(5, 8) + SourceIndex(0) +4 >Emitted(12, 9) Source(5, 11) + SourceIndex(0) +5 >Emitted(12, 22) Source(5, 24) + SourceIndex(0) +6 >Emitted(12, 23) Source(5, 25) + SourceIndex(0) --- >>>console.log(s); 1 > @@ -254,14 +258,14 @@ sourceFile:../first_PART1.ts 6 > s 7 > ) 8 > ; -1 >Emitted(11, 1) Source(11, 1) + SourceIndex(0) -2 >Emitted(11, 8) Source(11, 8) + SourceIndex(0) -3 >Emitted(11, 9) Source(11, 9) + SourceIndex(0) -4 >Emitted(11, 12) Source(11, 12) + SourceIndex(0) -5 >Emitted(11, 13) Source(11, 13) + SourceIndex(0) -6 >Emitted(11, 14) Source(11, 14) + SourceIndex(0) -7 >Emitted(11, 15) Source(11, 15) + SourceIndex(0) -8 >Emitted(11, 16) Source(11, 16) + SourceIndex(0) +1 >Emitted(13, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(13, 8) Source(11, 8) + SourceIndex(0) +3 >Emitted(13, 9) Source(11, 9) + SourceIndex(0) +4 >Emitted(13, 12) Source(11, 12) + SourceIndex(0) +5 >Emitted(13, 13) Source(11, 13) + SourceIndex(0) +6 >Emitted(13, 14) Source(11, 14) + SourceIndex(0) +7 >Emitted(13, 15) Source(11, 15) + SourceIndex(0) +8 >Emitted(13, 16) Source(11, 16) + SourceIndex(0) --- >>>function forfirstfirst_PART1Rest() { 1-> @@ -272,9 +276,9 @@ sourceFile:../first_PART1.ts > 2 >function 3 > forfirstfirst_PART1Rest -1->Emitted(12, 1) Source(12, 1) + SourceIndex(0) -2 >Emitted(12, 10) Source(12, 10) + SourceIndex(0) -3 >Emitted(12, 33) Source(12, 33) + SourceIndex(0) +1->Emitted(14, 1) Source(12, 1) + SourceIndex(0) +2 >Emitted(14, 10) Source(12, 10) + SourceIndex(0) +3 >Emitted(14, 33) Source(12, 33) + SourceIndex(0) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^ @@ -294,14 +298,14 @@ sourceFile:../first_PART1.ts 6 > , 7 > ...rest } = { a: 10, b: 30, yy: 30 } 8 > ; -1->Emitted(13, 5) Source(13, 1) + SourceIndex(0) -2 >Emitted(13, 9) Source(13, 7) + SourceIndex(0) -3 >Emitted(13, 38) Source(13, 48) + SourceIndex(0) -4 >Emitted(13, 40) Source(13, 9) + SourceIndex(0) -5 >Emitted(13, 48) Source(13, 10) + SourceIndex(0) -6 >Emitted(13, 50) Source(13, 12) + SourceIndex(0) -7 >Emitted(13, 74) Source(13, 48) + SourceIndex(0) -8 >Emitted(13, 75) Source(13, 49) + SourceIndex(0) +1->Emitted(15, 5) Source(13, 1) + SourceIndex(0) +2 >Emitted(15, 9) Source(13, 7) + SourceIndex(0) +3 >Emitted(15, 38) Source(13, 48) + SourceIndex(0) +4 >Emitted(15, 40) Source(13, 9) + SourceIndex(0) +5 >Emitted(15, 48) Source(13, 10) + SourceIndex(0) +6 >Emitted(15, 50) Source(13, 12) + SourceIndex(0) +7 >Emitted(15, 74) Source(13, 48) + SourceIndex(0) +8 >Emitted(15, 75) Source(13, 49) + SourceIndex(0) --- >>>} 1 > @@ -310,8 +314,8 @@ sourceFile:../first_PART1.ts 1 > > 2 >} -1 >Emitted(14, 1) Source(14, 1) + SourceIndex(0) -2 >Emitted(14, 2) Source(14, 2) + SourceIndex(0) +1 >Emitted(16, 1) Source(14, 1) + SourceIndex(0) +2 >Emitted(16, 2) Source(14, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/src/first/bin/first-output.js @@ -336,15 +340,15 @@ sourceFile:../first_part2.ts 7 > () 8 > ) 9 > ; -1->Emitted(15, 1) Source(1, 1) + SourceIndex(1) -2 >Emitted(15, 8) Source(1, 8) + SourceIndex(1) -3 >Emitted(15, 9) Source(1, 9) + SourceIndex(1) -4 >Emitted(15, 12) Source(1, 12) + SourceIndex(1) -5 >Emitted(15, 13) Source(1, 13) + SourceIndex(1) -6 >Emitted(15, 14) Source(1, 14) + SourceIndex(1) -7 >Emitted(15, 16) Source(1, 16) + SourceIndex(1) -8 >Emitted(15, 17) Source(1, 17) + SourceIndex(1) -9 >Emitted(15, 18) Source(1, 18) + SourceIndex(1) +1->Emitted(17, 1) Source(1, 1) + SourceIndex(1) +2 >Emitted(17, 8) Source(1, 8) + SourceIndex(1) +3 >Emitted(17, 9) Source(1, 9) + SourceIndex(1) +4 >Emitted(17, 12) Source(1, 12) + SourceIndex(1) +5 >Emitted(17, 13) Source(1, 13) + SourceIndex(1) +6 >Emitted(17, 14) Source(1, 14) + SourceIndex(1) +7 >Emitted(17, 16) Source(1, 16) + SourceIndex(1) +8 >Emitted(17, 17) Source(1, 17) + SourceIndex(1) +9 >Emitted(17, 18) Source(1, 18) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:/src/first/bin/first-output.js @@ -358,9 +362,9 @@ sourceFile:../first_part3.ts 1 > 2 >function 3 > f -1 >Emitted(16, 1) Source(1, 1) + SourceIndex(2) -2 >Emitted(16, 10) Source(1, 10) + SourceIndex(2) -3 >Emitted(16, 11) Source(1, 11) + SourceIndex(2) +1 >Emitted(18, 1) Source(1, 1) + SourceIndex(2) +2 >Emitted(18, 10) Source(1, 10) + SourceIndex(2) +3 >Emitted(18, 11) Source(1, 11) + SourceIndex(2) --- >>> return "JS does hoists"; 1->^^^^ @@ -372,10 +376,10 @@ sourceFile:../first_part3.ts 2 > return 3 > "JS does hoists" 4 > ; -1->Emitted(17, 5) Source(2, 5) + SourceIndex(2) -2 >Emitted(17, 12) Source(2, 12) + SourceIndex(2) -3 >Emitted(17, 28) Source(2, 28) + SourceIndex(2) -4 >Emitted(17, 29) Source(2, 29) + SourceIndex(2) +1->Emitted(19, 5) Source(2, 5) + SourceIndex(2) +2 >Emitted(19, 12) Source(2, 12) + SourceIndex(2) +3 >Emitted(19, 28) Source(2, 28) + SourceIndex(2) +4 >Emitted(19, 29) Source(2, 29) + SourceIndex(2) --- >>>} 1 > @@ -384,8 +388,8 @@ sourceFile:../first_part3.ts 1 > > 2 >} -1 >Emitted(18, 1) Source(3, 1) + SourceIndex(2) -2 >Emitted(18, 2) Source(3, 2) + SourceIndex(2) +1 >Emitted(20, 1) Source(3, 1) + SourceIndex(2) +2 >Emitted(20, 2) Source(3, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=first-output.js.map @@ -402,13 +406,13 @@ sourceFile:../first_part3.ts "sections": [ { "pos": 0, - "end": 415, + "end": 492, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 417, - "end": 643, + "pos": 494, + "end": 720, "kind": "text" } ], @@ -435,18 +439,20 @@ sourceFile:../first_part3.ts ====================================================================== File:: /src/first/bin/first-output.js ---------------------------------------------------------------------- -emitHelpers: (0-415):: typescript:rest +emitHelpers: (0-492):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; ---------------------------------------------------------------------- -text: (417-643) +text: (494-720) var s = "Hola, world"; console.log(s); function forfirstfirst_PART1Rest() { @@ -817,8 +823,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; var s = "Hola, world"; @@ -856,7 +864,7 @@ function forthirdthird_part1Rest() { //# sourceMappingURL=third-output.js.map //// [/src/third/thirdjs/output/third-output.js.map] -{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../../first/first_PART1.ts","../../../first/first_part2.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts","../../third_part1.ts"],"names":[],"mappings":";;;;;;;;;AAIA,IAAM,CAAC,GAAG,aAAa,CAAC;AAMxB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB;IAChC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;ACbD,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC;ACED,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;AACD,SAAS,yBAAyB;IAClC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;ACbD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC;ACJD,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC;AAChB,SAAS,uBAAuB;IAChC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC"} +{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../../first/first_PART1.ts","../../../first/first_part2.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts","../../third_part1.ts"],"names":[],"mappings":";;;;;;;;;;;AAIA,IAAM,CAAC,GAAG,aAAa,CAAC;AAMxB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB;IAChC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;ACbD,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC;ACED,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;AACD,SAAS,yBAAyB;IAClC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;ACbD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC;ACJD,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC;AAChB,SAAS,uBAAuB;IAChC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC"} //// [/src/third/thirdjs/output/third-output.js.map.baseline.txt] =================================================================== @@ -874,8 +882,10 @@ sourceFile:../../../first/first_PART1.ts >>> for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") ->>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) ->>> t[p[i]] = s[p[i]]; +>>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> t[p[i]] = s[p[i]]; +>>> } >>> return t; >>>}; >>>var s = "Hola, world"; @@ -895,12 +905,12 @@ sourceFile:../../../first/first_PART1.ts 4 > = 5 > "Hola, world" 6 > ; -1 >Emitted(10, 1) Source(5, 1) + SourceIndex(0) -2 >Emitted(10, 5) Source(5, 7) + SourceIndex(0) -3 >Emitted(10, 6) Source(5, 8) + SourceIndex(0) -4 >Emitted(10, 9) Source(5, 11) + SourceIndex(0) -5 >Emitted(10, 22) Source(5, 24) + SourceIndex(0) -6 >Emitted(10, 23) Source(5, 25) + SourceIndex(0) +1 >Emitted(12, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(12, 5) Source(5, 7) + SourceIndex(0) +3 >Emitted(12, 6) Source(5, 8) + SourceIndex(0) +4 >Emitted(12, 9) Source(5, 11) + SourceIndex(0) +5 >Emitted(12, 22) Source(5, 24) + SourceIndex(0) +6 >Emitted(12, 23) Source(5, 25) + SourceIndex(0) --- >>>console.log(s); 1 > @@ -926,14 +936,14 @@ sourceFile:../../../first/first_PART1.ts 6 > s 7 > ) 8 > ; -1 >Emitted(11, 1) Source(11, 1) + SourceIndex(0) -2 >Emitted(11, 8) Source(11, 8) + SourceIndex(0) -3 >Emitted(11, 9) Source(11, 9) + SourceIndex(0) -4 >Emitted(11, 12) Source(11, 12) + SourceIndex(0) -5 >Emitted(11, 13) Source(11, 13) + SourceIndex(0) -6 >Emitted(11, 14) Source(11, 14) + SourceIndex(0) -7 >Emitted(11, 15) Source(11, 15) + SourceIndex(0) -8 >Emitted(11, 16) Source(11, 16) + SourceIndex(0) +1 >Emitted(13, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(13, 8) Source(11, 8) + SourceIndex(0) +3 >Emitted(13, 9) Source(11, 9) + SourceIndex(0) +4 >Emitted(13, 12) Source(11, 12) + SourceIndex(0) +5 >Emitted(13, 13) Source(11, 13) + SourceIndex(0) +6 >Emitted(13, 14) Source(11, 14) + SourceIndex(0) +7 >Emitted(13, 15) Source(11, 15) + SourceIndex(0) +8 >Emitted(13, 16) Source(11, 16) + SourceIndex(0) --- >>>function forfirstfirst_PART1Rest() { 1-> @@ -944,9 +954,9 @@ sourceFile:../../../first/first_PART1.ts > 2 >function 3 > forfirstfirst_PART1Rest -1->Emitted(12, 1) Source(12, 1) + SourceIndex(0) -2 >Emitted(12, 10) Source(12, 10) + SourceIndex(0) -3 >Emitted(12, 33) Source(12, 33) + SourceIndex(0) +1->Emitted(14, 1) Source(12, 1) + SourceIndex(0) +2 >Emitted(14, 10) Source(12, 10) + SourceIndex(0) +3 >Emitted(14, 33) Source(12, 33) + SourceIndex(0) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^ @@ -966,14 +976,14 @@ sourceFile:../../../first/first_PART1.ts 6 > , 7 > ...rest } = { a: 10, b: 30, yy: 30 } 8 > ; -1->Emitted(13, 5) Source(13, 1) + SourceIndex(0) -2 >Emitted(13, 9) Source(13, 7) + SourceIndex(0) -3 >Emitted(13, 38) Source(13, 48) + SourceIndex(0) -4 >Emitted(13, 40) Source(13, 9) + SourceIndex(0) -5 >Emitted(13, 48) Source(13, 10) + SourceIndex(0) -6 >Emitted(13, 50) Source(13, 12) + SourceIndex(0) -7 >Emitted(13, 74) Source(13, 48) + SourceIndex(0) -8 >Emitted(13, 75) Source(13, 49) + SourceIndex(0) +1->Emitted(15, 5) Source(13, 1) + SourceIndex(0) +2 >Emitted(15, 9) Source(13, 7) + SourceIndex(0) +3 >Emitted(15, 38) Source(13, 48) + SourceIndex(0) +4 >Emitted(15, 40) Source(13, 9) + SourceIndex(0) +5 >Emitted(15, 48) Source(13, 10) + SourceIndex(0) +6 >Emitted(15, 50) Source(13, 12) + SourceIndex(0) +7 >Emitted(15, 74) Source(13, 48) + SourceIndex(0) +8 >Emitted(15, 75) Source(13, 49) + SourceIndex(0) --- >>>} 1 > @@ -982,8 +992,8 @@ sourceFile:../../../first/first_PART1.ts 1 > > 2 >} -1 >Emitted(14, 1) Source(14, 1) + SourceIndex(0) -2 >Emitted(14, 2) Source(14, 2) + SourceIndex(0) +1 >Emitted(16, 1) Source(14, 1) + SourceIndex(0) +2 >Emitted(16, 2) Source(14, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -1008,15 +1018,15 @@ sourceFile:../../../first/first_part2.ts 7 > () 8 > ) 9 > ; -1->Emitted(15, 1) Source(1, 1) + SourceIndex(1) -2 >Emitted(15, 8) Source(1, 8) + SourceIndex(1) -3 >Emitted(15, 9) Source(1, 9) + SourceIndex(1) -4 >Emitted(15, 12) Source(1, 12) + SourceIndex(1) -5 >Emitted(15, 13) Source(1, 13) + SourceIndex(1) -6 >Emitted(15, 14) Source(1, 14) + SourceIndex(1) -7 >Emitted(15, 16) Source(1, 16) + SourceIndex(1) -8 >Emitted(15, 17) Source(1, 17) + SourceIndex(1) -9 >Emitted(15, 18) Source(1, 18) + SourceIndex(1) +1->Emitted(17, 1) Source(1, 1) + SourceIndex(1) +2 >Emitted(17, 8) Source(1, 8) + SourceIndex(1) +3 >Emitted(17, 9) Source(1, 9) + SourceIndex(1) +4 >Emitted(17, 12) Source(1, 12) + SourceIndex(1) +5 >Emitted(17, 13) Source(1, 13) + SourceIndex(1) +6 >Emitted(17, 14) Source(1, 14) + SourceIndex(1) +7 >Emitted(17, 16) Source(1, 16) + SourceIndex(1) +8 >Emitted(17, 17) Source(1, 17) + SourceIndex(1) +9 >Emitted(17, 18) Source(1, 18) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -1030,9 +1040,9 @@ sourceFile:../../../first/first_part3.ts 1 > 2 >function 3 > f -1 >Emitted(16, 1) Source(1, 1) + SourceIndex(2) -2 >Emitted(16, 10) Source(1, 10) + SourceIndex(2) -3 >Emitted(16, 11) Source(1, 11) + SourceIndex(2) +1 >Emitted(18, 1) Source(1, 1) + SourceIndex(2) +2 >Emitted(18, 10) Source(1, 10) + SourceIndex(2) +3 >Emitted(18, 11) Source(1, 11) + SourceIndex(2) --- >>> return "JS does hoists"; 1->^^^^ @@ -1044,10 +1054,10 @@ sourceFile:../../../first/first_part3.ts 2 > return 3 > "JS does hoists" 4 > ; -1->Emitted(17, 5) Source(2, 5) + SourceIndex(2) -2 >Emitted(17, 12) Source(2, 12) + SourceIndex(2) -3 >Emitted(17, 28) Source(2, 28) + SourceIndex(2) -4 >Emitted(17, 29) Source(2, 29) + SourceIndex(2) +1->Emitted(19, 5) Source(2, 5) + SourceIndex(2) +2 >Emitted(19, 12) Source(2, 12) + SourceIndex(2) +3 >Emitted(19, 28) Source(2, 28) + SourceIndex(2) +4 >Emitted(19, 29) Source(2, 29) + SourceIndex(2) --- >>>} 1 > @@ -1056,8 +1066,8 @@ sourceFile:../../../first/first_part3.ts 1 > > 2 >} -1 >Emitted(18, 1) Source(3, 1) + SourceIndex(2) -2 >Emitted(18, 2) Source(3, 2) + SourceIndex(2) +1 >Emitted(20, 1) Source(3, 1) + SourceIndex(2) +2 >Emitted(20, 2) Source(3, 2) + SourceIndex(2) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -1083,10 +1093,10 @@ sourceFile:../../../second/second_part1.ts > > f(); > } -1->Emitted(19, 1) Source(5, 1) + SourceIndex(3) -2 >Emitted(19, 5) Source(5, 11) + SourceIndex(3) -3 >Emitted(19, 6) Source(5, 12) + SourceIndex(3) -4 >Emitted(19, 7) Source(11, 2) + SourceIndex(3) +1->Emitted(21, 1) Source(5, 1) + SourceIndex(3) +2 >Emitted(21, 5) Source(5, 11) + SourceIndex(3) +3 >Emitted(21, 6) Source(5, 12) + SourceIndex(3) +4 >Emitted(21, 7) Source(11, 2) + SourceIndex(3) --- >>>(function (N) { 1-> @@ -1096,9 +1106,9 @@ sourceFile:../../../second/second_part1.ts 1-> 2 >namespace 3 > N -1->Emitted(20, 1) Source(5, 1) + SourceIndex(3) -2 >Emitted(20, 12) Source(5, 11) + SourceIndex(3) -3 >Emitted(20, 13) Source(5, 12) + SourceIndex(3) +1->Emitted(22, 1) Source(5, 1) + SourceIndex(3) +2 >Emitted(22, 12) Source(5, 11) + SourceIndex(3) +3 >Emitted(22, 13) Source(5, 12) + SourceIndex(3) --- >>> function f() { 1->^^^^ @@ -1109,9 +1119,9 @@ sourceFile:../../../second/second_part1.ts > 2 > function 3 > f -1->Emitted(21, 5) Source(6, 5) + SourceIndex(3) -2 >Emitted(21, 14) Source(6, 14) + SourceIndex(3) -3 >Emitted(21, 15) Source(6, 15) + SourceIndex(3) +1->Emitted(23, 5) Source(6, 5) + SourceIndex(3) +2 >Emitted(23, 14) Source(6, 14) + SourceIndex(3) +3 >Emitted(23, 15) Source(6, 15) + SourceIndex(3) --- >>> console.log('testing'); 1->^^^^^^^^ @@ -1131,14 +1141,14 @@ sourceFile:../../../second/second_part1.ts 6 > 'testing' 7 > ) 8 > ; -1->Emitted(22, 9) Source(7, 9) + SourceIndex(3) -2 >Emitted(22, 16) Source(7, 16) + SourceIndex(3) -3 >Emitted(22, 17) Source(7, 17) + SourceIndex(3) -4 >Emitted(22, 20) Source(7, 20) + SourceIndex(3) -5 >Emitted(22, 21) Source(7, 21) + SourceIndex(3) -6 >Emitted(22, 30) Source(7, 30) + SourceIndex(3) -7 >Emitted(22, 31) Source(7, 31) + SourceIndex(3) -8 >Emitted(22, 32) Source(7, 32) + SourceIndex(3) +1->Emitted(24, 9) Source(7, 9) + SourceIndex(3) +2 >Emitted(24, 16) Source(7, 16) + SourceIndex(3) +3 >Emitted(24, 17) Source(7, 17) + SourceIndex(3) +4 >Emitted(24, 20) Source(7, 20) + SourceIndex(3) +5 >Emitted(24, 21) Source(7, 21) + SourceIndex(3) +6 >Emitted(24, 30) Source(7, 30) + SourceIndex(3) +7 >Emitted(24, 31) Source(7, 31) + SourceIndex(3) +8 >Emitted(24, 32) Source(7, 32) + SourceIndex(3) --- >>> } 1 >^^^^ @@ -1147,8 +1157,8 @@ sourceFile:../../../second/second_part1.ts 1 > > 2 > } -1 >Emitted(23, 5) Source(8, 5) + SourceIndex(3) -2 >Emitted(23, 6) Source(8, 6) + SourceIndex(3) +1 >Emitted(25, 5) Source(8, 5) + SourceIndex(3) +2 >Emitted(25, 6) Source(8, 6) + SourceIndex(3) --- >>> f(); 1->^^^^ @@ -1162,10 +1172,10 @@ sourceFile:../../../second/second_part1.ts 2 > f 3 > () 4 > ; -1->Emitted(24, 5) Source(10, 5) + SourceIndex(3) -2 >Emitted(24, 6) Source(10, 6) + SourceIndex(3) -3 >Emitted(24, 8) Source(10, 8) + SourceIndex(3) -4 >Emitted(24, 9) Source(10, 9) + SourceIndex(3) +1->Emitted(26, 5) Source(10, 5) + SourceIndex(3) +2 >Emitted(26, 6) Source(10, 6) + SourceIndex(3) +3 >Emitted(26, 8) Source(10, 8) + SourceIndex(3) +4 >Emitted(26, 9) Source(10, 9) + SourceIndex(3) --- >>>})(N || (N = {})); 1-> @@ -1190,13 +1200,13 @@ sourceFile:../../../second/second_part1.ts > > f(); > } -1->Emitted(25, 1) Source(11, 1) + SourceIndex(3) -2 >Emitted(25, 2) Source(11, 2) + SourceIndex(3) -3 >Emitted(25, 4) Source(5, 11) + SourceIndex(3) -4 >Emitted(25, 5) Source(5, 12) + SourceIndex(3) -5 >Emitted(25, 10) Source(5, 11) + SourceIndex(3) -6 >Emitted(25, 11) Source(5, 12) + SourceIndex(3) -7 >Emitted(25, 19) Source(11, 2) + SourceIndex(3) +1->Emitted(27, 1) Source(11, 1) + SourceIndex(3) +2 >Emitted(27, 2) Source(11, 2) + SourceIndex(3) +3 >Emitted(27, 4) Source(5, 11) + SourceIndex(3) +4 >Emitted(27, 5) Source(5, 12) + SourceIndex(3) +5 >Emitted(27, 10) Source(5, 11) + SourceIndex(3) +6 >Emitted(27, 11) Source(5, 12) + SourceIndex(3) +7 >Emitted(27, 19) Source(11, 2) + SourceIndex(3) --- >>>function forsecondsecond_part1Rest() { 1-> @@ -1207,9 +1217,9 @@ sourceFile:../../../second/second_part1.ts > 2 >function 3 > forsecondsecond_part1Rest -1->Emitted(26, 1) Source(12, 1) + SourceIndex(3) -2 >Emitted(26, 10) Source(12, 10) + SourceIndex(3) -3 >Emitted(26, 35) Source(12, 35) + SourceIndex(3) +1->Emitted(28, 1) Source(12, 1) + SourceIndex(3) +2 >Emitted(28, 10) Source(12, 10) + SourceIndex(3) +3 >Emitted(28, 35) Source(12, 35) + SourceIndex(3) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^ @@ -1229,14 +1239,14 @@ sourceFile:../../../second/second_part1.ts 6 > , 7 > ...rest } = { a: 10, b: 30, yy: 30 } 8 > ; -1->Emitted(27, 5) Source(13, 1) + SourceIndex(3) -2 >Emitted(27, 9) Source(13, 7) + SourceIndex(3) -3 >Emitted(27, 38) Source(13, 48) + SourceIndex(3) -4 >Emitted(27, 40) Source(13, 9) + SourceIndex(3) -5 >Emitted(27, 48) Source(13, 10) + SourceIndex(3) -6 >Emitted(27, 50) Source(13, 12) + SourceIndex(3) -7 >Emitted(27, 74) Source(13, 48) + SourceIndex(3) -8 >Emitted(27, 75) Source(13, 49) + SourceIndex(3) +1->Emitted(29, 5) Source(13, 1) + SourceIndex(3) +2 >Emitted(29, 9) Source(13, 7) + SourceIndex(3) +3 >Emitted(29, 38) Source(13, 48) + SourceIndex(3) +4 >Emitted(29, 40) Source(13, 9) + SourceIndex(3) +5 >Emitted(29, 48) Source(13, 10) + SourceIndex(3) +6 >Emitted(29, 50) Source(13, 12) + SourceIndex(3) +7 >Emitted(29, 74) Source(13, 48) + SourceIndex(3) +8 >Emitted(29, 75) Source(13, 49) + SourceIndex(3) --- >>>} 1 > @@ -1245,8 +1255,8 @@ sourceFile:../../../second/second_part1.ts 1 > > 2 >} -1 >Emitted(28, 1) Source(14, 1) + SourceIndex(3) -2 >Emitted(28, 2) Source(14, 2) + SourceIndex(3) +1 >Emitted(30, 1) Source(14, 1) + SourceIndex(3) +2 >Emitted(30, 2) Source(14, 2) + SourceIndex(3) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -1256,13 +1266,13 @@ sourceFile:../../../second/second_part2.ts 1-> 2 >^^^^^^^^^^^^^^^^^^^-> 1-> -1->Emitted(29, 1) Source(1, 1) + SourceIndex(4) +1->Emitted(31, 1) Source(1, 1) + SourceIndex(4) --- >>> function C() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(30, 5) Source(1, 1) + SourceIndex(4) +1->Emitted(32, 5) Source(1, 1) + SourceIndex(4) --- >>> } 1->^^^^ @@ -1274,8 +1284,8 @@ sourceFile:../../../second/second_part2.ts > } > 2 > } -1->Emitted(31, 5) Source(5, 1) + SourceIndex(4) -2 >Emitted(31, 6) Source(5, 2) + SourceIndex(4) +1->Emitted(33, 5) Source(5, 1) + SourceIndex(4) +2 >Emitted(33, 6) Source(5, 2) + SourceIndex(4) --- >>> C.prototype.doSomething = function () { 1->^^^^ @@ -1285,9 +1295,9 @@ sourceFile:../../../second/second_part2.ts 1-> 2 > doSomething 3 > -1->Emitted(32, 5) Source(2, 5) + SourceIndex(4) -2 >Emitted(32, 28) Source(2, 16) + SourceIndex(4) -3 >Emitted(32, 31) Source(2, 5) + SourceIndex(4) +1->Emitted(34, 5) Source(2, 5) + SourceIndex(4) +2 >Emitted(34, 28) Source(2, 16) + SourceIndex(4) +3 >Emitted(34, 31) Source(2, 5) + SourceIndex(4) --- >>> console.log("something got done"); 1->^^^^^^^^ @@ -1307,14 +1317,14 @@ sourceFile:../../../second/second_part2.ts 6 > "something got done" 7 > ) 8 > ; -1->Emitted(33, 9) Source(3, 9) + SourceIndex(4) -2 >Emitted(33, 16) Source(3, 16) + SourceIndex(4) -3 >Emitted(33, 17) Source(3, 17) + SourceIndex(4) -4 >Emitted(33, 20) Source(3, 20) + SourceIndex(4) -5 >Emitted(33, 21) Source(3, 21) + SourceIndex(4) -6 >Emitted(33, 41) Source(3, 41) + SourceIndex(4) -7 >Emitted(33, 42) Source(3, 42) + SourceIndex(4) -8 >Emitted(33, 43) Source(3, 43) + SourceIndex(4) +1->Emitted(35, 9) Source(3, 9) + SourceIndex(4) +2 >Emitted(35, 16) Source(3, 16) + SourceIndex(4) +3 >Emitted(35, 17) Source(3, 17) + SourceIndex(4) +4 >Emitted(35, 20) Source(3, 20) + SourceIndex(4) +5 >Emitted(35, 21) Source(3, 21) + SourceIndex(4) +6 >Emitted(35, 41) Source(3, 41) + SourceIndex(4) +7 >Emitted(35, 42) Source(3, 42) + SourceIndex(4) +8 >Emitted(35, 43) Source(3, 43) + SourceIndex(4) --- >>> }; 1 >^^^^ @@ -1323,8 +1333,8 @@ sourceFile:../../../second/second_part2.ts 1 > > 2 > } -1 >Emitted(34, 5) Source(4, 5) + SourceIndex(4) -2 >Emitted(34, 6) Source(4, 6) + SourceIndex(4) +1 >Emitted(36, 5) Source(4, 5) + SourceIndex(4) +2 >Emitted(36, 6) Source(4, 6) + SourceIndex(4) --- >>> return C; 1->^^^^ @@ -1332,8 +1342,8 @@ sourceFile:../../../second/second_part2.ts 1-> > 2 > } -1->Emitted(35, 5) Source(5, 1) + SourceIndex(4) -2 >Emitted(35, 13) Source(5, 2) + SourceIndex(4) +1->Emitted(37, 5) Source(5, 1) + SourceIndex(4) +2 >Emitted(37, 13) Source(5, 2) + SourceIndex(4) --- >>>}()); 1 > @@ -1349,10 +1359,10 @@ sourceFile:../../../second/second_part2.ts > console.log("something got done"); > } > } -1 >Emitted(36, 1) Source(5, 1) + SourceIndex(4) -2 >Emitted(36, 2) Source(5, 2) + SourceIndex(4) -3 >Emitted(36, 2) Source(1, 1) + SourceIndex(4) -4 >Emitted(36, 6) Source(5, 2) + SourceIndex(4) +1 >Emitted(38, 1) Source(5, 1) + SourceIndex(4) +2 >Emitted(38, 2) Source(5, 2) + SourceIndex(4) +3 >Emitted(38, 2) Source(1, 1) + SourceIndex(4) +4 >Emitted(38, 6) Source(5, 2) + SourceIndex(4) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -1376,14 +1386,14 @@ sourceFile:../../third_part1.ts 6 > C 7 > () 8 > ; -1->Emitted(37, 1) Source(1, 1) + SourceIndex(5) -2 >Emitted(37, 5) Source(1, 5) + SourceIndex(5) -3 >Emitted(37, 6) Source(1, 6) + SourceIndex(5) -4 >Emitted(37, 9) Source(1, 9) + SourceIndex(5) -5 >Emitted(37, 13) Source(1, 13) + SourceIndex(5) -6 >Emitted(37, 14) Source(1, 14) + SourceIndex(5) -7 >Emitted(37, 16) Source(1, 16) + SourceIndex(5) -8 >Emitted(37, 17) Source(1, 17) + SourceIndex(5) +1->Emitted(39, 1) Source(1, 1) + SourceIndex(5) +2 >Emitted(39, 5) Source(1, 5) + SourceIndex(5) +3 >Emitted(39, 6) Source(1, 6) + SourceIndex(5) +4 >Emitted(39, 9) Source(1, 9) + SourceIndex(5) +5 >Emitted(39, 13) Source(1, 13) + SourceIndex(5) +6 >Emitted(39, 14) Source(1, 14) + SourceIndex(5) +7 >Emitted(39, 16) Source(1, 16) + SourceIndex(5) +8 >Emitted(39, 17) Source(1, 17) + SourceIndex(5) --- >>>c.doSomething(); 1-> @@ -1400,12 +1410,12 @@ sourceFile:../../third_part1.ts 4 > doSomething 5 > () 6 > ; -1->Emitted(38, 1) Source(2, 1) + SourceIndex(5) -2 >Emitted(38, 2) Source(2, 2) + SourceIndex(5) -3 >Emitted(38, 3) Source(2, 3) + SourceIndex(5) -4 >Emitted(38, 14) Source(2, 14) + SourceIndex(5) -5 >Emitted(38, 16) Source(2, 16) + SourceIndex(5) -6 >Emitted(38, 17) Source(2, 17) + SourceIndex(5) +1->Emitted(40, 1) Source(2, 1) + SourceIndex(5) +2 >Emitted(40, 2) Source(2, 2) + SourceIndex(5) +3 >Emitted(40, 3) Source(2, 3) + SourceIndex(5) +4 >Emitted(40, 14) Source(2, 14) + SourceIndex(5) +5 >Emitted(40, 16) Source(2, 16) + SourceIndex(5) +6 >Emitted(40, 17) Source(2, 17) + SourceIndex(5) --- >>>function forthirdthird_part1Rest() { 1-> @@ -1416,9 +1426,9 @@ sourceFile:../../third_part1.ts > 2 >function 3 > forthirdthird_part1Rest -1->Emitted(39, 1) Source(3, 1) + SourceIndex(5) -2 >Emitted(39, 10) Source(3, 10) + SourceIndex(5) -3 >Emitted(39, 33) Source(3, 33) + SourceIndex(5) +1->Emitted(41, 1) Source(3, 1) + SourceIndex(5) +2 >Emitted(41, 10) Source(3, 10) + SourceIndex(5) +3 >Emitted(41, 33) Source(3, 33) + SourceIndex(5) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^ @@ -1438,14 +1448,14 @@ sourceFile:../../third_part1.ts 6 > , 7 > ...rest } = { a: 10, b: 30, yy: 30 } 8 > ; -1->Emitted(40, 5) Source(4, 1) + SourceIndex(5) -2 >Emitted(40, 9) Source(4, 7) + SourceIndex(5) -3 >Emitted(40, 38) Source(4, 48) + SourceIndex(5) -4 >Emitted(40, 40) Source(4, 9) + SourceIndex(5) -5 >Emitted(40, 48) Source(4, 10) + SourceIndex(5) -6 >Emitted(40, 50) Source(4, 12) + SourceIndex(5) -7 >Emitted(40, 74) Source(4, 48) + SourceIndex(5) -8 >Emitted(40, 75) Source(4, 49) + SourceIndex(5) +1->Emitted(42, 5) Source(4, 1) + SourceIndex(5) +2 >Emitted(42, 9) Source(4, 7) + SourceIndex(5) +3 >Emitted(42, 38) Source(4, 48) + SourceIndex(5) +4 >Emitted(42, 40) Source(4, 9) + SourceIndex(5) +5 >Emitted(42, 48) Source(4, 10) + SourceIndex(5) +6 >Emitted(42, 50) Source(4, 12) + SourceIndex(5) +7 >Emitted(42, 74) Source(4, 48) + SourceIndex(5) +8 >Emitted(42, 75) Source(4, 49) + SourceIndex(5) --- >>>} 1 > @@ -1454,8 +1464,8 @@ sourceFile:../../third_part1.ts 1 > > 2 >} -1 >Emitted(41, 1) Source(5, 1) + SourceIndex(5) -2 >Emitted(41, 2) Source(5, 2) + SourceIndex(5) +1 >Emitted(43, 1) Source(5, 1) + SourceIndex(5) +2 >Emitted(43, 2) Source(5, 2) + SourceIndex(5) --- >>>//# sourceMappingURL=third-output.js.map @@ -1470,39 +1480,39 @@ sourceFile:../../third_part1.ts "sections": [ { "pos": 0, - "end": 415, + "end": 492, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 417, - "end": 643, + "pos": 494, + "end": 720, "kind": "prepend", "data": "/src/first/bin/first-output.js", "texts": [ { - "pos": 417, - "end": 643, + "pos": 494, + "end": 720, "kind": "text" } ] }, { - "pos": 643, - "end": 1047, + "pos": 720, + "end": 1124, "kind": "prepend", "data": "/src/2/second-output.js", "texts": [ { - "pos": 643, - "end": 1047, + "pos": 720, + "end": 1124, "kind": "text" } ] }, { - "pos": 1047, - "end": 1200, + "pos": 1124, + "end": 1277, "kind": "text" } ], @@ -1555,20 +1565,22 @@ sourceFile:../../third_part1.ts ====================================================================== File:: /src/third/thirdjs/output/third-output.js ---------------------------------------------------------------------- -emitHelpers: (0-415):: typescript:rest +emitHelpers: (0-492):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; ---------------------------------------------------------------------- -prepend: (417-643):: /src/first/bin/first-output.js texts:: 1 +prepend: (494-720):: /src/first/bin/first-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (417-643) +text: (494-720) var s = "Hola, world"; console.log(s); function forfirstfirst_PART1Rest() { @@ -1580,9 +1592,9 @@ function f() { } ---------------------------------------------------------------------- -prepend: (643-1047):: /src/2/second-output.js texts:: 1 +prepend: (720-1124):: /src/2/second-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (643-1047) +text: (720-1124) var N; (function (N) { function f() { @@ -1603,7 +1615,7 @@ var C = (function () { }()); ---------------------------------------------------------------------- -text: (1047-1200) +text: (1124-1277) var c = new C(); c.doSomething(); function forthirdthird_part1Rest() { diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/emitHelpers-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/emitHelpers-in-all-projects.js index d5bf6c20807..6792ddaa099 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/emitHelpers-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/emitHelpers-in-all-projects.js @@ -4,8 +4,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; var s = "Hello, world"; @@ -21,7 +23,7 @@ function f() { //# sourceMappingURL=first-output.js.map //// [/src/first/bin/first-output.js.map] -{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":";;;;;;;;;AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB;IAChC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;AAAA,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACbhB,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC"} +{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":";;;;;;;;;;;AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB;IAChC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;AAAA,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACbhB,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC"} //// [/src/first/bin/first-output.js.map.baseline.txt] =================================================================== @@ -39,8 +41,10 @@ sourceFile:../first_PART1.ts >>> for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") ->>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) ->>> t[p[i]] = s[p[i]]; +>>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> t[p[i]] = s[p[i]]; +>>> } >>> return t; >>>}; >>>var s = "Hello, world"; @@ -60,12 +64,12 @@ sourceFile:../first_PART1.ts 4 > = 5 > "Hello, world" 6 > ; -1 >Emitted(10, 1) Source(5, 1) + SourceIndex(0) -2 >Emitted(10, 5) Source(5, 7) + SourceIndex(0) -3 >Emitted(10, 6) Source(5, 8) + SourceIndex(0) -4 >Emitted(10, 9) Source(5, 11) + SourceIndex(0) -5 >Emitted(10, 23) Source(5, 25) + SourceIndex(0) -6 >Emitted(10, 24) Source(5, 26) + SourceIndex(0) +1 >Emitted(12, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(12, 5) Source(5, 7) + SourceIndex(0) +3 >Emitted(12, 6) Source(5, 8) + SourceIndex(0) +4 >Emitted(12, 9) Source(5, 11) + SourceIndex(0) +5 >Emitted(12, 23) Source(5, 25) + SourceIndex(0) +6 >Emitted(12, 24) Source(5, 26) + SourceIndex(0) --- >>>console.log(s); 1 > @@ -91,14 +95,14 @@ sourceFile:../first_PART1.ts 6 > s 7 > ) 8 > ; -1 >Emitted(11, 1) Source(11, 1) + SourceIndex(0) -2 >Emitted(11, 8) Source(11, 8) + SourceIndex(0) -3 >Emitted(11, 9) Source(11, 9) + SourceIndex(0) -4 >Emitted(11, 12) Source(11, 12) + SourceIndex(0) -5 >Emitted(11, 13) Source(11, 13) + SourceIndex(0) -6 >Emitted(11, 14) Source(11, 14) + SourceIndex(0) -7 >Emitted(11, 15) Source(11, 15) + SourceIndex(0) -8 >Emitted(11, 16) Source(11, 16) + SourceIndex(0) +1 >Emitted(13, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(13, 8) Source(11, 8) + SourceIndex(0) +3 >Emitted(13, 9) Source(11, 9) + SourceIndex(0) +4 >Emitted(13, 12) Source(11, 12) + SourceIndex(0) +5 >Emitted(13, 13) Source(11, 13) + SourceIndex(0) +6 >Emitted(13, 14) Source(11, 14) + SourceIndex(0) +7 >Emitted(13, 15) Source(11, 15) + SourceIndex(0) +8 >Emitted(13, 16) Source(11, 16) + SourceIndex(0) --- >>>function forfirstfirst_PART1Rest() { 1-> @@ -109,9 +113,9 @@ sourceFile:../first_PART1.ts > 2 >function 3 > forfirstfirst_PART1Rest -1->Emitted(12, 1) Source(12, 1) + SourceIndex(0) -2 >Emitted(12, 10) Source(12, 10) + SourceIndex(0) -3 >Emitted(12, 33) Source(12, 33) + SourceIndex(0) +1->Emitted(14, 1) Source(12, 1) + SourceIndex(0) +2 >Emitted(14, 10) Source(12, 10) + SourceIndex(0) +3 >Emitted(14, 33) Source(12, 33) + SourceIndex(0) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^ @@ -131,14 +135,14 @@ sourceFile:../first_PART1.ts 6 > , 7 > ...rest } = { a: 10, b: 30, yy: 30 } 8 > ; -1->Emitted(13, 5) Source(13, 1) + SourceIndex(0) -2 >Emitted(13, 9) Source(13, 7) + SourceIndex(0) -3 >Emitted(13, 38) Source(13, 48) + SourceIndex(0) -4 >Emitted(13, 40) Source(13, 9) + SourceIndex(0) -5 >Emitted(13, 48) Source(13, 10) + SourceIndex(0) -6 >Emitted(13, 50) Source(13, 12) + SourceIndex(0) -7 >Emitted(13, 74) Source(13, 48) + SourceIndex(0) -8 >Emitted(13, 75) Source(13, 49) + SourceIndex(0) +1->Emitted(15, 5) Source(13, 1) + SourceIndex(0) +2 >Emitted(15, 9) Source(13, 7) + SourceIndex(0) +3 >Emitted(15, 38) Source(13, 48) + SourceIndex(0) +4 >Emitted(15, 40) Source(13, 9) + SourceIndex(0) +5 >Emitted(15, 48) Source(13, 10) + SourceIndex(0) +6 >Emitted(15, 50) Source(13, 12) + SourceIndex(0) +7 >Emitted(15, 74) Source(13, 48) + SourceIndex(0) +8 >Emitted(15, 75) Source(13, 49) + SourceIndex(0) --- >>>} 1 > @@ -147,8 +151,8 @@ sourceFile:../first_PART1.ts 1 > > 2 >} -1 >Emitted(14, 1) Source(14, 1) + SourceIndex(0) -2 >Emitted(14, 2) Source(14, 2) + SourceIndex(0) +1 >Emitted(16, 1) Source(14, 1) + SourceIndex(0) +2 >Emitted(16, 2) Source(14, 2) + SourceIndex(0) --- >>>console.log(s); 1-> @@ -168,14 +172,14 @@ sourceFile:../first_PART1.ts 6 > s 7 > ) 8 > ; -1->Emitted(15, 1) Source(14, 2) + SourceIndex(0) -2 >Emitted(15, 8) Source(14, 9) + SourceIndex(0) -3 >Emitted(15, 9) Source(14, 10) + SourceIndex(0) -4 >Emitted(15, 12) Source(14, 13) + SourceIndex(0) -5 >Emitted(15, 13) Source(14, 14) + SourceIndex(0) -6 >Emitted(15, 14) Source(14, 15) + SourceIndex(0) -7 >Emitted(15, 15) Source(14, 16) + SourceIndex(0) -8 >Emitted(15, 16) Source(14, 17) + SourceIndex(0) +1->Emitted(17, 1) Source(14, 2) + SourceIndex(0) +2 >Emitted(17, 8) Source(14, 9) + SourceIndex(0) +3 >Emitted(17, 9) Source(14, 10) + SourceIndex(0) +4 >Emitted(17, 12) Source(14, 13) + SourceIndex(0) +5 >Emitted(17, 13) Source(14, 14) + SourceIndex(0) +6 >Emitted(17, 14) Source(14, 15) + SourceIndex(0) +7 >Emitted(17, 15) Source(14, 16) + SourceIndex(0) +8 >Emitted(17, 16) Source(14, 17) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/src/first/bin/first-output.js @@ -200,15 +204,15 @@ sourceFile:../first_part2.ts 7 > () 8 > ) 9 > ; -1->Emitted(16, 1) Source(1, 1) + SourceIndex(1) -2 >Emitted(16, 8) Source(1, 8) + SourceIndex(1) -3 >Emitted(16, 9) Source(1, 9) + SourceIndex(1) -4 >Emitted(16, 12) Source(1, 12) + SourceIndex(1) -5 >Emitted(16, 13) Source(1, 13) + SourceIndex(1) -6 >Emitted(16, 14) Source(1, 14) + SourceIndex(1) -7 >Emitted(16, 16) Source(1, 16) + SourceIndex(1) -8 >Emitted(16, 17) Source(1, 17) + SourceIndex(1) -9 >Emitted(16, 18) Source(1, 18) + SourceIndex(1) +1->Emitted(18, 1) Source(1, 1) + SourceIndex(1) +2 >Emitted(18, 8) Source(1, 8) + SourceIndex(1) +3 >Emitted(18, 9) Source(1, 9) + SourceIndex(1) +4 >Emitted(18, 12) Source(1, 12) + SourceIndex(1) +5 >Emitted(18, 13) Source(1, 13) + SourceIndex(1) +6 >Emitted(18, 14) Source(1, 14) + SourceIndex(1) +7 >Emitted(18, 16) Source(1, 16) + SourceIndex(1) +8 >Emitted(18, 17) Source(1, 17) + SourceIndex(1) +9 >Emitted(18, 18) Source(1, 18) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:/src/first/bin/first-output.js @@ -222,9 +226,9 @@ sourceFile:../first_part3.ts 1 > 2 >function 3 > f -1 >Emitted(17, 1) Source(1, 1) + SourceIndex(2) -2 >Emitted(17, 10) Source(1, 10) + SourceIndex(2) -3 >Emitted(17, 11) Source(1, 11) + SourceIndex(2) +1 >Emitted(19, 1) Source(1, 1) + SourceIndex(2) +2 >Emitted(19, 10) Source(1, 10) + SourceIndex(2) +3 >Emitted(19, 11) Source(1, 11) + SourceIndex(2) --- >>> return "JS does hoists"; 1->^^^^ @@ -236,10 +240,10 @@ sourceFile:../first_part3.ts 2 > return 3 > "JS does hoists" 4 > ; -1->Emitted(18, 5) Source(2, 5) + SourceIndex(2) -2 >Emitted(18, 12) Source(2, 12) + SourceIndex(2) -3 >Emitted(18, 28) Source(2, 28) + SourceIndex(2) -4 >Emitted(18, 29) Source(2, 29) + SourceIndex(2) +1->Emitted(20, 5) Source(2, 5) + SourceIndex(2) +2 >Emitted(20, 12) Source(2, 12) + SourceIndex(2) +3 >Emitted(20, 28) Source(2, 28) + SourceIndex(2) +4 >Emitted(20, 29) Source(2, 29) + SourceIndex(2) --- >>>} 1 > @@ -248,8 +252,8 @@ sourceFile:../first_part3.ts 1 > > 2 >} -1 >Emitted(19, 1) Source(3, 1) + SourceIndex(2) -2 >Emitted(19, 2) Source(3, 2) + SourceIndex(2) +1 >Emitted(21, 1) Source(3, 1) + SourceIndex(2) +2 >Emitted(21, 2) Source(3, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=first-output.js.map @@ -266,13 +270,13 @@ sourceFile:../first_part3.ts "sections": [ { "pos": 0, - "end": 415, + "end": 492, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 417, - "end": 661, + "pos": 494, + "end": 738, "kind": "text" } ], @@ -299,18 +303,20 @@ sourceFile:../first_part3.ts ====================================================================== File:: /src/first/bin/first-output.js ---------------------------------------------------------------------- -emitHelpers: (0-415):: typescript:rest +emitHelpers: (0-492):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; ---------------------------------------------------------------------- -text: (417-661) +text: (494-738) var s = "Hello, world"; console.log(s); function forfirstfirst_PART1Rest() { @@ -361,8 +367,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; var s = "Hello, world"; @@ -401,7 +409,7 @@ function forthirdthird_part1Rest() { //# sourceMappingURL=third-output.js.map //// [/src/third/thirdjs/output/third-output.js.map] -{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../../first/first_PART1.ts","../../../first/first_part2.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts","../../third_part1.ts"],"names":[],"mappings":";;;;;;;;;AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB;IAChC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;AAAA,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACbhB,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC;ACED,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;AACD,SAAS,yBAAyB;IAClC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;ACbD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC;ACJD,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC;AAChB,SAAS,uBAAuB;IAChC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC"} +{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../../first/first_PART1.ts","../../../first/first_part2.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts","../../third_part1.ts"],"names":[],"mappings":";;;;;;;;;;;AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB;IAChC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;AAAA,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACbhB,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC;ACED,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;AACD,SAAS,yBAAyB;IAClC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;ACbD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC;ACJD,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC;AAChB,SAAS,uBAAuB;IAChC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC"} //// [/src/third/thirdjs/output/third-output.js.map.baseline.txt] =================================================================== @@ -419,8 +427,10 @@ sourceFile:../../../first/first_PART1.ts >>> for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") ->>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) ->>> t[p[i]] = s[p[i]]; +>>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> t[p[i]] = s[p[i]]; +>>> } >>> return t; >>>}; >>>var s = "Hello, world"; @@ -440,12 +450,12 @@ sourceFile:../../../first/first_PART1.ts 4 > = 5 > "Hello, world" 6 > ; -1 >Emitted(10, 1) Source(5, 1) + SourceIndex(0) -2 >Emitted(10, 5) Source(5, 7) + SourceIndex(0) -3 >Emitted(10, 6) Source(5, 8) + SourceIndex(0) -4 >Emitted(10, 9) Source(5, 11) + SourceIndex(0) -5 >Emitted(10, 23) Source(5, 25) + SourceIndex(0) -6 >Emitted(10, 24) Source(5, 26) + SourceIndex(0) +1 >Emitted(12, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(12, 5) Source(5, 7) + SourceIndex(0) +3 >Emitted(12, 6) Source(5, 8) + SourceIndex(0) +4 >Emitted(12, 9) Source(5, 11) + SourceIndex(0) +5 >Emitted(12, 23) Source(5, 25) + SourceIndex(0) +6 >Emitted(12, 24) Source(5, 26) + SourceIndex(0) --- >>>console.log(s); 1 > @@ -471,14 +481,14 @@ sourceFile:../../../first/first_PART1.ts 6 > s 7 > ) 8 > ; -1 >Emitted(11, 1) Source(11, 1) + SourceIndex(0) -2 >Emitted(11, 8) Source(11, 8) + SourceIndex(0) -3 >Emitted(11, 9) Source(11, 9) + SourceIndex(0) -4 >Emitted(11, 12) Source(11, 12) + SourceIndex(0) -5 >Emitted(11, 13) Source(11, 13) + SourceIndex(0) -6 >Emitted(11, 14) Source(11, 14) + SourceIndex(0) -7 >Emitted(11, 15) Source(11, 15) + SourceIndex(0) -8 >Emitted(11, 16) Source(11, 16) + SourceIndex(0) +1 >Emitted(13, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(13, 8) Source(11, 8) + SourceIndex(0) +3 >Emitted(13, 9) Source(11, 9) + SourceIndex(0) +4 >Emitted(13, 12) Source(11, 12) + SourceIndex(0) +5 >Emitted(13, 13) Source(11, 13) + SourceIndex(0) +6 >Emitted(13, 14) Source(11, 14) + SourceIndex(0) +7 >Emitted(13, 15) Source(11, 15) + SourceIndex(0) +8 >Emitted(13, 16) Source(11, 16) + SourceIndex(0) --- >>>function forfirstfirst_PART1Rest() { 1-> @@ -489,9 +499,9 @@ sourceFile:../../../first/first_PART1.ts > 2 >function 3 > forfirstfirst_PART1Rest -1->Emitted(12, 1) Source(12, 1) + SourceIndex(0) -2 >Emitted(12, 10) Source(12, 10) + SourceIndex(0) -3 >Emitted(12, 33) Source(12, 33) + SourceIndex(0) +1->Emitted(14, 1) Source(12, 1) + SourceIndex(0) +2 >Emitted(14, 10) Source(12, 10) + SourceIndex(0) +3 >Emitted(14, 33) Source(12, 33) + SourceIndex(0) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^ @@ -511,14 +521,14 @@ sourceFile:../../../first/first_PART1.ts 6 > , 7 > ...rest } = { a: 10, b: 30, yy: 30 } 8 > ; -1->Emitted(13, 5) Source(13, 1) + SourceIndex(0) -2 >Emitted(13, 9) Source(13, 7) + SourceIndex(0) -3 >Emitted(13, 38) Source(13, 48) + SourceIndex(0) -4 >Emitted(13, 40) Source(13, 9) + SourceIndex(0) -5 >Emitted(13, 48) Source(13, 10) + SourceIndex(0) -6 >Emitted(13, 50) Source(13, 12) + SourceIndex(0) -7 >Emitted(13, 74) Source(13, 48) + SourceIndex(0) -8 >Emitted(13, 75) Source(13, 49) + SourceIndex(0) +1->Emitted(15, 5) Source(13, 1) + SourceIndex(0) +2 >Emitted(15, 9) Source(13, 7) + SourceIndex(0) +3 >Emitted(15, 38) Source(13, 48) + SourceIndex(0) +4 >Emitted(15, 40) Source(13, 9) + SourceIndex(0) +5 >Emitted(15, 48) Source(13, 10) + SourceIndex(0) +6 >Emitted(15, 50) Source(13, 12) + SourceIndex(0) +7 >Emitted(15, 74) Source(13, 48) + SourceIndex(0) +8 >Emitted(15, 75) Source(13, 49) + SourceIndex(0) --- >>>} 1 > @@ -527,8 +537,8 @@ sourceFile:../../../first/first_PART1.ts 1 > > 2 >} -1 >Emitted(14, 1) Source(14, 1) + SourceIndex(0) -2 >Emitted(14, 2) Source(14, 2) + SourceIndex(0) +1 >Emitted(16, 1) Source(14, 1) + SourceIndex(0) +2 >Emitted(16, 2) Source(14, 2) + SourceIndex(0) --- >>>console.log(s); 1-> @@ -548,14 +558,14 @@ sourceFile:../../../first/first_PART1.ts 6 > s 7 > ) 8 > ; -1->Emitted(15, 1) Source(14, 2) + SourceIndex(0) -2 >Emitted(15, 8) Source(14, 9) + SourceIndex(0) -3 >Emitted(15, 9) Source(14, 10) + SourceIndex(0) -4 >Emitted(15, 12) Source(14, 13) + SourceIndex(0) -5 >Emitted(15, 13) Source(14, 14) + SourceIndex(0) -6 >Emitted(15, 14) Source(14, 15) + SourceIndex(0) -7 >Emitted(15, 15) Source(14, 16) + SourceIndex(0) -8 >Emitted(15, 16) Source(14, 17) + SourceIndex(0) +1->Emitted(17, 1) Source(14, 2) + SourceIndex(0) +2 >Emitted(17, 8) Source(14, 9) + SourceIndex(0) +3 >Emitted(17, 9) Source(14, 10) + SourceIndex(0) +4 >Emitted(17, 12) Source(14, 13) + SourceIndex(0) +5 >Emitted(17, 13) Source(14, 14) + SourceIndex(0) +6 >Emitted(17, 14) Source(14, 15) + SourceIndex(0) +7 >Emitted(17, 15) Source(14, 16) + SourceIndex(0) +8 >Emitted(17, 16) Source(14, 17) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -580,15 +590,15 @@ sourceFile:../../../first/first_part2.ts 7 > () 8 > ) 9 > ; -1->Emitted(16, 1) Source(1, 1) + SourceIndex(1) -2 >Emitted(16, 8) Source(1, 8) + SourceIndex(1) -3 >Emitted(16, 9) Source(1, 9) + SourceIndex(1) -4 >Emitted(16, 12) Source(1, 12) + SourceIndex(1) -5 >Emitted(16, 13) Source(1, 13) + SourceIndex(1) -6 >Emitted(16, 14) Source(1, 14) + SourceIndex(1) -7 >Emitted(16, 16) Source(1, 16) + SourceIndex(1) -8 >Emitted(16, 17) Source(1, 17) + SourceIndex(1) -9 >Emitted(16, 18) Source(1, 18) + SourceIndex(1) +1->Emitted(18, 1) Source(1, 1) + SourceIndex(1) +2 >Emitted(18, 8) Source(1, 8) + SourceIndex(1) +3 >Emitted(18, 9) Source(1, 9) + SourceIndex(1) +4 >Emitted(18, 12) Source(1, 12) + SourceIndex(1) +5 >Emitted(18, 13) Source(1, 13) + SourceIndex(1) +6 >Emitted(18, 14) Source(1, 14) + SourceIndex(1) +7 >Emitted(18, 16) Source(1, 16) + SourceIndex(1) +8 >Emitted(18, 17) Source(1, 17) + SourceIndex(1) +9 >Emitted(18, 18) Source(1, 18) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -602,9 +612,9 @@ sourceFile:../../../first/first_part3.ts 1 > 2 >function 3 > f -1 >Emitted(17, 1) Source(1, 1) + SourceIndex(2) -2 >Emitted(17, 10) Source(1, 10) + SourceIndex(2) -3 >Emitted(17, 11) Source(1, 11) + SourceIndex(2) +1 >Emitted(19, 1) Source(1, 1) + SourceIndex(2) +2 >Emitted(19, 10) Source(1, 10) + SourceIndex(2) +3 >Emitted(19, 11) Source(1, 11) + SourceIndex(2) --- >>> return "JS does hoists"; 1->^^^^ @@ -616,10 +626,10 @@ sourceFile:../../../first/first_part3.ts 2 > return 3 > "JS does hoists" 4 > ; -1->Emitted(18, 5) Source(2, 5) + SourceIndex(2) -2 >Emitted(18, 12) Source(2, 12) + SourceIndex(2) -3 >Emitted(18, 28) Source(2, 28) + SourceIndex(2) -4 >Emitted(18, 29) Source(2, 29) + SourceIndex(2) +1->Emitted(20, 5) Source(2, 5) + SourceIndex(2) +2 >Emitted(20, 12) Source(2, 12) + SourceIndex(2) +3 >Emitted(20, 28) Source(2, 28) + SourceIndex(2) +4 >Emitted(20, 29) Source(2, 29) + SourceIndex(2) --- >>>} 1 > @@ -628,8 +638,8 @@ sourceFile:../../../first/first_part3.ts 1 > > 2 >} -1 >Emitted(19, 1) Source(3, 1) + SourceIndex(2) -2 >Emitted(19, 2) Source(3, 2) + SourceIndex(2) +1 >Emitted(21, 1) Source(3, 1) + SourceIndex(2) +2 >Emitted(21, 2) Source(3, 2) + SourceIndex(2) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -655,10 +665,10 @@ sourceFile:../../../second/second_part1.ts > > f(); > } -1->Emitted(20, 1) Source(5, 1) + SourceIndex(3) -2 >Emitted(20, 5) Source(5, 11) + SourceIndex(3) -3 >Emitted(20, 6) Source(5, 12) + SourceIndex(3) -4 >Emitted(20, 7) Source(11, 2) + SourceIndex(3) +1->Emitted(22, 1) Source(5, 1) + SourceIndex(3) +2 >Emitted(22, 5) Source(5, 11) + SourceIndex(3) +3 >Emitted(22, 6) Source(5, 12) + SourceIndex(3) +4 >Emitted(22, 7) Source(11, 2) + SourceIndex(3) --- >>>(function (N) { 1-> @@ -668,9 +678,9 @@ sourceFile:../../../second/second_part1.ts 1-> 2 >namespace 3 > N -1->Emitted(21, 1) Source(5, 1) + SourceIndex(3) -2 >Emitted(21, 12) Source(5, 11) + SourceIndex(3) -3 >Emitted(21, 13) Source(5, 12) + SourceIndex(3) +1->Emitted(23, 1) Source(5, 1) + SourceIndex(3) +2 >Emitted(23, 12) Source(5, 11) + SourceIndex(3) +3 >Emitted(23, 13) Source(5, 12) + SourceIndex(3) --- >>> function f() { 1->^^^^ @@ -681,9 +691,9 @@ sourceFile:../../../second/second_part1.ts > 2 > function 3 > f -1->Emitted(22, 5) Source(6, 5) + SourceIndex(3) -2 >Emitted(22, 14) Source(6, 14) + SourceIndex(3) -3 >Emitted(22, 15) Source(6, 15) + SourceIndex(3) +1->Emitted(24, 5) Source(6, 5) + SourceIndex(3) +2 >Emitted(24, 14) Source(6, 14) + SourceIndex(3) +3 >Emitted(24, 15) Source(6, 15) + SourceIndex(3) --- >>> console.log('testing'); 1->^^^^^^^^ @@ -703,14 +713,14 @@ sourceFile:../../../second/second_part1.ts 6 > 'testing' 7 > ) 8 > ; -1->Emitted(23, 9) Source(7, 9) + SourceIndex(3) -2 >Emitted(23, 16) Source(7, 16) + SourceIndex(3) -3 >Emitted(23, 17) Source(7, 17) + SourceIndex(3) -4 >Emitted(23, 20) Source(7, 20) + SourceIndex(3) -5 >Emitted(23, 21) Source(7, 21) + SourceIndex(3) -6 >Emitted(23, 30) Source(7, 30) + SourceIndex(3) -7 >Emitted(23, 31) Source(7, 31) + SourceIndex(3) -8 >Emitted(23, 32) Source(7, 32) + SourceIndex(3) +1->Emitted(25, 9) Source(7, 9) + SourceIndex(3) +2 >Emitted(25, 16) Source(7, 16) + SourceIndex(3) +3 >Emitted(25, 17) Source(7, 17) + SourceIndex(3) +4 >Emitted(25, 20) Source(7, 20) + SourceIndex(3) +5 >Emitted(25, 21) Source(7, 21) + SourceIndex(3) +6 >Emitted(25, 30) Source(7, 30) + SourceIndex(3) +7 >Emitted(25, 31) Source(7, 31) + SourceIndex(3) +8 >Emitted(25, 32) Source(7, 32) + SourceIndex(3) --- >>> } 1 >^^^^ @@ -719,8 +729,8 @@ sourceFile:../../../second/second_part1.ts 1 > > 2 > } -1 >Emitted(24, 5) Source(8, 5) + SourceIndex(3) -2 >Emitted(24, 6) Source(8, 6) + SourceIndex(3) +1 >Emitted(26, 5) Source(8, 5) + SourceIndex(3) +2 >Emitted(26, 6) Source(8, 6) + SourceIndex(3) --- >>> f(); 1->^^^^ @@ -734,10 +744,10 @@ sourceFile:../../../second/second_part1.ts 2 > f 3 > () 4 > ; -1->Emitted(25, 5) Source(10, 5) + SourceIndex(3) -2 >Emitted(25, 6) Source(10, 6) + SourceIndex(3) -3 >Emitted(25, 8) Source(10, 8) + SourceIndex(3) -4 >Emitted(25, 9) Source(10, 9) + SourceIndex(3) +1->Emitted(27, 5) Source(10, 5) + SourceIndex(3) +2 >Emitted(27, 6) Source(10, 6) + SourceIndex(3) +3 >Emitted(27, 8) Source(10, 8) + SourceIndex(3) +4 >Emitted(27, 9) Source(10, 9) + SourceIndex(3) --- >>>})(N || (N = {})); 1-> @@ -762,13 +772,13 @@ sourceFile:../../../second/second_part1.ts > > f(); > } -1->Emitted(26, 1) Source(11, 1) + SourceIndex(3) -2 >Emitted(26, 2) Source(11, 2) + SourceIndex(3) -3 >Emitted(26, 4) Source(5, 11) + SourceIndex(3) -4 >Emitted(26, 5) Source(5, 12) + SourceIndex(3) -5 >Emitted(26, 10) Source(5, 11) + SourceIndex(3) -6 >Emitted(26, 11) Source(5, 12) + SourceIndex(3) -7 >Emitted(26, 19) Source(11, 2) + SourceIndex(3) +1->Emitted(28, 1) Source(11, 1) + SourceIndex(3) +2 >Emitted(28, 2) Source(11, 2) + SourceIndex(3) +3 >Emitted(28, 4) Source(5, 11) + SourceIndex(3) +4 >Emitted(28, 5) Source(5, 12) + SourceIndex(3) +5 >Emitted(28, 10) Source(5, 11) + SourceIndex(3) +6 >Emitted(28, 11) Source(5, 12) + SourceIndex(3) +7 >Emitted(28, 19) Source(11, 2) + SourceIndex(3) --- >>>function forsecondsecond_part1Rest() { 1-> @@ -779,9 +789,9 @@ sourceFile:../../../second/second_part1.ts > 2 >function 3 > forsecondsecond_part1Rest -1->Emitted(27, 1) Source(12, 1) + SourceIndex(3) -2 >Emitted(27, 10) Source(12, 10) + SourceIndex(3) -3 >Emitted(27, 35) Source(12, 35) + SourceIndex(3) +1->Emitted(29, 1) Source(12, 1) + SourceIndex(3) +2 >Emitted(29, 10) Source(12, 10) + SourceIndex(3) +3 >Emitted(29, 35) Source(12, 35) + SourceIndex(3) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^ @@ -801,14 +811,14 @@ sourceFile:../../../second/second_part1.ts 6 > , 7 > ...rest } = { a: 10, b: 30, yy: 30 } 8 > ; -1->Emitted(28, 5) Source(13, 1) + SourceIndex(3) -2 >Emitted(28, 9) Source(13, 7) + SourceIndex(3) -3 >Emitted(28, 38) Source(13, 48) + SourceIndex(3) -4 >Emitted(28, 40) Source(13, 9) + SourceIndex(3) -5 >Emitted(28, 48) Source(13, 10) + SourceIndex(3) -6 >Emitted(28, 50) Source(13, 12) + SourceIndex(3) -7 >Emitted(28, 74) Source(13, 48) + SourceIndex(3) -8 >Emitted(28, 75) Source(13, 49) + SourceIndex(3) +1->Emitted(30, 5) Source(13, 1) + SourceIndex(3) +2 >Emitted(30, 9) Source(13, 7) + SourceIndex(3) +3 >Emitted(30, 38) Source(13, 48) + SourceIndex(3) +4 >Emitted(30, 40) Source(13, 9) + SourceIndex(3) +5 >Emitted(30, 48) Source(13, 10) + SourceIndex(3) +6 >Emitted(30, 50) Source(13, 12) + SourceIndex(3) +7 >Emitted(30, 74) Source(13, 48) + SourceIndex(3) +8 >Emitted(30, 75) Source(13, 49) + SourceIndex(3) --- >>>} 1 > @@ -817,8 +827,8 @@ sourceFile:../../../second/second_part1.ts 1 > > 2 >} -1 >Emitted(29, 1) Source(14, 1) + SourceIndex(3) -2 >Emitted(29, 2) Source(14, 2) + SourceIndex(3) +1 >Emitted(31, 1) Source(14, 1) + SourceIndex(3) +2 >Emitted(31, 2) Source(14, 2) + SourceIndex(3) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -828,13 +838,13 @@ sourceFile:../../../second/second_part2.ts 1-> 2 >^^^^^^^^^^^^^^^^^^^-> 1-> -1->Emitted(30, 1) Source(1, 1) + SourceIndex(4) +1->Emitted(32, 1) Source(1, 1) + SourceIndex(4) --- >>> function C() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(31, 5) Source(1, 1) + SourceIndex(4) +1->Emitted(33, 5) Source(1, 1) + SourceIndex(4) --- >>> } 1->^^^^ @@ -846,8 +856,8 @@ sourceFile:../../../second/second_part2.ts > } > 2 > } -1->Emitted(32, 5) Source(5, 1) + SourceIndex(4) -2 >Emitted(32, 6) Source(5, 2) + SourceIndex(4) +1->Emitted(34, 5) Source(5, 1) + SourceIndex(4) +2 >Emitted(34, 6) Source(5, 2) + SourceIndex(4) --- >>> C.prototype.doSomething = function () { 1->^^^^ @@ -857,9 +867,9 @@ sourceFile:../../../second/second_part2.ts 1-> 2 > doSomething 3 > -1->Emitted(33, 5) Source(2, 5) + SourceIndex(4) -2 >Emitted(33, 28) Source(2, 16) + SourceIndex(4) -3 >Emitted(33, 31) Source(2, 5) + SourceIndex(4) +1->Emitted(35, 5) Source(2, 5) + SourceIndex(4) +2 >Emitted(35, 28) Source(2, 16) + SourceIndex(4) +3 >Emitted(35, 31) Source(2, 5) + SourceIndex(4) --- >>> console.log("something got done"); 1->^^^^^^^^ @@ -879,14 +889,14 @@ sourceFile:../../../second/second_part2.ts 6 > "something got done" 7 > ) 8 > ; -1->Emitted(34, 9) Source(3, 9) + SourceIndex(4) -2 >Emitted(34, 16) Source(3, 16) + SourceIndex(4) -3 >Emitted(34, 17) Source(3, 17) + SourceIndex(4) -4 >Emitted(34, 20) Source(3, 20) + SourceIndex(4) -5 >Emitted(34, 21) Source(3, 21) + SourceIndex(4) -6 >Emitted(34, 41) Source(3, 41) + SourceIndex(4) -7 >Emitted(34, 42) Source(3, 42) + SourceIndex(4) -8 >Emitted(34, 43) Source(3, 43) + SourceIndex(4) +1->Emitted(36, 9) Source(3, 9) + SourceIndex(4) +2 >Emitted(36, 16) Source(3, 16) + SourceIndex(4) +3 >Emitted(36, 17) Source(3, 17) + SourceIndex(4) +4 >Emitted(36, 20) Source(3, 20) + SourceIndex(4) +5 >Emitted(36, 21) Source(3, 21) + SourceIndex(4) +6 >Emitted(36, 41) Source(3, 41) + SourceIndex(4) +7 >Emitted(36, 42) Source(3, 42) + SourceIndex(4) +8 >Emitted(36, 43) Source(3, 43) + SourceIndex(4) --- >>> }; 1 >^^^^ @@ -895,8 +905,8 @@ sourceFile:../../../second/second_part2.ts 1 > > 2 > } -1 >Emitted(35, 5) Source(4, 5) + SourceIndex(4) -2 >Emitted(35, 6) Source(4, 6) + SourceIndex(4) +1 >Emitted(37, 5) Source(4, 5) + SourceIndex(4) +2 >Emitted(37, 6) Source(4, 6) + SourceIndex(4) --- >>> return C; 1->^^^^ @@ -904,8 +914,8 @@ sourceFile:../../../second/second_part2.ts 1-> > 2 > } -1->Emitted(36, 5) Source(5, 1) + SourceIndex(4) -2 >Emitted(36, 13) Source(5, 2) + SourceIndex(4) +1->Emitted(38, 5) Source(5, 1) + SourceIndex(4) +2 >Emitted(38, 13) Source(5, 2) + SourceIndex(4) --- >>>}()); 1 > @@ -921,10 +931,10 @@ sourceFile:../../../second/second_part2.ts > console.log("something got done"); > } > } -1 >Emitted(37, 1) Source(5, 1) + SourceIndex(4) -2 >Emitted(37, 2) Source(5, 2) + SourceIndex(4) -3 >Emitted(37, 2) Source(1, 1) + SourceIndex(4) -4 >Emitted(37, 6) Source(5, 2) + SourceIndex(4) +1 >Emitted(39, 1) Source(5, 1) + SourceIndex(4) +2 >Emitted(39, 2) Source(5, 2) + SourceIndex(4) +3 >Emitted(39, 2) Source(1, 1) + SourceIndex(4) +4 >Emitted(39, 6) Source(5, 2) + SourceIndex(4) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -948,14 +958,14 @@ sourceFile:../../third_part1.ts 6 > C 7 > () 8 > ; -1->Emitted(38, 1) Source(1, 1) + SourceIndex(5) -2 >Emitted(38, 5) Source(1, 5) + SourceIndex(5) -3 >Emitted(38, 6) Source(1, 6) + SourceIndex(5) -4 >Emitted(38, 9) Source(1, 9) + SourceIndex(5) -5 >Emitted(38, 13) Source(1, 13) + SourceIndex(5) -6 >Emitted(38, 14) Source(1, 14) + SourceIndex(5) -7 >Emitted(38, 16) Source(1, 16) + SourceIndex(5) -8 >Emitted(38, 17) Source(1, 17) + SourceIndex(5) +1->Emitted(40, 1) Source(1, 1) + SourceIndex(5) +2 >Emitted(40, 5) Source(1, 5) + SourceIndex(5) +3 >Emitted(40, 6) Source(1, 6) + SourceIndex(5) +4 >Emitted(40, 9) Source(1, 9) + SourceIndex(5) +5 >Emitted(40, 13) Source(1, 13) + SourceIndex(5) +6 >Emitted(40, 14) Source(1, 14) + SourceIndex(5) +7 >Emitted(40, 16) Source(1, 16) + SourceIndex(5) +8 >Emitted(40, 17) Source(1, 17) + SourceIndex(5) --- >>>c.doSomething(); 1-> @@ -972,12 +982,12 @@ sourceFile:../../third_part1.ts 4 > doSomething 5 > () 6 > ; -1->Emitted(39, 1) Source(2, 1) + SourceIndex(5) -2 >Emitted(39, 2) Source(2, 2) + SourceIndex(5) -3 >Emitted(39, 3) Source(2, 3) + SourceIndex(5) -4 >Emitted(39, 14) Source(2, 14) + SourceIndex(5) -5 >Emitted(39, 16) Source(2, 16) + SourceIndex(5) -6 >Emitted(39, 17) Source(2, 17) + SourceIndex(5) +1->Emitted(41, 1) Source(2, 1) + SourceIndex(5) +2 >Emitted(41, 2) Source(2, 2) + SourceIndex(5) +3 >Emitted(41, 3) Source(2, 3) + SourceIndex(5) +4 >Emitted(41, 14) Source(2, 14) + SourceIndex(5) +5 >Emitted(41, 16) Source(2, 16) + SourceIndex(5) +6 >Emitted(41, 17) Source(2, 17) + SourceIndex(5) --- >>>function forthirdthird_part1Rest() { 1-> @@ -988,9 +998,9 @@ sourceFile:../../third_part1.ts > 2 >function 3 > forthirdthird_part1Rest -1->Emitted(40, 1) Source(3, 1) + SourceIndex(5) -2 >Emitted(40, 10) Source(3, 10) + SourceIndex(5) -3 >Emitted(40, 33) Source(3, 33) + SourceIndex(5) +1->Emitted(42, 1) Source(3, 1) + SourceIndex(5) +2 >Emitted(42, 10) Source(3, 10) + SourceIndex(5) +3 >Emitted(42, 33) Source(3, 33) + SourceIndex(5) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^ @@ -1010,14 +1020,14 @@ sourceFile:../../third_part1.ts 6 > , 7 > ...rest } = { a: 10, b: 30, yy: 30 } 8 > ; -1->Emitted(41, 5) Source(4, 1) + SourceIndex(5) -2 >Emitted(41, 9) Source(4, 7) + SourceIndex(5) -3 >Emitted(41, 38) Source(4, 48) + SourceIndex(5) -4 >Emitted(41, 40) Source(4, 9) + SourceIndex(5) -5 >Emitted(41, 48) Source(4, 10) + SourceIndex(5) -6 >Emitted(41, 50) Source(4, 12) + SourceIndex(5) -7 >Emitted(41, 74) Source(4, 48) + SourceIndex(5) -8 >Emitted(41, 75) Source(4, 49) + SourceIndex(5) +1->Emitted(43, 5) Source(4, 1) + SourceIndex(5) +2 >Emitted(43, 9) Source(4, 7) + SourceIndex(5) +3 >Emitted(43, 38) Source(4, 48) + SourceIndex(5) +4 >Emitted(43, 40) Source(4, 9) + SourceIndex(5) +5 >Emitted(43, 48) Source(4, 10) + SourceIndex(5) +6 >Emitted(43, 50) Source(4, 12) + SourceIndex(5) +7 >Emitted(43, 74) Source(4, 48) + SourceIndex(5) +8 >Emitted(43, 75) Source(4, 49) + SourceIndex(5) --- >>>} 1 > @@ -1026,8 +1036,8 @@ sourceFile:../../third_part1.ts 1 > > 2 >} -1 >Emitted(42, 1) Source(5, 1) + SourceIndex(5) -2 >Emitted(42, 2) Source(5, 2) + SourceIndex(5) +1 >Emitted(44, 1) Source(5, 1) + SourceIndex(5) +2 >Emitted(44, 2) Source(5, 2) + SourceIndex(5) --- >>>//# sourceMappingURL=third-output.js.map @@ -1042,39 +1052,39 @@ sourceFile:../../third_part1.ts "sections": [ { "pos": 0, - "end": 415, + "end": 492, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 417, - "end": 661, + "pos": 494, + "end": 738, "kind": "prepend", "data": "/src/first/bin/first-output.js", "texts": [ { - "pos": 417, - "end": 661, + "pos": 494, + "end": 738, "kind": "text" } ] }, { - "pos": 661, - "end": 1065, + "pos": 738, + "end": 1142, "kind": "prepend", "data": "/src/2/second-output.js", "texts": [ { - "pos": 661, - "end": 1065, + "pos": 738, + "end": 1142, "kind": "text" } ] }, { - "pos": 1065, - "end": 1218, + "pos": 1142, + "end": 1295, "kind": "text" } ], @@ -1127,20 +1137,22 @@ sourceFile:../../third_part1.ts ====================================================================== File:: /src/third/thirdjs/output/third-output.js ---------------------------------------------------------------------- -emitHelpers: (0-415):: typescript:rest +emitHelpers: (0-492):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; ---------------------------------------------------------------------- -prepend: (417-661):: /src/first/bin/first-output.js texts:: 1 +prepend: (494-738):: /src/first/bin/first-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (417-661) +text: (494-738) var s = "Hello, world"; console.log(s); function forfirstfirst_PART1Rest() { @@ -1153,9 +1165,9 @@ function f() { } ---------------------------------------------------------------------- -prepend: (661-1065):: /src/2/second-output.js texts:: 1 +prepend: (738-1142):: /src/2/second-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (661-1065) +text: (738-1142) var N; (function (N) { function f() { @@ -1176,7 +1188,7 @@ var C = (function () { }()); ---------------------------------------------------------------------- -text: (1065-1218) +text: (1142-1295) var c = new C(); c.doSomething(); function forthirdthird_part1Rest() { diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/emitHelpers-in-only-one-dependency-project.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/emitHelpers-in-only-one-dependency-project.js index d0c1eb54a50..d0e7ceca502 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/emitHelpers-in-only-one-dependency-project.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/emitHelpers-in-only-one-dependency-project.js @@ -283,8 +283,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; var s = "Hello, world"; @@ -318,7 +320,7 @@ c.doSomething(); //# sourceMappingURL=third-output.js.map //// [/src/third/thirdjs/output/third-output.js.map] -{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../../first/first_PART1.ts","../../../first/first_part2.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts","../../third_part1.ts"],"names":[],"mappings":";;;;;;;;;AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB,KAAK,CAAC;AAAA,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACXrD,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC;ACED,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;AACD,SAAS,yBAAyB;IAClC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;ACbD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC;ACJD,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC"} +{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../../first/first_PART1.ts","../../../first/first_part2.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts","../../third_part1.ts"],"names":[],"mappings":";;;;;;;;;;;AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB,KAAK,CAAC;AAAA,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACXrD,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC;ACED,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;AACD,SAAS,yBAAyB;IAClC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;ACbD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC;ACJD,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC"} //// [/src/third/thirdjs/output/third-output.js.map.baseline.txt] =================================================================== @@ -336,8 +338,10 @@ sourceFile:../../../first/first_PART1.ts >>> for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") ->>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) ->>> t[p[i]] = s[p[i]]; +>>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> t[p[i]] = s[p[i]]; +>>> } >>> return t; >>>}; >>>var s = "Hello, world"; @@ -357,12 +361,12 @@ sourceFile:../../../first/first_PART1.ts 4 > = 5 > "Hello, world" 6 > ; -1 >Emitted(10, 1) Source(5, 1) + SourceIndex(0) -2 >Emitted(10, 5) Source(5, 7) + SourceIndex(0) -3 >Emitted(10, 6) Source(5, 8) + SourceIndex(0) -4 >Emitted(10, 9) Source(5, 11) + SourceIndex(0) -5 >Emitted(10, 23) Source(5, 25) + SourceIndex(0) -6 >Emitted(10, 24) Source(5, 26) + SourceIndex(0) +1 >Emitted(12, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(12, 5) Source(5, 7) + SourceIndex(0) +3 >Emitted(12, 6) Source(5, 8) + SourceIndex(0) +4 >Emitted(12, 9) Source(5, 11) + SourceIndex(0) +5 >Emitted(12, 23) Source(5, 25) + SourceIndex(0) +6 >Emitted(12, 24) Source(5, 26) + SourceIndex(0) --- >>>console.log(s); 1 > @@ -388,14 +392,14 @@ sourceFile:../../../first/first_PART1.ts 6 > s 7 > ) 8 > ; -1 >Emitted(11, 1) Source(11, 1) + SourceIndex(0) -2 >Emitted(11, 8) Source(11, 8) + SourceIndex(0) -3 >Emitted(11, 9) Source(11, 9) + SourceIndex(0) -4 >Emitted(11, 12) Source(11, 12) + SourceIndex(0) -5 >Emitted(11, 13) Source(11, 13) + SourceIndex(0) -6 >Emitted(11, 14) Source(11, 14) + SourceIndex(0) -7 >Emitted(11, 15) Source(11, 15) + SourceIndex(0) -8 >Emitted(11, 16) Source(11, 16) + SourceIndex(0) +1 >Emitted(13, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(13, 8) Source(11, 8) + SourceIndex(0) +3 >Emitted(13, 9) Source(11, 9) + SourceIndex(0) +4 >Emitted(13, 12) Source(11, 12) + SourceIndex(0) +5 >Emitted(13, 13) Source(11, 13) + SourceIndex(0) +6 >Emitted(13, 14) Source(11, 14) + SourceIndex(0) +7 >Emitted(13, 15) Source(11, 15) + SourceIndex(0) +8 >Emitted(13, 16) Source(11, 16) + SourceIndex(0) --- >>>function forfirstfirst_PART1Rest() { } 1-> @@ -409,11 +413,11 @@ sourceFile:../../../first/first_PART1.ts 3 > forfirstfirst_PART1Rest 4 > () { 5 > } -1->Emitted(12, 1) Source(12, 1) + SourceIndex(0) -2 >Emitted(12, 10) Source(12, 10) + SourceIndex(0) -3 >Emitted(12, 33) Source(12, 33) + SourceIndex(0) -4 >Emitted(12, 38) Source(12, 38) + SourceIndex(0) -5 >Emitted(12, 39) Source(12, 39) + SourceIndex(0) +1->Emitted(14, 1) Source(12, 1) + SourceIndex(0) +2 >Emitted(14, 10) Source(12, 10) + SourceIndex(0) +3 >Emitted(14, 33) Source(12, 33) + SourceIndex(0) +4 >Emitted(14, 38) Source(12, 38) + SourceIndex(0) +5 >Emitted(14, 39) Source(12, 39) + SourceIndex(0) --- >>>console.log(s); 1 > @@ -433,14 +437,14 @@ sourceFile:../../../first/first_PART1.ts 6 > s 7 > ) 8 > ; -1 >Emitted(13, 1) Source(12, 39) + SourceIndex(0) -2 >Emitted(13, 8) Source(12, 46) + SourceIndex(0) -3 >Emitted(13, 9) Source(12, 47) + SourceIndex(0) -4 >Emitted(13, 12) Source(12, 50) + SourceIndex(0) -5 >Emitted(13, 13) Source(12, 51) + SourceIndex(0) -6 >Emitted(13, 14) Source(12, 52) + SourceIndex(0) -7 >Emitted(13, 15) Source(12, 53) + SourceIndex(0) -8 >Emitted(13, 16) Source(12, 54) + SourceIndex(0) +1 >Emitted(15, 1) Source(12, 39) + SourceIndex(0) +2 >Emitted(15, 8) Source(12, 46) + SourceIndex(0) +3 >Emitted(15, 9) Source(12, 47) + SourceIndex(0) +4 >Emitted(15, 12) Source(12, 50) + SourceIndex(0) +5 >Emitted(15, 13) Source(12, 51) + SourceIndex(0) +6 >Emitted(15, 14) Source(12, 52) + SourceIndex(0) +7 >Emitted(15, 15) Source(12, 53) + SourceIndex(0) +8 >Emitted(15, 16) Source(12, 54) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -465,15 +469,15 @@ sourceFile:../../../first/first_part2.ts 7 > () 8 > ) 9 > ; -1->Emitted(14, 1) Source(1, 1) + SourceIndex(1) -2 >Emitted(14, 8) Source(1, 8) + SourceIndex(1) -3 >Emitted(14, 9) Source(1, 9) + SourceIndex(1) -4 >Emitted(14, 12) Source(1, 12) + SourceIndex(1) -5 >Emitted(14, 13) Source(1, 13) + SourceIndex(1) -6 >Emitted(14, 14) Source(1, 14) + SourceIndex(1) -7 >Emitted(14, 16) Source(1, 16) + SourceIndex(1) -8 >Emitted(14, 17) Source(1, 17) + SourceIndex(1) -9 >Emitted(14, 18) Source(1, 18) + SourceIndex(1) +1->Emitted(16, 1) Source(1, 1) + SourceIndex(1) +2 >Emitted(16, 8) Source(1, 8) + SourceIndex(1) +3 >Emitted(16, 9) Source(1, 9) + SourceIndex(1) +4 >Emitted(16, 12) Source(1, 12) + SourceIndex(1) +5 >Emitted(16, 13) Source(1, 13) + SourceIndex(1) +6 >Emitted(16, 14) Source(1, 14) + SourceIndex(1) +7 >Emitted(16, 16) Source(1, 16) + SourceIndex(1) +8 >Emitted(16, 17) Source(1, 17) + SourceIndex(1) +9 >Emitted(16, 18) Source(1, 18) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -487,9 +491,9 @@ sourceFile:../../../first/first_part3.ts 1 > 2 >function 3 > f -1 >Emitted(15, 1) Source(1, 1) + SourceIndex(2) -2 >Emitted(15, 10) Source(1, 10) + SourceIndex(2) -3 >Emitted(15, 11) Source(1, 11) + SourceIndex(2) +1 >Emitted(17, 1) Source(1, 1) + SourceIndex(2) +2 >Emitted(17, 10) Source(1, 10) + SourceIndex(2) +3 >Emitted(17, 11) Source(1, 11) + SourceIndex(2) --- >>> return "JS does hoists"; 1->^^^^ @@ -501,10 +505,10 @@ sourceFile:../../../first/first_part3.ts 2 > return 3 > "JS does hoists" 4 > ; -1->Emitted(16, 5) Source(2, 5) + SourceIndex(2) -2 >Emitted(16, 12) Source(2, 12) + SourceIndex(2) -3 >Emitted(16, 28) Source(2, 28) + SourceIndex(2) -4 >Emitted(16, 29) Source(2, 29) + SourceIndex(2) +1->Emitted(18, 5) Source(2, 5) + SourceIndex(2) +2 >Emitted(18, 12) Source(2, 12) + SourceIndex(2) +3 >Emitted(18, 28) Source(2, 28) + SourceIndex(2) +4 >Emitted(18, 29) Source(2, 29) + SourceIndex(2) --- >>>} 1 > @@ -513,8 +517,8 @@ sourceFile:../../../first/first_part3.ts 1 > > 2 >} -1 >Emitted(17, 1) Source(3, 1) + SourceIndex(2) -2 >Emitted(17, 2) Source(3, 2) + SourceIndex(2) +1 >Emitted(19, 1) Source(3, 1) + SourceIndex(2) +2 >Emitted(19, 2) Source(3, 2) + SourceIndex(2) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -540,10 +544,10 @@ sourceFile:../../../second/second_part1.ts > > f(); > } -1->Emitted(18, 1) Source(5, 1) + SourceIndex(3) -2 >Emitted(18, 5) Source(5, 11) + SourceIndex(3) -3 >Emitted(18, 6) Source(5, 12) + SourceIndex(3) -4 >Emitted(18, 7) Source(11, 2) + SourceIndex(3) +1->Emitted(20, 1) Source(5, 1) + SourceIndex(3) +2 >Emitted(20, 5) Source(5, 11) + SourceIndex(3) +3 >Emitted(20, 6) Source(5, 12) + SourceIndex(3) +4 >Emitted(20, 7) Source(11, 2) + SourceIndex(3) --- >>>(function (N) { 1-> @@ -553,9 +557,9 @@ sourceFile:../../../second/second_part1.ts 1-> 2 >namespace 3 > N -1->Emitted(19, 1) Source(5, 1) + SourceIndex(3) -2 >Emitted(19, 12) Source(5, 11) + SourceIndex(3) -3 >Emitted(19, 13) Source(5, 12) + SourceIndex(3) +1->Emitted(21, 1) Source(5, 1) + SourceIndex(3) +2 >Emitted(21, 12) Source(5, 11) + SourceIndex(3) +3 >Emitted(21, 13) Source(5, 12) + SourceIndex(3) --- >>> function f() { 1->^^^^ @@ -566,9 +570,9 @@ sourceFile:../../../second/second_part1.ts > 2 > function 3 > f -1->Emitted(20, 5) Source(6, 5) + SourceIndex(3) -2 >Emitted(20, 14) Source(6, 14) + SourceIndex(3) -3 >Emitted(20, 15) Source(6, 15) + SourceIndex(3) +1->Emitted(22, 5) Source(6, 5) + SourceIndex(3) +2 >Emitted(22, 14) Source(6, 14) + SourceIndex(3) +3 >Emitted(22, 15) Source(6, 15) + SourceIndex(3) --- >>> console.log('testing'); 1->^^^^^^^^ @@ -588,14 +592,14 @@ sourceFile:../../../second/second_part1.ts 6 > 'testing' 7 > ) 8 > ; -1->Emitted(21, 9) Source(7, 9) + SourceIndex(3) -2 >Emitted(21, 16) Source(7, 16) + SourceIndex(3) -3 >Emitted(21, 17) Source(7, 17) + SourceIndex(3) -4 >Emitted(21, 20) Source(7, 20) + SourceIndex(3) -5 >Emitted(21, 21) Source(7, 21) + SourceIndex(3) -6 >Emitted(21, 30) Source(7, 30) + SourceIndex(3) -7 >Emitted(21, 31) Source(7, 31) + SourceIndex(3) -8 >Emitted(21, 32) Source(7, 32) + SourceIndex(3) +1->Emitted(23, 9) Source(7, 9) + SourceIndex(3) +2 >Emitted(23, 16) Source(7, 16) + SourceIndex(3) +3 >Emitted(23, 17) Source(7, 17) + SourceIndex(3) +4 >Emitted(23, 20) Source(7, 20) + SourceIndex(3) +5 >Emitted(23, 21) Source(7, 21) + SourceIndex(3) +6 >Emitted(23, 30) Source(7, 30) + SourceIndex(3) +7 >Emitted(23, 31) Source(7, 31) + SourceIndex(3) +8 >Emitted(23, 32) Source(7, 32) + SourceIndex(3) --- >>> } 1 >^^^^ @@ -604,8 +608,8 @@ sourceFile:../../../second/second_part1.ts 1 > > 2 > } -1 >Emitted(22, 5) Source(8, 5) + SourceIndex(3) -2 >Emitted(22, 6) Source(8, 6) + SourceIndex(3) +1 >Emitted(24, 5) Source(8, 5) + SourceIndex(3) +2 >Emitted(24, 6) Source(8, 6) + SourceIndex(3) --- >>> f(); 1->^^^^ @@ -619,10 +623,10 @@ sourceFile:../../../second/second_part1.ts 2 > f 3 > () 4 > ; -1->Emitted(23, 5) Source(10, 5) + SourceIndex(3) -2 >Emitted(23, 6) Source(10, 6) + SourceIndex(3) -3 >Emitted(23, 8) Source(10, 8) + SourceIndex(3) -4 >Emitted(23, 9) Source(10, 9) + SourceIndex(3) +1->Emitted(25, 5) Source(10, 5) + SourceIndex(3) +2 >Emitted(25, 6) Source(10, 6) + SourceIndex(3) +3 >Emitted(25, 8) Source(10, 8) + SourceIndex(3) +4 >Emitted(25, 9) Source(10, 9) + SourceIndex(3) --- >>>})(N || (N = {})); 1-> @@ -647,13 +651,13 @@ sourceFile:../../../second/second_part1.ts > > f(); > } -1->Emitted(24, 1) Source(11, 1) + SourceIndex(3) -2 >Emitted(24, 2) Source(11, 2) + SourceIndex(3) -3 >Emitted(24, 4) Source(5, 11) + SourceIndex(3) -4 >Emitted(24, 5) Source(5, 12) + SourceIndex(3) -5 >Emitted(24, 10) Source(5, 11) + SourceIndex(3) -6 >Emitted(24, 11) Source(5, 12) + SourceIndex(3) -7 >Emitted(24, 19) Source(11, 2) + SourceIndex(3) +1->Emitted(26, 1) Source(11, 1) + SourceIndex(3) +2 >Emitted(26, 2) Source(11, 2) + SourceIndex(3) +3 >Emitted(26, 4) Source(5, 11) + SourceIndex(3) +4 >Emitted(26, 5) Source(5, 12) + SourceIndex(3) +5 >Emitted(26, 10) Source(5, 11) + SourceIndex(3) +6 >Emitted(26, 11) Source(5, 12) + SourceIndex(3) +7 >Emitted(26, 19) Source(11, 2) + SourceIndex(3) --- >>>function forsecondsecond_part1Rest() { 1-> @@ -664,9 +668,9 @@ sourceFile:../../../second/second_part1.ts > 2 >function 3 > forsecondsecond_part1Rest -1->Emitted(25, 1) Source(12, 1) + SourceIndex(3) -2 >Emitted(25, 10) Source(12, 10) + SourceIndex(3) -3 >Emitted(25, 35) Source(12, 35) + SourceIndex(3) +1->Emitted(27, 1) Source(12, 1) + SourceIndex(3) +2 >Emitted(27, 10) Source(12, 10) + SourceIndex(3) +3 >Emitted(27, 35) Source(12, 35) + SourceIndex(3) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^ @@ -686,14 +690,14 @@ sourceFile:../../../second/second_part1.ts 6 > , 7 > ...rest } = { a: 10, b: 30, yy: 30 } 8 > ; -1->Emitted(26, 5) Source(13, 1) + SourceIndex(3) -2 >Emitted(26, 9) Source(13, 7) + SourceIndex(3) -3 >Emitted(26, 38) Source(13, 48) + SourceIndex(3) -4 >Emitted(26, 40) Source(13, 9) + SourceIndex(3) -5 >Emitted(26, 48) Source(13, 10) + SourceIndex(3) -6 >Emitted(26, 50) Source(13, 12) + SourceIndex(3) -7 >Emitted(26, 74) Source(13, 48) + SourceIndex(3) -8 >Emitted(26, 75) Source(13, 49) + SourceIndex(3) +1->Emitted(28, 5) Source(13, 1) + SourceIndex(3) +2 >Emitted(28, 9) Source(13, 7) + SourceIndex(3) +3 >Emitted(28, 38) Source(13, 48) + SourceIndex(3) +4 >Emitted(28, 40) Source(13, 9) + SourceIndex(3) +5 >Emitted(28, 48) Source(13, 10) + SourceIndex(3) +6 >Emitted(28, 50) Source(13, 12) + SourceIndex(3) +7 >Emitted(28, 74) Source(13, 48) + SourceIndex(3) +8 >Emitted(28, 75) Source(13, 49) + SourceIndex(3) --- >>>} 1 > @@ -702,8 +706,8 @@ sourceFile:../../../second/second_part1.ts 1 > > 2 >} -1 >Emitted(27, 1) Source(14, 1) + SourceIndex(3) -2 >Emitted(27, 2) Source(14, 2) + SourceIndex(3) +1 >Emitted(29, 1) Source(14, 1) + SourceIndex(3) +2 >Emitted(29, 2) Source(14, 2) + SourceIndex(3) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -713,13 +717,13 @@ sourceFile:../../../second/second_part2.ts 1-> 2 >^^^^^^^^^^^^^^^^^^^-> 1-> -1->Emitted(28, 1) Source(1, 1) + SourceIndex(4) +1->Emitted(30, 1) Source(1, 1) + SourceIndex(4) --- >>> function C() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(29, 5) Source(1, 1) + SourceIndex(4) +1->Emitted(31, 5) Source(1, 1) + SourceIndex(4) --- >>> } 1->^^^^ @@ -731,8 +735,8 @@ sourceFile:../../../second/second_part2.ts > } > 2 > } -1->Emitted(30, 5) Source(5, 1) + SourceIndex(4) -2 >Emitted(30, 6) Source(5, 2) + SourceIndex(4) +1->Emitted(32, 5) Source(5, 1) + SourceIndex(4) +2 >Emitted(32, 6) Source(5, 2) + SourceIndex(4) --- >>> C.prototype.doSomething = function () { 1->^^^^ @@ -742,9 +746,9 @@ sourceFile:../../../second/second_part2.ts 1-> 2 > doSomething 3 > -1->Emitted(31, 5) Source(2, 5) + SourceIndex(4) -2 >Emitted(31, 28) Source(2, 16) + SourceIndex(4) -3 >Emitted(31, 31) Source(2, 5) + SourceIndex(4) +1->Emitted(33, 5) Source(2, 5) + SourceIndex(4) +2 >Emitted(33, 28) Source(2, 16) + SourceIndex(4) +3 >Emitted(33, 31) Source(2, 5) + SourceIndex(4) --- >>> console.log("something got done"); 1->^^^^^^^^ @@ -764,14 +768,14 @@ sourceFile:../../../second/second_part2.ts 6 > "something got done" 7 > ) 8 > ; -1->Emitted(32, 9) Source(3, 9) + SourceIndex(4) -2 >Emitted(32, 16) Source(3, 16) + SourceIndex(4) -3 >Emitted(32, 17) Source(3, 17) + SourceIndex(4) -4 >Emitted(32, 20) Source(3, 20) + SourceIndex(4) -5 >Emitted(32, 21) Source(3, 21) + SourceIndex(4) -6 >Emitted(32, 41) Source(3, 41) + SourceIndex(4) -7 >Emitted(32, 42) Source(3, 42) + SourceIndex(4) -8 >Emitted(32, 43) Source(3, 43) + SourceIndex(4) +1->Emitted(34, 9) Source(3, 9) + SourceIndex(4) +2 >Emitted(34, 16) Source(3, 16) + SourceIndex(4) +3 >Emitted(34, 17) Source(3, 17) + SourceIndex(4) +4 >Emitted(34, 20) Source(3, 20) + SourceIndex(4) +5 >Emitted(34, 21) Source(3, 21) + SourceIndex(4) +6 >Emitted(34, 41) Source(3, 41) + SourceIndex(4) +7 >Emitted(34, 42) Source(3, 42) + SourceIndex(4) +8 >Emitted(34, 43) Source(3, 43) + SourceIndex(4) --- >>> }; 1 >^^^^ @@ -780,8 +784,8 @@ sourceFile:../../../second/second_part2.ts 1 > > 2 > } -1 >Emitted(33, 5) Source(4, 5) + SourceIndex(4) -2 >Emitted(33, 6) Source(4, 6) + SourceIndex(4) +1 >Emitted(35, 5) Source(4, 5) + SourceIndex(4) +2 >Emitted(35, 6) Source(4, 6) + SourceIndex(4) --- >>> return C; 1->^^^^ @@ -789,8 +793,8 @@ sourceFile:../../../second/second_part2.ts 1-> > 2 > } -1->Emitted(34, 5) Source(5, 1) + SourceIndex(4) -2 >Emitted(34, 13) Source(5, 2) + SourceIndex(4) +1->Emitted(36, 5) Source(5, 1) + SourceIndex(4) +2 >Emitted(36, 13) Source(5, 2) + SourceIndex(4) --- >>>}()); 1 > @@ -806,10 +810,10 @@ sourceFile:../../../second/second_part2.ts > console.log("something got done"); > } > } -1 >Emitted(35, 1) Source(5, 1) + SourceIndex(4) -2 >Emitted(35, 2) Source(5, 2) + SourceIndex(4) -3 >Emitted(35, 2) Source(1, 1) + SourceIndex(4) -4 >Emitted(35, 6) Source(5, 2) + SourceIndex(4) +1 >Emitted(37, 1) Source(5, 1) + SourceIndex(4) +2 >Emitted(37, 2) Source(5, 2) + SourceIndex(4) +3 >Emitted(37, 2) Source(1, 1) + SourceIndex(4) +4 >Emitted(37, 6) Source(5, 2) + SourceIndex(4) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -833,14 +837,14 @@ sourceFile:../../third_part1.ts 6 > C 7 > () 8 > ; -1->Emitted(36, 1) Source(1, 1) + SourceIndex(5) -2 >Emitted(36, 5) Source(1, 5) + SourceIndex(5) -3 >Emitted(36, 6) Source(1, 6) + SourceIndex(5) -4 >Emitted(36, 9) Source(1, 9) + SourceIndex(5) -5 >Emitted(36, 13) Source(1, 13) + SourceIndex(5) -6 >Emitted(36, 14) Source(1, 14) + SourceIndex(5) -7 >Emitted(36, 16) Source(1, 16) + SourceIndex(5) -8 >Emitted(36, 17) Source(1, 17) + SourceIndex(5) +1->Emitted(38, 1) Source(1, 1) + SourceIndex(5) +2 >Emitted(38, 5) Source(1, 5) + SourceIndex(5) +3 >Emitted(38, 6) Source(1, 6) + SourceIndex(5) +4 >Emitted(38, 9) Source(1, 9) + SourceIndex(5) +5 >Emitted(38, 13) Source(1, 13) + SourceIndex(5) +6 >Emitted(38, 14) Source(1, 14) + SourceIndex(5) +7 >Emitted(38, 16) Source(1, 16) + SourceIndex(5) +8 >Emitted(38, 17) Source(1, 17) + SourceIndex(5) --- >>>c.doSomething(); 1-> @@ -857,12 +861,12 @@ sourceFile:../../third_part1.ts 4 > doSomething 5 > () 6 > ; -1->Emitted(37, 1) Source(2, 1) + SourceIndex(5) -2 >Emitted(37, 2) Source(2, 2) + SourceIndex(5) -3 >Emitted(37, 3) Source(2, 3) + SourceIndex(5) -4 >Emitted(37, 14) Source(2, 14) + SourceIndex(5) -5 >Emitted(37, 16) Source(2, 16) + SourceIndex(5) -6 >Emitted(37, 17) Source(2, 17) + SourceIndex(5) +1->Emitted(39, 1) Source(2, 1) + SourceIndex(5) +2 >Emitted(39, 2) Source(2, 2) + SourceIndex(5) +3 >Emitted(39, 3) Source(2, 3) + SourceIndex(5) +4 >Emitted(39, 14) Source(2, 14) + SourceIndex(5) +5 >Emitted(39, 16) Source(2, 16) + SourceIndex(5) +6 >Emitted(39, 17) Source(2, 17) + SourceIndex(5) --- >>>//# sourceMappingURL=third-output.js.map @@ -877,39 +881,39 @@ sourceFile:../../third_part1.ts "sections": [ { "pos": 0, - "end": 415, + "end": 492, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 417, - "end": 584, + "pos": 494, + "end": 661, "kind": "prepend", "data": "/src/first/bin/first-output.js", "texts": [ { - "pos": 417, - "end": 584, + "pos": 494, + "end": 661, "kind": "text" } ] }, { - "pos": 584, - "end": 988, + "pos": 661, + "end": 1065, "kind": "prepend", "data": "/src/2/second-output.js", "texts": [ { - "pos": 584, - "end": 988, + "pos": 661, + "end": 1065, "kind": "text" } ] }, { - "pos": 988, - "end": 1024, + "pos": 1065, + "end": 1101, "kind": "text" } ] @@ -957,20 +961,22 @@ sourceFile:../../third_part1.ts ====================================================================== File:: /src/third/thirdjs/output/third-output.js ---------------------------------------------------------------------- -emitHelpers: (0-415):: typescript:rest +emitHelpers: (0-492):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; ---------------------------------------------------------------------- -prepend: (417-584):: /src/first/bin/first-output.js texts:: 1 +prepend: (494-661):: /src/first/bin/first-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (417-584) +text: (494-661) var s = "Hello, world"; console.log(s); function forfirstfirst_PART1Rest() { } @@ -981,9 +987,9 @@ function f() { } ---------------------------------------------------------------------- -prepend: (584-988):: /src/2/second-output.js texts:: 1 +prepend: (661-1065):: /src/2/second-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (584-988) +text: (661-1065) var N; (function (N) { function f() { @@ -1004,7 +1010,7 @@ var C = (function () { }()); ---------------------------------------------------------------------- -text: (988-1024) +text: (1065-1101) var c = new C(); c.doSomething(); diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/multiple-emitHelpers-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/multiple-emitHelpers-in-all-projects.js index 83d4142e971..c9159e1408b 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/multiple-emitHelpers-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/multiple-emitHelpers-in-all-projects.js @@ -4,8 +4,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; var __read = (this && this.__read) || function (o, n) { @@ -48,7 +50,7 @@ firstfirst_part3Spread.apply(void 0, __spread([10, 20, 30])); //# sourceMappingURL=first-output.js.map //// [/src/first/bin/first-output.js.map] -{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB;IAChC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;AAAA,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACbhB,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC;AACD,SAAS,sBAAsB;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AACnD,sBAAsB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE"} +{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB;IAChC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;AAAA,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACbhB,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC;AACD,SAAS,sBAAsB;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AACnD,sBAAsB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE"} //// [/src/first/bin/first-output.js.map.baseline.txt] =================================================================== @@ -66,8 +68,10 @@ sourceFile:../first_PART1.ts >>> for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") ->>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) ->>> t[p[i]] = s[p[i]]; +>>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> t[p[i]] = s[p[i]]; +>>> } >>> return t; >>>}; >>>var __read = (this && this.__read) || function (o, n) { @@ -107,12 +111,12 @@ sourceFile:../first_PART1.ts 4 > = 5 > "Hello, world" 6 > ; -1 >Emitted(30, 1) Source(5, 1) + SourceIndex(0) -2 >Emitted(30, 5) Source(5, 7) + SourceIndex(0) -3 >Emitted(30, 6) Source(5, 8) + SourceIndex(0) -4 >Emitted(30, 9) Source(5, 11) + SourceIndex(0) -5 >Emitted(30, 23) Source(5, 25) + SourceIndex(0) -6 >Emitted(30, 24) Source(5, 26) + SourceIndex(0) +1 >Emitted(32, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(32, 5) Source(5, 7) + SourceIndex(0) +3 >Emitted(32, 6) Source(5, 8) + SourceIndex(0) +4 >Emitted(32, 9) Source(5, 11) + SourceIndex(0) +5 >Emitted(32, 23) Source(5, 25) + SourceIndex(0) +6 >Emitted(32, 24) Source(5, 26) + SourceIndex(0) --- >>>console.log(s); 1 > @@ -138,14 +142,14 @@ sourceFile:../first_PART1.ts 6 > s 7 > ) 8 > ; -1 >Emitted(31, 1) Source(11, 1) + SourceIndex(0) -2 >Emitted(31, 8) Source(11, 8) + SourceIndex(0) -3 >Emitted(31, 9) Source(11, 9) + SourceIndex(0) -4 >Emitted(31, 12) Source(11, 12) + SourceIndex(0) -5 >Emitted(31, 13) Source(11, 13) + SourceIndex(0) -6 >Emitted(31, 14) Source(11, 14) + SourceIndex(0) -7 >Emitted(31, 15) Source(11, 15) + SourceIndex(0) -8 >Emitted(31, 16) Source(11, 16) + SourceIndex(0) +1 >Emitted(33, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(33, 8) Source(11, 8) + SourceIndex(0) +3 >Emitted(33, 9) Source(11, 9) + SourceIndex(0) +4 >Emitted(33, 12) Source(11, 12) + SourceIndex(0) +5 >Emitted(33, 13) Source(11, 13) + SourceIndex(0) +6 >Emitted(33, 14) Source(11, 14) + SourceIndex(0) +7 >Emitted(33, 15) Source(11, 15) + SourceIndex(0) +8 >Emitted(33, 16) Source(11, 16) + SourceIndex(0) --- >>>function forfirstfirst_PART1Rest() { 1-> @@ -156,9 +160,9 @@ sourceFile:../first_PART1.ts > 2 >function 3 > forfirstfirst_PART1Rest -1->Emitted(32, 1) Source(12, 1) + SourceIndex(0) -2 >Emitted(32, 10) Source(12, 10) + SourceIndex(0) -3 >Emitted(32, 33) Source(12, 33) + SourceIndex(0) +1->Emitted(34, 1) Source(12, 1) + SourceIndex(0) +2 >Emitted(34, 10) Source(12, 10) + SourceIndex(0) +3 >Emitted(34, 33) Source(12, 33) + SourceIndex(0) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^ @@ -178,14 +182,14 @@ sourceFile:../first_PART1.ts 6 > , 7 > ...rest } = { a: 10, b: 30, yy: 30 } 8 > ; -1->Emitted(33, 5) Source(13, 1) + SourceIndex(0) -2 >Emitted(33, 9) Source(13, 7) + SourceIndex(0) -3 >Emitted(33, 38) Source(13, 48) + SourceIndex(0) -4 >Emitted(33, 40) Source(13, 9) + SourceIndex(0) -5 >Emitted(33, 48) Source(13, 10) + SourceIndex(0) -6 >Emitted(33, 50) Source(13, 12) + SourceIndex(0) -7 >Emitted(33, 74) Source(13, 48) + SourceIndex(0) -8 >Emitted(33, 75) Source(13, 49) + SourceIndex(0) +1->Emitted(35, 5) Source(13, 1) + SourceIndex(0) +2 >Emitted(35, 9) Source(13, 7) + SourceIndex(0) +3 >Emitted(35, 38) Source(13, 48) + SourceIndex(0) +4 >Emitted(35, 40) Source(13, 9) + SourceIndex(0) +5 >Emitted(35, 48) Source(13, 10) + SourceIndex(0) +6 >Emitted(35, 50) Source(13, 12) + SourceIndex(0) +7 >Emitted(35, 74) Source(13, 48) + SourceIndex(0) +8 >Emitted(35, 75) Source(13, 49) + SourceIndex(0) --- >>>} 1 > @@ -194,8 +198,8 @@ sourceFile:../first_PART1.ts 1 > > 2 >} -1 >Emitted(34, 1) Source(14, 1) + SourceIndex(0) -2 >Emitted(34, 2) Source(14, 2) + SourceIndex(0) +1 >Emitted(36, 1) Source(14, 1) + SourceIndex(0) +2 >Emitted(36, 2) Source(14, 2) + SourceIndex(0) --- >>>console.log(s); 1-> @@ -215,14 +219,14 @@ sourceFile:../first_PART1.ts 6 > s 7 > ) 8 > ; -1->Emitted(35, 1) Source(14, 2) + SourceIndex(0) -2 >Emitted(35, 8) Source(14, 9) + SourceIndex(0) -3 >Emitted(35, 9) Source(14, 10) + SourceIndex(0) -4 >Emitted(35, 12) Source(14, 13) + SourceIndex(0) -5 >Emitted(35, 13) Source(14, 14) + SourceIndex(0) -6 >Emitted(35, 14) Source(14, 15) + SourceIndex(0) -7 >Emitted(35, 15) Source(14, 16) + SourceIndex(0) -8 >Emitted(35, 16) Source(14, 17) + SourceIndex(0) +1->Emitted(37, 1) Source(14, 2) + SourceIndex(0) +2 >Emitted(37, 8) Source(14, 9) + SourceIndex(0) +3 >Emitted(37, 9) Source(14, 10) + SourceIndex(0) +4 >Emitted(37, 12) Source(14, 13) + SourceIndex(0) +5 >Emitted(37, 13) Source(14, 14) + SourceIndex(0) +6 >Emitted(37, 14) Source(14, 15) + SourceIndex(0) +7 >Emitted(37, 15) Source(14, 16) + SourceIndex(0) +8 >Emitted(37, 16) Source(14, 17) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/src/first/bin/first-output.js @@ -247,15 +251,15 @@ sourceFile:../first_part2.ts 7 > () 8 > ) 9 > ; -1->Emitted(36, 1) Source(1, 1) + SourceIndex(1) -2 >Emitted(36, 8) Source(1, 8) + SourceIndex(1) -3 >Emitted(36, 9) Source(1, 9) + SourceIndex(1) -4 >Emitted(36, 12) Source(1, 12) + SourceIndex(1) -5 >Emitted(36, 13) Source(1, 13) + SourceIndex(1) -6 >Emitted(36, 14) Source(1, 14) + SourceIndex(1) -7 >Emitted(36, 16) Source(1, 16) + SourceIndex(1) -8 >Emitted(36, 17) Source(1, 17) + SourceIndex(1) -9 >Emitted(36, 18) Source(1, 18) + SourceIndex(1) +1->Emitted(38, 1) Source(1, 1) + SourceIndex(1) +2 >Emitted(38, 8) Source(1, 8) + SourceIndex(1) +3 >Emitted(38, 9) Source(1, 9) + SourceIndex(1) +4 >Emitted(38, 12) Source(1, 12) + SourceIndex(1) +5 >Emitted(38, 13) Source(1, 13) + SourceIndex(1) +6 >Emitted(38, 14) Source(1, 14) + SourceIndex(1) +7 >Emitted(38, 16) Source(1, 16) + SourceIndex(1) +8 >Emitted(38, 17) Source(1, 17) + SourceIndex(1) +9 >Emitted(38, 18) Source(1, 18) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:/src/first/bin/first-output.js @@ -269,9 +273,9 @@ sourceFile:../first_part3.ts 1 > 2 >function 3 > f -1 >Emitted(37, 1) Source(1, 1) + SourceIndex(2) -2 >Emitted(37, 10) Source(1, 10) + SourceIndex(2) -3 >Emitted(37, 11) Source(1, 11) + SourceIndex(2) +1 >Emitted(39, 1) Source(1, 1) + SourceIndex(2) +2 >Emitted(39, 10) Source(1, 10) + SourceIndex(2) +3 >Emitted(39, 11) Source(1, 11) + SourceIndex(2) --- >>> return "JS does hoists"; 1->^^^^ @@ -283,10 +287,10 @@ sourceFile:../first_part3.ts 2 > return 3 > "JS does hoists" 4 > ; -1->Emitted(38, 5) Source(2, 5) + SourceIndex(2) -2 >Emitted(38, 12) Source(2, 12) + SourceIndex(2) -3 >Emitted(38, 28) Source(2, 28) + SourceIndex(2) -4 >Emitted(38, 29) Source(2, 29) + SourceIndex(2) +1->Emitted(40, 5) Source(2, 5) + SourceIndex(2) +2 >Emitted(40, 12) Source(2, 12) + SourceIndex(2) +3 >Emitted(40, 28) Source(2, 28) + SourceIndex(2) +4 >Emitted(40, 29) Source(2, 29) + SourceIndex(2) --- >>>} 1 > @@ -295,8 +299,8 @@ sourceFile:../first_part3.ts 1 > > 2 >} -1 >Emitted(39, 1) Source(3, 1) + SourceIndex(2) -2 >Emitted(39, 2) Source(3, 2) + SourceIndex(2) +1 >Emitted(41, 1) Source(3, 1) + SourceIndex(2) +2 >Emitted(41, 2) Source(3, 2) + SourceIndex(2) --- >>>function firstfirst_part3Spread() { 1-> @@ -306,9 +310,9 @@ sourceFile:../first_part3.ts > 2 >function 3 > firstfirst_part3Spread -1->Emitted(40, 1) Source(4, 1) + SourceIndex(2) -2 >Emitted(40, 10) Source(4, 10) + SourceIndex(2) -3 >Emitted(40, 32) Source(4, 32) + SourceIndex(2) +1->Emitted(42, 1) Source(4, 1) + SourceIndex(2) +2 >Emitted(42, 10) Source(4, 10) + SourceIndex(2) +3 >Emitted(42, 32) Source(4, 32) + SourceIndex(2) --- >>> var b = []; 1 >^^^^ @@ -316,8 +320,8 @@ sourceFile:../first_part3.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >( 2 > ...b: number[] -1 >Emitted(41, 5) Source(4, 33) + SourceIndex(2) -2 >Emitted(41, 16) Source(4, 47) + SourceIndex(2) +1 >Emitted(43, 5) Source(4, 33) + SourceIndex(2) +2 >Emitted(43, 16) Source(4, 47) + SourceIndex(2) --- >>> for (var _i = 0; _i < arguments.length; _i++) { 1->^^^^^^^^^ @@ -332,20 +336,20 @@ sourceFile:../first_part3.ts 4 > ...b: number[] 5 > 6 > ...b: number[] -1->Emitted(42, 10) Source(4, 33) + SourceIndex(2) -2 >Emitted(42, 20) Source(4, 47) + SourceIndex(2) -3 >Emitted(42, 22) Source(4, 33) + SourceIndex(2) -4 >Emitted(42, 43) Source(4, 47) + SourceIndex(2) -5 >Emitted(42, 45) Source(4, 33) + SourceIndex(2) -6 >Emitted(42, 49) Source(4, 47) + SourceIndex(2) +1->Emitted(44, 10) Source(4, 33) + SourceIndex(2) +2 >Emitted(44, 20) Source(4, 47) + SourceIndex(2) +3 >Emitted(44, 22) Source(4, 33) + SourceIndex(2) +4 >Emitted(44, 43) Source(4, 47) + SourceIndex(2) +5 >Emitted(44, 45) Source(4, 33) + SourceIndex(2) +6 >Emitted(44, 49) Source(4, 47) + SourceIndex(2) --- >>> b[_i] = arguments[_i]; 1 >^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^ 1 > 2 > ...b: number[] -1 >Emitted(43, 9) Source(4, 33) + SourceIndex(2) -2 >Emitted(43, 31) Source(4, 47) + SourceIndex(2) +1 >Emitted(45, 9) Source(4, 33) + SourceIndex(2) +2 >Emitted(45, 31) Source(4, 47) + SourceIndex(2) --- >>> } >>>} @@ -354,8 +358,8 @@ sourceFile:../first_part3.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >) { 2 >} -1 >Emitted(45, 1) Source(4, 51) + SourceIndex(2) -2 >Emitted(45, 2) Source(4, 52) + SourceIndex(2) +1 >Emitted(47, 1) Source(4, 51) + SourceIndex(2) +2 >Emitted(47, 2) Source(4, 52) + SourceIndex(2) --- >>>firstfirst_part3Spread.apply(void 0, __spread([10, 20, 30])); 1-> @@ -381,17 +385,17 @@ sourceFile:../first_part3.ts 9 > 30 10> ] 11> ); -1->Emitted(46, 1) Source(5, 1) + SourceIndex(2) -2 >Emitted(46, 23) Source(5, 23) + SourceIndex(2) -3 >Emitted(46, 47) Source(5, 27) + SourceIndex(2) -4 >Emitted(46, 48) Source(5, 28) + SourceIndex(2) -5 >Emitted(46, 50) Source(5, 30) + SourceIndex(2) -6 >Emitted(46, 52) Source(5, 32) + SourceIndex(2) -7 >Emitted(46, 54) Source(5, 34) + SourceIndex(2) -8 >Emitted(46, 56) Source(5, 36) + SourceIndex(2) -9 >Emitted(46, 58) Source(5, 38) + SourceIndex(2) -10>Emitted(46, 59) Source(5, 39) + SourceIndex(2) -11>Emitted(46, 62) Source(5, 41) + SourceIndex(2) +1->Emitted(48, 1) Source(5, 1) + SourceIndex(2) +2 >Emitted(48, 23) Source(5, 23) + SourceIndex(2) +3 >Emitted(48, 47) Source(5, 27) + SourceIndex(2) +4 >Emitted(48, 48) Source(5, 28) + SourceIndex(2) +5 >Emitted(48, 50) Source(5, 30) + SourceIndex(2) +6 >Emitted(48, 52) Source(5, 32) + SourceIndex(2) +7 >Emitted(48, 54) Source(5, 34) + SourceIndex(2) +8 >Emitted(48, 56) Source(5, 36) + SourceIndex(2) +9 >Emitted(48, 58) Source(5, 38) + SourceIndex(2) +10>Emitted(48, 59) Source(5, 39) + SourceIndex(2) +11>Emitted(48, 62) Source(5, 41) + SourceIndex(2) --- >>>//# sourceMappingURL=first-output.js.map @@ -408,25 +412,25 @@ sourceFile:../first_part3.ts "sections": [ { "pos": 0, - "end": 415, + "end": 492, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 417, - "end": 921, + "pos": 494, + "end": 998, "kind": "emitHelpers", "data": "typescript:read" }, { - "pos": 923, - "end": 1093, + "pos": 1000, + "end": 1170, "kind": "emitHelpers", "data": "typescript:spread" }, { - "pos": 1095, - "end": 1551, + "pos": 1172, + "end": 1628, "kind": "text" } ], @@ -455,18 +459,20 @@ sourceFile:../first_part3.ts ====================================================================== File:: /src/first/bin/first-output.js ---------------------------------------------------------------------- -emitHelpers: (0-415):: typescript:rest +emitHelpers: (0-492):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; ---------------------------------------------------------------------- -emitHelpers: (417-921):: typescript:read +emitHelpers: (494-998):: typescript:read var __read = (this && this.__read) || function (o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; if (!m) return o; @@ -484,13 +490,13 @@ var __read = (this && this.__read) || function (o, n) { return ar; }; ---------------------------------------------------------------------- -emitHelpers: (923-1093):: typescript:spread +emitHelpers: (1000-1170):: typescript:spread var __spread = (this && this.__spread) || function () { for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); return ar; }; ---------------------------------------------------------------------- -text: (1095-1551) +text: (1172-1628) var s = "Hello, world"; console.log(s); function forfirstfirst_PART1Rest() { @@ -549,8 +555,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; var __read = (this && this.__read) || function (o, n) { @@ -630,7 +638,7 @@ thirdthird_part1Spread.apply(void 0, __spread([10, 20, 30])); //# sourceMappingURL=third-output.js.map //// [/src/third/thirdjs/output/third-output.js.map] -{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../../first/first_PART1.ts","../../../first/first_part2.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts","../../third_part1.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB;IAChC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;AAAA,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACbhB,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC;AACD,SAAS,sBAAsB;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AACnD,sBAAsB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;ACAxC,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;AACD,SAAS,yBAAyB;IAClC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;ACbD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC;AAED,SAAS,wBAAwB;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AACrD,wBAAwB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;ACP1C,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC;AAChB,SAAS,uBAAuB;IAChC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;AACD,SAAS,sBAAsB;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AACnD,sBAAsB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE"} +{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../../first/first_PART1.ts","../../../first/first_part2.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts","../../third_part1.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB;IAChC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;AAAA,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACbhB,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC;AACD,SAAS,sBAAsB;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AACnD,sBAAsB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;ACAxC,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;AACD,SAAS,yBAAyB;IAClC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;ACbD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC;AAED,SAAS,wBAAwB;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AACrD,wBAAwB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;ACP1C,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC;AAChB,SAAS,uBAAuB;IAChC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;AACD,SAAS,sBAAsB;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AACnD,sBAAsB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE"} //// [/src/third/thirdjs/output/third-output.js.map.baseline.txt] =================================================================== @@ -648,8 +656,10 @@ sourceFile:../../../first/first_PART1.ts >>> for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") ->>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) ->>> t[p[i]] = s[p[i]]; +>>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> t[p[i]] = s[p[i]]; +>>> } >>> return t; >>>}; >>>var __read = (this && this.__read) || function (o, n) { @@ -689,12 +699,12 @@ sourceFile:../../../first/first_PART1.ts 4 > = 5 > "Hello, world" 6 > ; -1 >Emitted(30, 1) Source(5, 1) + SourceIndex(0) -2 >Emitted(30, 5) Source(5, 7) + SourceIndex(0) -3 >Emitted(30, 6) Source(5, 8) + SourceIndex(0) -4 >Emitted(30, 9) Source(5, 11) + SourceIndex(0) -5 >Emitted(30, 23) Source(5, 25) + SourceIndex(0) -6 >Emitted(30, 24) Source(5, 26) + SourceIndex(0) +1 >Emitted(32, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(32, 5) Source(5, 7) + SourceIndex(0) +3 >Emitted(32, 6) Source(5, 8) + SourceIndex(0) +4 >Emitted(32, 9) Source(5, 11) + SourceIndex(0) +5 >Emitted(32, 23) Source(5, 25) + SourceIndex(0) +6 >Emitted(32, 24) Source(5, 26) + SourceIndex(0) --- >>>console.log(s); 1 > @@ -720,14 +730,14 @@ sourceFile:../../../first/first_PART1.ts 6 > s 7 > ) 8 > ; -1 >Emitted(31, 1) Source(11, 1) + SourceIndex(0) -2 >Emitted(31, 8) Source(11, 8) + SourceIndex(0) -3 >Emitted(31, 9) Source(11, 9) + SourceIndex(0) -4 >Emitted(31, 12) Source(11, 12) + SourceIndex(0) -5 >Emitted(31, 13) Source(11, 13) + SourceIndex(0) -6 >Emitted(31, 14) Source(11, 14) + SourceIndex(0) -7 >Emitted(31, 15) Source(11, 15) + SourceIndex(0) -8 >Emitted(31, 16) Source(11, 16) + SourceIndex(0) +1 >Emitted(33, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(33, 8) Source(11, 8) + SourceIndex(0) +3 >Emitted(33, 9) Source(11, 9) + SourceIndex(0) +4 >Emitted(33, 12) Source(11, 12) + SourceIndex(0) +5 >Emitted(33, 13) Source(11, 13) + SourceIndex(0) +6 >Emitted(33, 14) Source(11, 14) + SourceIndex(0) +7 >Emitted(33, 15) Source(11, 15) + SourceIndex(0) +8 >Emitted(33, 16) Source(11, 16) + SourceIndex(0) --- >>>function forfirstfirst_PART1Rest() { 1-> @@ -738,9 +748,9 @@ sourceFile:../../../first/first_PART1.ts > 2 >function 3 > forfirstfirst_PART1Rest -1->Emitted(32, 1) Source(12, 1) + SourceIndex(0) -2 >Emitted(32, 10) Source(12, 10) + SourceIndex(0) -3 >Emitted(32, 33) Source(12, 33) + SourceIndex(0) +1->Emitted(34, 1) Source(12, 1) + SourceIndex(0) +2 >Emitted(34, 10) Source(12, 10) + SourceIndex(0) +3 >Emitted(34, 33) Source(12, 33) + SourceIndex(0) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^ @@ -760,14 +770,14 @@ sourceFile:../../../first/first_PART1.ts 6 > , 7 > ...rest } = { a: 10, b: 30, yy: 30 } 8 > ; -1->Emitted(33, 5) Source(13, 1) + SourceIndex(0) -2 >Emitted(33, 9) Source(13, 7) + SourceIndex(0) -3 >Emitted(33, 38) Source(13, 48) + SourceIndex(0) -4 >Emitted(33, 40) Source(13, 9) + SourceIndex(0) -5 >Emitted(33, 48) Source(13, 10) + SourceIndex(0) -6 >Emitted(33, 50) Source(13, 12) + SourceIndex(0) -7 >Emitted(33, 74) Source(13, 48) + SourceIndex(0) -8 >Emitted(33, 75) Source(13, 49) + SourceIndex(0) +1->Emitted(35, 5) Source(13, 1) + SourceIndex(0) +2 >Emitted(35, 9) Source(13, 7) + SourceIndex(0) +3 >Emitted(35, 38) Source(13, 48) + SourceIndex(0) +4 >Emitted(35, 40) Source(13, 9) + SourceIndex(0) +5 >Emitted(35, 48) Source(13, 10) + SourceIndex(0) +6 >Emitted(35, 50) Source(13, 12) + SourceIndex(0) +7 >Emitted(35, 74) Source(13, 48) + SourceIndex(0) +8 >Emitted(35, 75) Source(13, 49) + SourceIndex(0) --- >>>} 1 > @@ -776,8 +786,8 @@ sourceFile:../../../first/first_PART1.ts 1 > > 2 >} -1 >Emitted(34, 1) Source(14, 1) + SourceIndex(0) -2 >Emitted(34, 2) Source(14, 2) + SourceIndex(0) +1 >Emitted(36, 1) Source(14, 1) + SourceIndex(0) +2 >Emitted(36, 2) Source(14, 2) + SourceIndex(0) --- >>>console.log(s); 1-> @@ -797,14 +807,14 @@ sourceFile:../../../first/first_PART1.ts 6 > s 7 > ) 8 > ; -1->Emitted(35, 1) Source(14, 2) + SourceIndex(0) -2 >Emitted(35, 8) Source(14, 9) + SourceIndex(0) -3 >Emitted(35, 9) Source(14, 10) + SourceIndex(0) -4 >Emitted(35, 12) Source(14, 13) + SourceIndex(0) -5 >Emitted(35, 13) Source(14, 14) + SourceIndex(0) -6 >Emitted(35, 14) Source(14, 15) + SourceIndex(0) -7 >Emitted(35, 15) Source(14, 16) + SourceIndex(0) -8 >Emitted(35, 16) Source(14, 17) + SourceIndex(0) +1->Emitted(37, 1) Source(14, 2) + SourceIndex(0) +2 >Emitted(37, 8) Source(14, 9) + SourceIndex(0) +3 >Emitted(37, 9) Source(14, 10) + SourceIndex(0) +4 >Emitted(37, 12) Source(14, 13) + SourceIndex(0) +5 >Emitted(37, 13) Source(14, 14) + SourceIndex(0) +6 >Emitted(37, 14) Source(14, 15) + SourceIndex(0) +7 >Emitted(37, 15) Source(14, 16) + SourceIndex(0) +8 >Emitted(37, 16) Source(14, 17) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -829,15 +839,15 @@ sourceFile:../../../first/first_part2.ts 7 > () 8 > ) 9 > ; -1->Emitted(36, 1) Source(1, 1) + SourceIndex(1) -2 >Emitted(36, 8) Source(1, 8) + SourceIndex(1) -3 >Emitted(36, 9) Source(1, 9) + SourceIndex(1) -4 >Emitted(36, 12) Source(1, 12) + SourceIndex(1) -5 >Emitted(36, 13) Source(1, 13) + SourceIndex(1) -6 >Emitted(36, 14) Source(1, 14) + SourceIndex(1) -7 >Emitted(36, 16) Source(1, 16) + SourceIndex(1) -8 >Emitted(36, 17) Source(1, 17) + SourceIndex(1) -9 >Emitted(36, 18) Source(1, 18) + SourceIndex(1) +1->Emitted(38, 1) Source(1, 1) + SourceIndex(1) +2 >Emitted(38, 8) Source(1, 8) + SourceIndex(1) +3 >Emitted(38, 9) Source(1, 9) + SourceIndex(1) +4 >Emitted(38, 12) Source(1, 12) + SourceIndex(1) +5 >Emitted(38, 13) Source(1, 13) + SourceIndex(1) +6 >Emitted(38, 14) Source(1, 14) + SourceIndex(1) +7 >Emitted(38, 16) Source(1, 16) + SourceIndex(1) +8 >Emitted(38, 17) Source(1, 17) + SourceIndex(1) +9 >Emitted(38, 18) Source(1, 18) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -851,9 +861,9 @@ sourceFile:../../../first/first_part3.ts 1 > 2 >function 3 > f -1 >Emitted(37, 1) Source(1, 1) + SourceIndex(2) -2 >Emitted(37, 10) Source(1, 10) + SourceIndex(2) -3 >Emitted(37, 11) Source(1, 11) + SourceIndex(2) +1 >Emitted(39, 1) Source(1, 1) + SourceIndex(2) +2 >Emitted(39, 10) Source(1, 10) + SourceIndex(2) +3 >Emitted(39, 11) Source(1, 11) + SourceIndex(2) --- >>> return "JS does hoists"; 1->^^^^ @@ -865,10 +875,10 @@ sourceFile:../../../first/first_part3.ts 2 > return 3 > "JS does hoists" 4 > ; -1->Emitted(38, 5) Source(2, 5) + SourceIndex(2) -2 >Emitted(38, 12) Source(2, 12) + SourceIndex(2) -3 >Emitted(38, 28) Source(2, 28) + SourceIndex(2) -4 >Emitted(38, 29) Source(2, 29) + SourceIndex(2) +1->Emitted(40, 5) Source(2, 5) + SourceIndex(2) +2 >Emitted(40, 12) Source(2, 12) + SourceIndex(2) +3 >Emitted(40, 28) Source(2, 28) + SourceIndex(2) +4 >Emitted(40, 29) Source(2, 29) + SourceIndex(2) --- >>>} 1 > @@ -877,8 +887,8 @@ sourceFile:../../../first/first_part3.ts 1 > > 2 >} -1 >Emitted(39, 1) Source(3, 1) + SourceIndex(2) -2 >Emitted(39, 2) Source(3, 2) + SourceIndex(2) +1 >Emitted(41, 1) Source(3, 1) + SourceIndex(2) +2 >Emitted(41, 2) Source(3, 2) + SourceIndex(2) --- >>>function firstfirst_part3Spread() { 1-> @@ -888,9 +898,9 @@ sourceFile:../../../first/first_part3.ts > 2 >function 3 > firstfirst_part3Spread -1->Emitted(40, 1) Source(4, 1) + SourceIndex(2) -2 >Emitted(40, 10) Source(4, 10) + SourceIndex(2) -3 >Emitted(40, 32) Source(4, 32) + SourceIndex(2) +1->Emitted(42, 1) Source(4, 1) + SourceIndex(2) +2 >Emitted(42, 10) Source(4, 10) + SourceIndex(2) +3 >Emitted(42, 32) Source(4, 32) + SourceIndex(2) --- >>> var b = []; 1 >^^^^ @@ -898,8 +908,8 @@ sourceFile:../../../first/first_part3.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >( 2 > ...b: number[] -1 >Emitted(41, 5) Source(4, 33) + SourceIndex(2) -2 >Emitted(41, 16) Source(4, 47) + SourceIndex(2) +1 >Emitted(43, 5) Source(4, 33) + SourceIndex(2) +2 >Emitted(43, 16) Source(4, 47) + SourceIndex(2) --- >>> for (var _i = 0; _i < arguments.length; _i++) { 1->^^^^^^^^^ @@ -914,20 +924,20 @@ sourceFile:../../../first/first_part3.ts 4 > ...b: number[] 5 > 6 > ...b: number[] -1->Emitted(42, 10) Source(4, 33) + SourceIndex(2) -2 >Emitted(42, 20) Source(4, 47) + SourceIndex(2) -3 >Emitted(42, 22) Source(4, 33) + SourceIndex(2) -4 >Emitted(42, 43) Source(4, 47) + SourceIndex(2) -5 >Emitted(42, 45) Source(4, 33) + SourceIndex(2) -6 >Emitted(42, 49) Source(4, 47) + SourceIndex(2) +1->Emitted(44, 10) Source(4, 33) + SourceIndex(2) +2 >Emitted(44, 20) Source(4, 47) + SourceIndex(2) +3 >Emitted(44, 22) Source(4, 33) + SourceIndex(2) +4 >Emitted(44, 43) Source(4, 47) + SourceIndex(2) +5 >Emitted(44, 45) Source(4, 33) + SourceIndex(2) +6 >Emitted(44, 49) Source(4, 47) + SourceIndex(2) --- >>> b[_i] = arguments[_i]; 1 >^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^ 1 > 2 > ...b: number[] -1 >Emitted(43, 9) Source(4, 33) + SourceIndex(2) -2 >Emitted(43, 31) Source(4, 47) + SourceIndex(2) +1 >Emitted(45, 9) Source(4, 33) + SourceIndex(2) +2 >Emitted(45, 31) Source(4, 47) + SourceIndex(2) --- >>> } >>>} @@ -936,8 +946,8 @@ sourceFile:../../../first/first_part3.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >) { 2 >} -1 >Emitted(45, 1) Source(4, 51) + SourceIndex(2) -2 >Emitted(45, 2) Source(4, 52) + SourceIndex(2) +1 >Emitted(47, 1) Source(4, 51) + SourceIndex(2) +2 >Emitted(47, 2) Source(4, 52) + SourceIndex(2) --- >>>firstfirst_part3Spread.apply(void 0, __spread([10, 20, 30])); 1-> @@ -963,17 +973,17 @@ sourceFile:../../../first/first_part3.ts 9 > 30 10> ] 11> ); -1->Emitted(46, 1) Source(5, 1) + SourceIndex(2) -2 >Emitted(46, 23) Source(5, 23) + SourceIndex(2) -3 >Emitted(46, 47) Source(5, 27) + SourceIndex(2) -4 >Emitted(46, 48) Source(5, 28) + SourceIndex(2) -5 >Emitted(46, 50) Source(5, 30) + SourceIndex(2) -6 >Emitted(46, 52) Source(5, 32) + SourceIndex(2) -7 >Emitted(46, 54) Source(5, 34) + SourceIndex(2) -8 >Emitted(46, 56) Source(5, 36) + SourceIndex(2) -9 >Emitted(46, 58) Source(5, 38) + SourceIndex(2) -10>Emitted(46, 59) Source(5, 39) + SourceIndex(2) -11>Emitted(46, 62) Source(5, 41) + SourceIndex(2) +1->Emitted(48, 1) Source(5, 1) + SourceIndex(2) +2 >Emitted(48, 23) Source(5, 23) + SourceIndex(2) +3 >Emitted(48, 47) Source(5, 27) + SourceIndex(2) +4 >Emitted(48, 48) Source(5, 28) + SourceIndex(2) +5 >Emitted(48, 50) Source(5, 30) + SourceIndex(2) +6 >Emitted(48, 52) Source(5, 32) + SourceIndex(2) +7 >Emitted(48, 54) Source(5, 34) + SourceIndex(2) +8 >Emitted(48, 56) Source(5, 36) + SourceIndex(2) +9 >Emitted(48, 58) Source(5, 38) + SourceIndex(2) +10>Emitted(48, 59) Source(5, 39) + SourceIndex(2) +11>Emitted(48, 62) Source(5, 41) + SourceIndex(2) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -999,10 +1009,10 @@ sourceFile:../../../second/second_part1.ts > > f(); > } -1 >Emitted(47, 1) Source(5, 1) + SourceIndex(3) -2 >Emitted(47, 5) Source(5, 11) + SourceIndex(3) -3 >Emitted(47, 6) Source(5, 12) + SourceIndex(3) -4 >Emitted(47, 7) Source(11, 2) + SourceIndex(3) +1 >Emitted(49, 1) Source(5, 1) + SourceIndex(3) +2 >Emitted(49, 5) Source(5, 11) + SourceIndex(3) +3 >Emitted(49, 6) Source(5, 12) + SourceIndex(3) +4 >Emitted(49, 7) Source(11, 2) + SourceIndex(3) --- >>>(function (N) { 1-> @@ -1012,9 +1022,9 @@ sourceFile:../../../second/second_part1.ts 1-> 2 >namespace 3 > N -1->Emitted(48, 1) Source(5, 1) + SourceIndex(3) -2 >Emitted(48, 12) Source(5, 11) + SourceIndex(3) -3 >Emitted(48, 13) Source(5, 12) + SourceIndex(3) +1->Emitted(50, 1) Source(5, 1) + SourceIndex(3) +2 >Emitted(50, 12) Source(5, 11) + SourceIndex(3) +3 >Emitted(50, 13) Source(5, 12) + SourceIndex(3) --- >>> function f() { 1->^^^^ @@ -1025,9 +1035,9 @@ sourceFile:../../../second/second_part1.ts > 2 > function 3 > f -1->Emitted(49, 5) Source(6, 5) + SourceIndex(3) -2 >Emitted(49, 14) Source(6, 14) + SourceIndex(3) -3 >Emitted(49, 15) Source(6, 15) + SourceIndex(3) +1->Emitted(51, 5) Source(6, 5) + SourceIndex(3) +2 >Emitted(51, 14) Source(6, 14) + SourceIndex(3) +3 >Emitted(51, 15) Source(6, 15) + SourceIndex(3) --- >>> console.log('testing'); 1->^^^^^^^^ @@ -1047,14 +1057,14 @@ sourceFile:../../../second/second_part1.ts 6 > 'testing' 7 > ) 8 > ; -1->Emitted(50, 9) Source(7, 9) + SourceIndex(3) -2 >Emitted(50, 16) Source(7, 16) + SourceIndex(3) -3 >Emitted(50, 17) Source(7, 17) + SourceIndex(3) -4 >Emitted(50, 20) Source(7, 20) + SourceIndex(3) -5 >Emitted(50, 21) Source(7, 21) + SourceIndex(3) -6 >Emitted(50, 30) Source(7, 30) + SourceIndex(3) -7 >Emitted(50, 31) Source(7, 31) + SourceIndex(3) -8 >Emitted(50, 32) Source(7, 32) + SourceIndex(3) +1->Emitted(52, 9) Source(7, 9) + SourceIndex(3) +2 >Emitted(52, 16) Source(7, 16) + SourceIndex(3) +3 >Emitted(52, 17) Source(7, 17) + SourceIndex(3) +4 >Emitted(52, 20) Source(7, 20) + SourceIndex(3) +5 >Emitted(52, 21) Source(7, 21) + SourceIndex(3) +6 >Emitted(52, 30) Source(7, 30) + SourceIndex(3) +7 >Emitted(52, 31) Source(7, 31) + SourceIndex(3) +8 >Emitted(52, 32) Source(7, 32) + SourceIndex(3) --- >>> } 1 >^^^^ @@ -1063,8 +1073,8 @@ sourceFile:../../../second/second_part1.ts 1 > > 2 > } -1 >Emitted(51, 5) Source(8, 5) + SourceIndex(3) -2 >Emitted(51, 6) Source(8, 6) + SourceIndex(3) +1 >Emitted(53, 5) Source(8, 5) + SourceIndex(3) +2 >Emitted(53, 6) Source(8, 6) + SourceIndex(3) --- >>> f(); 1->^^^^ @@ -1078,10 +1088,10 @@ sourceFile:../../../second/second_part1.ts 2 > f 3 > () 4 > ; -1->Emitted(52, 5) Source(10, 5) + SourceIndex(3) -2 >Emitted(52, 6) Source(10, 6) + SourceIndex(3) -3 >Emitted(52, 8) Source(10, 8) + SourceIndex(3) -4 >Emitted(52, 9) Source(10, 9) + SourceIndex(3) +1->Emitted(54, 5) Source(10, 5) + SourceIndex(3) +2 >Emitted(54, 6) Source(10, 6) + SourceIndex(3) +3 >Emitted(54, 8) Source(10, 8) + SourceIndex(3) +4 >Emitted(54, 9) Source(10, 9) + SourceIndex(3) --- >>>})(N || (N = {})); 1-> @@ -1106,13 +1116,13 @@ sourceFile:../../../second/second_part1.ts > > f(); > } -1->Emitted(53, 1) Source(11, 1) + SourceIndex(3) -2 >Emitted(53, 2) Source(11, 2) + SourceIndex(3) -3 >Emitted(53, 4) Source(5, 11) + SourceIndex(3) -4 >Emitted(53, 5) Source(5, 12) + SourceIndex(3) -5 >Emitted(53, 10) Source(5, 11) + SourceIndex(3) -6 >Emitted(53, 11) Source(5, 12) + SourceIndex(3) -7 >Emitted(53, 19) Source(11, 2) + SourceIndex(3) +1->Emitted(55, 1) Source(11, 1) + SourceIndex(3) +2 >Emitted(55, 2) Source(11, 2) + SourceIndex(3) +3 >Emitted(55, 4) Source(5, 11) + SourceIndex(3) +4 >Emitted(55, 5) Source(5, 12) + SourceIndex(3) +5 >Emitted(55, 10) Source(5, 11) + SourceIndex(3) +6 >Emitted(55, 11) Source(5, 12) + SourceIndex(3) +7 >Emitted(55, 19) Source(11, 2) + SourceIndex(3) --- >>>function forsecondsecond_part1Rest() { 1-> @@ -1123,9 +1133,9 @@ sourceFile:../../../second/second_part1.ts > 2 >function 3 > forsecondsecond_part1Rest -1->Emitted(54, 1) Source(12, 1) + SourceIndex(3) -2 >Emitted(54, 10) Source(12, 10) + SourceIndex(3) -3 >Emitted(54, 35) Source(12, 35) + SourceIndex(3) +1->Emitted(56, 1) Source(12, 1) + SourceIndex(3) +2 >Emitted(56, 10) Source(12, 10) + SourceIndex(3) +3 >Emitted(56, 35) Source(12, 35) + SourceIndex(3) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^ @@ -1145,14 +1155,14 @@ sourceFile:../../../second/second_part1.ts 6 > , 7 > ...rest } = { a: 10, b: 30, yy: 30 } 8 > ; -1->Emitted(55, 5) Source(13, 1) + SourceIndex(3) -2 >Emitted(55, 9) Source(13, 7) + SourceIndex(3) -3 >Emitted(55, 38) Source(13, 48) + SourceIndex(3) -4 >Emitted(55, 40) Source(13, 9) + SourceIndex(3) -5 >Emitted(55, 48) Source(13, 10) + SourceIndex(3) -6 >Emitted(55, 50) Source(13, 12) + SourceIndex(3) -7 >Emitted(55, 74) Source(13, 48) + SourceIndex(3) -8 >Emitted(55, 75) Source(13, 49) + SourceIndex(3) +1->Emitted(57, 5) Source(13, 1) + SourceIndex(3) +2 >Emitted(57, 9) Source(13, 7) + SourceIndex(3) +3 >Emitted(57, 38) Source(13, 48) + SourceIndex(3) +4 >Emitted(57, 40) Source(13, 9) + SourceIndex(3) +5 >Emitted(57, 48) Source(13, 10) + SourceIndex(3) +6 >Emitted(57, 50) Source(13, 12) + SourceIndex(3) +7 >Emitted(57, 74) Source(13, 48) + SourceIndex(3) +8 >Emitted(57, 75) Source(13, 49) + SourceIndex(3) --- >>>} 1 > @@ -1161,8 +1171,8 @@ sourceFile:../../../second/second_part1.ts 1 > > 2 >} -1 >Emitted(56, 1) Source(14, 1) + SourceIndex(3) -2 >Emitted(56, 2) Source(14, 2) + SourceIndex(3) +1 >Emitted(58, 1) Source(14, 1) + SourceIndex(3) +2 >Emitted(58, 2) Source(14, 2) + SourceIndex(3) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -1172,13 +1182,13 @@ sourceFile:../../../second/second_part2.ts 1-> 2 >^^^^^^^^^^^^^^^^^^^-> 1-> -1->Emitted(57, 1) Source(1, 1) + SourceIndex(4) +1->Emitted(59, 1) Source(1, 1) + SourceIndex(4) --- >>> function C() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(58, 5) Source(1, 1) + SourceIndex(4) +1->Emitted(60, 5) Source(1, 1) + SourceIndex(4) --- >>> } 1->^^^^ @@ -1190,8 +1200,8 @@ sourceFile:../../../second/second_part2.ts > } > 2 > } -1->Emitted(59, 5) Source(5, 1) + SourceIndex(4) -2 >Emitted(59, 6) Source(5, 2) + SourceIndex(4) +1->Emitted(61, 5) Source(5, 1) + SourceIndex(4) +2 >Emitted(61, 6) Source(5, 2) + SourceIndex(4) --- >>> C.prototype.doSomething = function () { 1->^^^^ @@ -1201,9 +1211,9 @@ sourceFile:../../../second/second_part2.ts 1-> 2 > doSomething 3 > -1->Emitted(60, 5) Source(2, 5) + SourceIndex(4) -2 >Emitted(60, 28) Source(2, 16) + SourceIndex(4) -3 >Emitted(60, 31) Source(2, 5) + SourceIndex(4) +1->Emitted(62, 5) Source(2, 5) + SourceIndex(4) +2 >Emitted(62, 28) Source(2, 16) + SourceIndex(4) +3 >Emitted(62, 31) Source(2, 5) + SourceIndex(4) --- >>> console.log("something got done"); 1->^^^^^^^^ @@ -1223,14 +1233,14 @@ sourceFile:../../../second/second_part2.ts 6 > "something got done" 7 > ) 8 > ; -1->Emitted(61, 9) Source(3, 9) + SourceIndex(4) -2 >Emitted(61, 16) Source(3, 16) + SourceIndex(4) -3 >Emitted(61, 17) Source(3, 17) + SourceIndex(4) -4 >Emitted(61, 20) Source(3, 20) + SourceIndex(4) -5 >Emitted(61, 21) Source(3, 21) + SourceIndex(4) -6 >Emitted(61, 41) Source(3, 41) + SourceIndex(4) -7 >Emitted(61, 42) Source(3, 42) + SourceIndex(4) -8 >Emitted(61, 43) Source(3, 43) + SourceIndex(4) +1->Emitted(63, 9) Source(3, 9) + SourceIndex(4) +2 >Emitted(63, 16) Source(3, 16) + SourceIndex(4) +3 >Emitted(63, 17) Source(3, 17) + SourceIndex(4) +4 >Emitted(63, 20) Source(3, 20) + SourceIndex(4) +5 >Emitted(63, 21) Source(3, 21) + SourceIndex(4) +6 >Emitted(63, 41) Source(3, 41) + SourceIndex(4) +7 >Emitted(63, 42) Source(3, 42) + SourceIndex(4) +8 >Emitted(63, 43) Source(3, 43) + SourceIndex(4) --- >>> }; 1 >^^^^ @@ -1239,8 +1249,8 @@ sourceFile:../../../second/second_part2.ts 1 > > 2 > } -1 >Emitted(62, 5) Source(4, 5) + SourceIndex(4) -2 >Emitted(62, 6) Source(4, 6) + SourceIndex(4) +1 >Emitted(64, 5) Source(4, 5) + SourceIndex(4) +2 >Emitted(64, 6) Source(4, 6) + SourceIndex(4) --- >>> return C; 1->^^^^ @@ -1248,8 +1258,8 @@ sourceFile:../../../second/second_part2.ts 1-> > 2 > } -1->Emitted(63, 5) Source(5, 1) + SourceIndex(4) -2 >Emitted(63, 13) Source(5, 2) + SourceIndex(4) +1->Emitted(65, 5) Source(5, 1) + SourceIndex(4) +2 >Emitted(65, 13) Source(5, 2) + SourceIndex(4) --- >>>}()); 1 > @@ -1265,10 +1275,10 @@ sourceFile:../../../second/second_part2.ts > console.log("something got done"); > } > } -1 >Emitted(64, 1) Source(5, 1) + SourceIndex(4) -2 >Emitted(64, 2) Source(5, 2) + SourceIndex(4) -3 >Emitted(64, 2) Source(1, 1) + SourceIndex(4) -4 >Emitted(64, 6) Source(5, 2) + SourceIndex(4) +1 >Emitted(66, 1) Source(5, 1) + SourceIndex(4) +2 >Emitted(66, 2) Source(5, 2) + SourceIndex(4) +3 >Emitted(66, 2) Source(1, 1) + SourceIndex(4) +4 >Emitted(66, 6) Source(5, 2) + SourceIndex(4) --- >>>function secondsecond_part2Spread() { 1-> @@ -1279,9 +1289,9 @@ sourceFile:../../../second/second_part2.ts > 2 >function 3 > secondsecond_part2Spread -1->Emitted(65, 1) Source(7, 1) + SourceIndex(4) -2 >Emitted(65, 10) Source(7, 10) + SourceIndex(4) -3 >Emitted(65, 34) Source(7, 34) + SourceIndex(4) +1->Emitted(67, 1) Source(7, 1) + SourceIndex(4) +2 >Emitted(67, 10) Source(7, 10) + SourceIndex(4) +3 >Emitted(67, 34) Source(7, 34) + SourceIndex(4) --- >>> var b = []; 1 >^^^^ @@ -1289,8 +1299,8 @@ sourceFile:../../../second/second_part2.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >( 2 > ...b: number[] -1 >Emitted(66, 5) Source(7, 35) + SourceIndex(4) -2 >Emitted(66, 16) Source(7, 49) + SourceIndex(4) +1 >Emitted(68, 5) Source(7, 35) + SourceIndex(4) +2 >Emitted(68, 16) Source(7, 49) + SourceIndex(4) --- >>> for (var _i = 0; _i < arguments.length; _i++) { 1->^^^^^^^^^ @@ -1305,20 +1315,20 @@ sourceFile:../../../second/second_part2.ts 4 > ...b: number[] 5 > 6 > ...b: number[] -1->Emitted(67, 10) Source(7, 35) + SourceIndex(4) -2 >Emitted(67, 20) Source(7, 49) + SourceIndex(4) -3 >Emitted(67, 22) Source(7, 35) + SourceIndex(4) -4 >Emitted(67, 43) Source(7, 49) + SourceIndex(4) -5 >Emitted(67, 45) Source(7, 35) + SourceIndex(4) -6 >Emitted(67, 49) Source(7, 49) + SourceIndex(4) +1->Emitted(69, 10) Source(7, 35) + SourceIndex(4) +2 >Emitted(69, 20) Source(7, 49) + SourceIndex(4) +3 >Emitted(69, 22) Source(7, 35) + SourceIndex(4) +4 >Emitted(69, 43) Source(7, 49) + SourceIndex(4) +5 >Emitted(69, 45) Source(7, 35) + SourceIndex(4) +6 >Emitted(69, 49) Source(7, 49) + SourceIndex(4) --- >>> b[_i] = arguments[_i]; 1 >^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^ 1 > 2 > ...b: number[] -1 >Emitted(68, 9) Source(7, 35) + SourceIndex(4) -2 >Emitted(68, 31) Source(7, 49) + SourceIndex(4) +1 >Emitted(70, 9) Source(7, 35) + SourceIndex(4) +2 >Emitted(70, 31) Source(7, 49) + SourceIndex(4) --- >>> } >>>} @@ -1327,8 +1337,8 @@ sourceFile:../../../second/second_part2.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >) { 2 >} -1 >Emitted(70, 1) Source(7, 53) + SourceIndex(4) -2 >Emitted(70, 2) Source(7, 54) + SourceIndex(4) +1 >Emitted(72, 1) Source(7, 53) + SourceIndex(4) +2 >Emitted(72, 2) Source(7, 54) + SourceIndex(4) --- >>>secondsecond_part2Spread.apply(void 0, __spread([10, 20, 30])); 1-> @@ -1354,17 +1364,17 @@ sourceFile:../../../second/second_part2.ts 9 > 30 10> ] 11> ); -1->Emitted(71, 1) Source(8, 1) + SourceIndex(4) -2 >Emitted(71, 25) Source(8, 25) + SourceIndex(4) -3 >Emitted(71, 49) Source(8, 29) + SourceIndex(4) -4 >Emitted(71, 50) Source(8, 30) + SourceIndex(4) -5 >Emitted(71, 52) Source(8, 32) + SourceIndex(4) -6 >Emitted(71, 54) Source(8, 34) + SourceIndex(4) -7 >Emitted(71, 56) Source(8, 36) + SourceIndex(4) -8 >Emitted(71, 58) Source(8, 38) + SourceIndex(4) -9 >Emitted(71, 60) Source(8, 40) + SourceIndex(4) -10>Emitted(71, 61) Source(8, 41) + SourceIndex(4) -11>Emitted(71, 64) Source(8, 43) + SourceIndex(4) +1->Emitted(73, 1) Source(8, 1) + SourceIndex(4) +2 >Emitted(73, 25) Source(8, 25) + SourceIndex(4) +3 >Emitted(73, 49) Source(8, 29) + SourceIndex(4) +4 >Emitted(73, 50) Source(8, 30) + SourceIndex(4) +5 >Emitted(73, 52) Source(8, 32) + SourceIndex(4) +6 >Emitted(73, 54) Source(8, 34) + SourceIndex(4) +7 >Emitted(73, 56) Source(8, 36) + SourceIndex(4) +8 >Emitted(73, 58) Source(8, 38) + SourceIndex(4) +9 >Emitted(73, 60) Source(8, 40) + SourceIndex(4) +10>Emitted(73, 61) Source(8, 41) + SourceIndex(4) +11>Emitted(73, 64) Source(8, 43) + SourceIndex(4) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -1388,14 +1398,14 @@ sourceFile:../../third_part1.ts 6 > C 7 > () 8 > ; -1 >Emitted(72, 1) Source(1, 1) + SourceIndex(5) -2 >Emitted(72, 5) Source(1, 5) + SourceIndex(5) -3 >Emitted(72, 6) Source(1, 6) + SourceIndex(5) -4 >Emitted(72, 9) Source(1, 9) + SourceIndex(5) -5 >Emitted(72, 13) Source(1, 13) + SourceIndex(5) -6 >Emitted(72, 14) Source(1, 14) + SourceIndex(5) -7 >Emitted(72, 16) Source(1, 16) + SourceIndex(5) -8 >Emitted(72, 17) Source(1, 17) + SourceIndex(5) +1 >Emitted(74, 1) Source(1, 1) + SourceIndex(5) +2 >Emitted(74, 5) Source(1, 5) + SourceIndex(5) +3 >Emitted(74, 6) Source(1, 6) + SourceIndex(5) +4 >Emitted(74, 9) Source(1, 9) + SourceIndex(5) +5 >Emitted(74, 13) Source(1, 13) + SourceIndex(5) +6 >Emitted(74, 14) Source(1, 14) + SourceIndex(5) +7 >Emitted(74, 16) Source(1, 16) + SourceIndex(5) +8 >Emitted(74, 17) Source(1, 17) + SourceIndex(5) --- >>>c.doSomething(); 1-> @@ -1412,12 +1422,12 @@ sourceFile:../../third_part1.ts 4 > doSomething 5 > () 6 > ; -1->Emitted(73, 1) Source(2, 1) + SourceIndex(5) -2 >Emitted(73, 2) Source(2, 2) + SourceIndex(5) -3 >Emitted(73, 3) Source(2, 3) + SourceIndex(5) -4 >Emitted(73, 14) Source(2, 14) + SourceIndex(5) -5 >Emitted(73, 16) Source(2, 16) + SourceIndex(5) -6 >Emitted(73, 17) Source(2, 17) + SourceIndex(5) +1->Emitted(75, 1) Source(2, 1) + SourceIndex(5) +2 >Emitted(75, 2) Source(2, 2) + SourceIndex(5) +3 >Emitted(75, 3) Source(2, 3) + SourceIndex(5) +4 >Emitted(75, 14) Source(2, 14) + SourceIndex(5) +5 >Emitted(75, 16) Source(2, 16) + SourceIndex(5) +6 >Emitted(75, 17) Source(2, 17) + SourceIndex(5) --- >>>function forthirdthird_part1Rest() { 1-> @@ -1428,9 +1438,9 @@ sourceFile:../../third_part1.ts > 2 >function 3 > forthirdthird_part1Rest -1->Emitted(74, 1) Source(3, 1) + SourceIndex(5) -2 >Emitted(74, 10) Source(3, 10) + SourceIndex(5) -3 >Emitted(74, 33) Source(3, 33) + SourceIndex(5) +1->Emitted(76, 1) Source(3, 1) + SourceIndex(5) +2 >Emitted(76, 10) Source(3, 10) + SourceIndex(5) +3 >Emitted(76, 33) Source(3, 33) + SourceIndex(5) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^ @@ -1450,14 +1460,14 @@ sourceFile:../../third_part1.ts 6 > , 7 > ...rest } = { a: 10, b: 30, yy: 30 } 8 > ; -1->Emitted(75, 5) Source(4, 1) + SourceIndex(5) -2 >Emitted(75, 9) Source(4, 7) + SourceIndex(5) -3 >Emitted(75, 38) Source(4, 48) + SourceIndex(5) -4 >Emitted(75, 40) Source(4, 9) + SourceIndex(5) -5 >Emitted(75, 48) Source(4, 10) + SourceIndex(5) -6 >Emitted(75, 50) Source(4, 12) + SourceIndex(5) -7 >Emitted(75, 74) Source(4, 48) + SourceIndex(5) -8 >Emitted(75, 75) Source(4, 49) + SourceIndex(5) +1->Emitted(77, 5) Source(4, 1) + SourceIndex(5) +2 >Emitted(77, 9) Source(4, 7) + SourceIndex(5) +3 >Emitted(77, 38) Source(4, 48) + SourceIndex(5) +4 >Emitted(77, 40) Source(4, 9) + SourceIndex(5) +5 >Emitted(77, 48) Source(4, 10) + SourceIndex(5) +6 >Emitted(77, 50) Source(4, 12) + SourceIndex(5) +7 >Emitted(77, 74) Source(4, 48) + SourceIndex(5) +8 >Emitted(77, 75) Source(4, 49) + SourceIndex(5) --- >>>} 1 > @@ -1466,8 +1476,8 @@ sourceFile:../../third_part1.ts 1 > > 2 >} -1 >Emitted(76, 1) Source(5, 1) + SourceIndex(5) -2 >Emitted(76, 2) Source(5, 2) + SourceIndex(5) +1 >Emitted(78, 1) Source(5, 1) + SourceIndex(5) +2 >Emitted(78, 2) Source(5, 2) + SourceIndex(5) --- >>>function thirdthird_part1Spread() { 1-> @@ -1477,9 +1487,9 @@ sourceFile:../../third_part1.ts > 2 >function 3 > thirdthird_part1Spread -1->Emitted(77, 1) Source(6, 1) + SourceIndex(5) -2 >Emitted(77, 10) Source(6, 10) + SourceIndex(5) -3 >Emitted(77, 32) Source(6, 32) + SourceIndex(5) +1->Emitted(79, 1) Source(6, 1) + SourceIndex(5) +2 >Emitted(79, 10) Source(6, 10) + SourceIndex(5) +3 >Emitted(79, 32) Source(6, 32) + SourceIndex(5) --- >>> var b = []; 1 >^^^^ @@ -1487,8 +1497,8 @@ sourceFile:../../third_part1.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >( 2 > ...b: number[] -1 >Emitted(78, 5) Source(6, 33) + SourceIndex(5) -2 >Emitted(78, 16) Source(6, 47) + SourceIndex(5) +1 >Emitted(80, 5) Source(6, 33) + SourceIndex(5) +2 >Emitted(80, 16) Source(6, 47) + SourceIndex(5) --- >>> for (var _i = 0; _i < arguments.length; _i++) { 1->^^^^^^^^^ @@ -1503,20 +1513,20 @@ sourceFile:../../third_part1.ts 4 > ...b: number[] 5 > 6 > ...b: number[] -1->Emitted(79, 10) Source(6, 33) + SourceIndex(5) -2 >Emitted(79, 20) Source(6, 47) + SourceIndex(5) -3 >Emitted(79, 22) Source(6, 33) + SourceIndex(5) -4 >Emitted(79, 43) Source(6, 47) + SourceIndex(5) -5 >Emitted(79, 45) Source(6, 33) + SourceIndex(5) -6 >Emitted(79, 49) Source(6, 47) + SourceIndex(5) +1->Emitted(81, 10) Source(6, 33) + SourceIndex(5) +2 >Emitted(81, 20) Source(6, 47) + SourceIndex(5) +3 >Emitted(81, 22) Source(6, 33) + SourceIndex(5) +4 >Emitted(81, 43) Source(6, 47) + SourceIndex(5) +5 >Emitted(81, 45) Source(6, 33) + SourceIndex(5) +6 >Emitted(81, 49) Source(6, 47) + SourceIndex(5) --- >>> b[_i] = arguments[_i]; 1 >^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^ 1 > 2 > ...b: number[] -1 >Emitted(80, 9) Source(6, 33) + SourceIndex(5) -2 >Emitted(80, 31) Source(6, 47) + SourceIndex(5) +1 >Emitted(82, 9) Source(6, 33) + SourceIndex(5) +2 >Emitted(82, 31) Source(6, 47) + SourceIndex(5) --- >>> } >>>} @@ -1525,8 +1535,8 @@ sourceFile:../../third_part1.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >) { 2 >} -1 >Emitted(82, 1) Source(6, 51) + SourceIndex(5) -2 >Emitted(82, 2) Source(6, 52) + SourceIndex(5) +1 >Emitted(84, 1) Source(6, 51) + SourceIndex(5) +2 >Emitted(84, 2) Source(6, 52) + SourceIndex(5) --- >>>thirdthird_part1Spread.apply(void 0, __spread([10, 20, 30])); 1-> @@ -1552,17 +1562,17 @@ sourceFile:../../third_part1.ts 9 > 30 10> ] 11> ); -1->Emitted(83, 1) Source(7, 1) + SourceIndex(5) -2 >Emitted(83, 23) Source(7, 23) + SourceIndex(5) -3 >Emitted(83, 47) Source(7, 27) + SourceIndex(5) -4 >Emitted(83, 48) Source(7, 28) + SourceIndex(5) -5 >Emitted(83, 50) Source(7, 30) + SourceIndex(5) -6 >Emitted(83, 52) Source(7, 32) + SourceIndex(5) -7 >Emitted(83, 54) Source(7, 34) + SourceIndex(5) -8 >Emitted(83, 56) Source(7, 36) + SourceIndex(5) -9 >Emitted(83, 58) Source(7, 38) + SourceIndex(5) -10>Emitted(83, 59) Source(7, 39) + SourceIndex(5) -11>Emitted(83, 62) Source(7, 41) + SourceIndex(5) +1->Emitted(85, 1) Source(7, 1) + SourceIndex(5) +2 >Emitted(85, 23) Source(7, 23) + SourceIndex(5) +3 >Emitted(85, 47) Source(7, 27) + SourceIndex(5) +4 >Emitted(85, 48) Source(7, 28) + SourceIndex(5) +5 >Emitted(85, 50) Source(7, 30) + SourceIndex(5) +6 >Emitted(85, 52) Source(7, 32) + SourceIndex(5) +7 >Emitted(85, 54) Source(7, 34) + SourceIndex(5) +8 >Emitted(85, 56) Source(7, 36) + SourceIndex(5) +9 >Emitted(85, 58) Source(7, 38) + SourceIndex(5) +10>Emitted(85, 59) Source(7, 39) + SourceIndex(5) +11>Emitted(85, 62) Source(7, 41) + SourceIndex(5) --- >>>//# sourceMappingURL=third-output.js.map @@ -1577,51 +1587,51 @@ sourceFile:../../third_part1.ts "sections": [ { "pos": 0, - "end": 415, + "end": 492, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 417, - "end": 921, + "pos": 494, + "end": 998, "kind": "emitHelpers", "data": "typescript:read" }, { - "pos": 923, - "end": 1093, + "pos": 1000, + "end": 1170, "kind": "emitHelpers", "data": "typescript:spread" }, { - "pos": 1095, - "end": 1551, + "pos": 1172, + "end": 1628, "kind": "prepend", "data": "/src/first/bin/first-output.js", "texts": [ { - "pos": 1095, - "end": 1551, + "pos": 1172, + "end": 1628, "kind": "text" } ] }, { - "pos": 1551, - "end": 2171, + "pos": 1628, + "end": 2248, "kind": "prepend", "data": "/src/2/second-output.js", "texts": [ { - "pos": 1551, - "end": 2171, + "pos": 1628, + "end": 2248, "kind": "text" } ] }, { - "pos": 2171, - "end": 2536, + "pos": 2248, + "end": 2613, "kind": "text" } ], @@ -1676,18 +1686,20 @@ sourceFile:../../third_part1.ts ====================================================================== File:: /src/third/thirdjs/output/third-output.js ---------------------------------------------------------------------- -emitHelpers: (0-415):: typescript:rest +emitHelpers: (0-492):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; ---------------------------------------------------------------------- -emitHelpers: (417-921):: typescript:read +emitHelpers: (494-998):: typescript:read var __read = (this && this.__read) || function (o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; if (!m) return o; @@ -1705,15 +1717,15 @@ var __read = (this && this.__read) || function (o, n) { return ar; }; ---------------------------------------------------------------------- -emitHelpers: (923-1093):: typescript:spread +emitHelpers: (1000-1170):: typescript:spread var __spread = (this && this.__spread) || function () { for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); return ar; }; ---------------------------------------------------------------------- -prepend: (1095-1551):: /src/first/bin/first-output.js texts:: 1 +prepend: (1172-1628):: /src/first/bin/first-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (1095-1551) +text: (1172-1628) var s = "Hello, world"; console.log(s); function forfirstfirst_PART1Rest() { @@ -1733,9 +1745,9 @@ function firstfirst_part3Spread() { firstfirst_part3Spread.apply(void 0, __spread([10, 20, 30])); ---------------------------------------------------------------------- -prepend: (1551-2171):: /src/2/second-output.js texts:: 1 +prepend: (1628-2248):: /src/2/second-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (1551-2171) +text: (1628-2248) var N; (function (N) { function f() { @@ -1763,7 +1775,7 @@ function secondsecond_part2Spread() { secondsecond_part2Spread.apply(void 0, __spread([10, 20, 30])); ---------------------------------------------------------------------- -text: (2171-2536) +text: (2248-2613) var c = new C(); c.doSomething(); function forthirdthird_part1Rest() { diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/multiple-emitHelpers-in-different-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/multiple-emitHelpers-in-different-projects.js index 380c310bfd4..740d1baffcd 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/multiple-emitHelpers-in-different-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/multiple-emitHelpers-in-different-projects.js @@ -4,8 +4,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; var s = "Hello, world"; @@ -21,7 +23,7 @@ function f() { //# sourceMappingURL=first-output.js.map //// [/src/first/bin/first-output.js.map] -{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":";;;;;;;;;AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB;IAChC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;AAAA,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACbhB,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC"} +{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":";;;;;;;;;;;AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB;IAChC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;AAAA,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACbhB,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC"} //// [/src/first/bin/first-output.js.map.baseline.txt] =================================================================== @@ -39,8 +41,10 @@ sourceFile:../first_PART1.ts >>> for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") ->>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) ->>> t[p[i]] = s[p[i]]; +>>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> t[p[i]] = s[p[i]]; +>>> } >>> return t; >>>}; >>>var s = "Hello, world"; @@ -60,12 +64,12 @@ sourceFile:../first_PART1.ts 4 > = 5 > "Hello, world" 6 > ; -1 >Emitted(10, 1) Source(5, 1) + SourceIndex(0) -2 >Emitted(10, 5) Source(5, 7) + SourceIndex(0) -3 >Emitted(10, 6) Source(5, 8) + SourceIndex(0) -4 >Emitted(10, 9) Source(5, 11) + SourceIndex(0) -5 >Emitted(10, 23) Source(5, 25) + SourceIndex(0) -6 >Emitted(10, 24) Source(5, 26) + SourceIndex(0) +1 >Emitted(12, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(12, 5) Source(5, 7) + SourceIndex(0) +3 >Emitted(12, 6) Source(5, 8) + SourceIndex(0) +4 >Emitted(12, 9) Source(5, 11) + SourceIndex(0) +5 >Emitted(12, 23) Source(5, 25) + SourceIndex(0) +6 >Emitted(12, 24) Source(5, 26) + SourceIndex(0) --- >>>console.log(s); 1 > @@ -91,14 +95,14 @@ sourceFile:../first_PART1.ts 6 > s 7 > ) 8 > ; -1 >Emitted(11, 1) Source(11, 1) + SourceIndex(0) -2 >Emitted(11, 8) Source(11, 8) + SourceIndex(0) -3 >Emitted(11, 9) Source(11, 9) + SourceIndex(0) -4 >Emitted(11, 12) Source(11, 12) + SourceIndex(0) -5 >Emitted(11, 13) Source(11, 13) + SourceIndex(0) -6 >Emitted(11, 14) Source(11, 14) + SourceIndex(0) -7 >Emitted(11, 15) Source(11, 15) + SourceIndex(0) -8 >Emitted(11, 16) Source(11, 16) + SourceIndex(0) +1 >Emitted(13, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(13, 8) Source(11, 8) + SourceIndex(0) +3 >Emitted(13, 9) Source(11, 9) + SourceIndex(0) +4 >Emitted(13, 12) Source(11, 12) + SourceIndex(0) +5 >Emitted(13, 13) Source(11, 13) + SourceIndex(0) +6 >Emitted(13, 14) Source(11, 14) + SourceIndex(0) +7 >Emitted(13, 15) Source(11, 15) + SourceIndex(0) +8 >Emitted(13, 16) Source(11, 16) + SourceIndex(0) --- >>>function forfirstfirst_PART1Rest() { 1-> @@ -109,9 +113,9 @@ sourceFile:../first_PART1.ts > 2 >function 3 > forfirstfirst_PART1Rest -1->Emitted(12, 1) Source(12, 1) + SourceIndex(0) -2 >Emitted(12, 10) Source(12, 10) + SourceIndex(0) -3 >Emitted(12, 33) Source(12, 33) + SourceIndex(0) +1->Emitted(14, 1) Source(12, 1) + SourceIndex(0) +2 >Emitted(14, 10) Source(12, 10) + SourceIndex(0) +3 >Emitted(14, 33) Source(12, 33) + SourceIndex(0) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^ @@ -131,14 +135,14 @@ sourceFile:../first_PART1.ts 6 > , 7 > ...rest } = { a: 10, b: 30, yy: 30 } 8 > ; -1->Emitted(13, 5) Source(13, 1) + SourceIndex(0) -2 >Emitted(13, 9) Source(13, 7) + SourceIndex(0) -3 >Emitted(13, 38) Source(13, 48) + SourceIndex(0) -4 >Emitted(13, 40) Source(13, 9) + SourceIndex(0) -5 >Emitted(13, 48) Source(13, 10) + SourceIndex(0) -6 >Emitted(13, 50) Source(13, 12) + SourceIndex(0) -7 >Emitted(13, 74) Source(13, 48) + SourceIndex(0) -8 >Emitted(13, 75) Source(13, 49) + SourceIndex(0) +1->Emitted(15, 5) Source(13, 1) + SourceIndex(0) +2 >Emitted(15, 9) Source(13, 7) + SourceIndex(0) +3 >Emitted(15, 38) Source(13, 48) + SourceIndex(0) +4 >Emitted(15, 40) Source(13, 9) + SourceIndex(0) +5 >Emitted(15, 48) Source(13, 10) + SourceIndex(0) +6 >Emitted(15, 50) Source(13, 12) + SourceIndex(0) +7 >Emitted(15, 74) Source(13, 48) + SourceIndex(0) +8 >Emitted(15, 75) Source(13, 49) + SourceIndex(0) --- >>>} 1 > @@ -147,8 +151,8 @@ sourceFile:../first_PART1.ts 1 > > 2 >} -1 >Emitted(14, 1) Source(14, 1) + SourceIndex(0) -2 >Emitted(14, 2) Source(14, 2) + SourceIndex(0) +1 >Emitted(16, 1) Source(14, 1) + SourceIndex(0) +2 >Emitted(16, 2) Source(14, 2) + SourceIndex(0) --- >>>console.log(s); 1-> @@ -168,14 +172,14 @@ sourceFile:../first_PART1.ts 6 > s 7 > ) 8 > ; -1->Emitted(15, 1) Source(14, 2) + SourceIndex(0) -2 >Emitted(15, 8) Source(14, 9) + SourceIndex(0) -3 >Emitted(15, 9) Source(14, 10) + SourceIndex(0) -4 >Emitted(15, 12) Source(14, 13) + SourceIndex(0) -5 >Emitted(15, 13) Source(14, 14) + SourceIndex(0) -6 >Emitted(15, 14) Source(14, 15) + SourceIndex(0) -7 >Emitted(15, 15) Source(14, 16) + SourceIndex(0) -8 >Emitted(15, 16) Source(14, 17) + SourceIndex(0) +1->Emitted(17, 1) Source(14, 2) + SourceIndex(0) +2 >Emitted(17, 8) Source(14, 9) + SourceIndex(0) +3 >Emitted(17, 9) Source(14, 10) + SourceIndex(0) +4 >Emitted(17, 12) Source(14, 13) + SourceIndex(0) +5 >Emitted(17, 13) Source(14, 14) + SourceIndex(0) +6 >Emitted(17, 14) Source(14, 15) + SourceIndex(0) +7 >Emitted(17, 15) Source(14, 16) + SourceIndex(0) +8 >Emitted(17, 16) Source(14, 17) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/src/first/bin/first-output.js @@ -200,15 +204,15 @@ sourceFile:../first_part2.ts 7 > () 8 > ) 9 > ; -1->Emitted(16, 1) Source(1, 1) + SourceIndex(1) -2 >Emitted(16, 8) Source(1, 8) + SourceIndex(1) -3 >Emitted(16, 9) Source(1, 9) + SourceIndex(1) -4 >Emitted(16, 12) Source(1, 12) + SourceIndex(1) -5 >Emitted(16, 13) Source(1, 13) + SourceIndex(1) -6 >Emitted(16, 14) Source(1, 14) + SourceIndex(1) -7 >Emitted(16, 16) Source(1, 16) + SourceIndex(1) -8 >Emitted(16, 17) Source(1, 17) + SourceIndex(1) -9 >Emitted(16, 18) Source(1, 18) + SourceIndex(1) +1->Emitted(18, 1) Source(1, 1) + SourceIndex(1) +2 >Emitted(18, 8) Source(1, 8) + SourceIndex(1) +3 >Emitted(18, 9) Source(1, 9) + SourceIndex(1) +4 >Emitted(18, 12) Source(1, 12) + SourceIndex(1) +5 >Emitted(18, 13) Source(1, 13) + SourceIndex(1) +6 >Emitted(18, 14) Source(1, 14) + SourceIndex(1) +7 >Emitted(18, 16) Source(1, 16) + SourceIndex(1) +8 >Emitted(18, 17) Source(1, 17) + SourceIndex(1) +9 >Emitted(18, 18) Source(1, 18) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:/src/first/bin/first-output.js @@ -222,9 +226,9 @@ sourceFile:../first_part3.ts 1 > 2 >function 3 > f -1 >Emitted(17, 1) Source(1, 1) + SourceIndex(2) -2 >Emitted(17, 10) Source(1, 10) + SourceIndex(2) -3 >Emitted(17, 11) Source(1, 11) + SourceIndex(2) +1 >Emitted(19, 1) Source(1, 1) + SourceIndex(2) +2 >Emitted(19, 10) Source(1, 10) + SourceIndex(2) +3 >Emitted(19, 11) Source(1, 11) + SourceIndex(2) --- >>> return "JS does hoists"; 1->^^^^ @@ -236,10 +240,10 @@ sourceFile:../first_part3.ts 2 > return 3 > "JS does hoists" 4 > ; -1->Emitted(18, 5) Source(2, 5) + SourceIndex(2) -2 >Emitted(18, 12) Source(2, 12) + SourceIndex(2) -3 >Emitted(18, 28) Source(2, 28) + SourceIndex(2) -4 >Emitted(18, 29) Source(2, 29) + SourceIndex(2) +1->Emitted(20, 5) Source(2, 5) + SourceIndex(2) +2 >Emitted(20, 12) Source(2, 12) + SourceIndex(2) +3 >Emitted(20, 28) Source(2, 28) + SourceIndex(2) +4 >Emitted(20, 29) Source(2, 29) + SourceIndex(2) --- >>>} 1 > @@ -248,8 +252,8 @@ sourceFile:../first_part3.ts 1 > > 2 >} -1 >Emitted(19, 1) Source(3, 1) + SourceIndex(2) -2 >Emitted(19, 2) Source(3, 2) + SourceIndex(2) +1 >Emitted(21, 1) Source(3, 1) + SourceIndex(2) +2 >Emitted(21, 2) Source(3, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=first-output.js.map @@ -266,13 +270,13 @@ sourceFile:../first_part3.ts "sections": [ { "pos": 0, - "end": 415, + "end": 492, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 417, - "end": 661, + "pos": 494, + "end": 738, "kind": "text" } ], @@ -299,18 +303,20 @@ sourceFile:../first_part3.ts ====================================================================== File:: /src/first/bin/first-output.js ---------------------------------------------------------------------- -emitHelpers: (0-415):: typescript:rest +emitHelpers: (0-492):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; ---------------------------------------------------------------------- -text: (417-661) +text: (494-738) var s = "Hello, world"; console.log(s); function forfirstfirst_PART1Rest() { @@ -361,8 +367,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; var __read = (this && this.__read) || function (o, n) { @@ -425,7 +433,7 @@ function forthirdthird_part1Rest() { //# sourceMappingURL=third-output.js.map //// [/src/third/thirdjs/output/third-output.js.map] -{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../../first/first_PART1.ts","../../../first/first_part2.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts","../../third_part1.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB;IAChC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;AAAA,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACbhB,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC;ACED,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;AAED,SAAS,wBAAwB;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AACrD,wBAAwB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;ACb1C;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC;ACJD,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC;AAChB,SAAS,uBAAuB;IAChC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC"} +{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../../first/first_PART1.ts","../../../first/first_part2.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts","../../third_part1.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB;IAChC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;AAAA,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACbhB,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC;ACED,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;AAED,SAAS,wBAAwB;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AACrD,wBAAwB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;ACb1C;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC;ACJD,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC;AAChB,SAAS,uBAAuB;IAChC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC"} //// [/src/third/thirdjs/output/third-output.js.map.baseline.txt] =================================================================== @@ -443,8 +451,10 @@ sourceFile:../../../first/first_PART1.ts >>> for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") ->>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) ->>> t[p[i]] = s[p[i]]; +>>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> t[p[i]] = s[p[i]]; +>>> } >>> return t; >>>}; >>>var __read = (this && this.__read) || function (o, n) { @@ -484,12 +494,12 @@ sourceFile:../../../first/first_PART1.ts 4 > = 5 > "Hello, world" 6 > ; -1 >Emitted(30, 1) Source(5, 1) + SourceIndex(0) -2 >Emitted(30, 5) Source(5, 7) + SourceIndex(0) -3 >Emitted(30, 6) Source(5, 8) + SourceIndex(0) -4 >Emitted(30, 9) Source(5, 11) + SourceIndex(0) -5 >Emitted(30, 23) Source(5, 25) + SourceIndex(0) -6 >Emitted(30, 24) Source(5, 26) + SourceIndex(0) +1 >Emitted(32, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(32, 5) Source(5, 7) + SourceIndex(0) +3 >Emitted(32, 6) Source(5, 8) + SourceIndex(0) +4 >Emitted(32, 9) Source(5, 11) + SourceIndex(0) +5 >Emitted(32, 23) Source(5, 25) + SourceIndex(0) +6 >Emitted(32, 24) Source(5, 26) + SourceIndex(0) --- >>>console.log(s); 1 > @@ -515,14 +525,14 @@ sourceFile:../../../first/first_PART1.ts 6 > s 7 > ) 8 > ; -1 >Emitted(31, 1) Source(11, 1) + SourceIndex(0) -2 >Emitted(31, 8) Source(11, 8) + SourceIndex(0) -3 >Emitted(31, 9) Source(11, 9) + SourceIndex(0) -4 >Emitted(31, 12) Source(11, 12) + SourceIndex(0) -5 >Emitted(31, 13) Source(11, 13) + SourceIndex(0) -6 >Emitted(31, 14) Source(11, 14) + SourceIndex(0) -7 >Emitted(31, 15) Source(11, 15) + SourceIndex(0) -8 >Emitted(31, 16) Source(11, 16) + SourceIndex(0) +1 >Emitted(33, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(33, 8) Source(11, 8) + SourceIndex(0) +3 >Emitted(33, 9) Source(11, 9) + SourceIndex(0) +4 >Emitted(33, 12) Source(11, 12) + SourceIndex(0) +5 >Emitted(33, 13) Source(11, 13) + SourceIndex(0) +6 >Emitted(33, 14) Source(11, 14) + SourceIndex(0) +7 >Emitted(33, 15) Source(11, 15) + SourceIndex(0) +8 >Emitted(33, 16) Source(11, 16) + SourceIndex(0) --- >>>function forfirstfirst_PART1Rest() { 1-> @@ -533,9 +543,9 @@ sourceFile:../../../first/first_PART1.ts > 2 >function 3 > forfirstfirst_PART1Rest -1->Emitted(32, 1) Source(12, 1) + SourceIndex(0) -2 >Emitted(32, 10) Source(12, 10) + SourceIndex(0) -3 >Emitted(32, 33) Source(12, 33) + SourceIndex(0) +1->Emitted(34, 1) Source(12, 1) + SourceIndex(0) +2 >Emitted(34, 10) Source(12, 10) + SourceIndex(0) +3 >Emitted(34, 33) Source(12, 33) + SourceIndex(0) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^ @@ -555,14 +565,14 @@ sourceFile:../../../first/first_PART1.ts 6 > , 7 > ...rest } = { a: 10, b: 30, yy: 30 } 8 > ; -1->Emitted(33, 5) Source(13, 1) + SourceIndex(0) -2 >Emitted(33, 9) Source(13, 7) + SourceIndex(0) -3 >Emitted(33, 38) Source(13, 48) + SourceIndex(0) -4 >Emitted(33, 40) Source(13, 9) + SourceIndex(0) -5 >Emitted(33, 48) Source(13, 10) + SourceIndex(0) -6 >Emitted(33, 50) Source(13, 12) + SourceIndex(0) -7 >Emitted(33, 74) Source(13, 48) + SourceIndex(0) -8 >Emitted(33, 75) Source(13, 49) + SourceIndex(0) +1->Emitted(35, 5) Source(13, 1) + SourceIndex(0) +2 >Emitted(35, 9) Source(13, 7) + SourceIndex(0) +3 >Emitted(35, 38) Source(13, 48) + SourceIndex(0) +4 >Emitted(35, 40) Source(13, 9) + SourceIndex(0) +5 >Emitted(35, 48) Source(13, 10) + SourceIndex(0) +6 >Emitted(35, 50) Source(13, 12) + SourceIndex(0) +7 >Emitted(35, 74) Source(13, 48) + SourceIndex(0) +8 >Emitted(35, 75) Source(13, 49) + SourceIndex(0) --- >>>} 1 > @@ -571,8 +581,8 @@ sourceFile:../../../first/first_PART1.ts 1 > > 2 >} -1 >Emitted(34, 1) Source(14, 1) + SourceIndex(0) -2 >Emitted(34, 2) Source(14, 2) + SourceIndex(0) +1 >Emitted(36, 1) Source(14, 1) + SourceIndex(0) +2 >Emitted(36, 2) Source(14, 2) + SourceIndex(0) --- >>>console.log(s); 1-> @@ -592,14 +602,14 @@ sourceFile:../../../first/first_PART1.ts 6 > s 7 > ) 8 > ; -1->Emitted(35, 1) Source(14, 2) + SourceIndex(0) -2 >Emitted(35, 8) Source(14, 9) + SourceIndex(0) -3 >Emitted(35, 9) Source(14, 10) + SourceIndex(0) -4 >Emitted(35, 12) Source(14, 13) + SourceIndex(0) -5 >Emitted(35, 13) Source(14, 14) + SourceIndex(0) -6 >Emitted(35, 14) Source(14, 15) + SourceIndex(0) -7 >Emitted(35, 15) Source(14, 16) + SourceIndex(0) -8 >Emitted(35, 16) Source(14, 17) + SourceIndex(0) +1->Emitted(37, 1) Source(14, 2) + SourceIndex(0) +2 >Emitted(37, 8) Source(14, 9) + SourceIndex(0) +3 >Emitted(37, 9) Source(14, 10) + SourceIndex(0) +4 >Emitted(37, 12) Source(14, 13) + SourceIndex(0) +5 >Emitted(37, 13) Source(14, 14) + SourceIndex(0) +6 >Emitted(37, 14) Source(14, 15) + SourceIndex(0) +7 >Emitted(37, 15) Source(14, 16) + SourceIndex(0) +8 >Emitted(37, 16) Source(14, 17) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -624,15 +634,15 @@ sourceFile:../../../first/first_part2.ts 7 > () 8 > ) 9 > ; -1->Emitted(36, 1) Source(1, 1) + SourceIndex(1) -2 >Emitted(36, 8) Source(1, 8) + SourceIndex(1) -3 >Emitted(36, 9) Source(1, 9) + SourceIndex(1) -4 >Emitted(36, 12) Source(1, 12) + SourceIndex(1) -5 >Emitted(36, 13) Source(1, 13) + SourceIndex(1) -6 >Emitted(36, 14) Source(1, 14) + SourceIndex(1) -7 >Emitted(36, 16) Source(1, 16) + SourceIndex(1) -8 >Emitted(36, 17) Source(1, 17) + SourceIndex(1) -9 >Emitted(36, 18) Source(1, 18) + SourceIndex(1) +1->Emitted(38, 1) Source(1, 1) + SourceIndex(1) +2 >Emitted(38, 8) Source(1, 8) + SourceIndex(1) +3 >Emitted(38, 9) Source(1, 9) + SourceIndex(1) +4 >Emitted(38, 12) Source(1, 12) + SourceIndex(1) +5 >Emitted(38, 13) Source(1, 13) + SourceIndex(1) +6 >Emitted(38, 14) Source(1, 14) + SourceIndex(1) +7 >Emitted(38, 16) Source(1, 16) + SourceIndex(1) +8 >Emitted(38, 17) Source(1, 17) + SourceIndex(1) +9 >Emitted(38, 18) Source(1, 18) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -646,9 +656,9 @@ sourceFile:../../../first/first_part3.ts 1 > 2 >function 3 > f -1 >Emitted(37, 1) Source(1, 1) + SourceIndex(2) -2 >Emitted(37, 10) Source(1, 10) + SourceIndex(2) -3 >Emitted(37, 11) Source(1, 11) + SourceIndex(2) +1 >Emitted(39, 1) Source(1, 1) + SourceIndex(2) +2 >Emitted(39, 10) Source(1, 10) + SourceIndex(2) +3 >Emitted(39, 11) Source(1, 11) + SourceIndex(2) --- >>> return "JS does hoists"; 1->^^^^ @@ -660,10 +670,10 @@ sourceFile:../../../first/first_part3.ts 2 > return 3 > "JS does hoists" 4 > ; -1->Emitted(38, 5) Source(2, 5) + SourceIndex(2) -2 >Emitted(38, 12) Source(2, 12) + SourceIndex(2) -3 >Emitted(38, 28) Source(2, 28) + SourceIndex(2) -4 >Emitted(38, 29) Source(2, 29) + SourceIndex(2) +1->Emitted(40, 5) Source(2, 5) + SourceIndex(2) +2 >Emitted(40, 12) Source(2, 12) + SourceIndex(2) +3 >Emitted(40, 28) Source(2, 28) + SourceIndex(2) +4 >Emitted(40, 29) Source(2, 29) + SourceIndex(2) --- >>>} 1 > @@ -672,8 +682,8 @@ sourceFile:../../../first/first_part3.ts 1 > > 2 >} -1 >Emitted(39, 1) Source(3, 1) + SourceIndex(2) -2 >Emitted(39, 2) Source(3, 2) + SourceIndex(2) +1 >Emitted(41, 1) Source(3, 1) + SourceIndex(2) +2 >Emitted(41, 2) Source(3, 2) + SourceIndex(2) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -699,10 +709,10 @@ sourceFile:../../../second/second_part1.ts > > f(); > } -1->Emitted(40, 1) Source(5, 1) + SourceIndex(3) -2 >Emitted(40, 5) Source(5, 11) + SourceIndex(3) -3 >Emitted(40, 6) Source(5, 12) + SourceIndex(3) -4 >Emitted(40, 7) Source(11, 2) + SourceIndex(3) +1->Emitted(42, 1) Source(5, 1) + SourceIndex(3) +2 >Emitted(42, 5) Source(5, 11) + SourceIndex(3) +3 >Emitted(42, 6) Source(5, 12) + SourceIndex(3) +4 >Emitted(42, 7) Source(11, 2) + SourceIndex(3) --- >>>(function (N) { 1-> @@ -712,9 +722,9 @@ sourceFile:../../../second/second_part1.ts 1-> 2 >namespace 3 > N -1->Emitted(41, 1) Source(5, 1) + SourceIndex(3) -2 >Emitted(41, 12) Source(5, 11) + SourceIndex(3) -3 >Emitted(41, 13) Source(5, 12) + SourceIndex(3) +1->Emitted(43, 1) Source(5, 1) + SourceIndex(3) +2 >Emitted(43, 12) Source(5, 11) + SourceIndex(3) +3 >Emitted(43, 13) Source(5, 12) + SourceIndex(3) --- >>> function f() { 1->^^^^ @@ -725,9 +735,9 @@ sourceFile:../../../second/second_part1.ts > 2 > function 3 > f -1->Emitted(42, 5) Source(6, 5) + SourceIndex(3) -2 >Emitted(42, 14) Source(6, 14) + SourceIndex(3) -3 >Emitted(42, 15) Source(6, 15) + SourceIndex(3) +1->Emitted(44, 5) Source(6, 5) + SourceIndex(3) +2 >Emitted(44, 14) Source(6, 14) + SourceIndex(3) +3 >Emitted(44, 15) Source(6, 15) + SourceIndex(3) --- >>> console.log('testing'); 1->^^^^^^^^ @@ -747,14 +757,14 @@ sourceFile:../../../second/second_part1.ts 6 > 'testing' 7 > ) 8 > ; -1->Emitted(43, 9) Source(7, 9) + SourceIndex(3) -2 >Emitted(43, 16) Source(7, 16) + SourceIndex(3) -3 >Emitted(43, 17) Source(7, 17) + SourceIndex(3) -4 >Emitted(43, 20) Source(7, 20) + SourceIndex(3) -5 >Emitted(43, 21) Source(7, 21) + SourceIndex(3) -6 >Emitted(43, 30) Source(7, 30) + SourceIndex(3) -7 >Emitted(43, 31) Source(7, 31) + SourceIndex(3) -8 >Emitted(43, 32) Source(7, 32) + SourceIndex(3) +1->Emitted(45, 9) Source(7, 9) + SourceIndex(3) +2 >Emitted(45, 16) Source(7, 16) + SourceIndex(3) +3 >Emitted(45, 17) Source(7, 17) + SourceIndex(3) +4 >Emitted(45, 20) Source(7, 20) + SourceIndex(3) +5 >Emitted(45, 21) Source(7, 21) + SourceIndex(3) +6 >Emitted(45, 30) Source(7, 30) + SourceIndex(3) +7 >Emitted(45, 31) Source(7, 31) + SourceIndex(3) +8 >Emitted(45, 32) Source(7, 32) + SourceIndex(3) --- >>> } 1 >^^^^ @@ -763,8 +773,8 @@ sourceFile:../../../second/second_part1.ts 1 > > 2 > } -1 >Emitted(44, 5) Source(8, 5) + SourceIndex(3) -2 >Emitted(44, 6) Source(8, 6) + SourceIndex(3) +1 >Emitted(46, 5) Source(8, 5) + SourceIndex(3) +2 >Emitted(46, 6) Source(8, 6) + SourceIndex(3) --- >>> f(); 1->^^^^ @@ -778,10 +788,10 @@ sourceFile:../../../second/second_part1.ts 2 > f 3 > () 4 > ; -1->Emitted(45, 5) Source(10, 5) + SourceIndex(3) -2 >Emitted(45, 6) Source(10, 6) + SourceIndex(3) -3 >Emitted(45, 8) Source(10, 8) + SourceIndex(3) -4 >Emitted(45, 9) Source(10, 9) + SourceIndex(3) +1->Emitted(47, 5) Source(10, 5) + SourceIndex(3) +2 >Emitted(47, 6) Source(10, 6) + SourceIndex(3) +3 >Emitted(47, 8) Source(10, 8) + SourceIndex(3) +4 >Emitted(47, 9) Source(10, 9) + SourceIndex(3) --- >>>})(N || (N = {})); 1-> @@ -806,13 +816,13 @@ sourceFile:../../../second/second_part1.ts > > f(); > } -1->Emitted(46, 1) Source(11, 1) + SourceIndex(3) -2 >Emitted(46, 2) Source(11, 2) + SourceIndex(3) -3 >Emitted(46, 4) Source(5, 11) + SourceIndex(3) -4 >Emitted(46, 5) Source(5, 12) + SourceIndex(3) -5 >Emitted(46, 10) Source(5, 11) + SourceIndex(3) -6 >Emitted(46, 11) Source(5, 12) + SourceIndex(3) -7 >Emitted(46, 19) Source(11, 2) + SourceIndex(3) +1->Emitted(48, 1) Source(11, 1) + SourceIndex(3) +2 >Emitted(48, 2) Source(11, 2) + SourceIndex(3) +3 >Emitted(48, 4) Source(5, 11) + SourceIndex(3) +4 >Emitted(48, 5) Source(5, 12) + SourceIndex(3) +5 >Emitted(48, 10) Source(5, 11) + SourceIndex(3) +6 >Emitted(48, 11) Source(5, 12) + SourceIndex(3) +7 >Emitted(48, 19) Source(11, 2) + SourceIndex(3) --- >>>function secondsecond_part1Spread() { 1-> @@ -823,9 +833,9 @@ sourceFile:../../../second/second_part1.ts > 2 >function 3 > secondsecond_part1Spread -1->Emitted(47, 1) Source(13, 1) + SourceIndex(3) -2 >Emitted(47, 10) Source(13, 10) + SourceIndex(3) -3 >Emitted(47, 34) Source(13, 34) + SourceIndex(3) +1->Emitted(49, 1) Source(13, 1) + SourceIndex(3) +2 >Emitted(49, 10) Source(13, 10) + SourceIndex(3) +3 >Emitted(49, 34) Source(13, 34) + SourceIndex(3) --- >>> var b = []; 1 >^^^^ @@ -833,8 +843,8 @@ sourceFile:../../../second/second_part1.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >( 2 > ...b: number[] -1 >Emitted(48, 5) Source(13, 35) + SourceIndex(3) -2 >Emitted(48, 16) Source(13, 49) + SourceIndex(3) +1 >Emitted(50, 5) Source(13, 35) + SourceIndex(3) +2 >Emitted(50, 16) Source(13, 49) + SourceIndex(3) --- >>> for (var _i = 0; _i < arguments.length; _i++) { 1->^^^^^^^^^ @@ -849,20 +859,20 @@ sourceFile:../../../second/second_part1.ts 4 > ...b: number[] 5 > 6 > ...b: number[] -1->Emitted(49, 10) Source(13, 35) + SourceIndex(3) -2 >Emitted(49, 20) Source(13, 49) + SourceIndex(3) -3 >Emitted(49, 22) Source(13, 35) + SourceIndex(3) -4 >Emitted(49, 43) Source(13, 49) + SourceIndex(3) -5 >Emitted(49, 45) Source(13, 35) + SourceIndex(3) -6 >Emitted(49, 49) Source(13, 49) + SourceIndex(3) +1->Emitted(51, 10) Source(13, 35) + SourceIndex(3) +2 >Emitted(51, 20) Source(13, 49) + SourceIndex(3) +3 >Emitted(51, 22) Source(13, 35) + SourceIndex(3) +4 >Emitted(51, 43) Source(13, 49) + SourceIndex(3) +5 >Emitted(51, 45) Source(13, 35) + SourceIndex(3) +6 >Emitted(51, 49) Source(13, 49) + SourceIndex(3) --- >>> b[_i] = arguments[_i]; 1 >^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^ 1 > 2 > ...b: number[] -1 >Emitted(50, 9) Source(13, 35) + SourceIndex(3) -2 >Emitted(50, 31) Source(13, 49) + SourceIndex(3) +1 >Emitted(52, 9) Source(13, 35) + SourceIndex(3) +2 >Emitted(52, 31) Source(13, 49) + SourceIndex(3) --- >>> } >>>} @@ -871,8 +881,8 @@ sourceFile:../../../second/second_part1.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >) { 2 >} -1 >Emitted(52, 1) Source(13, 53) + SourceIndex(3) -2 >Emitted(52, 2) Source(13, 54) + SourceIndex(3) +1 >Emitted(54, 1) Source(13, 53) + SourceIndex(3) +2 >Emitted(54, 2) Source(13, 54) + SourceIndex(3) --- >>>secondsecond_part1Spread.apply(void 0, __spread([10, 20, 30])); 1-> @@ -898,17 +908,17 @@ sourceFile:../../../second/second_part1.ts 9 > 30 10> ] 11> ); -1->Emitted(53, 1) Source(14, 1) + SourceIndex(3) -2 >Emitted(53, 25) Source(14, 25) + SourceIndex(3) -3 >Emitted(53, 49) Source(14, 29) + SourceIndex(3) -4 >Emitted(53, 50) Source(14, 30) + SourceIndex(3) -5 >Emitted(53, 52) Source(14, 32) + SourceIndex(3) -6 >Emitted(53, 54) Source(14, 34) + SourceIndex(3) -7 >Emitted(53, 56) Source(14, 36) + SourceIndex(3) -8 >Emitted(53, 58) Source(14, 38) + SourceIndex(3) -9 >Emitted(53, 60) Source(14, 40) + SourceIndex(3) -10>Emitted(53, 61) Source(14, 41) + SourceIndex(3) -11>Emitted(53, 64) Source(14, 43) + SourceIndex(3) +1->Emitted(55, 1) Source(14, 1) + SourceIndex(3) +2 >Emitted(55, 25) Source(14, 25) + SourceIndex(3) +3 >Emitted(55, 49) Source(14, 29) + SourceIndex(3) +4 >Emitted(55, 50) Source(14, 30) + SourceIndex(3) +5 >Emitted(55, 52) Source(14, 32) + SourceIndex(3) +6 >Emitted(55, 54) Source(14, 34) + SourceIndex(3) +7 >Emitted(55, 56) Source(14, 36) + SourceIndex(3) +8 >Emitted(55, 58) Source(14, 38) + SourceIndex(3) +9 >Emitted(55, 60) Source(14, 40) + SourceIndex(3) +10>Emitted(55, 61) Source(14, 41) + SourceIndex(3) +11>Emitted(55, 64) Source(14, 43) + SourceIndex(3) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -918,13 +928,13 @@ sourceFile:../../../second/second_part2.ts 1 > 2 >^^^^^^^^^^^^^^^^^^^-> 1 > -1 >Emitted(54, 1) Source(1, 1) + SourceIndex(4) +1 >Emitted(56, 1) Source(1, 1) + SourceIndex(4) --- >>> function C() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(55, 5) Source(1, 1) + SourceIndex(4) +1->Emitted(57, 5) Source(1, 1) + SourceIndex(4) --- >>> } 1->^^^^ @@ -936,8 +946,8 @@ sourceFile:../../../second/second_part2.ts > } > 2 > } -1->Emitted(56, 5) Source(5, 1) + SourceIndex(4) -2 >Emitted(56, 6) Source(5, 2) + SourceIndex(4) +1->Emitted(58, 5) Source(5, 1) + SourceIndex(4) +2 >Emitted(58, 6) Source(5, 2) + SourceIndex(4) --- >>> C.prototype.doSomething = function () { 1->^^^^ @@ -947,9 +957,9 @@ sourceFile:../../../second/second_part2.ts 1-> 2 > doSomething 3 > -1->Emitted(57, 5) Source(2, 5) + SourceIndex(4) -2 >Emitted(57, 28) Source(2, 16) + SourceIndex(4) -3 >Emitted(57, 31) Source(2, 5) + SourceIndex(4) +1->Emitted(59, 5) Source(2, 5) + SourceIndex(4) +2 >Emitted(59, 28) Source(2, 16) + SourceIndex(4) +3 >Emitted(59, 31) Source(2, 5) + SourceIndex(4) --- >>> console.log("something got done"); 1->^^^^^^^^ @@ -969,14 +979,14 @@ sourceFile:../../../second/second_part2.ts 6 > "something got done" 7 > ) 8 > ; -1->Emitted(58, 9) Source(3, 9) + SourceIndex(4) -2 >Emitted(58, 16) Source(3, 16) + SourceIndex(4) -3 >Emitted(58, 17) Source(3, 17) + SourceIndex(4) -4 >Emitted(58, 20) Source(3, 20) + SourceIndex(4) -5 >Emitted(58, 21) Source(3, 21) + SourceIndex(4) -6 >Emitted(58, 41) Source(3, 41) + SourceIndex(4) -7 >Emitted(58, 42) Source(3, 42) + SourceIndex(4) -8 >Emitted(58, 43) Source(3, 43) + SourceIndex(4) +1->Emitted(60, 9) Source(3, 9) + SourceIndex(4) +2 >Emitted(60, 16) Source(3, 16) + SourceIndex(4) +3 >Emitted(60, 17) Source(3, 17) + SourceIndex(4) +4 >Emitted(60, 20) Source(3, 20) + SourceIndex(4) +5 >Emitted(60, 21) Source(3, 21) + SourceIndex(4) +6 >Emitted(60, 41) Source(3, 41) + SourceIndex(4) +7 >Emitted(60, 42) Source(3, 42) + SourceIndex(4) +8 >Emitted(60, 43) Source(3, 43) + SourceIndex(4) --- >>> }; 1 >^^^^ @@ -985,8 +995,8 @@ sourceFile:../../../second/second_part2.ts 1 > > 2 > } -1 >Emitted(59, 5) Source(4, 5) + SourceIndex(4) -2 >Emitted(59, 6) Source(4, 6) + SourceIndex(4) +1 >Emitted(61, 5) Source(4, 5) + SourceIndex(4) +2 >Emitted(61, 6) Source(4, 6) + SourceIndex(4) --- >>> return C; 1->^^^^ @@ -994,8 +1004,8 @@ sourceFile:../../../second/second_part2.ts 1-> > 2 > } -1->Emitted(60, 5) Source(5, 1) + SourceIndex(4) -2 >Emitted(60, 13) Source(5, 2) + SourceIndex(4) +1->Emitted(62, 5) Source(5, 1) + SourceIndex(4) +2 >Emitted(62, 13) Source(5, 2) + SourceIndex(4) --- >>>}()); 1 > @@ -1011,10 +1021,10 @@ sourceFile:../../../second/second_part2.ts > console.log("something got done"); > } > } -1 >Emitted(61, 1) Source(5, 1) + SourceIndex(4) -2 >Emitted(61, 2) Source(5, 2) + SourceIndex(4) -3 >Emitted(61, 2) Source(1, 1) + SourceIndex(4) -4 >Emitted(61, 6) Source(5, 2) + SourceIndex(4) +1 >Emitted(63, 1) Source(5, 1) + SourceIndex(4) +2 >Emitted(63, 2) Source(5, 2) + SourceIndex(4) +3 >Emitted(63, 2) Source(1, 1) + SourceIndex(4) +4 >Emitted(63, 6) Source(5, 2) + SourceIndex(4) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -1038,14 +1048,14 @@ sourceFile:../../third_part1.ts 6 > C 7 > () 8 > ; -1->Emitted(62, 1) Source(1, 1) + SourceIndex(5) -2 >Emitted(62, 5) Source(1, 5) + SourceIndex(5) -3 >Emitted(62, 6) Source(1, 6) + SourceIndex(5) -4 >Emitted(62, 9) Source(1, 9) + SourceIndex(5) -5 >Emitted(62, 13) Source(1, 13) + SourceIndex(5) -6 >Emitted(62, 14) Source(1, 14) + SourceIndex(5) -7 >Emitted(62, 16) Source(1, 16) + SourceIndex(5) -8 >Emitted(62, 17) Source(1, 17) + SourceIndex(5) +1->Emitted(64, 1) Source(1, 1) + SourceIndex(5) +2 >Emitted(64, 5) Source(1, 5) + SourceIndex(5) +3 >Emitted(64, 6) Source(1, 6) + SourceIndex(5) +4 >Emitted(64, 9) Source(1, 9) + SourceIndex(5) +5 >Emitted(64, 13) Source(1, 13) + SourceIndex(5) +6 >Emitted(64, 14) Source(1, 14) + SourceIndex(5) +7 >Emitted(64, 16) Source(1, 16) + SourceIndex(5) +8 >Emitted(64, 17) Source(1, 17) + SourceIndex(5) --- >>>c.doSomething(); 1-> @@ -1062,12 +1072,12 @@ sourceFile:../../third_part1.ts 4 > doSomething 5 > () 6 > ; -1->Emitted(63, 1) Source(2, 1) + SourceIndex(5) -2 >Emitted(63, 2) Source(2, 2) + SourceIndex(5) -3 >Emitted(63, 3) Source(2, 3) + SourceIndex(5) -4 >Emitted(63, 14) Source(2, 14) + SourceIndex(5) -5 >Emitted(63, 16) Source(2, 16) + SourceIndex(5) -6 >Emitted(63, 17) Source(2, 17) + SourceIndex(5) +1->Emitted(65, 1) Source(2, 1) + SourceIndex(5) +2 >Emitted(65, 2) Source(2, 2) + SourceIndex(5) +3 >Emitted(65, 3) Source(2, 3) + SourceIndex(5) +4 >Emitted(65, 14) Source(2, 14) + SourceIndex(5) +5 >Emitted(65, 16) Source(2, 16) + SourceIndex(5) +6 >Emitted(65, 17) Source(2, 17) + SourceIndex(5) --- >>>function forthirdthird_part1Rest() { 1-> @@ -1078,9 +1088,9 @@ sourceFile:../../third_part1.ts > 2 >function 3 > forthirdthird_part1Rest -1->Emitted(64, 1) Source(3, 1) + SourceIndex(5) -2 >Emitted(64, 10) Source(3, 10) + SourceIndex(5) -3 >Emitted(64, 33) Source(3, 33) + SourceIndex(5) +1->Emitted(66, 1) Source(3, 1) + SourceIndex(5) +2 >Emitted(66, 10) Source(3, 10) + SourceIndex(5) +3 >Emitted(66, 33) Source(3, 33) + SourceIndex(5) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^ @@ -1100,14 +1110,14 @@ sourceFile:../../third_part1.ts 6 > , 7 > ...rest } = { a: 10, b: 30, yy: 30 } 8 > ; -1->Emitted(65, 5) Source(4, 1) + SourceIndex(5) -2 >Emitted(65, 9) Source(4, 7) + SourceIndex(5) -3 >Emitted(65, 38) Source(4, 48) + SourceIndex(5) -4 >Emitted(65, 40) Source(4, 9) + SourceIndex(5) -5 >Emitted(65, 48) Source(4, 10) + SourceIndex(5) -6 >Emitted(65, 50) Source(4, 12) + SourceIndex(5) -7 >Emitted(65, 74) Source(4, 48) + SourceIndex(5) -8 >Emitted(65, 75) Source(4, 49) + SourceIndex(5) +1->Emitted(67, 5) Source(4, 1) + SourceIndex(5) +2 >Emitted(67, 9) Source(4, 7) + SourceIndex(5) +3 >Emitted(67, 38) Source(4, 48) + SourceIndex(5) +4 >Emitted(67, 40) Source(4, 9) + SourceIndex(5) +5 >Emitted(67, 48) Source(4, 10) + SourceIndex(5) +6 >Emitted(67, 50) Source(4, 12) + SourceIndex(5) +7 >Emitted(67, 74) Source(4, 48) + SourceIndex(5) +8 >Emitted(67, 75) Source(4, 49) + SourceIndex(5) --- >>>} 1 > @@ -1116,8 +1126,8 @@ sourceFile:../../third_part1.ts 1 > > 2 >} -1 >Emitted(66, 1) Source(5, 1) + SourceIndex(5) -2 >Emitted(66, 2) Source(5, 2) + SourceIndex(5) +1 >Emitted(68, 1) Source(5, 1) + SourceIndex(5) +2 >Emitted(68, 2) Source(5, 2) + SourceIndex(5) --- >>>//# sourceMappingURL=third-output.js.map @@ -1132,51 +1142,51 @@ sourceFile:../../third_part1.ts "sections": [ { "pos": 0, - "end": 415, + "end": 492, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 417, - "end": 921, + "pos": 494, + "end": 998, "kind": "emitHelpers", "data": "typescript:read" }, { - "pos": 923, - "end": 1093, + "pos": 1000, + "end": 1170, "kind": "emitHelpers", "data": "typescript:spread" }, { - "pos": 1095, - "end": 1339, + "pos": 1172, + "end": 1416, "kind": "prepend", "data": "/src/first/bin/first-output.js", "texts": [ { - "pos": 1095, - "end": 1339, + "pos": 1172, + "end": 1416, "kind": "text" } ] }, { - "pos": 1339, - "end": 1840, + "pos": 1416, + "end": 1917, "kind": "prepend", "data": "/src/2/second-output.js", "texts": [ { - "pos": 1339, - "end": 1840, + "pos": 1416, + "end": 1917, "kind": "text" } ] }, { - "pos": 1840, - "end": 1993, + "pos": 1917, + "end": 2070, "kind": "text" } ], @@ -1229,18 +1239,20 @@ sourceFile:../../third_part1.ts ====================================================================== File:: /src/third/thirdjs/output/third-output.js ---------------------------------------------------------------------- -emitHelpers: (0-415):: typescript:rest +emitHelpers: (0-492):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; ---------------------------------------------------------------------- -emitHelpers: (417-921):: typescript:read +emitHelpers: (494-998):: typescript:read var __read = (this && this.__read) || function (o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; if (!m) return o; @@ -1258,15 +1270,15 @@ var __read = (this && this.__read) || function (o, n) { return ar; }; ---------------------------------------------------------------------- -emitHelpers: (923-1093):: typescript:spread +emitHelpers: (1000-1170):: typescript:spread var __spread = (this && this.__spread) || function () { for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); return ar; }; ---------------------------------------------------------------------- -prepend: (1095-1339):: /src/first/bin/first-output.js texts:: 1 +prepend: (1172-1416):: /src/first/bin/first-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (1095-1339) +text: (1172-1416) var s = "Hello, world"; console.log(s); function forfirstfirst_PART1Rest() { @@ -1279,9 +1291,9 @@ function f() { } ---------------------------------------------------------------------- -prepend: (1339-1840):: /src/2/second-output.js texts:: 1 +prepend: (1416-1917):: /src/2/second-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (1339-1840) +text: (1416-1917) var N; (function (N) { function f() { @@ -1306,7 +1318,7 @@ var C = (function () { }()); ---------------------------------------------------------------------- -text: (1840-1993) +text: (1917-2070) var c = new C(); c.doSomething(); function forthirdthird_part1Rest() { diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/emitHelpers-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/emitHelpers-in-all-projects.js index 08d4171a436..77e9d4bb912 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/emitHelpers-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/emitHelpers-in-all-projects.js @@ -701,8 +701,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; var s = "Hello, world"; @@ -738,7 +740,7 @@ function forthirdthird_part1Rest() { //# sourceMappingURL=third-output.js.map //// [/src/third/thirdjs/output/third-output.js.map] -{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../../first/first_PART1.ts","../../../first/first_part2.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts","../../third_part1.ts"],"names":[],"mappings":";;;;;;;;;AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB,KAAK,CAAC;ACXtC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC;ACED,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;AACD,SAAS,yBAAyB;IAClC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;ACbD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC;ACJD,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC;AAChB,SAAS,uBAAuB;IAChC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC"} +{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../../first/first_PART1.ts","../../../first/first_part2.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts","../../third_part1.ts"],"names":[],"mappings":";;;;;;;;;;;AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB,KAAK,CAAC;ACXtC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC;ACED,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;AACD,SAAS,yBAAyB;IAClC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;ACbD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC;ACJD,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC;AAChB,SAAS,uBAAuB;IAChC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC"} //// [/src/third/thirdjs/output/third-output.js.map.baseline.txt] =================================================================== @@ -756,8 +758,10 @@ sourceFile:../../../first/first_PART1.ts >>> for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") ->>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) ->>> t[p[i]] = s[p[i]]; +>>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> t[p[i]] = s[p[i]]; +>>> } >>> return t; >>>}; >>>var s = "Hello, world"; @@ -777,12 +781,12 @@ sourceFile:../../../first/first_PART1.ts 4 > = 5 > "Hello, world" 6 > ; -1 >Emitted(10, 1) Source(5, 1) + SourceIndex(0) -2 >Emitted(10, 5) Source(5, 7) + SourceIndex(0) -3 >Emitted(10, 6) Source(5, 8) + SourceIndex(0) -4 >Emitted(10, 9) Source(5, 11) + SourceIndex(0) -5 >Emitted(10, 23) Source(5, 25) + SourceIndex(0) -6 >Emitted(10, 24) Source(5, 26) + SourceIndex(0) +1 >Emitted(12, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(12, 5) Source(5, 7) + SourceIndex(0) +3 >Emitted(12, 6) Source(5, 8) + SourceIndex(0) +4 >Emitted(12, 9) Source(5, 11) + SourceIndex(0) +5 >Emitted(12, 23) Source(5, 25) + SourceIndex(0) +6 >Emitted(12, 24) Source(5, 26) + SourceIndex(0) --- >>>console.log(s); 1 > @@ -808,14 +812,14 @@ sourceFile:../../../first/first_PART1.ts 6 > s 7 > ) 8 > ; -1 >Emitted(11, 1) Source(11, 1) + SourceIndex(0) -2 >Emitted(11, 8) Source(11, 8) + SourceIndex(0) -3 >Emitted(11, 9) Source(11, 9) + SourceIndex(0) -4 >Emitted(11, 12) Source(11, 12) + SourceIndex(0) -5 >Emitted(11, 13) Source(11, 13) + SourceIndex(0) -6 >Emitted(11, 14) Source(11, 14) + SourceIndex(0) -7 >Emitted(11, 15) Source(11, 15) + SourceIndex(0) -8 >Emitted(11, 16) Source(11, 16) + SourceIndex(0) +1 >Emitted(13, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(13, 8) Source(11, 8) + SourceIndex(0) +3 >Emitted(13, 9) Source(11, 9) + SourceIndex(0) +4 >Emitted(13, 12) Source(11, 12) + SourceIndex(0) +5 >Emitted(13, 13) Source(11, 13) + SourceIndex(0) +6 >Emitted(13, 14) Source(11, 14) + SourceIndex(0) +7 >Emitted(13, 15) Source(11, 15) + SourceIndex(0) +8 >Emitted(13, 16) Source(11, 16) + SourceIndex(0) --- >>>function forfirstfirst_PART1Rest() { } 1-> @@ -829,11 +833,11 @@ sourceFile:../../../first/first_PART1.ts 3 > forfirstfirst_PART1Rest 4 > () { 5 > } -1->Emitted(12, 1) Source(12, 1) + SourceIndex(0) -2 >Emitted(12, 10) Source(12, 10) + SourceIndex(0) -3 >Emitted(12, 33) Source(12, 33) + SourceIndex(0) -4 >Emitted(12, 38) Source(12, 38) + SourceIndex(0) -5 >Emitted(12, 39) Source(12, 39) + SourceIndex(0) +1->Emitted(14, 1) Source(12, 1) + SourceIndex(0) +2 >Emitted(14, 10) Source(12, 10) + SourceIndex(0) +3 >Emitted(14, 33) Source(12, 33) + SourceIndex(0) +4 >Emitted(14, 38) Source(12, 38) + SourceIndex(0) +5 >Emitted(14, 39) Source(12, 39) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -858,15 +862,15 @@ sourceFile:../../../first/first_part2.ts 7 > () 8 > ) 9 > ; -1 >Emitted(13, 1) Source(1, 1) + SourceIndex(1) -2 >Emitted(13, 8) Source(1, 8) + SourceIndex(1) -3 >Emitted(13, 9) Source(1, 9) + SourceIndex(1) -4 >Emitted(13, 12) Source(1, 12) + SourceIndex(1) -5 >Emitted(13, 13) Source(1, 13) + SourceIndex(1) -6 >Emitted(13, 14) Source(1, 14) + SourceIndex(1) -7 >Emitted(13, 16) Source(1, 16) + SourceIndex(1) -8 >Emitted(13, 17) Source(1, 17) + SourceIndex(1) -9 >Emitted(13, 18) Source(1, 18) + SourceIndex(1) +1 >Emitted(15, 1) Source(1, 1) + SourceIndex(1) +2 >Emitted(15, 8) Source(1, 8) + SourceIndex(1) +3 >Emitted(15, 9) Source(1, 9) + SourceIndex(1) +4 >Emitted(15, 12) Source(1, 12) + SourceIndex(1) +5 >Emitted(15, 13) Source(1, 13) + SourceIndex(1) +6 >Emitted(15, 14) Source(1, 14) + SourceIndex(1) +7 >Emitted(15, 16) Source(1, 16) + SourceIndex(1) +8 >Emitted(15, 17) Source(1, 17) + SourceIndex(1) +9 >Emitted(15, 18) Source(1, 18) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -880,9 +884,9 @@ sourceFile:../../../first/first_part3.ts 1 > 2 >function 3 > f -1 >Emitted(14, 1) Source(1, 1) + SourceIndex(2) -2 >Emitted(14, 10) Source(1, 10) + SourceIndex(2) -3 >Emitted(14, 11) Source(1, 11) + SourceIndex(2) +1 >Emitted(16, 1) Source(1, 1) + SourceIndex(2) +2 >Emitted(16, 10) Source(1, 10) + SourceIndex(2) +3 >Emitted(16, 11) Source(1, 11) + SourceIndex(2) --- >>> return "JS does hoists"; 1->^^^^ @@ -894,10 +898,10 @@ sourceFile:../../../first/first_part3.ts 2 > return 3 > "JS does hoists" 4 > ; -1->Emitted(15, 5) Source(2, 5) + SourceIndex(2) -2 >Emitted(15, 12) Source(2, 12) + SourceIndex(2) -3 >Emitted(15, 28) Source(2, 28) + SourceIndex(2) -4 >Emitted(15, 29) Source(2, 29) + SourceIndex(2) +1->Emitted(17, 5) Source(2, 5) + SourceIndex(2) +2 >Emitted(17, 12) Source(2, 12) + SourceIndex(2) +3 >Emitted(17, 28) Source(2, 28) + SourceIndex(2) +4 >Emitted(17, 29) Source(2, 29) + SourceIndex(2) --- >>>} 1 > @@ -906,8 +910,8 @@ sourceFile:../../../first/first_part3.ts 1 > > 2 >} -1 >Emitted(16, 1) Source(3, 1) + SourceIndex(2) -2 >Emitted(16, 2) Source(3, 2) + SourceIndex(2) +1 >Emitted(18, 1) Source(3, 1) + SourceIndex(2) +2 >Emitted(18, 2) Source(3, 2) + SourceIndex(2) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -933,10 +937,10 @@ sourceFile:../../../second/second_part1.ts > > f(); > } -1->Emitted(17, 1) Source(5, 1) + SourceIndex(3) -2 >Emitted(17, 5) Source(5, 11) + SourceIndex(3) -3 >Emitted(17, 6) Source(5, 12) + SourceIndex(3) -4 >Emitted(17, 7) Source(11, 2) + SourceIndex(3) +1->Emitted(19, 1) Source(5, 1) + SourceIndex(3) +2 >Emitted(19, 5) Source(5, 11) + SourceIndex(3) +3 >Emitted(19, 6) Source(5, 12) + SourceIndex(3) +4 >Emitted(19, 7) Source(11, 2) + SourceIndex(3) --- >>>(function (N) { 1-> @@ -946,9 +950,9 @@ sourceFile:../../../second/second_part1.ts 1-> 2 >namespace 3 > N -1->Emitted(18, 1) Source(5, 1) + SourceIndex(3) -2 >Emitted(18, 12) Source(5, 11) + SourceIndex(3) -3 >Emitted(18, 13) Source(5, 12) + SourceIndex(3) +1->Emitted(20, 1) Source(5, 1) + SourceIndex(3) +2 >Emitted(20, 12) Source(5, 11) + SourceIndex(3) +3 >Emitted(20, 13) Source(5, 12) + SourceIndex(3) --- >>> function f() { 1->^^^^ @@ -959,9 +963,9 @@ sourceFile:../../../second/second_part1.ts > 2 > function 3 > f -1->Emitted(19, 5) Source(6, 5) + SourceIndex(3) -2 >Emitted(19, 14) Source(6, 14) + SourceIndex(3) -3 >Emitted(19, 15) Source(6, 15) + SourceIndex(3) +1->Emitted(21, 5) Source(6, 5) + SourceIndex(3) +2 >Emitted(21, 14) Source(6, 14) + SourceIndex(3) +3 >Emitted(21, 15) Source(6, 15) + SourceIndex(3) --- >>> console.log('testing'); 1->^^^^^^^^ @@ -981,14 +985,14 @@ sourceFile:../../../second/second_part1.ts 6 > 'testing' 7 > ) 8 > ; -1->Emitted(20, 9) Source(7, 9) + SourceIndex(3) -2 >Emitted(20, 16) Source(7, 16) + SourceIndex(3) -3 >Emitted(20, 17) Source(7, 17) + SourceIndex(3) -4 >Emitted(20, 20) Source(7, 20) + SourceIndex(3) -5 >Emitted(20, 21) Source(7, 21) + SourceIndex(3) -6 >Emitted(20, 30) Source(7, 30) + SourceIndex(3) -7 >Emitted(20, 31) Source(7, 31) + SourceIndex(3) -8 >Emitted(20, 32) Source(7, 32) + SourceIndex(3) +1->Emitted(22, 9) Source(7, 9) + SourceIndex(3) +2 >Emitted(22, 16) Source(7, 16) + SourceIndex(3) +3 >Emitted(22, 17) Source(7, 17) + SourceIndex(3) +4 >Emitted(22, 20) Source(7, 20) + SourceIndex(3) +5 >Emitted(22, 21) Source(7, 21) + SourceIndex(3) +6 >Emitted(22, 30) Source(7, 30) + SourceIndex(3) +7 >Emitted(22, 31) Source(7, 31) + SourceIndex(3) +8 >Emitted(22, 32) Source(7, 32) + SourceIndex(3) --- >>> } 1 >^^^^ @@ -997,8 +1001,8 @@ sourceFile:../../../second/second_part1.ts 1 > > 2 > } -1 >Emitted(21, 5) Source(8, 5) + SourceIndex(3) -2 >Emitted(21, 6) Source(8, 6) + SourceIndex(3) +1 >Emitted(23, 5) Source(8, 5) + SourceIndex(3) +2 >Emitted(23, 6) Source(8, 6) + SourceIndex(3) --- >>> f(); 1->^^^^ @@ -1012,10 +1016,10 @@ sourceFile:../../../second/second_part1.ts 2 > f 3 > () 4 > ; -1->Emitted(22, 5) Source(10, 5) + SourceIndex(3) -2 >Emitted(22, 6) Source(10, 6) + SourceIndex(3) -3 >Emitted(22, 8) Source(10, 8) + SourceIndex(3) -4 >Emitted(22, 9) Source(10, 9) + SourceIndex(3) +1->Emitted(24, 5) Source(10, 5) + SourceIndex(3) +2 >Emitted(24, 6) Source(10, 6) + SourceIndex(3) +3 >Emitted(24, 8) Source(10, 8) + SourceIndex(3) +4 >Emitted(24, 9) Source(10, 9) + SourceIndex(3) --- >>>})(N || (N = {})); 1-> @@ -1040,13 +1044,13 @@ sourceFile:../../../second/second_part1.ts > > f(); > } -1->Emitted(23, 1) Source(11, 1) + SourceIndex(3) -2 >Emitted(23, 2) Source(11, 2) + SourceIndex(3) -3 >Emitted(23, 4) Source(5, 11) + SourceIndex(3) -4 >Emitted(23, 5) Source(5, 12) + SourceIndex(3) -5 >Emitted(23, 10) Source(5, 11) + SourceIndex(3) -6 >Emitted(23, 11) Source(5, 12) + SourceIndex(3) -7 >Emitted(23, 19) Source(11, 2) + SourceIndex(3) +1->Emitted(25, 1) Source(11, 1) + SourceIndex(3) +2 >Emitted(25, 2) Source(11, 2) + SourceIndex(3) +3 >Emitted(25, 4) Source(5, 11) + SourceIndex(3) +4 >Emitted(25, 5) Source(5, 12) + SourceIndex(3) +5 >Emitted(25, 10) Source(5, 11) + SourceIndex(3) +6 >Emitted(25, 11) Source(5, 12) + SourceIndex(3) +7 >Emitted(25, 19) Source(11, 2) + SourceIndex(3) --- >>>function forsecondsecond_part1Rest() { 1-> @@ -1057,9 +1061,9 @@ sourceFile:../../../second/second_part1.ts > 2 >function 3 > forsecondsecond_part1Rest -1->Emitted(24, 1) Source(12, 1) + SourceIndex(3) -2 >Emitted(24, 10) Source(12, 10) + SourceIndex(3) -3 >Emitted(24, 35) Source(12, 35) + SourceIndex(3) +1->Emitted(26, 1) Source(12, 1) + SourceIndex(3) +2 >Emitted(26, 10) Source(12, 10) + SourceIndex(3) +3 >Emitted(26, 35) Source(12, 35) + SourceIndex(3) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^ @@ -1079,14 +1083,14 @@ sourceFile:../../../second/second_part1.ts 6 > , 7 > ...rest } = { a: 10, b: 30, yy: 30 } 8 > ; -1->Emitted(25, 5) Source(13, 1) + SourceIndex(3) -2 >Emitted(25, 9) Source(13, 7) + SourceIndex(3) -3 >Emitted(25, 38) Source(13, 48) + SourceIndex(3) -4 >Emitted(25, 40) Source(13, 9) + SourceIndex(3) -5 >Emitted(25, 48) Source(13, 10) + SourceIndex(3) -6 >Emitted(25, 50) Source(13, 12) + SourceIndex(3) -7 >Emitted(25, 74) Source(13, 48) + SourceIndex(3) -8 >Emitted(25, 75) Source(13, 49) + SourceIndex(3) +1->Emitted(27, 5) Source(13, 1) + SourceIndex(3) +2 >Emitted(27, 9) Source(13, 7) + SourceIndex(3) +3 >Emitted(27, 38) Source(13, 48) + SourceIndex(3) +4 >Emitted(27, 40) Source(13, 9) + SourceIndex(3) +5 >Emitted(27, 48) Source(13, 10) + SourceIndex(3) +6 >Emitted(27, 50) Source(13, 12) + SourceIndex(3) +7 >Emitted(27, 74) Source(13, 48) + SourceIndex(3) +8 >Emitted(27, 75) Source(13, 49) + SourceIndex(3) --- >>>} 1 > @@ -1095,8 +1099,8 @@ sourceFile:../../../second/second_part1.ts 1 > > 2 >} -1 >Emitted(26, 1) Source(14, 1) + SourceIndex(3) -2 >Emitted(26, 2) Source(14, 2) + SourceIndex(3) +1 >Emitted(28, 1) Source(14, 1) + SourceIndex(3) +2 >Emitted(28, 2) Source(14, 2) + SourceIndex(3) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -1106,13 +1110,13 @@ sourceFile:../../../second/second_part2.ts 1-> 2 >^^^^^^^^^^^^^^^^^^^-> 1-> -1->Emitted(27, 1) Source(1, 1) + SourceIndex(4) +1->Emitted(29, 1) Source(1, 1) + SourceIndex(4) --- >>> function C() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(28, 5) Source(1, 1) + SourceIndex(4) +1->Emitted(30, 5) Source(1, 1) + SourceIndex(4) --- >>> } 1->^^^^ @@ -1124,8 +1128,8 @@ sourceFile:../../../second/second_part2.ts > } > 2 > } -1->Emitted(29, 5) Source(5, 1) + SourceIndex(4) -2 >Emitted(29, 6) Source(5, 2) + SourceIndex(4) +1->Emitted(31, 5) Source(5, 1) + SourceIndex(4) +2 >Emitted(31, 6) Source(5, 2) + SourceIndex(4) --- >>> C.prototype.doSomething = function () { 1->^^^^ @@ -1135,9 +1139,9 @@ sourceFile:../../../second/second_part2.ts 1-> 2 > doSomething 3 > -1->Emitted(30, 5) Source(2, 5) + SourceIndex(4) -2 >Emitted(30, 28) Source(2, 16) + SourceIndex(4) -3 >Emitted(30, 31) Source(2, 5) + SourceIndex(4) +1->Emitted(32, 5) Source(2, 5) + SourceIndex(4) +2 >Emitted(32, 28) Source(2, 16) + SourceIndex(4) +3 >Emitted(32, 31) Source(2, 5) + SourceIndex(4) --- >>> console.log("something got done"); 1->^^^^^^^^ @@ -1157,14 +1161,14 @@ sourceFile:../../../second/second_part2.ts 6 > "something got done" 7 > ) 8 > ; -1->Emitted(31, 9) Source(3, 9) + SourceIndex(4) -2 >Emitted(31, 16) Source(3, 16) + SourceIndex(4) -3 >Emitted(31, 17) Source(3, 17) + SourceIndex(4) -4 >Emitted(31, 20) Source(3, 20) + SourceIndex(4) -5 >Emitted(31, 21) Source(3, 21) + SourceIndex(4) -6 >Emitted(31, 41) Source(3, 41) + SourceIndex(4) -7 >Emitted(31, 42) Source(3, 42) + SourceIndex(4) -8 >Emitted(31, 43) Source(3, 43) + SourceIndex(4) +1->Emitted(33, 9) Source(3, 9) + SourceIndex(4) +2 >Emitted(33, 16) Source(3, 16) + SourceIndex(4) +3 >Emitted(33, 17) Source(3, 17) + SourceIndex(4) +4 >Emitted(33, 20) Source(3, 20) + SourceIndex(4) +5 >Emitted(33, 21) Source(3, 21) + SourceIndex(4) +6 >Emitted(33, 41) Source(3, 41) + SourceIndex(4) +7 >Emitted(33, 42) Source(3, 42) + SourceIndex(4) +8 >Emitted(33, 43) Source(3, 43) + SourceIndex(4) --- >>> }; 1 >^^^^ @@ -1173,8 +1177,8 @@ sourceFile:../../../second/second_part2.ts 1 > > 2 > } -1 >Emitted(32, 5) Source(4, 5) + SourceIndex(4) -2 >Emitted(32, 6) Source(4, 6) + SourceIndex(4) +1 >Emitted(34, 5) Source(4, 5) + SourceIndex(4) +2 >Emitted(34, 6) Source(4, 6) + SourceIndex(4) --- >>> return C; 1->^^^^ @@ -1182,8 +1186,8 @@ sourceFile:../../../second/second_part2.ts 1-> > 2 > } -1->Emitted(33, 5) Source(5, 1) + SourceIndex(4) -2 >Emitted(33, 13) Source(5, 2) + SourceIndex(4) +1->Emitted(35, 5) Source(5, 1) + SourceIndex(4) +2 >Emitted(35, 13) Source(5, 2) + SourceIndex(4) --- >>>}()); 1 > @@ -1199,10 +1203,10 @@ sourceFile:../../../second/second_part2.ts > console.log("something got done"); > } > } -1 >Emitted(34, 1) Source(5, 1) + SourceIndex(4) -2 >Emitted(34, 2) Source(5, 2) + SourceIndex(4) -3 >Emitted(34, 2) Source(1, 1) + SourceIndex(4) -4 >Emitted(34, 6) Source(5, 2) + SourceIndex(4) +1 >Emitted(36, 1) Source(5, 1) + SourceIndex(4) +2 >Emitted(36, 2) Source(5, 2) + SourceIndex(4) +3 >Emitted(36, 2) Source(1, 1) + SourceIndex(4) +4 >Emitted(36, 6) Source(5, 2) + SourceIndex(4) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -1226,14 +1230,14 @@ sourceFile:../../third_part1.ts 6 > C 7 > () 8 > ; -1->Emitted(35, 1) Source(1, 1) + SourceIndex(5) -2 >Emitted(35, 5) Source(1, 5) + SourceIndex(5) -3 >Emitted(35, 6) Source(1, 6) + SourceIndex(5) -4 >Emitted(35, 9) Source(1, 9) + SourceIndex(5) -5 >Emitted(35, 13) Source(1, 13) + SourceIndex(5) -6 >Emitted(35, 14) Source(1, 14) + SourceIndex(5) -7 >Emitted(35, 16) Source(1, 16) + SourceIndex(5) -8 >Emitted(35, 17) Source(1, 17) + SourceIndex(5) +1->Emitted(37, 1) Source(1, 1) + SourceIndex(5) +2 >Emitted(37, 5) Source(1, 5) + SourceIndex(5) +3 >Emitted(37, 6) Source(1, 6) + SourceIndex(5) +4 >Emitted(37, 9) Source(1, 9) + SourceIndex(5) +5 >Emitted(37, 13) Source(1, 13) + SourceIndex(5) +6 >Emitted(37, 14) Source(1, 14) + SourceIndex(5) +7 >Emitted(37, 16) Source(1, 16) + SourceIndex(5) +8 >Emitted(37, 17) Source(1, 17) + SourceIndex(5) --- >>>c.doSomething(); 1-> @@ -1250,12 +1254,12 @@ sourceFile:../../third_part1.ts 4 > doSomething 5 > () 6 > ; -1->Emitted(36, 1) Source(2, 1) + SourceIndex(5) -2 >Emitted(36, 2) Source(2, 2) + SourceIndex(5) -3 >Emitted(36, 3) Source(2, 3) + SourceIndex(5) -4 >Emitted(36, 14) Source(2, 14) + SourceIndex(5) -5 >Emitted(36, 16) Source(2, 16) + SourceIndex(5) -6 >Emitted(36, 17) Source(2, 17) + SourceIndex(5) +1->Emitted(38, 1) Source(2, 1) + SourceIndex(5) +2 >Emitted(38, 2) Source(2, 2) + SourceIndex(5) +3 >Emitted(38, 3) Source(2, 3) + SourceIndex(5) +4 >Emitted(38, 14) Source(2, 14) + SourceIndex(5) +5 >Emitted(38, 16) Source(2, 16) + SourceIndex(5) +6 >Emitted(38, 17) Source(2, 17) + SourceIndex(5) --- >>>function forthirdthird_part1Rest() { 1-> @@ -1266,9 +1270,9 @@ sourceFile:../../third_part1.ts > 2 >function 3 > forthirdthird_part1Rest -1->Emitted(37, 1) Source(3, 1) + SourceIndex(5) -2 >Emitted(37, 10) Source(3, 10) + SourceIndex(5) -3 >Emitted(37, 33) Source(3, 33) + SourceIndex(5) +1->Emitted(39, 1) Source(3, 1) + SourceIndex(5) +2 >Emitted(39, 10) Source(3, 10) + SourceIndex(5) +3 >Emitted(39, 33) Source(3, 33) + SourceIndex(5) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^ @@ -1288,14 +1292,14 @@ sourceFile:../../third_part1.ts 6 > , 7 > ...rest } = { a: 10, b: 30, yy: 30 } 8 > ; -1->Emitted(38, 5) Source(4, 1) + SourceIndex(5) -2 >Emitted(38, 9) Source(4, 7) + SourceIndex(5) -3 >Emitted(38, 38) Source(4, 48) + SourceIndex(5) -4 >Emitted(38, 40) Source(4, 9) + SourceIndex(5) -5 >Emitted(38, 48) Source(4, 10) + SourceIndex(5) -6 >Emitted(38, 50) Source(4, 12) + SourceIndex(5) -7 >Emitted(38, 74) Source(4, 48) + SourceIndex(5) -8 >Emitted(38, 75) Source(4, 49) + SourceIndex(5) +1->Emitted(40, 5) Source(4, 1) + SourceIndex(5) +2 >Emitted(40, 9) Source(4, 7) + SourceIndex(5) +3 >Emitted(40, 38) Source(4, 48) + SourceIndex(5) +4 >Emitted(40, 40) Source(4, 9) + SourceIndex(5) +5 >Emitted(40, 48) Source(4, 10) + SourceIndex(5) +6 >Emitted(40, 50) Source(4, 12) + SourceIndex(5) +7 >Emitted(40, 74) Source(4, 48) + SourceIndex(5) +8 >Emitted(40, 75) Source(4, 49) + SourceIndex(5) --- >>>} 1 > @@ -1304,8 +1308,8 @@ sourceFile:../../third_part1.ts 1 > > 2 >} -1 >Emitted(39, 1) Source(5, 1) + SourceIndex(5) -2 >Emitted(39, 2) Source(5, 2) + SourceIndex(5) +1 >Emitted(41, 1) Source(5, 1) + SourceIndex(5) +2 >Emitted(41, 2) Source(5, 2) + SourceIndex(5) --- >>>//# sourceMappingURL=third-output.js.map @@ -1320,39 +1324,39 @@ sourceFile:../../third_part1.ts "sections": [ { "pos": 0, - "end": 415, + "end": 492, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 417, - "end": 567, + "pos": 494, + "end": 644, "kind": "prepend", "data": "/src/first/bin/first-output.js", "texts": [ { - "pos": 417, - "end": 567, + "pos": 494, + "end": 644, "kind": "text" } ] }, { - "pos": 567, - "end": 971, + "pos": 644, + "end": 1048, "kind": "prepend", "data": "/src/2/second-output.js", "texts": [ { - "pos": 567, - "end": 971, + "pos": 644, + "end": 1048, "kind": "text" } ] }, { - "pos": 971, - "end": 1124, + "pos": 1048, + "end": 1201, "kind": "text" } ], @@ -1405,20 +1409,22 @@ sourceFile:../../third_part1.ts ====================================================================== File:: /src/third/thirdjs/output/third-output.js ---------------------------------------------------------------------- -emitHelpers: (0-415):: typescript:rest +emitHelpers: (0-492):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; ---------------------------------------------------------------------- -prepend: (417-567):: /src/first/bin/first-output.js texts:: 1 +prepend: (494-644):: /src/first/bin/first-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (417-567) +text: (494-644) var s = "Hello, world"; console.log(s); function forfirstfirst_PART1Rest() { } @@ -1428,9 +1434,9 @@ function f() { } ---------------------------------------------------------------------- -prepend: (567-971):: /src/2/second-output.js texts:: 1 +prepend: (644-1048):: /src/2/second-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (567-971) +text: (644-1048) var N; (function (N) { function f() { @@ -1451,7 +1457,7 @@ var C = (function () { }()); ---------------------------------------------------------------------- -text: (971-1124) +text: (1048-1201) var c = new C(); c.doSomething(); function forthirdthird_part1Rest() { diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/emitHelpers-in-only-one-dependency-project.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/emitHelpers-in-only-one-dependency-project.js index 3a7a68f2dfc..33927ceed5d 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/emitHelpers-in-only-one-dependency-project.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/emitHelpers-in-only-one-dependency-project.js @@ -156,8 +156,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; var s = "Hello, world"; @@ -172,7 +174,7 @@ function f() { //# sourceMappingURL=first-output.js.map //// [/src/first/bin/first-output.js.map] -{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":";;;;;;;;;AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB;IAChC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;ACbD,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC"} +{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":";;;;;;;;;;;AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB;IAChC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;ACbD,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC"} //// [/src/first/bin/first-output.js.map.baseline.txt] =================================================================== @@ -190,8 +192,10 @@ sourceFile:../first_PART1.ts >>> for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") ->>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) ->>> t[p[i]] = s[p[i]]; +>>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> t[p[i]] = s[p[i]]; +>>> } >>> return t; >>>}; >>>var s = "Hello, world"; @@ -211,12 +215,12 @@ sourceFile:../first_PART1.ts 4 > = 5 > "Hello, world" 6 > ; -1 >Emitted(10, 1) Source(5, 1) + SourceIndex(0) -2 >Emitted(10, 5) Source(5, 7) + SourceIndex(0) -3 >Emitted(10, 6) Source(5, 8) + SourceIndex(0) -4 >Emitted(10, 9) Source(5, 11) + SourceIndex(0) -5 >Emitted(10, 23) Source(5, 25) + SourceIndex(0) -6 >Emitted(10, 24) Source(5, 26) + SourceIndex(0) +1 >Emitted(12, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(12, 5) Source(5, 7) + SourceIndex(0) +3 >Emitted(12, 6) Source(5, 8) + SourceIndex(0) +4 >Emitted(12, 9) Source(5, 11) + SourceIndex(0) +5 >Emitted(12, 23) Source(5, 25) + SourceIndex(0) +6 >Emitted(12, 24) Source(5, 26) + SourceIndex(0) --- >>>console.log(s); 1 > @@ -242,14 +246,14 @@ sourceFile:../first_PART1.ts 6 > s 7 > ) 8 > ; -1 >Emitted(11, 1) Source(11, 1) + SourceIndex(0) -2 >Emitted(11, 8) Source(11, 8) + SourceIndex(0) -3 >Emitted(11, 9) Source(11, 9) + SourceIndex(0) -4 >Emitted(11, 12) Source(11, 12) + SourceIndex(0) -5 >Emitted(11, 13) Source(11, 13) + SourceIndex(0) -6 >Emitted(11, 14) Source(11, 14) + SourceIndex(0) -7 >Emitted(11, 15) Source(11, 15) + SourceIndex(0) -8 >Emitted(11, 16) Source(11, 16) + SourceIndex(0) +1 >Emitted(13, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(13, 8) Source(11, 8) + SourceIndex(0) +3 >Emitted(13, 9) Source(11, 9) + SourceIndex(0) +4 >Emitted(13, 12) Source(11, 12) + SourceIndex(0) +5 >Emitted(13, 13) Source(11, 13) + SourceIndex(0) +6 >Emitted(13, 14) Source(11, 14) + SourceIndex(0) +7 >Emitted(13, 15) Source(11, 15) + SourceIndex(0) +8 >Emitted(13, 16) Source(11, 16) + SourceIndex(0) --- >>>function forfirstfirst_PART1Rest() { 1-> @@ -260,9 +264,9 @@ sourceFile:../first_PART1.ts > 2 >function 3 > forfirstfirst_PART1Rest -1->Emitted(12, 1) Source(12, 1) + SourceIndex(0) -2 >Emitted(12, 10) Source(12, 10) + SourceIndex(0) -3 >Emitted(12, 33) Source(12, 33) + SourceIndex(0) +1->Emitted(14, 1) Source(12, 1) + SourceIndex(0) +2 >Emitted(14, 10) Source(12, 10) + SourceIndex(0) +3 >Emitted(14, 33) Source(12, 33) + SourceIndex(0) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^ @@ -282,14 +286,14 @@ sourceFile:../first_PART1.ts 6 > , 7 > ...rest } = { a: 10, b: 30, yy: 30 } 8 > ; -1->Emitted(13, 5) Source(13, 1) + SourceIndex(0) -2 >Emitted(13, 9) Source(13, 7) + SourceIndex(0) -3 >Emitted(13, 38) Source(13, 48) + SourceIndex(0) -4 >Emitted(13, 40) Source(13, 9) + SourceIndex(0) -5 >Emitted(13, 48) Source(13, 10) + SourceIndex(0) -6 >Emitted(13, 50) Source(13, 12) + SourceIndex(0) -7 >Emitted(13, 74) Source(13, 48) + SourceIndex(0) -8 >Emitted(13, 75) Source(13, 49) + SourceIndex(0) +1->Emitted(15, 5) Source(13, 1) + SourceIndex(0) +2 >Emitted(15, 9) Source(13, 7) + SourceIndex(0) +3 >Emitted(15, 38) Source(13, 48) + SourceIndex(0) +4 >Emitted(15, 40) Source(13, 9) + SourceIndex(0) +5 >Emitted(15, 48) Source(13, 10) + SourceIndex(0) +6 >Emitted(15, 50) Source(13, 12) + SourceIndex(0) +7 >Emitted(15, 74) Source(13, 48) + SourceIndex(0) +8 >Emitted(15, 75) Source(13, 49) + SourceIndex(0) --- >>>} 1 > @@ -298,8 +302,8 @@ sourceFile:../first_PART1.ts 1 > > 2 >} -1 >Emitted(14, 1) Source(14, 1) + SourceIndex(0) -2 >Emitted(14, 2) Source(14, 2) + SourceIndex(0) +1 >Emitted(16, 1) Source(14, 1) + SourceIndex(0) +2 >Emitted(16, 2) Source(14, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/src/first/bin/first-output.js @@ -324,15 +328,15 @@ sourceFile:../first_part2.ts 7 > () 8 > ) 9 > ; -1->Emitted(15, 1) Source(1, 1) + SourceIndex(1) -2 >Emitted(15, 8) Source(1, 8) + SourceIndex(1) -3 >Emitted(15, 9) Source(1, 9) + SourceIndex(1) -4 >Emitted(15, 12) Source(1, 12) + SourceIndex(1) -5 >Emitted(15, 13) Source(1, 13) + SourceIndex(1) -6 >Emitted(15, 14) Source(1, 14) + SourceIndex(1) -7 >Emitted(15, 16) Source(1, 16) + SourceIndex(1) -8 >Emitted(15, 17) Source(1, 17) + SourceIndex(1) -9 >Emitted(15, 18) Source(1, 18) + SourceIndex(1) +1->Emitted(17, 1) Source(1, 1) + SourceIndex(1) +2 >Emitted(17, 8) Source(1, 8) + SourceIndex(1) +3 >Emitted(17, 9) Source(1, 9) + SourceIndex(1) +4 >Emitted(17, 12) Source(1, 12) + SourceIndex(1) +5 >Emitted(17, 13) Source(1, 13) + SourceIndex(1) +6 >Emitted(17, 14) Source(1, 14) + SourceIndex(1) +7 >Emitted(17, 16) Source(1, 16) + SourceIndex(1) +8 >Emitted(17, 17) Source(1, 17) + SourceIndex(1) +9 >Emitted(17, 18) Source(1, 18) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:/src/first/bin/first-output.js @@ -346,9 +350,9 @@ sourceFile:../first_part3.ts 1 > 2 >function 3 > f -1 >Emitted(16, 1) Source(1, 1) + SourceIndex(2) -2 >Emitted(16, 10) Source(1, 10) + SourceIndex(2) -3 >Emitted(16, 11) Source(1, 11) + SourceIndex(2) +1 >Emitted(18, 1) Source(1, 1) + SourceIndex(2) +2 >Emitted(18, 10) Source(1, 10) + SourceIndex(2) +3 >Emitted(18, 11) Source(1, 11) + SourceIndex(2) --- >>> return "JS does hoists"; 1->^^^^ @@ -360,10 +364,10 @@ sourceFile:../first_part3.ts 2 > return 3 > "JS does hoists" 4 > ; -1->Emitted(17, 5) Source(2, 5) + SourceIndex(2) -2 >Emitted(17, 12) Source(2, 12) + SourceIndex(2) -3 >Emitted(17, 28) Source(2, 28) + SourceIndex(2) -4 >Emitted(17, 29) Source(2, 29) + SourceIndex(2) +1->Emitted(19, 5) Source(2, 5) + SourceIndex(2) +2 >Emitted(19, 12) Source(2, 12) + SourceIndex(2) +3 >Emitted(19, 28) Source(2, 28) + SourceIndex(2) +4 >Emitted(19, 29) Source(2, 29) + SourceIndex(2) --- >>>} 1 > @@ -372,8 +376,8 @@ sourceFile:../first_part3.ts 1 > > 2 >} -1 >Emitted(18, 1) Source(3, 1) + SourceIndex(2) -2 >Emitted(18, 2) Source(3, 2) + SourceIndex(2) +1 >Emitted(20, 1) Source(3, 1) + SourceIndex(2) +2 >Emitted(20, 2) Source(3, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=first-output.js.map @@ -390,13 +394,13 @@ sourceFile:../first_part3.ts "sections": [ { "pos": 0, - "end": 415, + "end": 492, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 417, - "end": 644, + "pos": 494, + "end": 721, "kind": "text" } ], @@ -423,18 +427,20 @@ sourceFile:../first_part3.ts ====================================================================== File:: /src/first/bin/first-output.js ---------------------------------------------------------------------- -emitHelpers: (0-415):: typescript:rest +emitHelpers: (0-492):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; ---------------------------------------------------------------------- -text: (417-644) +text: (494-721) var s = "Hello, world"; console.log(s); function forfirstfirst_PART1Rest() { @@ -765,8 +771,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; var s = "Hello, world"; @@ -801,7 +809,7 @@ c.doSomething(); //# sourceMappingURL=third-output.js.map //// [/src/third/thirdjs/output/third-output.js.map] -{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../../first/first_PART1.ts","../../../first/first_part2.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts","../../third_part1.ts"],"names":[],"mappings":";;;;;;;;;AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB;IAChC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;ACbD,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC;ACED,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;AACD,SAAS,yBAAyB;IAClC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;ACbD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC;ACJD,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC"} +{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../../first/first_PART1.ts","../../../first/first_part2.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts","../../third_part1.ts"],"names":[],"mappings":";;;;;;;;;;;AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB;IAChC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;ACbD,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC;ACED,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;AACD,SAAS,yBAAyB;IAClC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;ACbD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC;ACJD,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC"} //// [/src/third/thirdjs/output/third-output.js.map.baseline.txt] =================================================================== @@ -819,8 +827,10 @@ sourceFile:../../../first/first_PART1.ts >>> for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") ->>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) ->>> t[p[i]] = s[p[i]]; +>>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> t[p[i]] = s[p[i]]; +>>> } >>> return t; >>>}; >>>var s = "Hello, world"; @@ -840,12 +850,12 @@ sourceFile:../../../first/first_PART1.ts 4 > = 5 > "Hello, world" 6 > ; -1 >Emitted(10, 1) Source(5, 1) + SourceIndex(0) -2 >Emitted(10, 5) Source(5, 7) + SourceIndex(0) -3 >Emitted(10, 6) Source(5, 8) + SourceIndex(0) -4 >Emitted(10, 9) Source(5, 11) + SourceIndex(0) -5 >Emitted(10, 23) Source(5, 25) + SourceIndex(0) -6 >Emitted(10, 24) Source(5, 26) + SourceIndex(0) +1 >Emitted(12, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(12, 5) Source(5, 7) + SourceIndex(0) +3 >Emitted(12, 6) Source(5, 8) + SourceIndex(0) +4 >Emitted(12, 9) Source(5, 11) + SourceIndex(0) +5 >Emitted(12, 23) Source(5, 25) + SourceIndex(0) +6 >Emitted(12, 24) Source(5, 26) + SourceIndex(0) --- >>>console.log(s); 1 > @@ -871,14 +881,14 @@ sourceFile:../../../first/first_PART1.ts 6 > s 7 > ) 8 > ; -1 >Emitted(11, 1) Source(11, 1) + SourceIndex(0) -2 >Emitted(11, 8) Source(11, 8) + SourceIndex(0) -3 >Emitted(11, 9) Source(11, 9) + SourceIndex(0) -4 >Emitted(11, 12) Source(11, 12) + SourceIndex(0) -5 >Emitted(11, 13) Source(11, 13) + SourceIndex(0) -6 >Emitted(11, 14) Source(11, 14) + SourceIndex(0) -7 >Emitted(11, 15) Source(11, 15) + SourceIndex(0) -8 >Emitted(11, 16) Source(11, 16) + SourceIndex(0) +1 >Emitted(13, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(13, 8) Source(11, 8) + SourceIndex(0) +3 >Emitted(13, 9) Source(11, 9) + SourceIndex(0) +4 >Emitted(13, 12) Source(11, 12) + SourceIndex(0) +5 >Emitted(13, 13) Source(11, 13) + SourceIndex(0) +6 >Emitted(13, 14) Source(11, 14) + SourceIndex(0) +7 >Emitted(13, 15) Source(11, 15) + SourceIndex(0) +8 >Emitted(13, 16) Source(11, 16) + SourceIndex(0) --- >>>function forfirstfirst_PART1Rest() { 1-> @@ -889,9 +899,9 @@ sourceFile:../../../first/first_PART1.ts > 2 >function 3 > forfirstfirst_PART1Rest -1->Emitted(12, 1) Source(12, 1) + SourceIndex(0) -2 >Emitted(12, 10) Source(12, 10) + SourceIndex(0) -3 >Emitted(12, 33) Source(12, 33) + SourceIndex(0) +1->Emitted(14, 1) Source(12, 1) + SourceIndex(0) +2 >Emitted(14, 10) Source(12, 10) + SourceIndex(0) +3 >Emitted(14, 33) Source(12, 33) + SourceIndex(0) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^ @@ -911,14 +921,14 @@ sourceFile:../../../first/first_PART1.ts 6 > , 7 > ...rest } = { a: 10, b: 30, yy: 30 } 8 > ; -1->Emitted(13, 5) Source(13, 1) + SourceIndex(0) -2 >Emitted(13, 9) Source(13, 7) + SourceIndex(0) -3 >Emitted(13, 38) Source(13, 48) + SourceIndex(0) -4 >Emitted(13, 40) Source(13, 9) + SourceIndex(0) -5 >Emitted(13, 48) Source(13, 10) + SourceIndex(0) -6 >Emitted(13, 50) Source(13, 12) + SourceIndex(0) -7 >Emitted(13, 74) Source(13, 48) + SourceIndex(0) -8 >Emitted(13, 75) Source(13, 49) + SourceIndex(0) +1->Emitted(15, 5) Source(13, 1) + SourceIndex(0) +2 >Emitted(15, 9) Source(13, 7) + SourceIndex(0) +3 >Emitted(15, 38) Source(13, 48) + SourceIndex(0) +4 >Emitted(15, 40) Source(13, 9) + SourceIndex(0) +5 >Emitted(15, 48) Source(13, 10) + SourceIndex(0) +6 >Emitted(15, 50) Source(13, 12) + SourceIndex(0) +7 >Emitted(15, 74) Source(13, 48) + SourceIndex(0) +8 >Emitted(15, 75) Source(13, 49) + SourceIndex(0) --- >>>} 1 > @@ -927,8 +937,8 @@ sourceFile:../../../first/first_PART1.ts 1 > > 2 >} -1 >Emitted(14, 1) Source(14, 1) + SourceIndex(0) -2 >Emitted(14, 2) Source(14, 2) + SourceIndex(0) +1 >Emitted(16, 1) Source(14, 1) + SourceIndex(0) +2 >Emitted(16, 2) Source(14, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -953,15 +963,15 @@ sourceFile:../../../first/first_part2.ts 7 > () 8 > ) 9 > ; -1->Emitted(15, 1) Source(1, 1) + SourceIndex(1) -2 >Emitted(15, 8) Source(1, 8) + SourceIndex(1) -3 >Emitted(15, 9) Source(1, 9) + SourceIndex(1) -4 >Emitted(15, 12) Source(1, 12) + SourceIndex(1) -5 >Emitted(15, 13) Source(1, 13) + SourceIndex(1) -6 >Emitted(15, 14) Source(1, 14) + SourceIndex(1) -7 >Emitted(15, 16) Source(1, 16) + SourceIndex(1) -8 >Emitted(15, 17) Source(1, 17) + SourceIndex(1) -9 >Emitted(15, 18) Source(1, 18) + SourceIndex(1) +1->Emitted(17, 1) Source(1, 1) + SourceIndex(1) +2 >Emitted(17, 8) Source(1, 8) + SourceIndex(1) +3 >Emitted(17, 9) Source(1, 9) + SourceIndex(1) +4 >Emitted(17, 12) Source(1, 12) + SourceIndex(1) +5 >Emitted(17, 13) Source(1, 13) + SourceIndex(1) +6 >Emitted(17, 14) Source(1, 14) + SourceIndex(1) +7 >Emitted(17, 16) Source(1, 16) + SourceIndex(1) +8 >Emitted(17, 17) Source(1, 17) + SourceIndex(1) +9 >Emitted(17, 18) Source(1, 18) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -975,9 +985,9 @@ sourceFile:../../../first/first_part3.ts 1 > 2 >function 3 > f -1 >Emitted(16, 1) Source(1, 1) + SourceIndex(2) -2 >Emitted(16, 10) Source(1, 10) + SourceIndex(2) -3 >Emitted(16, 11) Source(1, 11) + SourceIndex(2) +1 >Emitted(18, 1) Source(1, 1) + SourceIndex(2) +2 >Emitted(18, 10) Source(1, 10) + SourceIndex(2) +3 >Emitted(18, 11) Source(1, 11) + SourceIndex(2) --- >>> return "JS does hoists"; 1->^^^^ @@ -989,10 +999,10 @@ sourceFile:../../../first/first_part3.ts 2 > return 3 > "JS does hoists" 4 > ; -1->Emitted(17, 5) Source(2, 5) + SourceIndex(2) -2 >Emitted(17, 12) Source(2, 12) + SourceIndex(2) -3 >Emitted(17, 28) Source(2, 28) + SourceIndex(2) -4 >Emitted(17, 29) Source(2, 29) + SourceIndex(2) +1->Emitted(19, 5) Source(2, 5) + SourceIndex(2) +2 >Emitted(19, 12) Source(2, 12) + SourceIndex(2) +3 >Emitted(19, 28) Source(2, 28) + SourceIndex(2) +4 >Emitted(19, 29) Source(2, 29) + SourceIndex(2) --- >>>} 1 > @@ -1001,8 +1011,8 @@ sourceFile:../../../first/first_part3.ts 1 > > 2 >} -1 >Emitted(18, 1) Source(3, 1) + SourceIndex(2) -2 >Emitted(18, 2) Source(3, 2) + SourceIndex(2) +1 >Emitted(20, 1) Source(3, 1) + SourceIndex(2) +2 >Emitted(20, 2) Source(3, 2) + SourceIndex(2) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -1028,10 +1038,10 @@ sourceFile:../../../second/second_part1.ts > > f(); > } -1->Emitted(19, 1) Source(5, 1) + SourceIndex(3) -2 >Emitted(19, 5) Source(5, 11) + SourceIndex(3) -3 >Emitted(19, 6) Source(5, 12) + SourceIndex(3) -4 >Emitted(19, 7) Source(11, 2) + SourceIndex(3) +1->Emitted(21, 1) Source(5, 1) + SourceIndex(3) +2 >Emitted(21, 5) Source(5, 11) + SourceIndex(3) +3 >Emitted(21, 6) Source(5, 12) + SourceIndex(3) +4 >Emitted(21, 7) Source(11, 2) + SourceIndex(3) --- >>>(function (N) { 1-> @@ -1041,9 +1051,9 @@ sourceFile:../../../second/second_part1.ts 1-> 2 >namespace 3 > N -1->Emitted(20, 1) Source(5, 1) + SourceIndex(3) -2 >Emitted(20, 12) Source(5, 11) + SourceIndex(3) -3 >Emitted(20, 13) Source(5, 12) + SourceIndex(3) +1->Emitted(22, 1) Source(5, 1) + SourceIndex(3) +2 >Emitted(22, 12) Source(5, 11) + SourceIndex(3) +3 >Emitted(22, 13) Source(5, 12) + SourceIndex(3) --- >>> function f() { 1->^^^^ @@ -1054,9 +1064,9 @@ sourceFile:../../../second/second_part1.ts > 2 > function 3 > f -1->Emitted(21, 5) Source(6, 5) + SourceIndex(3) -2 >Emitted(21, 14) Source(6, 14) + SourceIndex(3) -3 >Emitted(21, 15) Source(6, 15) + SourceIndex(3) +1->Emitted(23, 5) Source(6, 5) + SourceIndex(3) +2 >Emitted(23, 14) Source(6, 14) + SourceIndex(3) +3 >Emitted(23, 15) Source(6, 15) + SourceIndex(3) --- >>> console.log('testing'); 1->^^^^^^^^ @@ -1076,14 +1086,14 @@ sourceFile:../../../second/second_part1.ts 6 > 'testing' 7 > ) 8 > ; -1->Emitted(22, 9) Source(7, 9) + SourceIndex(3) -2 >Emitted(22, 16) Source(7, 16) + SourceIndex(3) -3 >Emitted(22, 17) Source(7, 17) + SourceIndex(3) -4 >Emitted(22, 20) Source(7, 20) + SourceIndex(3) -5 >Emitted(22, 21) Source(7, 21) + SourceIndex(3) -6 >Emitted(22, 30) Source(7, 30) + SourceIndex(3) -7 >Emitted(22, 31) Source(7, 31) + SourceIndex(3) -8 >Emitted(22, 32) Source(7, 32) + SourceIndex(3) +1->Emitted(24, 9) Source(7, 9) + SourceIndex(3) +2 >Emitted(24, 16) Source(7, 16) + SourceIndex(3) +3 >Emitted(24, 17) Source(7, 17) + SourceIndex(3) +4 >Emitted(24, 20) Source(7, 20) + SourceIndex(3) +5 >Emitted(24, 21) Source(7, 21) + SourceIndex(3) +6 >Emitted(24, 30) Source(7, 30) + SourceIndex(3) +7 >Emitted(24, 31) Source(7, 31) + SourceIndex(3) +8 >Emitted(24, 32) Source(7, 32) + SourceIndex(3) --- >>> } 1 >^^^^ @@ -1092,8 +1102,8 @@ sourceFile:../../../second/second_part1.ts 1 > > 2 > } -1 >Emitted(23, 5) Source(8, 5) + SourceIndex(3) -2 >Emitted(23, 6) Source(8, 6) + SourceIndex(3) +1 >Emitted(25, 5) Source(8, 5) + SourceIndex(3) +2 >Emitted(25, 6) Source(8, 6) + SourceIndex(3) --- >>> f(); 1->^^^^ @@ -1107,10 +1117,10 @@ sourceFile:../../../second/second_part1.ts 2 > f 3 > () 4 > ; -1->Emitted(24, 5) Source(10, 5) + SourceIndex(3) -2 >Emitted(24, 6) Source(10, 6) + SourceIndex(3) -3 >Emitted(24, 8) Source(10, 8) + SourceIndex(3) -4 >Emitted(24, 9) Source(10, 9) + SourceIndex(3) +1->Emitted(26, 5) Source(10, 5) + SourceIndex(3) +2 >Emitted(26, 6) Source(10, 6) + SourceIndex(3) +3 >Emitted(26, 8) Source(10, 8) + SourceIndex(3) +4 >Emitted(26, 9) Source(10, 9) + SourceIndex(3) --- >>>})(N || (N = {})); 1-> @@ -1135,13 +1145,13 @@ sourceFile:../../../second/second_part1.ts > > f(); > } -1->Emitted(25, 1) Source(11, 1) + SourceIndex(3) -2 >Emitted(25, 2) Source(11, 2) + SourceIndex(3) -3 >Emitted(25, 4) Source(5, 11) + SourceIndex(3) -4 >Emitted(25, 5) Source(5, 12) + SourceIndex(3) -5 >Emitted(25, 10) Source(5, 11) + SourceIndex(3) -6 >Emitted(25, 11) Source(5, 12) + SourceIndex(3) -7 >Emitted(25, 19) Source(11, 2) + SourceIndex(3) +1->Emitted(27, 1) Source(11, 1) + SourceIndex(3) +2 >Emitted(27, 2) Source(11, 2) + SourceIndex(3) +3 >Emitted(27, 4) Source(5, 11) + SourceIndex(3) +4 >Emitted(27, 5) Source(5, 12) + SourceIndex(3) +5 >Emitted(27, 10) Source(5, 11) + SourceIndex(3) +6 >Emitted(27, 11) Source(5, 12) + SourceIndex(3) +7 >Emitted(27, 19) Source(11, 2) + SourceIndex(3) --- >>>function forsecondsecond_part1Rest() { 1-> @@ -1152,9 +1162,9 @@ sourceFile:../../../second/second_part1.ts > 2 >function 3 > forsecondsecond_part1Rest -1->Emitted(26, 1) Source(12, 1) + SourceIndex(3) -2 >Emitted(26, 10) Source(12, 10) + SourceIndex(3) -3 >Emitted(26, 35) Source(12, 35) + SourceIndex(3) +1->Emitted(28, 1) Source(12, 1) + SourceIndex(3) +2 >Emitted(28, 10) Source(12, 10) + SourceIndex(3) +3 >Emitted(28, 35) Source(12, 35) + SourceIndex(3) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^ @@ -1174,14 +1184,14 @@ sourceFile:../../../second/second_part1.ts 6 > , 7 > ...rest } = { a: 10, b: 30, yy: 30 } 8 > ; -1->Emitted(27, 5) Source(13, 1) + SourceIndex(3) -2 >Emitted(27, 9) Source(13, 7) + SourceIndex(3) -3 >Emitted(27, 38) Source(13, 48) + SourceIndex(3) -4 >Emitted(27, 40) Source(13, 9) + SourceIndex(3) -5 >Emitted(27, 48) Source(13, 10) + SourceIndex(3) -6 >Emitted(27, 50) Source(13, 12) + SourceIndex(3) -7 >Emitted(27, 74) Source(13, 48) + SourceIndex(3) -8 >Emitted(27, 75) Source(13, 49) + SourceIndex(3) +1->Emitted(29, 5) Source(13, 1) + SourceIndex(3) +2 >Emitted(29, 9) Source(13, 7) + SourceIndex(3) +3 >Emitted(29, 38) Source(13, 48) + SourceIndex(3) +4 >Emitted(29, 40) Source(13, 9) + SourceIndex(3) +5 >Emitted(29, 48) Source(13, 10) + SourceIndex(3) +6 >Emitted(29, 50) Source(13, 12) + SourceIndex(3) +7 >Emitted(29, 74) Source(13, 48) + SourceIndex(3) +8 >Emitted(29, 75) Source(13, 49) + SourceIndex(3) --- >>>} 1 > @@ -1190,8 +1200,8 @@ sourceFile:../../../second/second_part1.ts 1 > > 2 >} -1 >Emitted(28, 1) Source(14, 1) + SourceIndex(3) -2 >Emitted(28, 2) Source(14, 2) + SourceIndex(3) +1 >Emitted(30, 1) Source(14, 1) + SourceIndex(3) +2 >Emitted(30, 2) Source(14, 2) + SourceIndex(3) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -1201,13 +1211,13 @@ sourceFile:../../../second/second_part2.ts 1-> 2 >^^^^^^^^^^^^^^^^^^^-> 1-> -1->Emitted(29, 1) Source(1, 1) + SourceIndex(4) +1->Emitted(31, 1) Source(1, 1) + SourceIndex(4) --- >>> function C() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(30, 5) Source(1, 1) + SourceIndex(4) +1->Emitted(32, 5) Source(1, 1) + SourceIndex(4) --- >>> } 1->^^^^ @@ -1219,8 +1229,8 @@ sourceFile:../../../second/second_part2.ts > } > 2 > } -1->Emitted(31, 5) Source(5, 1) + SourceIndex(4) -2 >Emitted(31, 6) Source(5, 2) + SourceIndex(4) +1->Emitted(33, 5) Source(5, 1) + SourceIndex(4) +2 >Emitted(33, 6) Source(5, 2) + SourceIndex(4) --- >>> C.prototype.doSomething = function () { 1->^^^^ @@ -1230,9 +1240,9 @@ sourceFile:../../../second/second_part2.ts 1-> 2 > doSomething 3 > -1->Emitted(32, 5) Source(2, 5) + SourceIndex(4) -2 >Emitted(32, 28) Source(2, 16) + SourceIndex(4) -3 >Emitted(32, 31) Source(2, 5) + SourceIndex(4) +1->Emitted(34, 5) Source(2, 5) + SourceIndex(4) +2 >Emitted(34, 28) Source(2, 16) + SourceIndex(4) +3 >Emitted(34, 31) Source(2, 5) + SourceIndex(4) --- >>> console.log("something got done"); 1->^^^^^^^^ @@ -1252,14 +1262,14 @@ sourceFile:../../../second/second_part2.ts 6 > "something got done" 7 > ) 8 > ; -1->Emitted(33, 9) Source(3, 9) + SourceIndex(4) -2 >Emitted(33, 16) Source(3, 16) + SourceIndex(4) -3 >Emitted(33, 17) Source(3, 17) + SourceIndex(4) -4 >Emitted(33, 20) Source(3, 20) + SourceIndex(4) -5 >Emitted(33, 21) Source(3, 21) + SourceIndex(4) -6 >Emitted(33, 41) Source(3, 41) + SourceIndex(4) -7 >Emitted(33, 42) Source(3, 42) + SourceIndex(4) -8 >Emitted(33, 43) Source(3, 43) + SourceIndex(4) +1->Emitted(35, 9) Source(3, 9) + SourceIndex(4) +2 >Emitted(35, 16) Source(3, 16) + SourceIndex(4) +3 >Emitted(35, 17) Source(3, 17) + SourceIndex(4) +4 >Emitted(35, 20) Source(3, 20) + SourceIndex(4) +5 >Emitted(35, 21) Source(3, 21) + SourceIndex(4) +6 >Emitted(35, 41) Source(3, 41) + SourceIndex(4) +7 >Emitted(35, 42) Source(3, 42) + SourceIndex(4) +8 >Emitted(35, 43) Source(3, 43) + SourceIndex(4) --- >>> }; 1 >^^^^ @@ -1268,8 +1278,8 @@ sourceFile:../../../second/second_part2.ts 1 > > 2 > } -1 >Emitted(34, 5) Source(4, 5) + SourceIndex(4) -2 >Emitted(34, 6) Source(4, 6) + SourceIndex(4) +1 >Emitted(36, 5) Source(4, 5) + SourceIndex(4) +2 >Emitted(36, 6) Source(4, 6) + SourceIndex(4) --- >>> return C; 1->^^^^ @@ -1277,8 +1287,8 @@ sourceFile:../../../second/second_part2.ts 1-> > 2 > } -1->Emitted(35, 5) Source(5, 1) + SourceIndex(4) -2 >Emitted(35, 13) Source(5, 2) + SourceIndex(4) +1->Emitted(37, 5) Source(5, 1) + SourceIndex(4) +2 >Emitted(37, 13) Source(5, 2) + SourceIndex(4) --- >>>}()); 1 > @@ -1294,10 +1304,10 @@ sourceFile:../../../second/second_part2.ts > console.log("something got done"); > } > } -1 >Emitted(36, 1) Source(5, 1) + SourceIndex(4) -2 >Emitted(36, 2) Source(5, 2) + SourceIndex(4) -3 >Emitted(36, 2) Source(1, 1) + SourceIndex(4) -4 >Emitted(36, 6) Source(5, 2) + SourceIndex(4) +1 >Emitted(38, 1) Source(5, 1) + SourceIndex(4) +2 >Emitted(38, 2) Source(5, 2) + SourceIndex(4) +3 >Emitted(38, 2) Source(1, 1) + SourceIndex(4) +4 >Emitted(38, 6) Source(5, 2) + SourceIndex(4) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -1321,14 +1331,14 @@ sourceFile:../../third_part1.ts 6 > C 7 > () 8 > ; -1->Emitted(37, 1) Source(1, 1) + SourceIndex(5) -2 >Emitted(37, 5) Source(1, 5) + SourceIndex(5) -3 >Emitted(37, 6) Source(1, 6) + SourceIndex(5) -4 >Emitted(37, 9) Source(1, 9) + SourceIndex(5) -5 >Emitted(37, 13) Source(1, 13) + SourceIndex(5) -6 >Emitted(37, 14) Source(1, 14) + SourceIndex(5) -7 >Emitted(37, 16) Source(1, 16) + SourceIndex(5) -8 >Emitted(37, 17) Source(1, 17) + SourceIndex(5) +1->Emitted(39, 1) Source(1, 1) + SourceIndex(5) +2 >Emitted(39, 5) Source(1, 5) + SourceIndex(5) +3 >Emitted(39, 6) Source(1, 6) + SourceIndex(5) +4 >Emitted(39, 9) Source(1, 9) + SourceIndex(5) +5 >Emitted(39, 13) Source(1, 13) + SourceIndex(5) +6 >Emitted(39, 14) Source(1, 14) + SourceIndex(5) +7 >Emitted(39, 16) Source(1, 16) + SourceIndex(5) +8 >Emitted(39, 17) Source(1, 17) + SourceIndex(5) --- >>>c.doSomething(); 1-> @@ -1345,12 +1355,12 @@ sourceFile:../../third_part1.ts 4 > doSomething 5 > () 6 > ; -1->Emitted(38, 1) Source(2, 1) + SourceIndex(5) -2 >Emitted(38, 2) Source(2, 2) + SourceIndex(5) -3 >Emitted(38, 3) Source(2, 3) + SourceIndex(5) -4 >Emitted(38, 14) Source(2, 14) + SourceIndex(5) -5 >Emitted(38, 16) Source(2, 16) + SourceIndex(5) -6 >Emitted(38, 17) Source(2, 17) + SourceIndex(5) +1->Emitted(40, 1) Source(2, 1) + SourceIndex(5) +2 >Emitted(40, 2) Source(2, 2) + SourceIndex(5) +3 >Emitted(40, 3) Source(2, 3) + SourceIndex(5) +4 >Emitted(40, 14) Source(2, 14) + SourceIndex(5) +5 >Emitted(40, 16) Source(2, 16) + SourceIndex(5) +6 >Emitted(40, 17) Source(2, 17) + SourceIndex(5) --- >>>//# sourceMappingURL=third-output.js.map @@ -1365,39 +1375,39 @@ sourceFile:../../third_part1.ts "sections": [ { "pos": 0, - "end": 415, + "end": 492, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 417, - "end": 644, + "pos": 494, + "end": 721, "kind": "prepend", "data": "/src/first/bin/first-output.js", "texts": [ { - "pos": 417, - "end": 644, + "pos": 494, + "end": 721, "kind": "text" } ] }, { - "pos": 644, - "end": 1048, + "pos": 721, + "end": 1125, "kind": "prepend", "data": "/src/2/second-output.js", "texts": [ { - "pos": 644, - "end": 1048, + "pos": 721, + "end": 1125, "kind": "text" } ] }, { - "pos": 1048, - "end": 1084, + "pos": 1125, + "end": 1161, "kind": "text" } ] @@ -1445,20 +1455,22 @@ sourceFile:../../third_part1.ts ====================================================================== File:: /src/third/thirdjs/output/third-output.js ---------------------------------------------------------------------- -emitHelpers: (0-415):: typescript:rest +emitHelpers: (0-492):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; ---------------------------------------------------------------------- -prepend: (417-644):: /src/first/bin/first-output.js texts:: 1 +prepend: (494-721):: /src/first/bin/first-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (417-644) +text: (494-721) var s = "Hello, world"; console.log(s); function forfirstfirst_PART1Rest() { @@ -1470,9 +1482,9 @@ function f() { } ---------------------------------------------------------------------- -prepend: (644-1048):: /src/2/second-output.js texts:: 1 +prepend: (721-1125):: /src/2/second-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (644-1048) +text: (721-1125) var N; (function (N) { function f() { @@ -1493,7 +1505,7 @@ var C = (function () { }()); ---------------------------------------------------------------------- -text: (1048-1084) +text: (1125-1161) var c = new C(); c.doSomething(); diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/multiple-emitHelpers-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/multiple-emitHelpers-in-all-projects.js index 339c19933fc..a035efb8d8f 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/multiple-emitHelpers-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/multiple-emitHelpers-in-all-projects.js @@ -1036,8 +1036,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; var s = "Hello, world"; @@ -1094,7 +1096,7 @@ thirdthird_part1Spread.apply(void 0, __spread([10, 20, 30])); //# sourceMappingURL=third-output.js.map //// [/src/third/thirdjs/output/third-output.js.map] -{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../../first/first_PART1.ts","../../../first/first_part2.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts","../../third_part1.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB,KAAK,CAAC;ACXtC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC;AACD,SAAS,sBAAsB;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AACnD,sBAAsB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;ACAxC,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;AACD,SAAS,yBAAyB;IAClC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;ACbD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC;AAED,SAAS,wBAAwB;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AACrD,wBAAwB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;ACP1C,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC;AAChB,SAAS,uBAAuB;IAChC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;AACD,SAAS,sBAAsB;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AACnD,sBAAsB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE"} +{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../../first/first_PART1.ts","../../../first/first_part2.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts","../../third_part1.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB,KAAK,CAAC;ACXtC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC;AACD,SAAS,sBAAsB;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AACnD,sBAAsB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;ACAxC,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;AACD,SAAS,yBAAyB;IAClC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;ACbD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC;AAED,SAAS,wBAAwB;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AACrD,wBAAwB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;ACP1C,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC;AAChB,SAAS,uBAAuB;IAChC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;AACD,SAAS,sBAAsB;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AACnD,sBAAsB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE"} //// [/src/third/thirdjs/output/third-output.js.map.baseline.txt] =================================================================== @@ -1132,8 +1134,10 @@ sourceFile:../../../first/first_PART1.ts >>> for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") ->>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) ->>> t[p[i]] = s[p[i]]; +>>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> t[p[i]] = s[p[i]]; +>>> } >>> return t; >>>}; >>>var s = "Hello, world"; @@ -1153,12 +1157,12 @@ sourceFile:../../../first/first_PART1.ts 4 > = 5 > "Hello, world" 6 > ; -1 >Emitted(30, 1) Source(5, 1) + SourceIndex(0) -2 >Emitted(30, 5) Source(5, 7) + SourceIndex(0) -3 >Emitted(30, 6) Source(5, 8) + SourceIndex(0) -4 >Emitted(30, 9) Source(5, 11) + SourceIndex(0) -5 >Emitted(30, 23) Source(5, 25) + SourceIndex(0) -6 >Emitted(30, 24) Source(5, 26) + SourceIndex(0) +1 >Emitted(32, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(32, 5) Source(5, 7) + SourceIndex(0) +3 >Emitted(32, 6) Source(5, 8) + SourceIndex(0) +4 >Emitted(32, 9) Source(5, 11) + SourceIndex(0) +5 >Emitted(32, 23) Source(5, 25) + SourceIndex(0) +6 >Emitted(32, 24) Source(5, 26) + SourceIndex(0) --- >>>console.log(s); 1 > @@ -1184,14 +1188,14 @@ sourceFile:../../../first/first_PART1.ts 6 > s 7 > ) 8 > ; -1 >Emitted(31, 1) Source(11, 1) + SourceIndex(0) -2 >Emitted(31, 8) Source(11, 8) + SourceIndex(0) -3 >Emitted(31, 9) Source(11, 9) + SourceIndex(0) -4 >Emitted(31, 12) Source(11, 12) + SourceIndex(0) -5 >Emitted(31, 13) Source(11, 13) + SourceIndex(0) -6 >Emitted(31, 14) Source(11, 14) + SourceIndex(0) -7 >Emitted(31, 15) Source(11, 15) + SourceIndex(0) -8 >Emitted(31, 16) Source(11, 16) + SourceIndex(0) +1 >Emitted(33, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(33, 8) Source(11, 8) + SourceIndex(0) +3 >Emitted(33, 9) Source(11, 9) + SourceIndex(0) +4 >Emitted(33, 12) Source(11, 12) + SourceIndex(0) +5 >Emitted(33, 13) Source(11, 13) + SourceIndex(0) +6 >Emitted(33, 14) Source(11, 14) + SourceIndex(0) +7 >Emitted(33, 15) Source(11, 15) + SourceIndex(0) +8 >Emitted(33, 16) Source(11, 16) + SourceIndex(0) --- >>>function forfirstfirst_PART1Rest() { } 1-> @@ -1205,11 +1209,11 @@ sourceFile:../../../first/first_PART1.ts 3 > forfirstfirst_PART1Rest 4 > () { 5 > } -1->Emitted(32, 1) Source(12, 1) + SourceIndex(0) -2 >Emitted(32, 10) Source(12, 10) + SourceIndex(0) -3 >Emitted(32, 33) Source(12, 33) + SourceIndex(0) -4 >Emitted(32, 38) Source(12, 38) + SourceIndex(0) -5 >Emitted(32, 39) Source(12, 39) + SourceIndex(0) +1->Emitted(34, 1) Source(12, 1) + SourceIndex(0) +2 >Emitted(34, 10) Source(12, 10) + SourceIndex(0) +3 >Emitted(34, 33) Source(12, 33) + SourceIndex(0) +4 >Emitted(34, 38) Source(12, 38) + SourceIndex(0) +5 >Emitted(34, 39) Source(12, 39) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -1234,15 +1238,15 @@ sourceFile:../../../first/first_part2.ts 7 > () 8 > ) 9 > ; -1 >Emitted(33, 1) Source(1, 1) + SourceIndex(1) -2 >Emitted(33, 8) Source(1, 8) + SourceIndex(1) -3 >Emitted(33, 9) Source(1, 9) + SourceIndex(1) -4 >Emitted(33, 12) Source(1, 12) + SourceIndex(1) -5 >Emitted(33, 13) Source(1, 13) + SourceIndex(1) -6 >Emitted(33, 14) Source(1, 14) + SourceIndex(1) -7 >Emitted(33, 16) Source(1, 16) + SourceIndex(1) -8 >Emitted(33, 17) Source(1, 17) + SourceIndex(1) -9 >Emitted(33, 18) Source(1, 18) + SourceIndex(1) +1 >Emitted(35, 1) Source(1, 1) + SourceIndex(1) +2 >Emitted(35, 8) Source(1, 8) + SourceIndex(1) +3 >Emitted(35, 9) Source(1, 9) + SourceIndex(1) +4 >Emitted(35, 12) Source(1, 12) + SourceIndex(1) +5 >Emitted(35, 13) Source(1, 13) + SourceIndex(1) +6 >Emitted(35, 14) Source(1, 14) + SourceIndex(1) +7 >Emitted(35, 16) Source(1, 16) + SourceIndex(1) +8 >Emitted(35, 17) Source(1, 17) + SourceIndex(1) +9 >Emitted(35, 18) Source(1, 18) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -1256,9 +1260,9 @@ sourceFile:../../../first/first_part3.ts 1 > 2 >function 3 > f -1 >Emitted(34, 1) Source(1, 1) + SourceIndex(2) -2 >Emitted(34, 10) Source(1, 10) + SourceIndex(2) -3 >Emitted(34, 11) Source(1, 11) + SourceIndex(2) +1 >Emitted(36, 1) Source(1, 1) + SourceIndex(2) +2 >Emitted(36, 10) Source(1, 10) + SourceIndex(2) +3 >Emitted(36, 11) Source(1, 11) + SourceIndex(2) --- >>> return "JS does hoists"; 1->^^^^ @@ -1270,10 +1274,10 @@ sourceFile:../../../first/first_part3.ts 2 > return 3 > "JS does hoists" 4 > ; -1->Emitted(35, 5) Source(2, 5) + SourceIndex(2) -2 >Emitted(35, 12) Source(2, 12) + SourceIndex(2) -3 >Emitted(35, 28) Source(2, 28) + SourceIndex(2) -4 >Emitted(35, 29) Source(2, 29) + SourceIndex(2) +1->Emitted(37, 5) Source(2, 5) + SourceIndex(2) +2 >Emitted(37, 12) Source(2, 12) + SourceIndex(2) +3 >Emitted(37, 28) Source(2, 28) + SourceIndex(2) +4 >Emitted(37, 29) Source(2, 29) + SourceIndex(2) --- >>>} 1 > @@ -1282,8 +1286,8 @@ sourceFile:../../../first/first_part3.ts 1 > > 2 >} -1 >Emitted(36, 1) Source(3, 1) + SourceIndex(2) -2 >Emitted(36, 2) Source(3, 2) + SourceIndex(2) +1 >Emitted(38, 1) Source(3, 1) + SourceIndex(2) +2 >Emitted(38, 2) Source(3, 2) + SourceIndex(2) --- >>>function firstfirst_part3Spread() { 1-> @@ -1293,9 +1297,9 @@ sourceFile:../../../first/first_part3.ts > 2 >function 3 > firstfirst_part3Spread -1->Emitted(37, 1) Source(4, 1) + SourceIndex(2) -2 >Emitted(37, 10) Source(4, 10) + SourceIndex(2) -3 >Emitted(37, 32) Source(4, 32) + SourceIndex(2) +1->Emitted(39, 1) Source(4, 1) + SourceIndex(2) +2 >Emitted(39, 10) Source(4, 10) + SourceIndex(2) +3 >Emitted(39, 32) Source(4, 32) + SourceIndex(2) --- >>> var b = []; 1 >^^^^ @@ -1303,8 +1307,8 @@ sourceFile:../../../first/first_part3.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >( 2 > ...b: number[] -1 >Emitted(38, 5) Source(4, 33) + SourceIndex(2) -2 >Emitted(38, 16) Source(4, 47) + SourceIndex(2) +1 >Emitted(40, 5) Source(4, 33) + SourceIndex(2) +2 >Emitted(40, 16) Source(4, 47) + SourceIndex(2) --- >>> for (var _i = 0; _i < arguments.length; _i++) { 1->^^^^^^^^^ @@ -1319,20 +1323,20 @@ sourceFile:../../../first/first_part3.ts 4 > ...b: number[] 5 > 6 > ...b: number[] -1->Emitted(39, 10) Source(4, 33) + SourceIndex(2) -2 >Emitted(39, 20) Source(4, 47) + SourceIndex(2) -3 >Emitted(39, 22) Source(4, 33) + SourceIndex(2) -4 >Emitted(39, 43) Source(4, 47) + SourceIndex(2) -5 >Emitted(39, 45) Source(4, 33) + SourceIndex(2) -6 >Emitted(39, 49) Source(4, 47) + SourceIndex(2) +1->Emitted(41, 10) Source(4, 33) + SourceIndex(2) +2 >Emitted(41, 20) Source(4, 47) + SourceIndex(2) +3 >Emitted(41, 22) Source(4, 33) + SourceIndex(2) +4 >Emitted(41, 43) Source(4, 47) + SourceIndex(2) +5 >Emitted(41, 45) Source(4, 33) + SourceIndex(2) +6 >Emitted(41, 49) Source(4, 47) + SourceIndex(2) --- >>> b[_i] = arguments[_i]; 1 >^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^ 1 > 2 > ...b: number[] -1 >Emitted(40, 9) Source(4, 33) + SourceIndex(2) -2 >Emitted(40, 31) Source(4, 47) + SourceIndex(2) +1 >Emitted(42, 9) Source(4, 33) + SourceIndex(2) +2 >Emitted(42, 31) Source(4, 47) + SourceIndex(2) --- >>> } >>>} @@ -1341,8 +1345,8 @@ sourceFile:../../../first/first_part3.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >) { 2 >} -1 >Emitted(42, 1) Source(4, 51) + SourceIndex(2) -2 >Emitted(42, 2) Source(4, 52) + SourceIndex(2) +1 >Emitted(44, 1) Source(4, 51) + SourceIndex(2) +2 >Emitted(44, 2) Source(4, 52) + SourceIndex(2) --- >>>firstfirst_part3Spread.apply(void 0, __spread([10, 20, 30])); 1-> @@ -1368,17 +1372,17 @@ sourceFile:../../../first/first_part3.ts 9 > 30 10> ] 11> ); -1->Emitted(43, 1) Source(5, 1) + SourceIndex(2) -2 >Emitted(43, 23) Source(5, 23) + SourceIndex(2) -3 >Emitted(43, 47) Source(5, 27) + SourceIndex(2) -4 >Emitted(43, 48) Source(5, 28) + SourceIndex(2) -5 >Emitted(43, 50) Source(5, 30) + SourceIndex(2) -6 >Emitted(43, 52) Source(5, 32) + SourceIndex(2) -7 >Emitted(43, 54) Source(5, 34) + SourceIndex(2) -8 >Emitted(43, 56) Source(5, 36) + SourceIndex(2) -9 >Emitted(43, 58) Source(5, 38) + SourceIndex(2) -10>Emitted(43, 59) Source(5, 39) + SourceIndex(2) -11>Emitted(43, 62) Source(5, 41) + SourceIndex(2) +1->Emitted(45, 1) Source(5, 1) + SourceIndex(2) +2 >Emitted(45, 23) Source(5, 23) + SourceIndex(2) +3 >Emitted(45, 47) Source(5, 27) + SourceIndex(2) +4 >Emitted(45, 48) Source(5, 28) + SourceIndex(2) +5 >Emitted(45, 50) Source(5, 30) + SourceIndex(2) +6 >Emitted(45, 52) Source(5, 32) + SourceIndex(2) +7 >Emitted(45, 54) Source(5, 34) + SourceIndex(2) +8 >Emitted(45, 56) Source(5, 36) + SourceIndex(2) +9 >Emitted(45, 58) Source(5, 38) + SourceIndex(2) +10>Emitted(45, 59) Source(5, 39) + SourceIndex(2) +11>Emitted(45, 62) Source(5, 41) + SourceIndex(2) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -1404,10 +1408,10 @@ sourceFile:../../../second/second_part1.ts > > f(); > } -1 >Emitted(44, 1) Source(5, 1) + SourceIndex(3) -2 >Emitted(44, 5) Source(5, 11) + SourceIndex(3) -3 >Emitted(44, 6) Source(5, 12) + SourceIndex(3) -4 >Emitted(44, 7) Source(11, 2) + SourceIndex(3) +1 >Emitted(46, 1) Source(5, 1) + SourceIndex(3) +2 >Emitted(46, 5) Source(5, 11) + SourceIndex(3) +3 >Emitted(46, 6) Source(5, 12) + SourceIndex(3) +4 >Emitted(46, 7) Source(11, 2) + SourceIndex(3) --- >>>(function (N) { 1-> @@ -1417,9 +1421,9 @@ sourceFile:../../../second/second_part1.ts 1-> 2 >namespace 3 > N -1->Emitted(45, 1) Source(5, 1) + SourceIndex(3) -2 >Emitted(45, 12) Source(5, 11) + SourceIndex(3) -3 >Emitted(45, 13) Source(5, 12) + SourceIndex(3) +1->Emitted(47, 1) Source(5, 1) + SourceIndex(3) +2 >Emitted(47, 12) Source(5, 11) + SourceIndex(3) +3 >Emitted(47, 13) Source(5, 12) + SourceIndex(3) --- >>> function f() { 1->^^^^ @@ -1430,9 +1434,9 @@ sourceFile:../../../second/second_part1.ts > 2 > function 3 > f -1->Emitted(46, 5) Source(6, 5) + SourceIndex(3) -2 >Emitted(46, 14) Source(6, 14) + SourceIndex(3) -3 >Emitted(46, 15) Source(6, 15) + SourceIndex(3) +1->Emitted(48, 5) Source(6, 5) + SourceIndex(3) +2 >Emitted(48, 14) Source(6, 14) + SourceIndex(3) +3 >Emitted(48, 15) Source(6, 15) + SourceIndex(3) --- >>> console.log('testing'); 1->^^^^^^^^ @@ -1452,14 +1456,14 @@ sourceFile:../../../second/second_part1.ts 6 > 'testing' 7 > ) 8 > ; -1->Emitted(47, 9) Source(7, 9) + SourceIndex(3) -2 >Emitted(47, 16) Source(7, 16) + SourceIndex(3) -3 >Emitted(47, 17) Source(7, 17) + SourceIndex(3) -4 >Emitted(47, 20) Source(7, 20) + SourceIndex(3) -5 >Emitted(47, 21) Source(7, 21) + SourceIndex(3) -6 >Emitted(47, 30) Source(7, 30) + SourceIndex(3) -7 >Emitted(47, 31) Source(7, 31) + SourceIndex(3) -8 >Emitted(47, 32) Source(7, 32) + SourceIndex(3) +1->Emitted(49, 9) Source(7, 9) + SourceIndex(3) +2 >Emitted(49, 16) Source(7, 16) + SourceIndex(3) +3 >Emitted(49, 17) Source(7, 17) + SourceIndex(3) +4 >Emitted(49, 20) Source(7, 20) + SourceIndex(3) +5 >Emitted(49, 21) Source(7, 21) + SourceIndex(3) +6 >Emitted(49, 30) Source(7, 30) + SourceIndex(3) +7 >Emitted(49, 31) Source(7, 31) + SourceIndex(3) +8 >Emitted(49, 32) Source(7, 32) + SourceIndex(3) --- >>> } 1 >^^^^ @@ -1468,8 +1472,8 @@ sourceFile:../../../second/second_part1.ts 1 > > 2 > } -1 >Emitted(48, 5) Source(8, 5) + SourceIndex(3) -2 >Emitted(48, 6) Source(8, 6) + SourceIndex(3) +1 >Emitted(50, 5) Source(8, 5) + SourceIndex(3) +2 >Emitted(50, 6) Source(8, 6) + SourceIndex(3) --- >>> f(); 1->^^^^ @@ -1483,10 +1487,10 @@ sourceFile:../../../second/second_part1.ts 2 > f 3 > () 4 > ; -1->Emitted(49, 5) Source(10, 5) + SourceIndex(3) -2 >Emitted(49, 6) Source(10, 6) + SourceIndex(3) -3 >Emitted(49, 8) Source(10, 8) + SourceIndex(3) -4 >Emitted(49, 9) Source(10, 9) + SourceIndex(3) +1->Emitted(51, 5) Source(10, 5) + SourceIndex(3) +2 >Emitted(51, 6) Source(10, 6) + SourceIndex(3) +3 >Emitted(51, 8) Source(10, 8) + SourceIndex(3) +4 >Emitted(51, 9) Source(10, 9) + SourceIndex(3) --- >>>})(N || (N = {})); 1-> @@ -1511,13 +1515,13 @@ sourceFile:../../../second/second_part1.ts > > f(); > } -1->Emitted(50, 1) Source(11, 1) + SourceIndex(3) -2 >Emitted(50, 2) Source(11, 2) + SourceIndex(3) -3 >Emitted(50, 4) Source(5, 11) + SourceIndex(3) -4 >Emitted(50, 5) Source(5, 12) + SourceIndex(3) -5 >Emitted(50, 10) Source(5, 11) + SourceIndex(3) -6 >Emitted(50, 11) Source(5, 12) + SourceIndex(3) -7 >Emitted(50, 19) Source(11, 2) + SourceIndex(3) +1->Emitted(52, 1) Source(11, 1) + SourceIndex(3) +2 >Emitted(52, 2) Source(11, 2) + SourceIndex(3) +3 >Emitted(52, 4) Source(5, 11) + SourceIndex(3) +4 >Emitted(52, 5) Source(5, 12) + SourceIndex(3) +5 >Emitted(52, 10) Source(5, 11) + SourceIndex(3) +6 >Emitted(52, 11) Source(5, 12) + SourceIndex(3) +7 >Emitted(52, 19) Source(11, 2) + SourceIndex(3) --- >>>function forsecondsecond_part1Rest() { 1-> @@ -1528,9 +1532,9 @@ sourceFile:../../../second/second_part1.ts > 2 >function 3 > forsecondsecond_part1Rest -1->Emitted(51, 1) Source(12, 1) + SourceIndex(3) -2 >Emitted(51, 10) Source(12, 10) + SourceIndex(3) -3 >Emitted(51, 35) Source(12, 35) + SourceIndex(3) +1->Emitted(53, 1) Source(12, 1) + SourceIndex(3) +2 >Emitted(53, 10) Source(12, 10) + SourceIndex(3) +3 >Emitted(53, 35) Source(12, 35) + SourceIndex(3) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^ @@ -1550,14 +1554,14 @@ sourceFile:../../../second/second_part1.ts 6 > , 7 > ...rest } = { a: 10, b: 30, yy: 30 } 8 > ; -1->Emitted(52, 5) Source(13, 1) + SourceIndex(3) -2 >Emitted(52, 9) Source(13, 7) + SourceIndex(3) -3 >Emitted(52, 38) Source(13, 48) + SourceIndex(3) -4 >Emitted(52, 40) Source(13, 9) + SourceIndex(3) -5 >Emitted(52, 48) Source(13, 10) + SourceIndex(3) -6 >Emitted(52, 50) Source(13, 12) + SourceIndex(3) -7 >Emitted(52, 74) Source(13, 48) + SourceIndex(3) -8 >Emitted(52, 75) Source(13, 49) + SourceIndex(3) +1->Emitted(54, 5) Source(13, 1) + SourceIndex(3) +2 >Emitted(54, 9) Source(13, 7) + SourceIndex(3) +3 >Emitted(54, 38) Source(13, 48) + SourceIndex(3) +4 >Emitted(54, 40) Source(13, 9) + SourceIndex(3) +5 >Emitted(54, 48) Source(13, 10) + SourceIndex(3) +6 >Emitted(54, 50) Source(13, 12) + SourceIndex(3) +7 >Emitted(54, 74) Source(13, 48) + SourceIndex(3) +8 >Emitted(54, 75) Source(13, 49) + SourceIndex(3) --- >>>} 1 > @@ -1566,8 +1570,8 @@ sourceFile:../../../second/second_part1.ts 1 > > 2 >} -1 >Emitted(53, 1) Source(14, 1) + SourceIndex(3) -2 >Emitted(53, 2) Source(14, 2) + SourceIndex(3) +1 >Emitted(55, 1) Source(14, 1) + SourceIndex(3) +2 >Emitted(55, 2) Source(14, 2) + SourceIndex(3) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -1577,13 +1581,13 @@ sourceFile:../../../second/second_part2.ts 1-> 2 >^^^^^^^^^^^^^^^^^^^-> 1-> -1->Emitted(54, 1) Source(1, 1) + SourceIndex(4) +1->Emitted(56, 1) Source(1, 1) + SourceIndex(4) --- >>> function C() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(55, 5) Source(1, 1) + SourceIndex(4) +1->Emitted(57, 5) Source(1, 1) + SourceIndex(4) --- >>> } 1->^^^^ @@ -1595,8 +1599,8 @@ sourceFile:../../../second/second_part2.ts > } > 2 > } -1->Emitted(56, 5) Source(5, 1) + SourceIndex(4) -2 >Emitted(56, 6) Source(5, 2) + SourceIndex(4) +1->Emitted(58, 5) Source(5, 1) + SourceIndex(4) +2 >Emitted(58, 6) Source(5, 2) + SourceIndex(4) --- >>> C.prototype.doSomething = function () { 1->^^^^ @@ -1606,9 +1610,9 @@ sourceFile:../../../second/second_part2.ts 1-> 2 > doSomething 3 > -1->Emitted(57, 5) Source(2, 5) + SourceIndex(4) -2 >Emitted(57, 28) Source(2, 16) + SourceIndex(4) -3 >Emitted(57, 31) Source(2, 5) + SourceIndex(4) +1->Emitted(59, 5) Source(2, 5) + SourceIndex(4) +2 >Emitted(59, 28) Source(2, 16) + SourceIndex(4) +3 >Emitted(59, 31) Source(2, 5) + SourceIndex(4) --- >>> console.log("something got done"); 1->^^^^^^^^ @@ -1628,14 +1632,14 @@ sourceFile:../../../second/second_part2.ts 6 > "something got done" 7 > ) 8 > ; -1->Emitted(58, 9) Source(3, 9) + SourceIndex(4) -2 >Emitted(58, 16) Source(3, 16) + SourceIndex(4) -3 >Emitted(58, 17) Source(3, 17) + SourceIndex(4) -4 >Emitted(58, 20) Source(3, 20) + SourceIndex(4) -5 >Emitted(58, 21) Source(3, 21) + SourceIndex(4) -6 >Emitted(58, 41) Source(3, 41) + SourceIndex(4) -7 >Emitted(58, 42) Source(3, 42) + SourceIndex(4) -8 >Emitted(58, 43) Source(3, 43) + SourceIndex(4) +1->Emitted(60, 9) Source(3, 9) + SourceIndex(4) +2 >Emitted(60, 16) Source(3, 16) + SourceIndex(4) +3 >Emitted(60, 17) Source(3, 17) + SourceIndex(4) +4 >Emitted(60, 20) Source(3, 20) + SourceIndex(4) +5 >Emitted(60, 21) Source(3, 21) + SourceIndex(4) +6 >Emitted(60, 41) Source(3, 41) + SourceIndex(4) +7 >Emitted(60, 42) Source(3, 42) + SourceIndex(4) +8 >Emitted(60, 43) Source(3, 43) + SourceIndex(4) --- >>> }; 1 >^^^^ @@ -1644,8 +1648,8 @@ sourceFile:../../../second/second_part2.ts 1 > > 2 > } -1 >Emitted(59, 5) Source(4, 5) + SourceIndex(4) -2 >Emitted(59, 6) Source(4, 6) + SourceIndex(4) +1 >Emitted(61, 5) Source(4, 5) + SourceIndex(4) +2 >Emitted(61, 6) Source(4, 6) + SourceIndex(4) --- >>> return C; 1->^^^^ @@ -1653,8 +1657,8 @@ sourceFile:../../../second/second_part2.ts 1-> > 2 > } -1->Emitted(60, 5) Source(5, 1) + SourceIndex(4) -2 >Emitted(60, 13) Source(5, 2) + SourceIndex(4) +1->Emitted(62, 5) Source(5, 1) + SourceIndex(4) +2 >Emitted(62, 13) Source(5, 2) + SourceIndex(4) --- >>>}()); 1 > @@ -1670,10 +1674,10 @@ sourceFile:../../../second/second_part2.ts > console.log("something got done"); > } > } -1 >Emitted(61, 1) Source(5, 1) + SourceIndex(4) -2 >Emitted(61, 2) Source(5, 2) + SourceIndex(4) -3 >Emitted(61, 2) Source(1, 1) + SourceIndex(4) -4 >Emitted(61, 6) Source(5, 2) + SourceIndex(4) +1 >Emitted(63, 1) Source(5, 1) + SourceIndex(4) +2 >Emitted(63, 2) Source(5, 2) + SourceIndex(4) +3 >Emitted(63, 2) Source(1, 1) + SourceIndex(4) +4 >Emitted(63, 6) Source(5, 2) + SourceIndex(4) --- >>>function secondsecond_part2Spread() { 1-> @@ -1684,9 +1688,9 @@ sourceFile:../../../second/second_part2.ts > 2 >function 3 > secondsecond_part2Spread -1->Emitted(62, 1) Source(7, 1) + SourceIndex(4) -2 >Emitted(62, 10) Source(7, 10) + SourceIndex(4) -3 >Emitted(62, 34) Source(7, 34) + SourceIndex(4) +1->Emitted(64, 1) Source(7, 1) + SourceIndex(4) +2 >Emitted(64, 10) Source(7, 10) + SourceIndex(4) +3 >Emitted(64, 34) Source(7, 34) + SourceIndex(4) --- >>> var b = []; 1 >^^^^ @@ -1694,8 +1698,8 @@ sourceFile:../../../second/second_part2.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >( 2 > ...b: number[] -1 >Emitted(63, 5) Source(7, 35) + SourceIndex(4) -2 >Emitted(63, 16) Source(7, 49) + SourceIndex(4) +1 >Emitted(65, 5) Source(7, 35) + SourceIndex(4) +2 >Emitted(65, 16) Source(7, 49) + SourceIndex(4) --- >>> for (var _i = 0; _i < arguments.length; _i++) { 1->^^^^^^^^^ @@ -1710,20 +1714,20 @@ sourceFile:../../../second/second_part2.ts 4 > ...b: number[] 5 > 6 > ...b: number[] -1->Emitted(64, 10) Source(7, 35) + SourceIndex(4) -2 >Emitted(64, 20) Source(7, 49) + SourceIndex(4) -3 >Emitted(64, 22) Source(7, 35) + SourceIndex(4) -4 >Emitted(64, 43) Source(7, 49) + SourceIndex(4) -5 >Emitted(64, 45) Source(7, 35) + SourceIndex(4) -6 >Emitted(64, 49) Source(7, 49) + SourceIndex(4) +1->Emitted(66, 10) Source(7, 35) + SourceIndex(4) +2 >Emitted(66, 20) Source(7, 49) + SourceIndex(4) +3 >Emitted(66, 22) Source(7, 35) + SourceIndex(4) +4 >Emitted(66, 43) Source(7, 49) + SourceIndex(4) +5 >Emitted(66, 45) Source(7, 35) + SourceIndex(4) +6 >Emitted(66, 49) Source(7, 49) + SourceIndex(4) --- >>> b[_i] = arguments[_i]; 1 >^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^ 1 > 2 > ...b: number[] -1 >Emitted(65, 9) Source(7, 35) + SourceIndex(4) -2 >Emitted(65, 31) Source(7, 49) + SourceIndex(4) +1 >Emitted(67, 9) Source(7, 35) + SourceIndex(4) +2 >Emitted(67, 31) Source(7, 49) + SourceIndex(4) --- >>> } >>>} @@ -1732,8 +1736,8 @@ sourceFile:../../../second/second_part2.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >) { 2 >} -1 >Emitted(67, 1) Source(7, 53) + SourceIndex(4) -2 >Emitted(67, 2) Source(7, 54) + SourceIndex(4) +1 >Emitted(69, 1) Source(7, 53) + SourceIndex(4) +2 >Emitted(69, 2) Source(7, 54) + SourceIndex(4) --- >>>secondsecond_part2Spread.apply(void 0, __spread([10, 20, 30])); 1-> @@ -1759,17 +1763,17 @@ sourceFile:../../../second/second_part2.ts 9 > 30 10> ] 11> ); -1->Emitted(68, 1) Source(8, 1) + SourceIndex(4) -2 >Emitted(68, 25) Source(8, 25) + SourceIndex(4) -3 >Emitted(68, 49) Source(8, 29) + SourceIndex(4) -4 >Emitted(68, 50) Source(8, 30) + SourceIndex(4) -5 >Emitted(68, 52) Source(8, 32) + SourceIndex(4) -6 >Emitted(68, 54) Source(8, 34) + SourceIndex(4) -7 >Emitted(68, 56) Source(8, 36) + SourceIndex(4) -8 >Emitted(68, 58) Source(8, 38) + SourceIndex(4) -9 >Emitted(68, 60) Source(8, 40) + SourceIndex(4) -10>Emitted(68, 61) Source(8, 41) + SourceIndex(4) -11>Emitted(68, 64) Source(8, 43) + SourceIndex(4) +1->Emitted(70, 1) Source(8, 1) + SourceIndex(4) +2 >Emitted(70, 25) Source(8, 25) + SourceIndex(4) +3 >Emitted(70, 49) Source(8, 29) + SourceIndex(4) +4 >Emitted(70, 50) Source(8, 30) + SourceIndex(4) +5 >Emitted(70, 52) Source(8, 32) + SourceIndex(4) +6 >Emitted(70, 54) Source(8, 34) + SourceIndex(4) +7 >Emitted(70, 56) Source(8, 36) + SourceIndex(4) +8 >Emitted(70, 58) Source(8, 38) + SourceIndex(4) +9 >Emitted(70, 60) Source(8, 40) + SourceIndex(4) +10>Emitted(70, 61) Source(8, 41) + SourceIndex(4) +11>Emitted(70, 64) Source(8, 43) + SourceIndex(4) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -1793,14 +1797,14 @@ sourceFile:../../third_part1.ts 6 > C 7 > () 8 > ; -1 >Emitted(69, 1) Source(1, 1) + SourceIndex(5) -2 >Emitted(69, 5) Source(1, 5) + SourceIndex(5) -3 >Emitted(69, 6) Source(1, 6) + SourceIndex(5) -4 >Emitted(69, 9) Source(1, 9) + SourceIndex(5) -5 >Emitted(69, 13) Source(1, 13) + SourceIndex(5) -6 >Emitted(69, 14) Source(1, 14) + SourceIndex(5) -7 >Emitted(69, 16) Source(1, 16) + SourceIndex(5) -8 >Emitted(69, 17) Source(1, 17) + SourceIndex(5) +1 >Emitted(71, 1) Source(1, 1) + SourceIndex(5) +2 >Emitted(71, 5) Source(1, 5) + SourceIndex(5) +3 >Emitted(71, 6) Source(1, 6) + SourceIndex(5) +4 >Emitted(71, 9) Source(1, 9) + SourceIndex(5) +5 >Emitted(71, 13) Source(1, 13) + SourceIndex(5) +6 >Emitted(71, 14) Source(1, 14) + SourceIndex(5) +7 >Emitted(71, 16) Source(1, 16) + SourceIndex(5) +8 >Emitted(71, 17) Source(1, 17) + SourceIndex(5) --- >>>c.doSomething(); 1-> @@ -1817,12 +1821,12 @@ sourceFile:../../third_part1.ts 4 > doSomething 5 > () 6 > ; -1->Emitted(70, 1) Source(2, 1) + SourceIndex(5) -2 >Emitted(70, 2) Source(2, 2) + SourceIndex(5) -3 >Emitted(70, 3) Source(2, 3) + SourceIndex(5) -4 >Emitted(70, 14) Source(2, 14) + SourceIndex(5) -5 >Emitted(70, 16) Source(2, 16) + SourceIndex(5) -6 >Emitted(70, 17) Source(2, 17) + SourceIndex(5) +1->Emitted(72, 1) Source(2, 1) + SourceIndex(5) +2 >Emitted(72, 2) Source(2, 2) + SourceIndex(5) +3 >Emitted(72, 3) Source(2, 3) + SourceIndex(5) +4 >Emitted(72, 14) Source(2, 14) + SourceIndex(5) +5 >Emitted(72, 16) Source(2, 16) + SourceIndex(5) +6 >Emitted(72, 17) Source(2, 17) + SourceIndex(5) --- >>>function forthirdthird_part1Rest() { 1-> @@ -1833,9 +1837,9 @@ sourceFile:../../third_part1.ts > 2 >function 3 > forthirdthird_part1Rest -1->Emitted(71, 1) Source(3, 1) + SourceIndex(5) -2 >Emitted(71, 10) Source(3, 10) + SourceIndex(5) -3 >Emitted(71, 33) Source(3, 33) + SourceIndex(5) +1->Emitted(73, 1) Source(3, 1) + SourceIndex(5) +2 >Emitted(73, 10) Source(3, 10) + SourceIndex(5) +3 >Emitted(73, 33) Source(3, 33) + SourceIndex(5) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^ @@ -1855,14 +1859,14 @@ sourceFile:../../third_part1.ts 6 > , 7 > ...rest } = { a: 10, b: 30, yy: 30 } 8 > ; -1->Emitted(72, 5) Source(4, 1) + SourceIndex(5) -2 >Emitted(72, 9) Source(4, 7) + SourceIndex(5) -3 >Emitted(72, 38) Source(4, 48) + SourceIndex(5) -4 >Emitted(72, 40) Source(4, 9) + SourceIndex(5) -5 >Emitted(72, 48) Source(4, 10) + SourceIndex(5) -6 >Emitted(72, 50) Source(4, 12) + SourceIndex(5) -7 >Emitted(72, 74) Source(4, 48) + SourceIndex(5) -8 >Emitted(72, 75) Source(4, 49) + SourceIndex(5) +1->Emitted(74, 5) Source(4, 1) + SourceIndex(5) +2 >Emitted(74, 9) Source(4, 7) + SourceIndex(5) +3 >Emitted(74, 38) Source(4, 48) + SourceIndex(5) +4 >Emitted(74, 40) Source(4, 9) + SourceIndex(5) +5 >Emitted(74, 48) Source(4, 10) + SourceIndex(5) +6 >Emitted(74, 50) Source(4, 12) + SourceIndex(5) +7 >Emitted(74, 74) Source(4, 48) + SourceIndex(5) +8 >Emitted(74, 75) Source(4, 49) + SourceIndex(5) --- >>>} 1 > @@ -1871,8 +1875,8 @@ sourceFile:../../third_part1.ts 1 > > 2 >} -1 >Emitted(73, 1) Source(5, 1) + SourceIndex(5) -2 >Emitted(73, 2) Source(5, 2) + SourceIndex(5) +1 >Emitted(75, 1) Source(5, 1) + SourceIndex(5) +2 >Emitted(75, 2) Source(5, 2) + SourceIndex(5) --- >>>function thirdthird_part1Spread() { 1-> @@ -1882,9 +1886,9 @@ sourceFile:../../third_part1.ts > 2 >function 3 > thirdthird_part1Spread -1->Emitted(74, 1) Source(6, 1) + SourceIndex(5) -2 >Emitted(74, 10) Source(6, 10) + SourceIndex(5) -3 >Emitted(74, 32) Source(6, 32) + SourceIndex(5) +1->Emitted(76, 1) Source(6, 1) + SourceIndex(5) +2 >Emitted(76, 10) Source(6, 10) + SourceIndex(5) +3 >Emitted(76, 32) Source(6, 32) + SourceIndex(5) --- >>> var b = []; 1 >^^^^ @@ -1892,8 +1896,8 @@ sourceFile:../../third_part1.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >( 2 > ...b: number[] -1 >Emitted(75, 5) Source(6, 33) + SourceIndex(5) -2 >Emitted(75, 16) Source(6, 47) + SourceIndex(5) +1 >Emitted(77, 5) Source(6, 33) + SourceIndex(5) +2 >Emitted(77, 16) Source(6, 47) + SourceIndex(5) --- >>> for (var _i = 0; _i < arguments.length; _i++) { 1->^^^^^^^^^ @@ -1908,20 +1912,20 @@ sourceFile:../../third_part1.ts 4 > ...b: number[] 5 > 6 > ...b: number[] -1->Emitted(76, 10) Source(6, 33) + SourceIndex(5) -2 >Emitted(76, 20) Source(6, 47) + SourceIndex(5) -3 >Emitted(76, 22) Source(6, 33) + SourceIndex(5) -4 >Emitted(76, 43) Source(6, 47) + SourceIndex(5) -5 >Emitted(76, 45) Source(6, 33) + SourceIndex(5) -6 >Emitted(76, 49) Source(6, 47) + SourceIndex(5) +1->Emitted(78, 10) Source(6, 33) + SourceIndex(5) +2 >Emitted(78, 20) Source(6, 47) + SourceIndex(5) +3 >Emitted(78, 22) Source(6, 33) + SourceIndex(5) +4 >Emitted(78, 43) Source(6, 47) + SourceIndex(5) +5 >Emitted(78, 45) Source(6, 33) + SourceIndex(5) +6 >Emitted(78, 49) Source(6, 47) + SourceIndex(5) --- >>> b[_i] = arguments[_i]; 1 >^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^ 1 > 2 > ...b: number[] -1 >Emitted(77, 9) Source(6, 33) + SourceIndex(5) -2 >Emitted(77, 31) Source(6, 47) + SourceIndex(5) +1 >Emitted(79, 9) Source(6, 33) + SourceIndex(5) +2 >Emitted(79, 31) Source(6, 47) + SourceIndex(5) --- >>> } >>>} @@ -1930,8 +1934,8 @@ sourceFile:../../third_part1.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >) { 2 >} -1 >Emitted(79, 1) Source(6, 51) + SourceIndex(5) -2 >Emitted(79, 2) Source(6, 52) + SourceIndex(5) +1 >Emitted(81, 1) Source(6, 51) + SourceIndex(5) +2 >Emitted(81, 2) Source(6, 52) + SourceIndex(5) --- >>>thirdthird_part1Spread.apply(void 0, __spread([10, 20, 30])); 1-> @@ -1957,17 +1961,17 @@ sourceFile:../../third_part1.ts 9 > 30 10> ] 11> ); -1->Emitted(80, 1) Source(7, 1) + SourceIndex(5) -2 >Emitted(80, 23) Source(7, 23) + SourceIndex(5) -3 >Emitted(80, 47) Source(7, 27) + SourceIndex(5) -4 >Emitted(80, 48) Source(7, 28) + SourceIndex(5) -5 >Emitted(80, 50) Source(7, 30) + SourceIndex(5) -6 >Emitted(80, 52) Source(7, 32) + SourceIndex(5) -7 >Emitted(80, 54) Source(7, 34) + SourceIndex(5) -8 >Emitted(80, 56) Source(7, 36) + SourceIndex(5) -9 >Emitted(80, 58) Source(7, 38) + SourceIndex(5) -10>Emitted(80, 59) Source(7, 39) + SourceIndex(5) -11>Emitted(80, 62) Source(7, 41) + SourceIndex(5) +1->Emitted(82, 1) Source(7, 1) + SourceIndex(5) +2 >Emitted(82, 23) Source(7, 23) + SourceIndex(5) +3 >Emitted(82, 47) Source(7, 27) + SourceIndex(5) +4 >Emitted(82, 48) Source(7, 28) + SourceIndex(5) +5 >Emitted(82, 50) Source(7, 30) + SourceIndex(5) +6 >Emitted(82, 52) Source(7, 32) + SourceIndex(5) +7 >Emitted(82, 54) Source(7, 34) + SourceIndex(5) +8 >Emitted(82, 56) Source(7, 36) + SourceIndex(5) +9 >Emitted(82, 58) Source(7, 38) + SourceIndex(5) +10>Emitted(82, 59) Source(7, 39) + SourceIndex(5) +11>Emitted(82, 62) Source(7, 41) + SourceIndex(5) --- >>>//# sourceMappingURL=third-output.js.map @@ -1994,39 +1998,39 @@ sourceFile:../../third_part1.ts }, { "pos": 678, - "end": 1093, + "end": 1170, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 1095, - "end": 1457, + "pos": 1172, + "end": 1534, "kind": "prepend", "data": "/src/first/bin/first-output.js", "texts": [ { - "pos": 1095, - "end": 1457, + "pos": 1172, + "end": 1534, "kind": "text" } ] }, { - "pos": 1457, - "end": 2077, + "pos": 1534, + "end": 2154, "kind": "prepend", "data": "/src/2/second-output.js", "texts": [ { - "pos": 1457, - "end": 2077, + "pos": 1534, + "end": 2154, "kind": "text" } ] }, { - "pos": 2077, - "end": 2442, + "pos": 2154, + "end": 2519, "kind": "text" } ], @@ -2105,20 +2109,22 @@ var __spread = (this && this.__spread) || function () { return ar; }; ---------------------------------------------------------------------- -emitHelpers: (678-1093):: typescript:rest +emitHelpers: (678-1170):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; ---------------------------------------------------------------------- -prepend: (1095-1457):: /src/first/bin/first-output.js texts:: 1 +prepend: (1172-1534):: /src/first/bin/first-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (1095-1457) +text: (1172-1534) var s = "Hello, world"; console.log(s); function forfirstfirst_PART1Rest() { } @@ -2135,9 +2141,9 @@ function firstfirst_part3Spread() { firstfirst_part3Spread.apply(void 0, __spread([10, 20, 30])); ---------------------------------------------------------------------- -prepend: (1457-2077):: /src/2/second-output.js texts:: 1 +prepend: (1534-2154):: /src/2/second-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (1457-2077) +text: (1534-2154) var N; (function (N) { function f() { @@ -2165,7 +2171,7 @@ function secondsecond_part2Spread() { secondsecond_part2Spread.apply(void 0, __spread([10, 20, 30])); ---------------------------------------------------------------------- -text: (2077-2442) +text: (2154-2519) var c = new C(); c.doSomething(); function forthirdthird_part1Rest() { diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/multiple-emitHelpers-in-different-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/multiple-emitHelpers-in-different-projects.js index 14fc6f86607..36176e67722 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/multiple-emitHelpers-in-different-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/multiple-emitHelpers-in-different-projects.js @@ -735,8 +735,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; var s = "Hello, world"; @@ -776,7 +778,7 @@ function forthirdthird_part1Rest() { //# sourceMappingURL=third-output.js.map //// [/src/third/thirdjs/output/third-output.js.map] -{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../../first/first_PART1.ts","../../../first/first_part2.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts","../../third_part1.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB,KAAK,CAAC;ACXtC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC;ACED,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;AAED,SAAS,wBAAwB;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AACrD,wBAAwB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;ACb1C;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC;ACJD,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC;AAChB,SAAS,uBAAuB;IAChC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC"} +{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../../first/first_PART1.ts","../../../first/first_part2.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts","../../third_part1.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB,KAAK,CAAC;ACXtC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC;ACED,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;AAED,SAAS,wBAAwB;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AACrD,wBAAwB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;ACb1C;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC;ACJD,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC;AAChB,SAAS,uBAAuB;IAChC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC"} //// [/src/third/thirdjs/output/third-output.js.map.baseline.txt] =================================================================== @@ -814,8 +816,10 @@ sourceFile:../../../first/first_PART1.ts >>> for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") ->>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) ->>> t[p[i]] = s[p[i]]; +>>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> t[p[i]] = s[p[i]]; +>>> } >>> return t; >>>}; >>>var s = "Hello, world"; @@ -835,12 +839,12 @@ sourceFile:../../../first/first_PART1.ts 4 > = 5 > "Hello, world" 6 > ; -1 >Emitted(30, 1) Source(5, 1) + SourceIndex(0) -2 >Emitted(30, 5) Source(5, 7) + SourceIndex(0) -3 >Emitted(30, 6) Source(5, 8) + SourceIndex(0) -4 >Emitted(30, 9) Source(5, 11) + SourceIndex(0) -5 >Emitted(30, 23) Source(5, 25) + SourceIndex(0) -6 >Emitted(30, 24) Source(5, 26) + SourceIndex(0) +1 >Emitted(32, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(32, 5) Source(5, 7) + SourceIndex(0) +3 >Emitted(32, 6) Source(5, 8) + SourceIndex(0) +4 >Emitted(32, 9) Source(5, 11) + SourceIndex(0) +5 >Emitted(32, 23) Source(5, 25) + SourceIndex(0) +6 >Emitted(32, 24) Source(5, 26) + SourceIndex(0) --- >>>console.log(s); 1 > @@ -866,14 +870,14 @@ sourceFile:../../../first/first_PART1.ts 6 > s 7 > ) 8 > ; -1 >Emitted(31, 1) Source(11, 1) + SourceIndex(0) -2 >Emitted(31, 8) Source(11, 8) + SourceIndex(0) -3 >Emitted(31, 9) Source(11, 9) + SourceIndex(0) -4 >Emitted(31, 12) Source(11, 12) + SourceIndex(0) -5 >Emitted(31, 13) Source(11, 13) + SourceIndex(0) -6 >Emitted(31, 14) Source(11, 14) + SourceIndex(0) -7 >Emitted(31, 15) Source(11, 15) + SourceIndex(0) -8 >Emitted(31, 16) Source(11, 16) + SourceIndex(0) +1 >Emitted(33, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(33, 8) Source(11, 8) + SourceIndex(0) +3 >Emitted(33, 9) Source(11, 9) + SourceIndex(0) +4 >Emitted(33, 12) Source(11, 12) + SourceIndex(0) +5 >Emitted(33, 13) Source(11, 13) + SourceIndex(0) +6 >Emitted(33, 14) Source(11, 14) + SourceIndex(0) +7 >Emitted(33, 15) Source(11, 15) + SourceIndex(0) +8 >Emitted(33, 16) Source(11, 16) + SourceIndex(0) --- >>>function forfirstfirst_PART1Rest() { } 1-> @@ -887,11 +891,11 @@ sourceFile:../../../first/first_PART1.ts 3 > forfirstfirst_PART1Rest 4 > () { 5 > } -1->Emitted(32, 1) Source(12, 1) + SourceIndex(0) -2 >Emitted(32, 10) Source(12, 10) + SourceIndex(0) -3 >Emitted(32, 33) Source(12, 33) + SourceIndex(0) -4 >Emitted(32, 38) Source(12, 38) + SourceIndex(0) -5 >Emitted(32, 39) Source(12, 39) + SourceIndex(0) +1->Emitted(34, 1) Source(12, 1) + SourceIndex(0) +2 >Emitted(34, 10) Source(12, 10) + SourceIndex(0) +3 >Emitted(34, 33) Source(12, 33) + SourceIndex(0) +4 >Emitted(34, 38) Source(12, 38) + SourceIndex(0) +5 >Emitted(34, 39) Source(12, 39) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -916,15 +920,15 @@ sourceFile:../../../first/first_part2.ts 7 > () 8 > ) 9 > ; -1 >Emitted(33, 1) Source(1, 1) + SourceIndex(1) -2 >Emitted(33, 8) Source(1, 8) + SourceIndex(1) -3 >Emitted(33, 9) Source(1, 9) + SourceIndex(1) -4 >Emitted(33, 12) Source(1, 12) + SourceIndex(1) -5 >Emitted(33, 13) Source(1, 13) + SourceIndex(1) -6 >Emitted(33, 14) Source(1, 14) + SourceIndex(1) -7 >Emitted(33, 16) Source(1, 16) + SourceIndex(1) -8 >Emitted(33, 17) Source(1, 17) + SourceIndex(1) -9 >Emitted(33, 18) Source(1, 18) + SourceIndex(1) +1 >Emitted(35, 1) Source(1, 1) + SourceIndex(1) +2 >Emitted(35, 8) Source(1, 8) + SourceIndex(1) +3 >Emitted(35, 9) Source(1, 9) + SourceIndex(1) +4 >Emitted(35, 12) Source(1, 12) + SourceIndex(1) +5 >Emitted(35, 13) Source(1, 13) + SourceIndex(1) +6 >Emitted(35, 14) Source(1, 14) + SourceIndex(1) +7 >Emitted(35, 16) Source(1, 16) + SourceIndex(1) +8 >Emitted(35, 17) Source(1, 17) + SourceIndex(1) +9 >Emitted(35, 18) Source(1, 18) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -938,9 +942,9 @@ sourceFile:../../../first/first_part3.ts 1 > 2 >function 3 > f -1 >Emitted(34, 1) Source(1, 1) + SourceIndex(2) -2 >Emitted(34, 10) Source(1, 10) + SourceIndex(2) -3 >Emitted(34, 11) Source(1, 11) + SourceIndex(2) +1 >Emitted(36, 1) Source(1, 1) + SourceIndex(2) +2 >Emitted(36, 10) Source(1, 10) + SourceIndex(2) +3 >Emitted(36, 11) Source(1, 11) + SourceIndex(2) --- >>> return "JS does hoists"; 1->^^^^ @@ -952,10 +956,10 @@ sourceFile:../../../first/first_part3.ts 2 > return 3 > "JS does hoists" 4 > ; -1->Emitted(35, 5) Source(2, 5) + SourceIndex(2) -2 >Emitted(35, 12) Source(2, 12) + SourceIndex(2) -3 >Emitted(35, 28) Source(2, 28) + SourceIndex(2) -4 >Emitted(35, 29) Source(2, 29) + SourceIndex(2) +1->Emitted(37, 5) Source(2, 5) + SourceIndex(2) +2 >Emitted(37, 12) Source(2, 12) + SourceIndex(2) +3 >Emitted(37, 28) Source(2, 28) + SourceIndex(2) +4 >Emitted(37, 29) Source(2, 29) + SourceIndex(2) --- >>>} 1 > @@ -964,8 +968,8 @@ sourceFile:../../../first/first_part3.ts 1 > > 2 >} -1 >Emitted(36, 1) Source(3, 1) + SourceIndex(2) -2 >Emitted(36, 2) Source(3, 2) + SourceIndex(2) +1 >Emitted(38, 1) Source(3, 1) + SourceIndex(2) +2 >Emitted(38, 2) Source(3, 2) + SourceIndex(2) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -991,10 +995,10 @@ sourceFile:../../../second/second_part1.ts > > f(); > } -1->Emitted(37, 1) Source(5, 1) + SourceIndex(3) -2 >Emitted(37, 5) Source(5, 11) + SourceIndex(3) -3 >Emitted(37, 6) Source(5, 12) + SourceIndex(3) -4 >Emitted(37, 7) Source(11, 2) + SourceIndex(3) +1->Emitted(39, 1) Source(5, 1) + SourceIndex(3) +2 >Emitted(39, 5) Source(5, 11) + SourceIndex(3) +3 >Emitted(39, 6) Source(5, 12) + SourceIndex(3) +4 >Emitted(39, 7) Source(11, 2) + SourceIndex(3) --- >>>(function (N) { 1-> @@ -1004,9 +1008,9 @@ sourceFile:../../../second/second_part1.ts 1-> 2 >namespace 3 > N -1->Emitted(38, 1) Source(5, 1) + SourceIndex(3) -2 >Emitted(38, 12) Source(5, 11) + SourceIndex(3) -3 >Emitted(38, 13) Source(5, 12) + SourceIndex(3) +1->Emitted(40, 1) Source(5, 1) + SourceIndex(3) +2 >Emitted(40, 12) Source(5, 11) + SourceIndex(3) +3 >Emitted(40, 13) Source(5, 12) + SourceIndex(3) --- >>> function f() { 1->^^^^ @@ -1017,9 +1021,9 @@ sourceFile:../../../second/second_part1.ts > 2 > function 3 > f -1->Emitted(39, 5) Source(6, 5) + SourceIndex(3) -2 >Emitted(39, 14) Source(6, 14) + SourceIndex(3) -3 >Emitted(39, 15) Source(6, 15) + SourceIndex(3) +1->Emitted(41, 5) Source(6, 5) + SourceIndex(3) +2 >Emitted(41, 14) Source(6, 14) + SourceIndex(3) +3 >Emitted(41, 15) Source(6, 15) + SourceIndex(3) --- >>> console.log('testing'); 1->^^^^^^^^ @@ -1039,14 +1043,14 @@ sourceFile:../../../second/second_part1.ts 6 > 'testing' 7 > ) 8 > ; -1->Emitted(40, 9) Source(7, 9) + SourceIndex(3) -2 >Emitted(40, 16) Source(7, 16) + SourceIndex(3) -3 >Emitted(40, 17) Source(7, 17) + SourceIndex(3) -4 >Emitted(40, 20) Source(7, 20) + SourceIndex(3) -5 >Emitted(40, 21) Source(7, 21) + SourceIndex(3) -6 >Emitted(40, 30) Source(7, 30) + SourceIndex(3) -7 >Emitted(40, 31) Source(7, 31) + SourceIndex(3) -8 >Emitted(40, 32) Source(7, 32) + SourceIndex(3) +1->Emitted(42, 9) Source(7, 9) + SourceIndex(3) +2 >Emitted(42, 16) Source(7, 16) + SourceIndex(3) +3 >Emitted(42, 17) Source(7, 17) + SourceIndex(3) +4 >Emitted(42, 20) Source(7, 20) + SourceIndex(3) +5 >Emitted(42, 21) Source(7, 21) + SourceIndex(3) +6 >Emitted(42, 30) Source(7, 30) + SourceIndex(3) +7 >Emitted(42, 31) Source(7, 31) + SourceIndex(3) +8 >Emitted(42, 32) Source(7, 32) + SourceIndex(3) --- >>> } 1 >^^^^ @@ -1055,8 +1059,8 @@ sourceFile:../../../second/second_part1.ts 1 > > 2 > } -1 >Emitted(41, 5) Source(8, 5) + SourceIndex(3) -2 >Emitted(41, 6) Source(8, 6) + SourceIndex(3) +1 >Emitted(43, 5) Source(8, 5) + SourceIndex(3) +2 >Emitted(43, 6) Source(8, 6) + SourceIndex(3) --- >>> f(); 1->^^^^ @@ -1070,10 +1074,10 @@ sourceFile:../../../second/second_part1.ts 2 > f 3 > () 4 > ; -1->Emitted(42, 5) Source(10, 5) + SourceIndex(3) -2 >Emitted(42, 6) Source(10, 6) + SourceIndex(3) -3 >Emitted(42, 8) Source(10, 8) + SourceIndex(3) -4 >Emitted(42, 9) Source(10, 9) + SourceIndex(3) +1->Emitted(44, 5) Source(10, 5) + SourceIndex(3) +2 >Emitted(44, 6) Source(10, 6) + SourceIndex(3) +3 >Emitted(44, 8) Source(10, 8) + SourceIndex(3) +4 >Emitted(44, 9) Source(10, 9) + SourceIndex(3) --- >>>})(N || (N = {})); 1-> @@ -1098,13 +1102,13 @@ sourceFile:../../../second/second_part1.ts > > f(); > } -1->Emitted(43, 1) Source(11, 1) + SourceIndex(3) -2 >Emitted(43, 2) Source(11, 2) + SourceIndex(3) -3 >Emitted(43, 4) Source(5, 11) + SourceIndex(3) -4 >Emitted(43, 5) Source(5, 12) + SourceIndex(3) -5 >Emitted(43, 10) Source(5, 11) + SourceIndex(3) -6 >Emitted(43, 11) Source(5, 12) + SourceIndex(3) -7 >Emitted(43, 19) Source(11, 2) + SourceIndex(3) +1->Emitted(45, 1) Source(11, 1) + SourceIndex(3) +2 >Emitted(45, 2) Source(11, 2) + SourceIndex(3) +3 >Emitted(45, 4) Source(5, 11) + SourceIndex(3) +4 >Emitted(45, 5) Source(5, 12) + SourceIndex(3) +5 >Emitted(45, 10) Source(5, 11) + SourceIndex(3) +6 >Emitted(45, 11) Source(5, 12) + SourceIndex(3) +7 >Emitted(45, 19) Source(11, 2) + SourceIndex(3) --- >>>function secondsecond_part1Spread() { 1-> @@ -1115,9 +1119,9 @@ sourceFile:../../../second/second_part1.ts > 2 >function 3 > secondsecond_part1Spread -1->Emitted(44, 1) Source(13, 1) + SourceIndex(3) -2 >Emitted(44, 10) Source(13, 10) + SourceIndex(3) -3 >Emitted(44, 34) Source(13, 34) + SourceIndex(3) +1->Emitted(46, 1) Source(13, 1) + SourceIndex(3) +2 >Emitted(46, 10) Source(13, 10) + SourceIndex(3) +3 >Emitted(46, 34) Source(13, 34) + SourceIndex(3) --- >>> var b = []; 1 >^^^^ @@ -1125,8 +1129,8 @@ sourceFile:../../../second/second_part1.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >( 2 > ...b: number[] -1 >Emitted(45, 5) Source(13, 35) + SourceIndex(3) -2 >Emitted(45, 16) Source(13, 49) + SourceIndex(3) +1 >Emitted(47, 5) Source(13, 35) + SourceIndex(3) +2 >Emitted(47, 16) Source(13, 49) + SourceIndex(3) --- >>> for (var _i = 0; _i < arguments.length; _i++) { 1->^^^^^^^^^ @@ -1141,20 +1145,20 @@ sourceFile:../../../second/second_part1.ts 4 > ...b: number[] 5 > 6 > ...b: number[] -1->Emitted(46, 10) Source(13, 35) + SourceIndex(3) -2 >Emitted(46, 20) Source(13, 49) + SourceIndex(3) -3 >Emitted(46, 22) Source(13, 35) + SourceIndex(3) -4 >Emitted(46, 43) Source(13, 49) + SourceIndex(3) -5 >Emitted(46, 45) Source(13, 35) + SourceIndex(3) -6 >Emitted(46, 49) Source(13, 49) + SourceIndex(3) +1->Emitted(48, 10) Source(13, 35) + SourceIndex(3) +2 >Emitted(48, 20) Source(13, 49) + SourceIndex(3) +3 >Emitted(48, 22) Source(13, 35) + SourceIndex(3) +4 >Emitted(48, 43) Source(13, 49) + SourceIndex(3) +5 >Emitted(48, 45) Source(13, 35) + SourceIndex(3) +6 >Emitted(48, 49) Source(13, 49) + SourceIndex(3) --- >>> b[_i] = arguments[_i]; 1 >^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^ 1 > 2 > ...b: number[] -1 >Emitted(47, 9) Source(13, 35) + SourceIndex(3) -2 >Emitted(47, 31) Source(13, 49) + SourceIndex(3) +1 >Emitted(49, 9) Source(13, 35) + SourceIndex(3) +2 >Emitted(49, 31) Source(13, 49) + SourceIndex(3) --- >>> } >>>} @@ -1163,8 +1167,8 @@ sourceFile:../../../second/second_part1.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >) { 2 >} -1 >Emitted(49, 1) Source(13, 53) + SourceIndex(3) -2 >Emitted(49, 2) Source(13, 54) + SourceIndex(3) +1 >Emitted(51, 1) Source(13, 53) + SourceIndex(3) +2 >Emitted(51, 2) Source(13, 54) + SourceIndex(3) --- >>>secondsecond_part1Spread.apply(void 0, __spread([10, 20, 30])); 1-> @@ -1190,17 +1194,17 @@ sourceFile:../../../second/second_part1.ts 9 > 30 10> ] 11> ); -1->Emitted(50, 1) Source(14, 1) + SourceIndex(3) -2 >Emitted(50, 25) Source(14, 25) + SourceIndex(3) -3 >Emitted(50, 49) Source(14, 29) + SourceIndex(3) -4 >Emitted(50, 50) Source(14, 30) + SourceIndex(3) -5 >Emitted(50, 52) Source(14, 32) + SourceIndex(3) -6 >Emitted(50, 54) Source(14, 34) + SourceIndex(3) -7 >Emitted(50, 56) Source(14, 36) + SourceIndex(3) -8 >Emitted(50, 58) Source(14, 38) + SourceIndex(3) -9 >Emitted(50, 60) Source(14, 40) + SourceIndex(3) -10>Emitted(50, 61) Source(14, 41) + SourceIndex(3) -11>Emitted(50, 64) Source(14, 43) + SourceIndex(3) +1->Emitted(52, 1) Source(14, 1) + SourceIndex(3) +2 >Emitted(52, 25) Source(14, 25) + SourceIndex(3) +3 >Emitted(52, 49) Source(14, 29) + SourceIndex(3) +4 >Emitted(52, 50) Source(14, 30) + SourceIndex(3) +5 >Emitted(52, 52) Source(14, 32) + SourceIndex(3) +6 >Emitted(52, 54) Source(14, 34) + SourceIndex(3) +7 >Emitted(52, 56) Source(14, 36) + SourceIndex(3) +8 >Emitted(52, 58) Source(14, 38) + SourceIndex(3) +9 >Emitted(52, 60) Source(14, 40) + SourceIndex(3) +10>Emitted(52, 61) Source(14, 41) + SourceIndex(3) +11>Emitted(52, 64) Source(14, 43) + SourceIndex(3) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -1210,13 +1214,13 @@ sourceFile:../../../second/second_part2.ts 1 > 2 >^^^^^^^^^^^^^^^^^^^-> 1 > -1 >Emitted(51, 1) Source(1, 1) + SourceIndex(4) +1 >Emitted(53, 1) Source(1, 1) + SourceIndex(4) --- >>> function C() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(52, 5) Source(1, 1) + SourceIndex(4) +1->Emitted(54, 5) Source(1, 1) + SourceIndex(4) --- >>> } 1->^^^^ @@ -1228,8 +1232,8 @@ sourceFile:../../../second/second_part2.ts > } > 2 > } -1->Emitted(53, 5) Source(5, 1) + SourceIndex(4) -2 >Emitted(53, 6) Source(5, 2) + SourceIndex(4) +1->Emitted(55, 5) Source(5, 1) + SourceIndex(4) +2 >Emitted(55, 6) Source(5, 2) + SourceIndex(4) --- >>> C.prototype.doSomething = function () { 1->^^^^ @@ -1239,9 +1243,9 @@ sourceFile:../../../second/second_part2.ts 1-> 2 > doSomething 3 > -1->Emitted(54, 5) Source(2, 5) + SourceIndex(4) -2 >Emitted(54, 28) Source(2, 16) + SourceIndex(4) -3 >Emitted(54, 31) Source(2, 5) + SourceIndex(4) +1->Emitted(56, 5) Source(2, 5) + SourceIndex(4) +2 >Emitted(56, 28) Source(2, 16) + SourceIndex(4) +3 >Emitted(56, 31) Source(2, 5) + SourceIndex(4) --- >>> console.log("something got done"); 1->^^^^^^^^ @@ -1261,14 +1265,14 @@ sourceFile:../../../second/second_part2.ts 6 > "something got done" 7 > ) 8 > ; -1->Emitted(55, 9) Source(3, 9) + SourceIndex(4) -2 >Emitted(55, 16) Source(3, 16) + SourceIndex(4) -3 >Emitted(55, 17) Source(3, 17) + SourceIndex(4) -4 >Emitted(55, 20) Source(3, 20) + SourceIndex(4) -5 >Emitted(55, 21) Source(3, 21) + SourceIndex(4) -6 >Emitted(55, 41) Source(3, 41) + SourceIndex(4) -7 >Emitted(55, 42) Source(3, 42) + SourceIndex(4) -8 >Emitted(55, 43) Source(3, 43) + SourceIndex(4) +1->Emitted(57, 9) Source(3, 9) + SourceIndex(4) +2 >Emitted(57, 16) Source(3, 16) + SourceIndex(4) +3 >Emitted(57, 17) Source(3, 17) + SourceIndex(4) +4 >Emitted(57, 20) Source(3, 20) + SourceIndex(4) +5 >Emitted(57, 21) Source(3, 21) + SourceIndex(4) +6 >Emitted(57, 41) Source(3, 41) + SourceIndex(4) +7 >Emitted(57, 42) Source(3, 42) + SourceIndex(4) +8 >Emitted(57, 43) Source(3, 43) + SourceIndex(4) --- >>> }; 1 >^^^^ @@ -1277,8 +1281,8 @@ sourceFile:../../../second/second_part2.ts 1 > > 2 > } -1 >Emitted(56, 5) Source(4, 5) + SourceIndex(4) -2 >Emitted(56, 6) Source(4, 6) + SourceIndex(4) +1 >Emitted(58, 5) Source(4, 5) + SourceIndex(4) +2 >Emitted(58, 6) Source(4, 6) + SourceIndex(4) --- >>> return C; 1->^^^^ @@ -1286,8 +1290,8 @@ sourceFile:../../../second/second_part2.ts 1-> > 2 > } -1->Emitted(57, 5) Source(5, 1) + SourceIndex(4) -2 >Emitted(57, 13) Source(5, 2) + SourceIndex(4) +1->Emitted(59, 5) Source(5, 1) + SourceIndex(4) +2 >Emitted(59, 13) Source(5, 2) + SourceIndex(4) --- >>>}()); 1 > @@ -1303,10 +1307,10 @@ sourceFile:../../../second/second_part2.ts > console.log("something got done"); > } > } -1 >Emitted(58, 1) Source(5, 1) + SourceIndex(4) -2 >Emitted(58, 2) Source(5, 2) + SourceIndex(4) -3 >Emitted(58, 2) Source(1, 1) + SourceIndex(4) -4 >Emitted(58, 6) Source(5, 2) + SourceIndex(4) +1 >Emitted(60, 1) Source(5, 1) + SourceIndex(4) +2 >Emitted(60, 2) Source(5, 2) + SourceIndex(4) +3 >Emitted(60, 2) Source(1, 1) + SourceIndex(4) +4 >Emitted(60, 6) Source(5, 2) + SourceIndex(4) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -1330,14 +1334,14 @@ sourceFile:../../third_part1.ts 6 > C 7 > () 8 > ; -1->Emitted(59, 1) Source(1, 1) + SourceIndex(5) -2 >Emitted(59, 5) Source(1, 5) + SourceIndex(5) -3 >Emitted(59, 6) Source(1, 6) + SourceIndex(5) -4 >Emitted(59, 9) Source(1, 9) + SourceIndex(5) -5 >Emitted(59, 13) Source(1, 13) + SourceIndex(5) -6 >Emitted(59, 14) Source(1, 14) + SourceIndex(5) -7 >Emitted(59, 16) Source(1, 16) + SourceIndex(5) -8 >Emitted(59, 17) Source(1, 17) + SourceIndex(5) +1->Emitted(61, 1) Source(1, 1) + SourceIndex(5) +2 >Emitted(61, 5) Source(1, 5) + SourceIndex(5) +3 >Emitted(61, 6) Source(1, 6) + SourceIndex(5) +4 >Emitted(61, 9) Source(1, 9) + SourceIndex(5) +5 >Emitted(61, 13) Source(1, 13) + SourceIndex(5) +6 >Emitted(61, 14) Source(1, 14) + SourceIndex(5) +7 >Emitted(61, 16) Source(1, 16) + SourceIndex(5) +8 >Emitted(61, 17) Source(1, 17) + SourceIndex(5) --- >>>c.doSomething(); 1-> @@ -1354,12 +1358,12 @@ sourceFile:../../third_part1.ts 4 > doSomething 5 > () 6 > ; -1->Emitted(60, 1) Source(2, 1) + SourceIndex(5) -2 >Emitted(60, 2) Source(2, 2) + SourceIndex(5) -3 >Emitted(60, 3) Source(2, 3) + SourceIndex(5) -4 >Emitted(60, 14) Source(2, 14) + SourceIndex(5) -5 >Emitted(60, 16) Source(2, 16) + SourceIndex(5) -6 >Emitted(60, 17) Source(2, 17) + SourceIndex(5) +1->Emitted(62, 1) Source(2, 1) + SourceIndex(5) +2 >Emitted(62, 2) Source(2, 2) + SourceIndex(5) +3 >Emitted(62, 3) Source(2, 3) + SourceIndex(5) +4 >Emitted(62, 14) Source(2, 14) + SourceIndex(5) +5 >Emitted(62, 16) Source(2, 16) + SourceIndex(5) +6 >Emitted(62, 17) Source(2, 17) + SourceIndex(5) --- >>>function forthirdthird_part1Rest() { 1-> @@ -1370,9 +1374,9 @@ sourceFile:../../third_part1.ts > 2 >function 3 > forthirdthird_part1Rest -1->Emitted(61, 1) Source(3, 1) + SourceIndex(5) -2 >Emitted(61, 10) Source(3, 10) + SourceIndex(5) -3 >Emitted(61, 33) Source(3, 33) + SourceIndex(5) +1->Emitted(63, 1) Source(3, 1) + SourceIndex(5) +2 >Emitted(63, 10) Source(3, 10) + SourceIndex(5) +3 >Emitted(63, 33) Source(3, 33) + SourceIndex(5) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^ @@ -1392,14 +1396,14 @@ sourceFile:../../third_part1.ts 6 > , 7 > ...rest } = { a: 10, b: 30, yy: 30 } 8 > ; -1->Emitted(62, 5) Source(4, 1) + SourceIndex(5) -2 >Emitted(62, 9) Source(4, 7) + SourceIndex(5) -3 >Emitted(62, 38) Source(4, 48) + SourceIndex(5) -4 >Emitted(62, 40) Source(4, 9) + SourceIndex(5) -5 >Emitted(62, 48) Source(4, 10) + SourceIndex(5) -6 >Emitted(62, 50) Source(4, 12) + SourceIndex(5) -7 >Emitted(62, 74) Source(4, 48) + SourceIndex(5) -8 >Emitted(62, 75) Source(4, 49) + SourceIndex(5) +1->Emitted(64, 5) Source(4, 1) + SourceIndex(5) +2 >Emitted(64, 9) Source(4, 7) + SourceIndex(5) +3 >Emitted(64, 38) Source(4, 48) + SourceIndex(5) +4 >Emitted(64, 40) Source(4, 9) + SourceIndex(5) +5 >Emitted(64, 48) Source(4, 10) + SourceIndex(5) +6 >Emitted(64, 50) Source(4, 12) + SourceIndex(5) +7 >Emitted(64, 74) Source(4, 48) + SourceIndex(5) +8 >Emitted(64, 75) Source(4, 49) + SourceIndex(5) --- >>>} 1 > @@ -1408,8 +1412,8 @@ sourceFile:../../third_part1.ts 1 > > 2 >} -1 >Emitted(63, 1) Source(5, 1) + SourceIndex(5) -2 >Emitted(63, 2) Source(5, 2) + SourceIndex(5) +1 >Emitted(65, 1) Source(5, 1) + SourceIndex(5) +2 >Emitted(65, 2) Source(5, 2) + SourceIndex(5) --- >>>//# sourceMappingURL=third-output.js.map @@ -1436,39 +1440,39 @@ sourceFile:../../third_part1.ts }, { "pos": 678, - "end": 1093, + "end": 1170, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 1095, - "end": 1245, + "pos": 1172, + "end": 1322, "kind": "prepend", "data": "/src/first/bin/first-output.js", "texts": [ { - "pos": 1095, - "end": 1245, + "pos": 1172, + "end": 1322, "kind": "text" } ] }, { - "pos": 1245, - "end": 1746, + "pos": 1322, + "end": 1823, "kind": "prepend", "data": "/src/2/second-output.js", "texts": [ { - "pos": 1245, - "end": 1746, + "pos": 1322, + "end": 1823, "kind": "text" } ] }, { - "pos": 1746, - "end": 1899, + "pos": 1823, + "end": 1976, "kind": "text" } ], @@ -1545,20 +1549,22 @@ var __spread = (this && this.__spread) || function () { return ar; }; ---------------------------------------------------------------------- -emitHelpers: (678-1093):: typescript:rest +emitHelpers: (678-1170):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; ---------------------------------------------------------------------- -prepend: (1095-1245):: /src/first/bin/first-output.js texts:: 1 +prepend: (1172-1322):: /src/first/bin/first-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (1095-1245) +text: (1172-1322) var s = "Hello, world"; console.log(s); function forfirstfirst_PART1Rest() { } @@ -1568,9 +1574,9 @@ function f() { } ---------------------------------------------------------------------- -prepend: (1245-1746):: /src/2/second-output.js texts:: 1 +prepend: (1322-1823):: /src/2/second-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (1245-1746) +text: (1322-1823) var N; (function (N) { function f() { @@ -1595,7 +1601,7 @@ var C = (function () { }()); ---------------------------------------------------------------------- -text: (1746-1899) +text: (1823-1976) var c = new C(); c.doSomething(); function forthirdthird_part1Rest() { diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/emitHelpers-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/emitHelpers-in-all-projects.js index 659e3921ac1..ffc0d67b134 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/emitHelpers-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/emitHelpers-in-all-projects.js @@ -132,8 +132,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; var N; @@ -157,7 +159,7 @@ var C = (function () { //# sourceMappingURL=second-output.js.map //// [/src/2/second-output.js.map] -{"version":3,"file":"second-output.js","sourceRoot":"","sources":["../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":";;;;;;;;;AAIA,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;AACD,SAAS,yBAAyB;IAClC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;ACbD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC"} +{"version":3,"file":"second-output.js","sourceRoot":"","sources":["../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":";;;;;;;;;;;AAIA,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;AACD,SAAS,yBAAyB;IAClC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;ACbD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC"} //// [/src/2/second-output.js.map.baseline.txt] =================================================================== @@ -175,8 +177,10 @@ sourceFile:../second/second_part1.ts >>> for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") ->>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) ->>> t[p[i]] = s[p[i]]; +>>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> t[p[i]] = s[p[i]]; +>>> } >>> return t; >>>}; >>>var N; @@ -199,10 +203,10 @@ sourceFile:../second/second_part1.ts > > f(); > } -1 >Emitted(10, 1) Source(5, 1) + SourceIndex(0) -2 >Emitted(10, 5) Source(5, 11) + SourceIndex(0) -3 >Emitted(10, 6) Source(5, 12) + SourceIndex(0) -4 >Emitted(10, 7) Source(11, 2) + SourceIndex(0) +1 >Emitted(12, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(12, 5) Source(5, 11) + SourceIndex(0) +3 >Emitted(12, 6) Source(5, 12) + SourceIndex(0) +4 >Emitted(12, 7) Source(11, 2) + SourceIndex(0) --- >>>(function (N) { 1-> @@ -212,9 +216,9 @@ sourceFile:../second/second_part1.ts 1-> 2 >namespace 3 > N -1->Emitted(11, 1) Source(5, 1) + SourceIndex(0) -2 >Emitted(11, 12) Source(5, 11) + SourceIndex(0) -3 >Emitted(11, 13) Source(5, 12) + SourceIndex(0) +1->Emitted(13, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(13, 12) Source(5, 11) + SourceIndex(0) +3 >Emitted(13, 13) Source(5, 12) + SourceIndex(0) --- >>> function f() { 1->^^^^ @@ -225,9 +229,9 @@ sourceFile:../second/second_part1.ts > 2 > function 3 > f -1->Emitted(12, 5) Source(6, 5) + SourceIndex(0) -2 >Emitted(12, 14) Source(6, 14) + SourceIndex(0) -3 >Emitted(12, 15) Source(6, 15) + SourceIndex(0) +1->Emitted(14, 5) Source(6, 5) + SourceIndex(0) +2 >Emitted(14, 14) Source(6, 14) + SourceIndex(0) +3 >Emitted(14, 15) Source(6, 15) + SourceIndex(0) --- >>> console.log('testing'); 1->^^^^^^^^ @@ -247,14 +251,14 @@ sourceFile:../second/second_part1.ts 6 > 'testing' 7 > ) 8 > ; -1->Emitted(13, 9) Source(7, 9) + SourceIndex(0) -2 >Emitted(13, 16) Source(7, 16) + SourceIndex(0) -3 >Emitted(13, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(7, 20) + SourceIndex(0) -5 >Emitted(13, 21) Source(7, 21) + SourceIndex(0) -6 >Emitted(13, 30) Source(7, 30) + SourceIndex(0) -7 >Emitted(13, 31) Source(7, 31) + SourceIndex(0) -8 >Emitted(13, 32) Source(7, 32) + SourceIndex(0) +1->Emitted(15, 9) Source(7, 9) + SourceIndex(0) +2 >Emitted(15, 16) Source(7, 16) + SourceIndex(0) +3 >Emitted(15, 17) Source(7, 17) + SourceIndex(0) +4 >Emitted(15, 20) Source(7, 20) + SourceIndex(0) +5 >Emitted(15, 21) Source(7, 21) + SourceIndex(0) +6 >Emitted(15, 30) Source(7, 30) + SourceIndex(0) +7 >Emitted(15, 31) Source(7, 31) + SourceIndex(0) +8 >Emitted(15, 32) Source(7, 32) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -263,8 +267,8 @@ sourceFile:../second/second_part1.ts 1 > > 2 > } -1 >Emitted(14, 5) Source(8, 5) + SourceIndex(0) -2 >Emitted(14, 6) Source(8, 6) + SourceIndex(0) +1 >Emitted(16, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(16, 6) Source(8, 6) + SourceIndex(0) --- >>> f(); 1->^^^^ @@ -278,10 +282,10 @@ sourceFile:../second/second_part1.ts 2 > f 3 > () 4 > ; -1->Emitted(15, 5) Source(10, 5) + SourceIndex(0) -2 >Emitted(15, 6) Source(10, 6) + SourceIndex(0) -3 >Emitted(15, 8) Source(10, 8) + SourceIndex(0) -4 >Emitted(15, 9) Source(10, 9) + SourceIndex(0) +1->Emitted(17, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(17, 6) Source(10, 6) + SourceIndex(0) +3 >Emitted(17, 8) Source(10, 8) + SourceIndex(0) +4 >Emitted(17, 9) Source(10, 9) + SourceIndex(0) --- >>>})(N || (N = {})); 1-> @@ -306,13 +310,13 @@ sourceFile:../second/second_part1.ts > > f(); > } -1->Emitted(16, 1) Source(11, 1) + SourceIndex(0) -2 >Emitted(16, 2) Source(11, 2) + SourceIndex(0) -3 >Emitted(16, 4) Source(5, 11) + SourceIndex(0) -4 >Emitted(16, 5) Source(5, 12) + SourceIndex(0) -5 >Emitted(16, 10) Source(5, 11) + SourceIndex(0) -6 >Emitted(16, 11) Source(5, 12) + SourceIndex(0) -7 >Emitted(16, 19) Source(11, 2) + SourceIndex(0) +1->Emitted(18, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(18, 2) Source(11, 2) + SourceIndex(0) +3 >Emitted(18, 4) Source(5, 11) + SourceIndex(0) +4 >Emitted(18, 5) Source(5, 12) + SourceIndex(0) +5 >Emitted(18, 10) Source(5, 11) + SourceIndex(0) +6 >Emitted(18, 11) Source(5, 12) + SourceIndex(0) +7 >Emitted(18, 19) Source(11, 2) + SourceIndex(0) --- >>>function forsecondsecond_part1Rest() { 1-> @@ -323,9 +327,9 @@ sourceFile:../second/second_part1.ts > 2 >function 3 > forsecondsecond_part1Rest -1->Emitted(17, 1) Source(12, 1) + SourceIndex(0) -2 >Emitted(17, 10) Source(12, 10) + SourceIndex(0) -3 >Emitted(17, 35) Source(12, 35) + SourceIndex(0) +1->Emitted(19, 1) Source(12, 1) + SourceIndex(0) +2 >Emitted(19, 10) Source(12, 10) + SourceIndex(0) +3 >Emitted(19, 35) Source(12, 35) + SourceIndex(0) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^ @@ -345,14 +349,14 @@ sourceFile:../second/second_part1.ts 6 > , 7 > ...rest } = { a: 10, b: 30, yy: 30 } 8 > ; -1->Emitted(18, 5) Source(13, 1) + SourceIndex(0) -2 >Emitted(18, 9) Source(13, 7) + SourceIndex(0) -3 >Emitted(18, 38) Source(13, 48) + SourceIndex(0) -4 >Emitted(18, 40) Source(13, 9) + SourceIndex(0) -5 >Emitted(18, 48) Source(13, 10) + SourceIndex(0) -6 >Emitted(18, 50) Source(13, 12) + SourceIndex(0) -7 >Emitted(18, 74) Source(13, 48) + SourceIndex(0) -8 >Emitted(18, 75) Source(13, 49) + SourceIndex(0) +1->Emitted(20, 5) Source(13, 1) + SourceIndex(0) +2 >Emitted(20, 9) Source(13, 7) + SourceIndex(0) +3 >Emitted(20, 38) Source(13, 48) + SourceIndex(0) +4 >Emitted(20, 40) Source(13, 9) + SourceIndex(0) +5 >Emitted(20, 48) Source(13, 10) + SourceIndex(0) +6 >Emitted(20, 50) Source(13, 12) + SourceIndex(0) +7 >Emitted(20, 74) Source(13, 48) + SourceIndex(0) +8 >Emitted(20, 75) Source(13, 49) + SourceIndex(0) --- >>>} 1 > @@ -361,8 +365,8 @@ sourceFile:../second/second_part1.ts 1 > > 2 >} -1 >Emitted(19, 1) Source(14, 1) + SourceIndex(0) -2 >Emitted(19, 2) Source(14, 2) + SourceIndex(0) +1 >Emitted(21, 1) Source(14, 1) + SourceIndex(0) +2 >Emitted(21, 2) Source(14, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/src/2/second-output.js @@ -372,13 +376,13 @@ sourceFile:../second/second_part2.ts 1-> 2 >^^^^^^^^^^^^^^^^^^^-> 1-> -1->Emitted(20, 1) Source(1, 1) + SourceIndex(1) +1->Emitted(22, 1) Source(1, 1) + SourceIndex(1) --- >>> function C() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(21, 5) Source(1, 1) + SourceIndex(1) +1->Emitted(23, 5) Source(1, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -390,8 +394,8 @@ sourceFile:../second/second_part2.ts > } > 2 > } -1->Emitted(22, 5) Source(5, 1) + SourceIndex(1) -2 >Emitted(22, 6) Source(5, 2) + SourceIndex(1) +1->Emitted(24, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(24, 6) Source(5, 2) + SourceIndex(1) --- >>> C.prototype.doSomething = function () { 1->^^^^ @@ -401,9 +405,9 @@ sourceFile:../second/second_part2.ts 1-> 2 > doSomething 3 > -1->Emitted(23, 5) Source(2, 5) + SourceIndex(1) -2 >Emitted(23, 28) Source(2, 16) + SourceIndex(1) -3 >Emitted(23, 31) Source(2, 5) + SourceIndex(1) +1->Emitted(25, 5) Source(2, 5) + SourceIndex(1) +2 >Emitted(25, 28) Source(2, 16) + SourceIndex(1) +3 >Emitted(25, 31) Source(2, 5) + SourceIndex(1) --- >>> console.log("something got done"); 1->^^^^^^^^ @@ -423,14 +427,14 @@ sourceFile:../second/second_part2.ts 6 > "something got done" 7 > ) 8 > ; -1->Emitted(24, 9) Source(3, 9) + SourceIndex(1) -2 >Emitted(24, 16) Source(3, 16) + SourceIndex(1) -3 >Emitted(24, 17) Source(3, 17) + SourceIndex(1) -4 >Emitted(24, 20) Source(3, 20) + SourceIndex(1) -5 >Emitted(24, 21) Source(3, 21) + SourceIndex(1) -6 >Emitted(24, 41) Source(3, 41) + SourceIndex(1) -7 >Emitted(24, 42) Source(3, 42) + SourceIndex(1) -8 >Emitted(24, 43) Source(3, 43) + SourceIndex(1) +1->Emitted(26, 9) Source(3, 9) + SourceIndex(1) +2 >Emitted(26, 16) Source(3, 16) + SourceIndex(1) +3 >Emitted(26, 17) Source(3, 17) + SourceIndex(1) +4 >Emitted(26, 20) Source(3, 20) + SourceIndex(1) +5 >Emitted(26, 21) Source(3, 21) + SourceIndex(1) +6 >Emitted(26, 41) Source(3, 41) + SourceIndex(1) +7 >Emitted(26, 42) Source(3, 42) + SourceIndex(1) +8 >Emitted(26, 43) Source(3, 43) + SourceIndex(1) --- >>> }; 1 >^^^^ @@ -439,8 +443,8 @@ sourceFile:../second/second_part2.ts 1 > > 2 > } -1 >Emitted(25, 5) Source(4, 5) + SourceIndex(1) -2 >Emitted(25, 6) Source(4, 6) + SourceIndex(1) +1 >Emitted(27, 5) Source(4, 5) + SourceIndex(1) +2 >Emitted(27, 6) Source(4, 6) + SourceIndex(1) --- >>> return C; 1->^^^^ @@ -448,8 +452,8 @@ sourceFile:../second/second_part2.ts 1-> > 2 > } -1->Emitted(26, 5) Source(5, 1) + SourceIndex(1) -2 >Emitted(26, 13) Source(5, 2) + SourceIndex(1) +1->Emitted(28, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(28, 13) Source(5, 2) + SourceIndex(1) --- >>>}()); 1 > @@ -465,10 +469,10 @@ sourceFile:../second/second_part2.ts > console.log("something got done"); > } > } -1 >Emitted(27, 1) Source(5, 1) + SourceIndex(1) -2 >Emitted(27, 2) Source(5, 2) + SourceIndex(1) -3 >Emitted(27, 2) Source(1, 1) + SourceIndex(1) -4 >Emitted(27, 6) Source(5, 2) + SourceIndex(1) +1 >Emitted(29, 1) Source(5, 1) + SourceIndex(1) +2 >Emitted(29, 2) Source(5, 2) + SourceIndex(1) +3 >Emitted(29, 2) Source(1, 1) + SourceIndex(1) +4 >Emitted(29, 6) Source(5, 2) + SourceIndex(1) --- >>>//# sourceMappingURL=second-output.js.map @@ -484,13 +488,13 @@ sourceFile:../second/second_part2.ts "sections": [ { "pos": 0, - "end": 415, + "end": 492, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 417, - "end": 821, + "pos": 494, + "end": 898, "kind": "text" } ], @@ -517,18 +521,20 @@ sourceFile:../second/second_part2.ts ====================================================================== File:: /src/2/second-output.js ---------------------------------------------------------------------- -emitHelpers: (0-415):: typescript:rest +emitHelpers: (0-492):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; ---------------------------------------------------------------------- -text: (417-821) +text: (494-898) var N; (function (N) { function f() { @@ -734,8 +740,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; var s = "Hello, world"; @@ -750,7 +758,7 @@ function f() { //# sourceMappingURL=first-output.js.map //// [/src/first/bin/first-output.js.map] -{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":";;;;;;;;;AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB;IAChC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;ACbD,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC"} +{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":";;;;;;;;;;;AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB;IAChC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;ACbD,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC"} //// [/src/first/bin/first-output.js.map.baseline.txt] =================================================================== @@ -768,8 +776,10 @@ sourceFile:../first_PART1.ts >>> for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") ->>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) ->>> t[p[i]] = s[p[i]]; +>>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> t[p[i]] = s[p[i]]; +>>> } >>> return t; >>>}; >>>var s = "Hello, world"; @@ -789,12 +799,12 @@ sourceFile:../first_PART1.ts 4 > = 5 > "Hello, world" 6 > ; -1 >Emitted(10, 1) Source(5, 1) + SourceIndex(0) -2 >Emitted(10, 5) Source(5, 7) + SourceIndex(0) -3 >Emitted(10, 6) Source(5, 8) + SourceIndex(0) -4 >Emitted(10, 9) Source(5, 11) + SourceIndex(0) -5 >Emitted(10, 23) Source(5, 25) + SourceIndex(0) -6 >Emitted(10, 24) Source(5, 26) + SourceIndex(0) +1 >Emitted(12, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(12, 5) Source(5, 7) + SourceIndex(0) +3 >Emitted(12, 6) Source(5, 8) + SourceIndex(0) +4 >Emitted(12, 9) Source(5, 11) + SourceIndex(0) +5 >Emitted(12, 23) Source(5, 25) + SourceIndex(0) +6 >Emitted(12, 24) Source(5, 26) + SourceIndex(0) --- >>>console.log(s); 1 > @@ -820,14 +830,14 @@ sourceFile:../first_PART1.ts 6 > s 7 > ) 8 > ; -1 >Emitted(11, 1) Source(11, 1) + SourceIndex(0) -2 >Emitted(11, 8) Source(11, 8) + SourceIndex(0) -3 >Emitted(11, 9) Source(11, 9) + SourceIndex(0) -4 >Emitted(11, 12) Source(11, 12) + SourceIndex(0) -5 >Emitted(11, 13) Source(11, 13) + SourceIndex(0) -6 >Emitted(11, 14) Source(11, 14) + SourceIndex(0) -7 >Emitted(11, 15) Source(11, 15) + SourceIndex(0) -8 >Emitted(11, 16) Source(11, 16) + SourceIndex(0) +1 >Emitted(13, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(13, 8) Source(11, 8) + SourceIndex(0) +3 >Emitted(13, 9) Source(11, 9) + SourceIndex(0) +4 >Emitted(13, 12) Source(11, 12) + SourceIndex(0) +5 >Emitted(13, 13) Source(11, 13) + SourceIndex(0) +6 >Emitted(13, 14) Source(11, 14) + SourceIndex(0) +7 >Emitted(13, 15) Source(11, 15) + SourceIndex(0) +8 >Emitted(13, 16) Source(11, 16) + SourceIndex(0) --- >>>function forfirstfirst_PART1Rest() { 1-> @@ -838,9 +848,9 @@ sourceFile:../first_PART1.ts > 2 >function 3 > forfirstfirst_PART1Rest -1->Emitted(12, 1) Source(12, 1) + SourceIndex(0) -2 >Emitted(12, 10) Source(12, 10) + SourceIndex(0) -3 >Emitted(12, 33) Source(12, 33) + SourceIndex(0) +1->Emitted(14, 1) Source(12, 1) + SourceIndex(0) +2 >Emitted(14, 10) Source(12, 10) + SourceIndex(0) +3 >Emitted(14, 33) Source(12, 33) + SourceIndex(0) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^ @@ -860,14 +870,14 @@ sourceFile:../first_PART1.ts 6 > , 7 > ...rest } = { a: 10, b: 30, yy: 30 } 8 > ; -1->Emitted(13, 5) Source(13, 1) + SourceIndex(0) -2 >Emitted(13, 9) Source(13, 7) + SourceIndex(0) -3 >Emitted(13, 38) Source(13, 48) + SourceIndex(0) -4 >Emitted(13, 40) Source(13, 9) + SourceIndex(0) -5 >Emitted(13, 48) Source(13, 10) + SourceIndex(0) -6 >Emitted(13, 50) Source(13, 12) + SourceIndex(0) -7 >Emitted(13, 74) Source(13, 48) + SourceIndex(0) -8 >Emitted(13, 75) Source(13, 49) + SourceIndex(0) +1->Emitted(15, 5) Source(13, 1) + SourceIndex(0) +2 >Emitted(15, 9) Source(13, 7) + SourceIndex(0) +3 >Emitted(15, 38) Source(13, 48) + SourceIndex(0) +4 >Emitted(15, 40) Source(13, 9) + SourceIndex(0) +5 >Emitted(15, 48) Source(13, 10) + SourceIndex(0) +6 >Emitted(15, 50) Source(13, 12) + SourceIndex(0) +7 >Emitted(15, 74) Source(13, 48) + SourceIndex(0) +8 >Emitted(15, 75) Source(13, 49) + SourceIndex(0) --- >>>} 1 > @@ -876,8 +886,8 @@ sourceFile:../first_PART1.ts 1 > > 2 >} -1 >Emitted(14, 1) Source(14, 1) + SourceIndex(0) -2 >Emitted(14, 2) Source(14, 2) + SourceIndex(0) +1 >Emitted(16, 1) Source(14, 1) + SourceIndex(0) +2 >Emitted(16, 2) Source(14, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/src/first/bin/first-output.js @@ -902,15 +912,15 @@ sourceFile:../first_part2.ts 7 > () 8 > ) 9 > ; -1->Emitted(15, 1) Source(1, 1) + SourceIndex(1) -2 >Emitted(15, 8) Source(1, 8) + SourceIndex(1) -3 >Emitted(15, 9) Source(1, 9) + SourceIndex(1) -4 >Emitted(15, 12) Source(1, 12) + SourceIndex(1) -5 >Emitted(15, 13) Source(1, 13) + SourceIndex(1) -6 >Emitted(15, 14) Source(1, 14) + SourceIndex(1) -7 >Emitted(15, 16) Source(1, 16) + SourceIndex(1) -8 >Emitted(15, 17) Source(1, 17) + SourceIndex(1) -9 >Emitted(15, 18) Source(1, 18) + SourceIndex(1) +1->Emitted(17, 1) Source(1, 1) + SourceIndex(1) +2 >Emitted(17, 8) Source(1, 8) + SourceIndex(1) +3 >Emitted(17, 9) Source(1, 9) + SourceIndex(1) +4 >Emitted(17, 12) Source(1, 12) + SourceIndex(1) +5 >Emitted(17, 13) Source(1, 13) + SourceIndex(1) +6 >Emitted(17, 14) Source(1, 14) + SourceIndex(1) +7 >Emitted(17, 16) Source(1, 16) + SourceIndex(1) +8 >Emitted(17, 17) Source(1, 17) + SourceIndex(1) +9 >Emitted(17, 18) Source(1, 18) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:/src/first/bin/first-output.js @@ -924,9 +934,9 @@ sourceFile:../first_part3.ts 1 > 2 >function 3 > f -1 >Emitted(16, 1) Source(1, 1) + SourceIndex(2) -2 >Emitted(16, 10) Source(1, 10) + SourceIndex(2) -3 >Emitted(16, 11) Source(1, 11) + SourceIndex(2) +1 >Emitted(18, 1) Source(1, 1) + SourceIndex(2) +2 >Emitted(18, 10) Source(1, 10) + SourceIndex(2) +3 >Emitted(18, 11) Source(1, 11) + SourceIndex(2) --- >>> return "JS does hoists"; 1->^^^^ @@ -938,10 +948,10 @@ sourceFile:../first_part3.ts 2 > return 3 > "JS does hoists" 4 > ; -1->Emitted(17, 5) Source(2, 5) + SourceIndex(2) -2 >Emitted(17, 12) Source(2, 12) + SourceIndex(2) -3 >Emitted(17, 28) Source(2, 28) + SourceIndex(2) -4 >Emitted(17, 29) Source(2, 29) + SourceIndex(2) +1->Emitted(19, 5) Source(2, 5) + SourceIndex(2) +2 >Emitted(19, 12) Source(2, 12) + SourceIndex(2) +3 >Emitted(19, 28) Source(2, 28) + SourceIndex(2) +4 >Emitted(19, 29) Source(2, 29) + SourceIndex(2) --- >>>} 1 > @@ -950,8 +960,8 @@ sourceFile:../first_part3.ts 1 > > 2 >} -1 >Emitted(18, 1) Source(3, 1) + SourceIndex(2) -2 >Emitted(18, 2) Source(3, 2) + SourceIndex(2) +1 >Emitted(20, 1) Source(3, 1) + SourceIndex(2) +2 >Emitted(20, 2) Source(3, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=first-output.js.map @@ -968,13 +978,13 @@ sourceFile:../first_part3.ts "sections": [ { "pos": 0, - "end": 415, + "end": 492, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 417, - "end": 644, + "pos": 494, + "end": 721, "kind": "text" } ], @@ -1001,18 +1011,20 @@ sourceFile:../first_part3.ts ====================================================================== File:: /src/first/bin/first-output.js ---------------------------------------------------------------------- -emitHelpers: (0-415):: typescript:rest +emitHelpers: (0-492):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; ---------------------------------------------------------------------- -text: (417-644) +text: (494-721) var s = "Hello, world"; console.log(s); function forfirstfirst_PART1Rest() { @@ -1399,8 +1411,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; var s = "Hello, world"; @@ -1438,7 +1452,7 @@ function forthirdthird_part1Rest() { //# sourceMappingURL=third-output.js.map //// [/src/third/thirdjs/output/third-output.js.map] -{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../../first/first_PART1.ts","../../../first/first_part2.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts","../../third_part1.ts"],"names":[],"mappings":";;;;;;;;;AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB;IAChC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;ACbD,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC;ACED,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;AACD,SAAS,yBAAyB;IAClC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;ACbD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC;ACJD,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC;AAChB,SAAS,uBAAuB;IAChC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC"} +{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../../first/first_PART1.ts","../../../first/first_part2.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts","../../third_part1.ts"],"names":[],"mappings":";;;;;;;;;;;AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB;IAChC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;ACbD,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC;ACED,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;AACD,SAAS,yBAAyB;IAClC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;ACbD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC;ACJD,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC;AAChB,SAAS,uBAAuB;IAChC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC"} //// [/src/third/thirdjs/output/third-output.js.map.baseline.txt] =================================================================== @@ -1456,8 +1470,10 @@ sourceFile:../../../first/first_PART1.ts >>> for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") ->>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) ->>> t[p[i]] = s[p[i]]; +>>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> t[p[i]] = s[p[i]]; +>>> } >>> return t; >>>}; >>>var s = "Hello, world"; @@ -1477,12 +1493,12 @@ sourceFile:../../../first/first_PART1.ts 4 > = 5 > "Hello, world" 6 > ; -1 >Emitted(10, 1) Source(5, 1) + SourceIndex(0) -2 >Emitted(10, 5) Source(5, 7) + SourceIndex(0) -3 >Emitted(10, 6) Source(5, 8) + SourceIndex(0) -4 >Emitted(10, 9) Source(5, 11) + SourceIndex(0) -5 >Emitted(10, 23) Source(5, 25) + SourceIndex(0) -6 >Emitted(10, 24) Source(5, 26) + SourceIndex(0) +1 >Emitted(12, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(12, 5) Source(5, 7) + SourceIndex(0) +3 >Emitted(12, 6) Source(5, 8) + SourceIndex(0) +4 >Emitted(12, 9) Source(5, 11) + SourceIndex(0) +5 >Emitted(12, 23) Source(5, 25) + SourceIndex(0) +6 >Emitted(12, 24) Source(5, 26) + SourceIndex(0) --- >>>console.log(s); 1 > @@ -1508,14 +1524,14 @@ sourceFile:../../../first/first_PART1.ts 6 > s 7 > ) 8 > ; -1 >Emitted(11, 1) Source(11, 1) + SourceIndex(0) -2 >Emitted(11, 8) Source(11, 8) + SourceIndex(0) -3 >Emitted(11, 9) Source(11, 9) + SourceIndex(0) -4 >Emitted(11, 12) Source(11, 12) + SourceIndex(0) -5 >Emitted(11, 13) Source(11, 13) + SourceIndex(0) -6 >Emitted(11, 14) Source(11, 14) + SourceIndex(0) -7 >Emitted(11, 15) Source(11, 15) + SourceIndex(0) -8 >Emitted(11, 16) Source(11, 16) + SourceIndex(0) +1 >Emitted(13, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(13, 8) Source(11, 8) + SourceIndex(0) +3 >Emitted(13, 9) Source(11, 9) + SourceIndex(0) +4 >Emitted(13, 12) Source(11, 12) + SourceIndex(0) +5 >Emitted(13, 13) Source(11, 13) + SourceIndex(0) +6 >Emitted(13, 14) Source(11, 14) + SourceIndex(0) +7 >Emitted(13, 15) Source(11, 15) + SourceIndex(0) +8 >Emitted(13, 16) Source(11, 16) + SourceIndex(0) --- >>>function forfirstfirst_PART1Rest() { 1-> @@ -1526,9 +1542,9 @@ sourceFile:../../../first/first_PART1.ts > 2 >function 3 > forfirstfirst_PART1Rest -1->Emitted(12, 1) Source(12, 1) + SourceIndex(0) -2 >Emitted(12, 10) Source(12, 10) + SourceIndex(0) -3 >Emitted(12, 33) Source(12, 33) + SourceIndex(0) +1->Emitted(14, 1) Source(12, 1) + SourceIndex(0) +2 >Emitted(14, 10) Source(12, 10) + SourceIndex(0) +3 >Emitted(14, 33) Source(12, 33) + SourceIndex(0) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^ @@ -1548,14 +1564,14 @@ sourceFile:../../../first/first_PART1.ts 6 > , 7 > ...rest } = { a: 10, b: 30, yy: 30 } 8 > ; -1->Emitted(13, 5) Source(13, 1) + SourceIndex(0) -2 >Emitted(13, 9) Source(13, 7) + SourceIndex(0) -3 >Emitted(13, 38) Source(13, 48) + SourceIndex(0) -4 >Emitted(13, 40) Source(13, 9) + SourceIndex(0) -5 >Emitted(13, 48) Source(13, 10) + SourceIndex(0) -6 >Emitted(13, 50) Source(13, 12) + SourceIndex(0) -7 >Emitted(13, 74) Source(13, 48) + SourceIndex(0) -8 >Emitted(13, 75) Source(13, 49) + SourceIndex(0) +1->Emitted(15, 5) Source(13, 1) + SourceIndex(0) +2 >Emitted(15, 9) Source(13, 7) + SourceIndex(0) +3 >Emitted(15, 38) Source(13, 48) + SourceIndex(0) +4 >Emitted(15, 40) Source(13, 9) + SourceIndex(0) +5 >Emitted(15, 48) Source(13, 10) + SourceIndex(0) +6 >Emitted(15, 50) Source(13, 12) + SourceIndex(0) +7 >Emitted(15, 74) Source(13, 48) + SourceIndex(0) +8 >Emitted(15, 75) Source(13, 49) + SourceIndex(0) --- >>>} 1 > @@ -1564,8 +1580,8 @@ sourceFile:../../../first/first_PART1.ts 1 > > 2 >} -1 >Emitted(14, 1) Source(14, 1) + SourceIndex(0) -2 >Emitted(14, 2) Source(14, 2) + SourceIndex(0) +1 >Emitted(16, 1) Source(14, 1) + SourceIndex(0) +2 >Emitted(16, 2) Source(14, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -1590,15 +1606,15 @@ sourceFile:../../../first/first_part2.ts 7 > () 8 > ) 9 > ; -1->Emitted(15, 1) Source(1, 1) + SourceIndex(1) -2 >Emitted(15, 8) Source(1, 8) + SourceIndex(1) -3 >Emitted(15, 9) Source(1, 9) + SourceIndex(1) -4 >Emitted(15, 12) Source(1, 12) + SourceIndex(1) -5 >Emitted(15, 13) Source(1, 13) + SourceIndex(1) -6 >Emitted(15, 14) Source(1, 14) + SourceIndex(1) -7 >Emitted(15, 16) Source(1, 16) + SourceIndex(1) -8 >Emitted(15, 17) Source(1, 17) + SourceIndex(1) -9 >Emitted(15, 18) Source(1, 18) + SourceIndex(1) +1->Emitted(17, 1) Source(1, 1) + SourceIndex(1) +2 >Emitted(17, 8) Source(1, 8) + SourceIndex(1) +3 >Emitted(17, 9) Source(1, 9) + SourceIndex(1) +4 >Emitted(17, 12) Source(1, 12) + SourceIndex(1) +5 >Emitted(17, 13) Source(1, 13) + SourceIndex(1) +6 >Emitted(17, 14) Source(1, 14) + SourceIndex(1) +7 >Emitted(17, 16) Source(1, 16) + SourceIndex(1) +8 >Emitted(17, 17) Source(1, 17) + SourceIndex(1) +9 >Emitted(17, 18) Source(1, 18) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -1612,9 +1628,9 @@ sourceFile:../../../first/first_part3.ts 1 > 2 >function 3 > f -1 >Emitted(16, 1) Source(1, 1) + SourceIndex(2) -2 >Emitted(16, 10) Source(1, 10) + SourceIndex(2) -3 >Emitted(16, 11) Source(1, 11) + SourceIndex(2) +1 >Emitted(18, 1) Source(1, 1) + SourceIndex(2) +2 >Emitted(18, 10) Source(1, 10) + SourceIndex(2) +3 >Emitted(18, 11) Source(1, 11) + SourceIndex(2) --- >>> return "JS does hoists"; 1->^^^^ @@ -1626,10 +1642,10 @@ sourceFile:../../../first/first_part3.ts 2 > return 3 > "JS does hoists" 4 > ; -1->Emitted(17, 5) Source(2, 5) + SourceIndex(2) -2 >Emitted(17, 12) Source(2, 12) + SourceIndex(2) -3 >Emitted(17, 28) Source(2, 28) + SourceIndex(2) -4 >Emitted(17, 29) Source(2, 29) + SourceIndex(2) +1->Emitted(19, 5) Source(2, 5) + SourceIndex(2) +2 >Emitted(19, 12) Source(2, 12) + SourceIndex(2) +3 >Emitted(19, 28) Source(2, 28) + SourceIndex(2) +4 >Emitted(19, 29) Source(2, 29) + SourceIndex(2) --- >>>} 1 > @@ -1638,8 +1654,8 @@ sourceFile:../../../first/first_part3.ts 1 > > 2 >} -1 >Emitted(18, 1) Source(3, 1) + SourceIndex(2) -2 >Emitted(18, 2) Source(3, 2) + SourceIndex(2) +1 >Emitted(20, 1) Source(3, 1) + SourceIndex(2) +2 >Emitted(20, 2) Source(3, 2) + SourceIndex(2) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -1665,10 +1681,10 @@ sourceFile:../../../second/second_part1.ts > > f(); > } -1->Emitted(19, 1) Source(5, 1) + SourceIndex(3) -2 >Emitted(19, 5) Source(5, 11) + SourceIndex(3) -3 >Emitted(19, 6) Source(5, 12) + SourceIndex(3) -4 >Emitted(19, 7) Source(11, 2) + SourceIndex(3) +1->Emitted(21, 1) Source(5, 1) + SourceIndex(3) +2 >Emitted(21, 5) Source(5, 11) + SourceIndex(3) +3 >Emitted(21, 6) Source(5, 12) + SourceIndex(3) +4 >Emitted(21, 7) Source(11, 2) + SourceIndex(3) --- >>>(function (N) { 1-> @@ -1678,9 +1694,9 @@ sourceFile:../../../second/second_part1.ts 1-> 2 >namespace 3 > N -1->Emitted(20, 1) Source(5, 1) + SourceIndex(3) -2 >Emitted(20, 12) Source(5, 11) + SourceIndex(3) -3 >Emitted(20, 13) Source(5, 12) + SourceIndex(3) +1->Emitted(22, 1) Source(5, 1) + SourceIndex(3) +2 >Emitted(22, 12) Source(5, 11) + SourceIndex(3) +3 >Emitted(22, 13) Source(5, 12) + SourceIndex(3) --- >>> function f() { 1->^^^^ @@ -1691,9 +1707,9 @@ sourceFile:../../../second/second_part1.ts > 2 > function 3 > f -1->Emitted(21, 5) Source(6, 5) + SourceIndex(3) -2 >Emitted(21, 14) Source(6, 14) + SourceIndex(3) -3 >Emitted(21, 15) Source(6, 15) + SourceIndex(3) +1->Emitted(23, 5) Source(6, 5) + SourceIndex(3) +2 >Emitted(23, 14) Source(6, 14) + SourceIndex(3) +3 >Emitted(23, 15) Source(6, 15) + SourceIndex(3) --- >>> console.log('testing'); 1->^^^^^^^^ @@ -1713,14 +1729,14 @@ sourceFile:../../../second/second_part1.ts 6 > 'testing' 7 > ) 8 > ; -1->Emitted(22, 9) Source(7, 9) + SourceIndex(3) -2 >Emitted(22, 16) Source(7, 16) + SourceIndex(3) -3 >Emitted(22, 17) Source(7, 17) + SourceIndex(3) -4 >Emitted(22, 20) Source(7, 20) + SourceIndex(3) -5 >Emitted(22, 21) Source(7, 21) + SourceIndex(3) -6 >Emitted(22, 30) Source(7, 30) + SourceIndex(3) -7 >Emitted(22, 31) Source(7, 31) + SourceIndex(3) -8 >Emitted(22, 32) Source(7, 32) + SourceIndex(3) +1->Emitted(24, 9) Source(7, 9) + SourceIndex(3) +2 >Emitted(24, 16) Source(7, 16) + SourceIndex(3) +3 >Emitted(24, 17) Source(7, 17) + SourceIndex(3) +4 >Emitted(24, 20) Source(7, 20) + SourceIndex(3) +5 >Emitted(24, 21) Source(7, 21) + SourceIndex(3) +6 >Emitted(24, 30) Source(7, 30) + SourceIndex(3) +7 >Emitted(24, 31) Source(7, 31) + SourceIndex(3) +8 >Emitted(24, 32) Source(7, 32) + SourceIndex(3) --- >>> } 1 >^^^^ @@ -1729,8 +1745,8 @@ sourceFile:../../../second/second_part1.ts 1 > > 2 > } -1 >Emitted(23, 5) Source(8, 5) + SourceIndex(3) -2 >Emitted(23, 6) Source(8, 6) + SourceIndex(3) +1 >Emitted(25, 5) Source(8, 5) + SourceIndex(3) +2 >Emitted(25, 6) Source(8, 6) + SourceIndex(3) --- >>> f(); 1->^^^^ @@ -1744,10 +1760,10 @@ sourceFile:../../../second/second_part1.ts 2 > f 3 > () 4 > ; -1->Emitted(24, 5) Source(10, 5) + SourceIndex(3) -2 >Emitted(24, 6) Source(10, 6) + SourceIndex(3) -3 >Emitted(24, 8) Source(10, 8) + SourceIndex(3) -4 >Emitted(24, 9) Source(10, 9) + SourceIndex(3) +1->Emitted(26, 5) Source(10, 5) + SourceIndex(3) +2 >Emitted(26, 6) Source(10, 6) + SourceIndex(3) +3 >Emitted(26, 8) Source(10, 8) + SourceIndex(3) +4 >Emitted(26, 9) Source(10, 9) + SourceIndex(3) --- >>>})(N || (N = {})); 1-> @@ -1772,13 +1788,13 @@ sourceFile:../../../second/second_part1.ts > > f(); > } -1->Emitted(25, 1) Source(11, 1) + SourceIndex(3) -2 >Emitted(25, 2) Source(11, 2) + SourceIndex(3) -3 >Emitted(25, 4) Source(5, 11) + SourceIndex(3) -4 >Emitted(25, 5) Source(5, 12) + SourceIndex(3) -5 >Emitted(25, 10) Source(5, 11) + SourceIndex(3) -6 >Emitted(25, 11) Source(5, 12) + SourceIndex(3) -7 >Emitted(25, 19) Source(11, 2) + SourceIndex(3) +1->Emitted(27, 1) Source(11, 1) + SourceIndex(3) +2 >Emitted(27, 2) Source(11, 2) + SourceIndex(3) +3 >Emitted(27, 4) Source(5, 11) + SourceIndex(3) +4 >Emitted(27, 5) Source(5, 12) + SourceIndex(3) +5 >Emitted(27, 10) Source(5, 11) + SourceIndex(3) +6 >Emitted(27, 11) Source(5, 12) + SourceIndex(3) +7 >Emitted(27, 19) Source(11, 2) + SourceIndex(3) --- >>>function forsecondsecond_part1Rest() { 1-> @@ -1789,9 +1805,9 @@ sourceFile:../../../second/second_part1.ts > 2 >function 3 > forsecondsecond_part1Rest -1->Emitted(26, 1) Source(12, 1) + SourceIndex(3) -2 >Emitted(26, 10) Source(12, 10) + SourceIndex(3) -3 >Emitted(26, 35) Source(12, 35) + SourceIndex(3) +1->Emitted(28, 1) Source(12, 1) + SourceIndex(3) +2 >Emitted(28, 10) Source(12, 10) + SourceIndex(3) +3 >Emitted(28, 35) Source(12, 35) + SourceIndex(3) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^ @@ -1811,14 +1827,14 @@ sourceFile:../../../second/second_part1.ts 6 > , 7 > ...rest } = { a: 10, b: 30, yy: 30 } 8 > ; -1->Emitted(27, 5) Source(13, 1) + SourceIndex(3) -2 >Emitted(27, 9) Source(13, 7) + SourceIndex(3) -3 >Emitted(27, 38) Source(13, 48) + SourceIndex(3) -4 >Emitted(27, 40) Source(13, 9) + SourceIndex(3) -5 >Emitted(27, 48) Source(13, 10) + SourceIndex(3) -6 >Emitted(27, 50) Source(13, 12) + SourceIndex(3) -7 >Emitted(27, 74) Source(13, 48) + SourceIndex(3) -8 >Emitted(27, 75) Source(13, 49) + SourceIndex(3) +1->Emitted(29, 5) Source(13, 1) + SourceIndex(3) +2 >Emitted(29, 9) Source(13, 7) + SourceIndex(3) +3 >Emitted(29, 38) Source(13, 48) + SourceIndex(3) +4 >Emitted(29, 40) Source(13, 9) + SourceIndex(3) +5 >Emitted(29, 48) Source(13, 10) + SourceIndex(3) +6 >Emitted(29, 50) Source(13, 12) + SourceIndex(3) +7 >Emitted(29, 74) Source(13, 48) + SourceIndex(3) +8 >Emitted(29, 75) Source(13, 49) + SourceIndex(3) --- >>>} 1 > @@ -1827,8 +1843,8 @@ sourceFile:../../../second/second_part1.ts 1 > > 2 >} -1 >Emitted(28, 1) Source(14, 1) + SourceIndex(3) -2 >Emitted(28, 2) Source(14, 2) + SourceIndex(3) +1 >Emitted(30, 1) Source(14, 1) + SourceIndex(3) +2 >Emitted(30, 2) Source(14, 2) + SourceIndex(3) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -1838,13 +1854,13 @@ sourceFile:../../../second/second_part2.ts 1-> 2 >^^^^^^^^^^^^^^^^^^^-> 1-> -1->Emitted(29, 1) Source(1, 1) + SourceIndex(4) +1->Emitted(31, 1) Source(1, 1) + SourceIndex(4) --- >>> function C() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(30, 5) Source(1, 1) + SourceIndex(4) +1->Emitted(32, 5) Source(1, 1) + SourceIndex(4) --- >>> } 1->^^^^ @@ -1856,8 +1872,8 @@ sourceFile:../../../second/second_part2.ts > } > 2 > } -1->Emitted(31, 5) Source(5, 1) + SourceIndex(4) -2 >Emitted(31, 6) Source(5, 2) + SourceIndex(4) +1->Emitted(33, 5) Source(5, 1) + SourceIndex(4) +2 >Emitted(33, 6) Source(5, 2) + SourceIndex(4) --- >>> C.prototype.doSomething = function () { 1->^^^^ @@ -1867,9 +1883,9 @@ sourceFile:../../../second/second_part2.ts 1-> 2 > doSomething 3 > -1->Emitted(32, 5) Source(2, 5) + SourceIndex(4) -2 >Emitted(32, 28) Source(2, 16) + SourceIndex(4) -3 >Emitted(32, 31) Source(2, 5) + SourceIndex(4) +1->Emitted(34, 5) Source(2, 5) + SourceIndex(4) +2 >Emitted(34, 28) Source(2, 16) + SourceIndex(4) +3 >Emitted(34, 31) Source(2, 5) + SourceIndex(4) --- >>> console.log("something got done"); 1->^^^^^^^^ @@ -1889,14 +1905,14 @@ sourceFile:../../../second/second_part2.ts 6 > "something got done" 7 > ) 8 > ; -1->Emitted(33, 9) Source(3, 9) + SourceIndex(4) -2 >Emitted(33, 16) Source(3, 16) + SourceIndex(4) -3 >Emitted(33, 17) Source(3, 17) + SourceIndex(4) -4 >Emitted(33, 20) Source(3, 20) + SourceIndex(4) -5 >Emitted(33, 21) Source(3, 21) + SourceIndex(4) -6 >Emitted(33, 41) Source(3, 41) + SourceIndex(4) -7 >Emitted(33, 42) Source(3, 42) + SourceIndex(4) -8 >Emitted(33, 43) Source(3, 43) + SourceIndex(4) +1->Emitted(35, 9) Source(3, 9) + SourceIndex(4) +2 >Emitted(35, 16) Source(3, 16) + SourceIndex(4) +3 >Emitted(35, 17) Source(3, 17) + SourceIndex(4) +4 >Emitted(35, 20) Source(3, 20) + SourceIndex(4) +5 >Emitted(35, 21) Source(3, 21) + SourceIndex(4) +6 >Emitted(35, 41) Source(3, 41) + SourceIndex(4) +7 >Emitted(35, 42) Source(3, 42) + SourceIndex(4) +8 >Emitted(35, 43) Source(3, 43) + SourceIndex(4) --- >>> }; 1 >^^^^ @@ -1905,8 +1921,8 @@ sourceFile:../../../second/second_part2.ts 1 > > 2 > } -1 >Emitted(34, 5) Source(4, 5) + SourceIndex(4) -2 >Emitted(34, 6) Source(4, 6) + SourceIndex(4) +1 >Emitted(36, 5) Source(4, 5) + SourceIndex(4) +2 >Emitted(36, 6) Source(4, 6) + SourceIndex(4) --- >>> return C; 1->^^^^ @@ -1914,8 +1930,8 @@ sourceFile:../../../second/second_part2.ts 1-> > 2 > } -1->Emitted(35, 5) Source(5, 1) + SourceIndex(4) -2 >Emitted(35, 13) Source(5, 2) + SourceIndex(4) +1->Emitted(37, 5) Source(5, 1) + SourceIndex(4) +2 >Emitted(37, 13) Source(5, 2) + SourceIndex(4) --- >>>}()); 1 > @@ -1931,10 +1947,10 @@ sourceFile:../../../second/second_part2.ts > console.log("something got done"); > } > } -1 >Emitted(36, 1) Source(5, 1) + SourceIndex(4) -2 >Emitted(36, 2) Source(5, 2) + SourceIndex(4) -3 >Emitted(36, 2) Source(1, 1) + SourceIndex(4) -4 >Emitted(36, 6) Source(5, 2) + SourceIndex(4) +1 >Emitted(38, 1) Source(5, 1) + SourceIndex(4) +2 >Emitted(38, 2) Source(5, 2) + SourceIndex(4) +3 >Emitted(38, 2) Source(1, 1) + SourceIndex(4) +4 >Emitted(38, 6) Source(5, 2) + SourceIndex(4) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -1958,14 +1974,14 @@ sourceFile:../../third_part1.ts 6 > C 7 > () 8 > ; -1->Emitted(37, 1) Source(1, 1) + SourceIndex(5) -2 >Emitted(37, 5) Source(1, 5) + SourceIndex(5) -3 >Emitted(37, 6) Source(1, 6) + SourceIndex(5) -4 >Emitted(37, 9) Source(1, 9) + SourceIndex(5) -5 >Emitted(37, 13) Source(1, 13) + SourceIndex(5) -6 >Emitted(37, 14) Source(1, 14) + SourceIndex(5) -7 >Emitted(37, 16) Source(1, 16) + SourceIndex(5) -8 >Emitted(37, 17) Source(1, 17) + SourceIndex(5) +1->Emitted(39, 1) Source(1, 1) + SourceIndex(5) +2 >Emitted(39, 5) Source(1, 5) + SourceIndex(5) +3 >Emitted(39, 6) Source(1, 6) + SourceIndex(5) +4 >Emitted(39, 9) Source(1, 9) + SourceIndex(5) +5 >Emitted(39, 13) Source(1, 13) + SourceIndex(5) +6 >Emitted(39, 14) Source(1, 14) + SourceIndex(5) +7 >Emitted(39, 16) Source(1, 16) + SourceIndex(5) +8 >Emitted(39, 17) Source(1, 17) + SourceIndex(5) --- >>>c.doSomething(); 1-> @@ -1982,12 +1998,12 @@ sourceFile:../../third_part1.ts 4 > doSomething 5 > () 6 > ; -1->Emitted(38, 1) Source(2, 1) + SourceIndex(5) -2 >Emitted(38, 2) Source(2, 2) + SourceIndex(5) -3 >Emitted(38, 3) Source(2, 3) + SourceIndex(5) -4 >Emitted(38, 14) Source(2, 14) + SourceIndex(5) -5 >Emitted(38, 16) Source(2, 16) + SourceIndex(5) -6 >Emitted(38, 17) Source(2, 17) + SourceIndex(5) +1->Emitted(40, 1) Source(2, 1) + SourceIndex(5) +2 >Emitted(40, 2) Source(2, 2) + SourceIndex(5) +3 >Emitted(40, 3) Source(2, 3) + SourceIndex(5) +4 >Emitted(40, 14) Source(2, 14) + SourceIndex(5) +5 >Emitted(40, 16) Source(2, 16) + SourceIndex(5) +6 >Emitted(40, 17) Source(2, 17) + SourceIndex(5) --- >>>function forthirdthird_part1Rest() { 1-> @@ -1998,9 +2014,9 @@ sourceFile:../../third_part1.ts > 2 >function 3 > forthirdthird_part1Rest -1->Emitted(39, 1) Source(3, 1) + SourceIndex(5) -2 >Emitted(39, 10) Source(3, 10) + SourceIndex(5) -3 >Emitted(39, 33) Source(3, 33) + SourceIndex(5) +1->Emitted(41, 1) Source(3, 1) + SourceIndex(5) +2 >Emitted(41, 10) Source(3, 10) + SourceIndex(5) +3 >Emitted(41, 33) Source(3, 33) + SourceIndex(5) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^ @@ -2020,14 +2036,14 @@ sourceFile:../../third_part1.ts 6 > , 7 > ...rest } = { a: 10, b: 30, yy: 30 } 8 > ; -1->Emitted(40, 5) Source(4, 1) + SourceIndex(5) -2 >Emitted(40, 9) Source(4, 7) + SourceIndex(5) -3 >Emitted(40, 38) Source(4, 48) + SourceIndex(5) -4 >Emitted(40, 40) Source(4, 9) + SourceIndex(5) -5 >Emitted(40, 48) Source(4, 10) + SourceIndex(5) -6 >Emitted(40, 50) Source(4, 12) + SourceIndex(5) -7 >Emitted(40, 74) Source(4, 48) + SourceIndex(5) -8 >Emitted(40, 75) Source(4, 49) + SourceIndex(5) +1->Emitted(42, 5) Source(4, 1) + SourceIndex(5) +2 >Emitted(42, 9) Source(4, 7) + SourceIndex(5) +3 >Emitted(42, 38) Source(4, 48) + SourceIndex(5) +4 >Emitted(42, 40) Source(4, 9) + SourceIndex(5) +5 >Emitted(42, 48) Source(4, 10) + SourceIndex(5) +6 >Emitted(42, 50) Source(4, 12) + SourceIndex(5) +7 >Emitted(42, 74) Source(4, 48) + SourceIndex(5) +8 >Emitted(42, 75) Source(4, 49) + SourceIndex(5) --- >>>} 1 > @@ -2036,8 +2052,8 @@ sourceFile:../../third_part1.ts 1 > > 2 >} -1 >Emitted(41, 1) Source(5, 1) + SourceIndex(5) -2 >Emitted(41, 2) Source(5, 2) + SourceIndex(5) +1 >Emitted(43, 1) Source(5, 1) + SourceIndex(5) +2 >Emitted(43, 2) Source(5, 2) + SourceIndex(5) --- >>>//# sourceMappingURL=third-output.js.map @@ -2052,39 +2068,39 @@ sourceFile:../../third_part1.ts "sections": [ { "pos": 0, - "end": 415, + "end": 492, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 417, - "end": 644, + "pos": 494, + "end": 721, "kind": "prepend", "data": "/src/first/bin/first-output.js", "texts": [ { - "pos": 417, - "end": 644, + "pos": 494, + "end": 721, "kind": "text" } ] }, { - "pos": 644, - "end": 1048, + "pos": 721, + "end": 1125, "kind": "prepend", "data": "/src/2/second-output.js", "texts": [ { - "pos": 644, - "end": 1048, + "pos": 721, + "end": 1125, "kind": "text" } ] }, { - "pos": 1048, - "end": 1201, + "pos": 1125, + "end": 1278, "kind": "text" } ], @@ -2137,20 +2153,22 @@ sourceFile:../../third_part1.ts ====================================================================== File:: /src/third/thirdjs/output/third-output.js ---------------------------------------------------------------------- -emitHelpers: (0-415):: typescript:rest +emitHelpers: (0-492):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; ---------------------------------------------------------------------- -prepend: (417-644):: /src/first/bin/first-output.js texts:: 1 +prepend: (494-721):: /src/first/bin/first-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (417-644) +text: (494-721) var s = "Hello, world"; console.log(s); function forfirstfirst_PART1Rest() { @@ -2162,9 +2180,9 @@ function f() { } ---------------------------------------------------------------------- -prepend: (644-1048):: /src/2/second-output.js texts:: 1 +prepend: (721-1125):: /src/2/second-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (644-1048) +text: (721-1125) var N; (function (N) { function f() { @@ -2185,7 +2203,7 @@ var C = (function () { }()); ---------------------------------------------------------------------- -text: (1048-1201) +text: (1125-1278) var c = new C(); c.doSomething(); function forthirdthird_part1Rest() { diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/emitHelpers-in-only-one-dependency-project.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/emitHelpers-in-only-one-dependency-project.js index fba3d8b427a..3e3d2c010a5 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/emitHelpers-in-only-one-dependency-project.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/emitHelpers-in-only-one-dependency-project.js @@ -132,8 +132,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; var N; @@ -157,7 +159,7 @@ var C = (function () { //# sourceMappingURL=second-output.js.map //// [/src/2/second-output.js.map] -{"version":3,"file":"second-output.js","sourceRoot":"","sources":["../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":";;;;;;;;;AAIA,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;AACD,SAAS,yBAAyB;IAClC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;ACbD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC"} +{"version":3,"file":"second-output.js","sourceRoot":"","sources":["../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":";;;;;;;;;;;AAIA,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;AACD,SAAS,yBAAyB;IAClC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;ACbD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC"} //// [/src/2/second-output.js.map.baseline.txt] =================================================================== @@ -175,8 +177,10 @@ sourceFile:../second/second_part1.ts >>> for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") ->>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) ->>> t[p[i]] = s[p[i]]; +>>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> t[p[i]] = s[p[i]]; +>>> } >>> return t; >>>}; >>>var N; @@ -199,10 +203,10 @@ sourceFile:../second/second_part1.ts > > f(); > } -1 >Emitted(10, 1) Source(5, 1) + SourceIndex(0) -2 >Emitted(10, 5) Source(5, 11) + SourceIndex(0) -3 >Emitted(10, 6) Source(5, 12) + SourceIndex(0) -4 >Emitted(10, 7) Source(11, 2) + SourceIndex(0) +1 >Emitted(12, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(12, 5) Source(5, 11) + SourceIndex(0) +3 >Emitted(12, 6) Source(5, 12) + SourceIndex(0) +4 >Emitted(12, 7) Source(11, 2) + SourceIndex(0) --- >>>(function (N) { 1-> @@ -212,9 +216,9 @@ sourceFile:../second/second_part1.ts 1-> 2 >namespace 3 > N -1->Emitted(11, 1) Source(5, 1) + SourceIndex(0) -2 >Emitted(11, 12) Source(5, 11) + SourceIndex(0) -3 >Emitted(11, 13) Source(5, 12) + SourceIndex(0) +1->Emitted(13, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(13, 12) Source(5, 11) + SourceIndex(0) +3 >Emitted(13, 13) Source(5, 12) + SourceIndex(0) --- >>> function f() { 1->^^^^ @@ -225,9 +229,9 @@ sourceFile:../second/second_part1.ts > 2 > function 3 > f -1->Emitted(12, 5) Source(6, 5) + SourceIndex(0) -2 >Emitted(12, 14) Source(6, 14) + SourceIndex(0) -3 >Emitted(12, 15) Source(6, 15) + SourceIndex(0) +1->Emitted(14, 5) Source(6, 5) + SourceIndex(0) +2 >Emitted(14, 14) Source(6, 14) + SourceIndex(0) +3 >Emitted(14, 15) Source(6, 15) + SourceIndex(0) --- >>> console.log('testing'); 1->^^^^^^^^ @@ -247,14 +251,14 @@ sourceFile:../second/second_part1.ts 6 > 'testing' 7 > ) 8 > ; -1->Emitted(13, 9) Source(7, 9) + SourceIndex(0) -2 >Emitted(13, 16) Source(7, 16) + SourceIndex(0) -3 >Emitted(13, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(13, 20) Source(7, 20) + SourceIndex(0) -5 >Emitted(13, 21) Source(7, 21) + SourceIndex(0) -6 >Emitted(13, 30) Source(7, 30) + SourceIndex(0) -7 >Emitted(13, 31) Source(7, 31) + SourceIndex(0) -8 >Emitted(13, 32) Source(7, 32) + SourceIndex(0) +1->Emitted(15, 9) Source(7, 9) + SourceIndex(0) +2 >Emitted(15, 16) Source(7, 16) + SourceIndex(0) +3 >Emitted(15, 17) Source(7, 17) + SourceIndex(0) +4 >Emitted(15, 20) Source(7, 20) + SourceIndex(0) +5 >Emitted(15, 21) Source(7, 21) + SourceIndex(0) +6 >Emitted(15, 30) Source(7, 30) + SourceIndex(0) +7 >Emitted(15, 31) Source(7, 31) + SourceIndex(0) +8 >Emitted(15, 32) Source(7, 32) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -263,8 +267,8 @@ sourceFile:../second/second_part1.ts 1 > > 2 > } -1 >Emitted(14, 5) Source(8, 5) + SourceIndex(0) -2 >Emitted(14, 6) Source(8, 6) + SourceIndex(0) +1 >Emitted(16, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(16, 6) Source(8, 6) + SourceIndex(0) --- >>> f(); 1->^^^^ @@ -278,10 +282,10 @@ sourceFile:../second/second_part1.ts 2 > f 3 > () 4 > ; -1->Emitted(15, 5) Source(10, 5) + SourceIndex(0) -2 >Emitted(15, 6) Source(10, 6) + SourceIndex(0) -3 >Emitted(15, 8) Source(10, 8) + SourceIndex(0) -4 >Emitted(15, 9) Source(10, 9) + SourceIndex(0) +1->Emitted(17, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(17, 6) Source(10, 6) + SourceIndex(0) +3 >Emitted(17, 8) Source(10, 8) + SourceIndex(0) +4 >Emitted(17, 9) Source(10, 9) + SourceIndex(0) --- >>>})(N || (N = {})); 1-> @@ -306,13 +310,13 @@ sourceFile:../second/second_part1.ts > > f(); > } -1->Emitted(16, 1) Source(11, 1) + SourceIndex(0) -2 >Emitted(16, 2) Source(11, 2) + SourceIndex(0) -3 >Emitted(16, 4) Source(5, 11) + SourceIndex(0) -4 >Emitted(16, 5) Source(5, 12) + SourceIndex(0) -5 >Emitted(16, 10) Source(5, 11) + SourceIndex(0) -6 >Emitted(16, 11) Source(5, 12) + SourceIndex(0) -7 >Emitted(16, 19) Source(11, 2) + SourceIndex(0) +1->Emitted(18, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(18, 2) Source(11, 2) + SourceIndex(0) +3 >Emitted(18, 4) Source(5, 11) + SourceIndex(0) +4 >Emitted(18, 5) Source(5, 12) + SourceIndex(0) +5 >Emitted(18, 10) Source(5, 11) + SourceIndex(0) +6 >Emitted(18, 11) Source(5, 12) + SourceIndex(0) +7 >Emitted(18, 19) Source(11, 2) + SourceIndex(0) --- >>>function forsecondsecond_part1Rest() { 1-> @@ -323,9 +327,9 @@ sourceFile:../second/second_part1.ts > 2 >function 3 > forsecondsecond_part1Rest -1->Emitted(17, 1) Source(12, 1) + SourceIndex(0) -2 >Emitted(17, 10) Source(12, 10) + SourceIndex(0) -3 >Emitted(17, 35) Source(12, 35) + SourceIndex(0) +1->Emitted(19, 1) Source(12, 1) + SourceIndex(0) +2 >Emitted(19, 10) Source(12, 10) + SourceIndex(0) +3 >Emitted(19, 35) Source(12, 35) + SourceIndex(0) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^ @@ -345,14 +349,14 @@ sourceFile:../second/second_part1.ts 6 > , 7 > ...rest } = { a: 10, b: 30, yy: 30 } 8 > ; -1->Emitted(18, 5) Source(13, 1) + SourceIndex(0) -2 >Emitted(18, 9) Source(13, 7) + SourceIndex(0) -3 >Emitted(18, 38) Source(13, 48) + SourceIndex(0) -4 >Emitted(18, 40) Source(13, 9) + SourceIndex(0) -5 >Emitted(18, 48) Source(13, 10) + SourceIndex(0) -6 >Emitted(18, 50) Source(13, 12) + SourceIndex(0) -7 >Emitted(18, 74) Source(13, 48) + SourceIndex(0) -8 >Emitted(18, 75) Source(13, 49) + SourceIndex(0) +1->Emitted(20, 5) Source(13, 1) + SourceIndex(0) +2 >Emitted(20, 9) Source(13, 7) + SourceIndex(0) +3 >Emitted(20, 38) Source(13, 48) + SourceIndex(0) +4 >Emitted(20, 40) Source(13, 9) + SourceIndex(0) +5 >Emitted(20, 48) Source(13, 10) + SourceIndex(0) +6 >Emitted(20, 50) Source(13, 12) + SourceIndex(0) +7 >Emitted(20, 74) Source(13, 48) + SourceIndex(0) +8 >Emitted(20, 75) Source(13, 49) + SourceIndex(0) --- >>>} 1 > @@ -361,8 +365,8 @@ sourceFile:../second/second_part1.ts 1 > > 2 >} -1 >Emitted(19, 1) Source(14, 1) + SourceIndex(0) -2 >Emitted(19, 2) Source(14, 2) + SourceIndex(0) +1 >Emitted(21, 1) Source(14, 1) + SourceIndex(0) +2 >Emitted(21, 2) Source(14, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/src/2/second-output.js @@ -372,13 +376,13 @@ sourceFile:../second/second_part2.ts 1-> 2 >^^^^^^^^^^^^^^^^^^^-> 1-> -1->Emitted(20, 1) Source(1, 1) + SourceIndex(1) +1->Emitted(22, 1) Source(1, 1) + SourceIndex(1) --- >>> function C() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(21, 5) Source(1, 1) + SourceIndex(1) +1->Emitted(23, 5) Source(1, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -390,8 +394,8 @@ sourceFile:../second/second_part2.ts > } > 2 > } -1->Emitted(22, 5) Source(5, 1) + SourceIndex(1) -2 >Emitted(22, 6) Source(5, 2) + SourceIndex(1) +1->Emitted(24, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(24, 6) Source(5, 2) + SourceIndex(1) --- >>> C.prototype.doSomething = function () { 1->^^^^ @@ -401,9 +405,9 @@ sourceFile:../second/second_part2.ts 1-> 2 > doSomething 3 > -1->Emitted(23, 5) Source(2, 5) + SourceIndex(1) -2 >Emitted(23, 28) Source(2, 16) + SourceIndex(1) -3 >Emitted(23, 31) Source(2, 5) + SourceIndex(1) +1->Emitted(25, 5) Source(2, 5) + SourceIndex(1) +2 >Emitted(25, 28) Source(2, 16) + SourceIndex(1) +3 >Emitted(25, 31) Source(2, 5) + SourceIndex(1) --- >>> console.log("something got done"); 1->^^^^^^^^ @@ -423,14 +427,14 @@ sourceFile:../second/second_part2.ts 6 > "something got done" 7 > ) 8 > ; -1->Emitted(24, 9) Source(3, 9) + SourceIndex(1) -2 >Emitted(24, 16) Source(3, 16) + SourceIndex(1) -3 >Emitted(24, 17) Source(3, 17) + SourceIndex(1) -4 >Emitted(24, 20) Source(3, 20) + SourceIndex(1) -5 >Emitted(24, 21) Source(3, 21) + SourceIndex(1) -6 >Emitted(24, 41) Source(3, 41) + SourceIndex(1) -7 >Emitted(24, 42) Source(3, 42) + SourceIndex(1) -8 >Emitted(24, 43) Source(3, 43) + SourceIndex(1) +1->Emitted(26, 9) Source(3, 9) + SourceIndex(1) +2 >Emitted(26, 16) Source(3, 16) + SourceIndex(1) +3 >Emitted(26, 17) Source(3, 17) + SourceIndex(1) +4 >Emitted(26, 20) Source(3, 20) + SourceIndex(1) +5 >Emitted(26, 21) Source(3, 21) + SourceIndex(1) +6 >Emitted(26, 41) Source(3, 41) + SourceIndex(1) +7 >Emitted(26, 42) Source(3, 42) + SourceIndex(1) +8 >Emitted(26, 43) Source(3, 43) + SourceIndex(1) --- >>> }; 1 >^^^^ @@ -439,8 +443,8 @@ sourceFile:../second/second_part2.ts 1 > > 2 > } -1 >Emitted(25, 5) Source(4, 5) + SourceIndex(1) -2 >Emitted(25, 6) Source(4, 6) + SourceIndex(1) +1 >Emitted(27, 5) Source(4, 5) + SourceIndex(1) +2 >Emitted(27, 6) Source(4, 6) + SourceIndex(1) --- >>> return C; 1->^^^^ @@ -448,8 +452,8 @@ sourceFile:../second/second_part2.ts 1-> > 2 > } -1->Emitted(26, 5) Source(5, 1) + SourceIndex(1) -2 >Emitted(26, 13) Source(5, 2) + SourceIndex(1) +1->Emitted(28, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(28, 13) Source(5, 2) + SourceIndex(1) --- >>>}()); 1 > @@ -465,10 +469,10 @@ sourceFile:../second/second_part2.ts > console.log("something got done"); > } > } -1 >Emitted(27, 1) Source(5, 1) + SourceIndex(1) -2 >Emitted(27, 2) Source(5, 2) + SourceIndex(1) -3 >Emitted(27, 2) Source(1, 1) + SourceIndex(1) -4 >Emitted(27, 6) Source(5, 2) + SourceIndex(1) +1 >Emitted(29, 1) Source(5, 1) + SourceIndex(1) +2 >Emitted(29, 2) Source(5, 2) + SourceIndex(1) +3 >Emitted(29, 2) Source(1, 1) + SourceIndex(1) +4 >Emitted(29, 6) Source(5, 2) + SourceIndex(1) --- >>>//# sourceMappingURL=second-output.js.map @@ -484,13 +488,13 @@ sourceFile:../second/second_part2.ts "sections": [ { "pos": 0, - "end": 415, + "end": 492, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 417, - "end": 821, + "pos": 494, + "end": 898, "kind": "text" } ], @@ -517,18 +521,20 @@ sourceFile:../second/second_part2.ts ====================================================================== File:: /src/2/second-output.js ---------------------------------------------------------------------- -emitHelpers: (0-415):: typescript:rest +emitHelpers: (0-492):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; ---------------------------------------------------------------------- -text: (417-821) +text: (494-898) var N; (function (N) { function f() { @@ -1298,8 +1304,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; var s = "Hello, world"; @@ -1332,7 +1340,7 @@ c.doSomething(); //# sourceMappingURL=third-output.js.map //// [/src/third/thirdjs/output/third-output.js.map] -{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../../first/first_PART1.ts","../../../first/first_part2.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts","../../third_part1.ts"],"names":[],"mappings":";;;;;;;;;AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB,KAAK,CAAC;ACXtC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC;ACED,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;AACD,SAAS,yBAAyB;IAClC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;ACbD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC;ACJD,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC"} +{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../../first/first_PART1.ts","../../../first/first_part2.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts","../../third_part1.ts"],"names":[],"mappings":";;;;;;;;;;;AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB,KAAK,CAAC;ACXtC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC;ACED,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;AACD,SAAS,yBAAyB;IAClC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;ACbD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC;ACJD,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC"} //// [/src/third/thirdjs/output/third-output.js.map.baseline.txt] =================================================================== @@ -1350,8 +1358,10 @@ sourceFile:../../../first/first_PART1.ts >>> for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") ->>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) ->>> t[p[i]] = s[p[i]]; +>>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> t[p[i]] = s[p[i]]; +>>> } >>> return t; >>>}; >>>var s = "Hello, world"; @@ -1371,12 +1381,12 @@ sourceFile:../../../first/first_PART1.ts 4 > = 5 > "Hello, world" 6 > ; -1 >Emitted(10, 1) Source(5, 1) + SourceIndex(0) -2 >Emitted(10, 5) Source(5, 7) + SourceIndex(0) -3 >Emitted(10, 6) Source(5, 8) + SourceIndex(0) -4 >Emitted(10, 9) Source(5, 11) + SourceIndex(0) -5 >Emitted(10, 23) Source(5, 25) + SourceIndex(0) -6 >Emitted(10, 24) Source(5, 26) + SourceIndex(0) +1 >Emitted(12, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(12, 5) Source(5, 7) + SourceIndex(0) +3 >Emitted(12, 6) Source(5, 8) + SourceIndex(0) +4 >Emitted(12, 9) Source(5, 11) + SourceIndex(0) +5 >Emitted(12, 23) Source(5, 25) + SourceIndex(0) +6 >Emitted(12, 24) Source(5, 26) + SourceIndex(0) --- >>>console.log(s); 1 > @@ -1402,14 +1412,14 @@ sourceFile:../../../first/first_PART1.ts 6 > s 7 > ) 8 > ; -1 >Emitted(11, 1) Source(11, 1) + SourceIndex(0) -2 >Emitted(11, 8) Source(11, 8) + SourceIndex(0) -3 >Emitted(11, 9) Source(11, 9) + SourceIndex(0) -4 >Emitted(11, 12) Source(11, 12) + SourceIndex(0) -5 >Emitted(11, 13) Source(11, 13) + SourceIndex(0) -6 >Emitted(11, 14) Source(11, 14) + SourceIndex(0) -7 >Emitted(11, 15) Source(11, 15) + SourceIndex(0) -8 >Emitted(11, 16) Source(11, 16) + SourceIndex(0) +1 >Emitted(13, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(13, 8) Source(11, 8) + SourceIndex(0) +3 >Emitted(13, 9) Source(11, 9) + SourceIndex(0) +4 >Emitted(13, 12) Source(11, 12) + SourceIndex(0) +5 >Emitted(13, 13) Source(11, 13) + SourceIndex(0) +6 >Emitted(13, 14) Source(11, 14) + SourceIndex(0) +7 >Emitted(13, 15) Source(11, 15) + SourceIndex(0) +8 >Emitted(13, 16) Source(11, 16) + SourceIndex(0) --- >>>function forfirstfirst_PART1Rest() { } 1-> @@ -1423,11 +1433,11 @@ sourceFile:../../../first/first_PART1.ts 3 > forfirstfirst_PART1Rest 4 > () { 5 > } -1->Emitted(12, 1) Source(12, 1) + SourceIndex(0) -2 >Emitted(12, 10) Source(12, 10) + SourceIndex(0) -3 >Emitted(12, 33) Source(12, 33) + SourceIndex(0) -4 >Emitted(12, 38) Source(12, 38) + SourceIndex(0) -5 >Emitted(12, 39) Source(12, 39) + SourceIndex(0) +1->Emitted(14, 1) Source(12, 1) + SourceIndex(0) +2 >Emitted(14, 10) Source(12, 10) + SourceIndex(0) +3 >Emitted(14, 33) Source(12, 33) + SourceIndex(0) +4 >Emitted(14, 38) Source(12, 38) + SourceIndex(0) +5 >Emitted(14, 39) Source(12, 39) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -1452,15 +1462,15 @@ sourceFile:../../../first/first_part2.ts 7 > () 8 > ) 9 > ; -1 >Emitted(13, 1) Source(1, 1) + SourceIndex(1) -2 >Emitted(13, 8) Source(1, 8) + SourceIndex(1) -3 >Emitted(13, 9) Source(1, 9) + SourceIndex(1) -4 >Emitted(13, 12) Source(1, 12) + SourceIndex(1) -5 >Emitted(13, 13) Source(1, 13) + SourceIndex(1) -6 >Emitted(13, 14) Source(1, 14) + SourceIndex(1) -7 >Emitted(13, 16) Source(1, 16) + SourceIndex(1) -8 >Emitted(13, 17) Source(1, 17) + SourceIndex(1) -9 >Emitted(13, 18) Source(1, 18) + SourceIndex(1) +1 >Emitted(15, 1) Source(1, 1) + SourceIndex(1) +2 >Emitted(15, 8) Source(1, 8) + SourceIndex(1) +3 >Emitted(15, 9) Source(1, 9) + SourceIndex(1) +4 >Emitted(15, 12) Source(1, 12) + SourceIndex(1) +5 >Emitted(15, 13) Source(1, 13) + SourceIndex(1) +6 >Emitted(15, 14) Source(1, 14) + SourceIndex(1) +7 >Emitted(15, 16) Source(1, 16) + SourceIndex(1) +8 >Emitted(15, 17) Source(1, 17) + SourceIndex(1) +9 >Emitted(15, 18) Source(1, 18) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -1474,9 +1484,9 @@ sourceFile:../../../first/first_part3.ts 1 > 2 >function 3 > f -1 >Emitted(14, 1) Source(1, 1) + SourceIndex(2) -2 >Emitted(14, 10) Source(1, 10) + SourceIndex(2) -3 >Emitted(14, 11) Source(1, 11) + SourceIndex(2) +1 >Emitted(16, 1) Source(1, 1) + SourceIndex(2) +2 >Emitted(16, 10) Source(1, 10) + SourceIndex(2) +3 >Emitted(16, 11) Source(1, 11) + SourceIndex(2) --- >>> return "JS does hoists"; 1->^^^^ @@ -1488,10 +1498,10 @@ sourceFile:../../../first/first_part3.ts 2 > return 3 > "JS does hoists" 4 > ; -1->Emitted(15, 5) Source(2, 5) + SourceIndex(2) -2 >Emitted(15, 12) Source(2, 12) + SourceIndex(2) -3 >Emitted(15, 28) Source(2, 28) + SourceIndex(2) -4 >Emitted(15, 29) Source(2, 29) + SourceIndex(2) +1->Emitted(17, 5) Source(2, 5) + SourceIndex(2) +2 >Emitted(17, 12) Source(2, 12) + SourceIndex(2) +3 >Emitted(17, 28) Source(2, 28) + SourceIndex(2) +4 >Emitted(17, 29) Source(2, 29) + SourceIndex(2) --- >>>} 1 > @@ -1500,8 +1510,8 @@ sourceFile:../../../first/first_part3.ts 1 > > 2 >} -1 >Emitted(16, 1) Source(3, 1) + SourceIndex(2) -2 >Emitted(16, 2) Source(3, 2) + SourceIndex(2) +1 >Emitted(18, 1) Source(3, 1) + SourceIndex(2) +2 >Emitted(18, 2) Source(3, 2) + SourceIndex(2) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -1527,10 +1537,10 @@ sourceFile:../../../second/second_part1.ts > > f(); > } -1->Emitted(17, 1) Source(5, 1) + SourceIndex(3) -2 >Emitted(17, 5) Source(5, 11) + SourceIndex(3) -3 >Emitted(17, 6) Source(5, 12) + SourceIndex(3) -4 >Emitted(17, 7) Source(11, 2) + SourceIndex(3) +1->Emitted(19, 1) Source(5, 1) + SourceIndex(3) +2 >Emitted(19, 5) Source(5, 11) + SourceIndex(3) +3 >Emitted(19, 6) Source(5, 12) + SourceIndex(3) +4 >Emitted(19, 7) Source(11, 2) + SourceIndex(3) --- >>>(function (N) { 1-> @@ -1540,9 +1550,9 @@ sourceFile:../../../second/second_part1.ts 1-> 2 >namespace 3 > N -1->Emitted(18, 1) Source(5, 1) + SourceIndex(3) -2 >Emitted(18, 12) Source(5, 11) + SourceIndex(3) -3 >Emitted(18, 13) Source(5, 12) + SourceIndex(3) +1->Emitted(20, 1) Source(5, 1) + SourceIndex(3) +2 >Emitted(20, 12) Source(5, 11) + SourceIndex(3) +3 >Emitted(20, 13) Source(5, 12) + SourceIndex(3) --- >>> function f() { 1->^^^^ @@ -1553,9 +1563,9 @@ sourceFile:../../../second/second_part1.ts > 2 > function 3 > f -1->Emitted(19, 5) Source(6, 5) + SourceIndex(3) -2 >Emitted(19, 14) Source(6, 14) + SourceIndex(3) -3 >Emitted(19, 15) Source(6, 15) + SourceIndex(3) +1->Emitted(21, 5) Source(6, 5) + SourceIndex(3) +2 >Emitted(21, 14) Source(6, 14) + SourceIndex(3) +3 >Emitted(21, 15) Source(6, 15) + SourceIndex(3) --- >>> console.log('testing'); 1->^^^^^^^^ @@ -1575,14 +1585,14 @@ sourceFile:../../../second/second_part1.ts 6 > 'testing' 7 > ) 8 > ; -1->Emitted(20, 9) Source(7, 9) + SourceIndex(3) -2 >Emitted(20, 16) Source(7, 16) + SourceIndex(3) -3 >Emitted(20, 17) Source(7, 17) + SourceIndex(3) -4 >Emitted(20, 20) Source(7, 20) + SourceIndex(3) -5 >Emitted(20, 21) Source(7, 21) + SourceIndex(3) -6 >Emitted(20, 30) Source(7, 30) + SourceIndex(3) -7 >Emitted(20, 31) Source(7, 31) + SourceIndex(3) -8 >Emitted(20, 32) Source(7, 32) + SourceIndex(3) +1->Emitted(22, 9) Source(7, 9) + SourceIndex(3) +2 >Emitted(22, 16) Source(7, 16) + SourceIndex(3) +3 >Emitted(22, 17) Source(7, 17) + SourceIndex(3) +4 >Emitted(22, 20) Source(7, 20) + SourceIndex(3) +5 >Emitted(22, 21) Source(7, 21) + SourceIndex(3) +6 >Emitted(22, 30) Source(7, 30) + SourceIndex(3) +7 >Emitted(22, 31) Source(7, 31) + SourceIndex(3) +8 >Emitted(22, 32) Source(7, 32) + SourceIndex(3) --- >>> } 1 >^^^^ @@ -1591,8 +1601,8 @@ sourceFile:../../../second/second_part1.ts 1 > > 2 > } -1 >Emitted(21, 5) Source(8, 5) + SourceIndex(3) -2 >Emitted(21, 6) Source(8, 6) + SourceIndex(3) +1 >Emitted(23, 5) Source(8, 5) + SourceIndex(3) +2 >Emitted(23, 6) Source(8, 6) + SourceIndex(3) --- >>> f(); 1->^^^^ @@ -1606,10 +1616,10 @@ sourceFile:../../../second/second_part1.ts 2 > f 3 > () 4 > ; -1->Emitted(22, 5) Source(10, 5) + SourceIndex(3) -2 >Emitted(22, 6) Source(10, 6) + SourceIndex(3) -3 >Emitted(22, 8) Source(10, 8) + SourceIndex(3) -4 >Emitted(22, 9) Source(10, 9) + SourceIndex(3) +1->Emitted(24, 5) Source(10, 5) + SourceIndex(3) +2 >Emitted(24, 6) Source(10, 6) + SourceIndex(3) +3 >Emitted(24, 8) Source(10, 8) + SourceIndex(3) +4 >Emitted(24, 9) Source(10, 9) + SourceIndex(3) --- >>>})(N || (N = {})); 1-> @@ -1634,13 +1644,13 @@ sourceFile:../../../second/second_part1.ts > > f(); > } -1->Emitted(23, 1) Source(11, 1) + SourceIndex(3) -2 >Emitted(23, 2) Source(11, 2) + SourceIndex(3) -3 >Emitted(23, 4) Source(5, 11) + SourceIndex(3) -4 >Emitted(23, 5) Source(5, 12) + SourceIndex(3) -5 >Emitted(23, 10) Source(5, 11) + SourceIndex(3) -6 >Emitted(23, 11) Source(5, 12) + SourceIndex(3) -7 >Emitted(23, 19) Source(11, 2) + SourceIndex(3) +1->Emitted(25, 1) Source(11, 1) + SourceIndex(3) +2 >Emitted(25, 2) Source(11, 2) + SourceIndex(3) +3 >Emitted(25, 4) Source(5, 11) + SourceIndex(3) +4 >Emitted(25, 5) Source(5, 12) + SourceIndex(3) +5 >Emitted(25, 10) Source(5, 11) + SourceIndex(3) +6 >Emitted(25, 11) Source(5, 12) + SourceIndex(3) +7 >Emitted(25, 19) Source(11, 2) + SourceIndex(3) --- >>>function forsecondsecond_part1Rest() { 1-> @@ -1651,9 +1661,9 @@ sourceFile:../../../second/second_part1.ts > 2 >function 3 > forsecondsecond_part1Rest -1->Emitted(24, 1) Source(12, 1) + SourceIndex(3) -2 >Emitted(24, 10) Source(12, 10) + SourceIndex(3) -3 >Emitted(24, 35) Source(12, 35) + SourceIndex(3) +1->Emitted(26, 1) Source(12, 1) + SourceIndex(3) +2 >Emitted(26, 10) Source(12, 10) + SourceIndex(3) +3 >Emitted(26, 35) Source(12, 35) + SourceIndex(3) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^ @@ -1673,14 +1683,14 @@ sourceFile:../../../second/second_part1.ts 6 > , 7 > ...rest } = { a: 10, b: 30, yy: 30 } 8 > ; -1->Emitted(25, 5) Source(13, 1) + SourceIndex(3) -2 >Emitted(25, 9) Source(13, 7) + SourceIndex(3) -3 >Emitted(25, 38) Source(13, 48) + SourceIndex(3) -4 >Emitted(25, 40) Source(13, 9) + SourceIndex(3) -5 >Emitted(25, 48) Source(13, 10) + SourceIndex(3) -6 >Emitted(25, 50) Source(13, 12) + SourceIndex(3) -7 >Emitted(25, 74) Source(13, 48) + SourceIndex(3) -8 >Emitted(25, 75) Source(13, 49) + SourceIndex(3) +1->Emitted(27, 5) Source(13, 1) + SourceIndex(3) +2 >Emitted(27, 9) Source(13, 7) + SourceIndex(3) +3 >Emitted(27, 38) Source(13, 48) + SourceIndex(3) +4 >Emitted(27, 40) Source(13, 9) + SourceIndex(3) +5 >Emitted(27, 48) Source(13, 10) + SourceIndex(3) +6 >Emitted(27, 50) Source(13, 12) + SourceIndex(3) +7 >Emitted(27, 74) Source(13, 48) + SourceIndex(3) +8 >Emitted(27, 75) Source(13, 49) + SourceIndex(3) --- >>>} 1 > @@ -1689,8 +1699,8 @@ sourceFile:../../../second/second_part1.ts 1 > > 2 >} -1 >Emitted(26, 1) Source(14, 1) + SourceIndex(3) -2 >Emitted(26, 2) Source(14, 2) + SourceIndex(3) +1 >Emitted(28, 1) Source(14, 1) + SourceIndex(3) +2 >Emitted(28, 2) Source(14, 2) + SourceIndex(3) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -1700,13 +1710,13 @@ sourceFile:../../../second/second_part2.ts 1-> 2 >^^^^^^^^^^^^^^^^^^^-> 1-> -1->Emitted(27, 1) Source(1, 1) + SourceIndex(4) +1->Emitted(29, 1) Source(1, 1) + SourceIndex(4) --- >>> function C() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(28, 5) Source(1, 1) + SourceIndex(4) +1->Emitted(30, 5) Source(1, 1) + SourceIndex(4) --- >>> } 1->^^^^ @@ -1718,8 +1728,8 @@ sourceFile:../../../second/second_part2.ts > } > 2 > } -1->Emitted(29, 5) Source(5, 1) + SourceIndex(4) -2 >Emitted(29, 6) Source(5, 2) + SourceIndex(4) +1->Emitted(31, 5) Source(5, 1) + SourceIndex(4) +2 >Emitted(31, 6) Source(5, 2) + SourceIndex(4) --- >>> C.prototype.doSomething = function () { 1->^^^^ @@ -1729,9 +1739,9 @@ sourceFile:../../../second/second_part2.ts 1-> 2 > doSomething 3 > -1->Emitted(30, 5) Source(2, 5) + SourceIndex(4) -2 >Emitted(30, 28) Source(2, 16) + SourceIndex(4) -3 >Emitted(30, 31) Source(2, 5) + SourceIndex(4) +1->Emitted(32, 5) Source(2, 5) + SourceIndex(4) +2 >Emitted(32, 28) Source(2, 16) + SourceIndex(4) +3 >Emitted(32, 31) Source(2, 5) + SourceIndex(4) --- >>> console.log("something got done"); 1->^^^^^^^^ @@ -1751,14 +1761,14 @@ sourceFile:../../../second/second_part2.ts 6 > "something got done" 7 > ) 8 > ; -1->Emitted(31, 9) Source(3, 9) + SourceIndex(4) -2 >Emitted(31, 16) Source(3, 16) + SourceIndex(4) -3 >Emitted(31, 17) Source(3, 17) + SourceIndex(4) -4 >Emitted(31, 20) Source(3, 20) + SourceIndex(4) -5 >Emitted(31, 21) Source(3, 21) + SourceIndex(4) -6 >Emitted(31, 41) Source(3, 41) + SourceIndex(4) -7 >Emitted(31, 42) Source(3, 42) + SourceIndex(4) -8 >Emitted(31, 43) Source(3, 43) + SourceIndex(4) +1->Emitted(33, 9) Source(3, 9) + SourceIndex(4) +2 >Emitted(33, 16) Source(3, 16) + SourceIndex(4) +3 >Emitted(33, 17) Source(3, 17) + SourceIndex(4) +4 >Emitted(33, 20) Source(3, 20) + SourceIndex(4) +5 >Emitted(33, 21) Source(3, 21) + SourceIndex(4) +6 >Emitted(33, 41) Source(3, 41) + SourceIndex(4) +7 >Emitted(33, 42) Source(3, 42) + SourceIndex(4) +8 >Emitted(33, 43) Source(3, 43) + SourceIndex(4) --- >>> }; 1 >^^^^ @@ -1767,8 +1777,8 @@ sourceFile:../../../second/second_part2.ts 1 > > 2 > } -1 >Emitted(32, 5) Source(4, 5) + SourceIndex(4) -2 >Emitted(32, 6) Source(4, 6) + SourceIndex(4) +1 >Emitted(34, 5) Source(4, 5) + SourceIndex(4) +2 >Emitted(34, 6) Source(4, 6) + SourceIndex(4) --- >>> return C; 1->^^^^ @@ -1776,8 +1786,8 @@ sourceFile:../../../second/second_part2.ts 1-> > 2 > } -1->Emitted(33, 5) Source(5, 1) + SourceIndex(4) -2 >Emitted(33, 13) Source(5, 2) + SourceIndex(4) +1->Emitted(35, 5) Source(5, 1) + SourceIndex(4) +2 >Emitted(35, 13) Source(5, 2) + SourceIndex(4) --- >>>}()); 1 > @@ -1793,10 +1803,10 @@ sourceFile:../../../second/second_part2.ts > console.log("something got done"); > } > } -1 >Emitted(34, 1) Source(5, 1) + SourceIndex(4) -2 >Emitted(34, 2) Source(5, 2) + SourceIndex(4) -3 >Emitted(34, 2) Source(1, 1) + SourceIndex(4) -4 >Emitted(34, 6) Source(5, 2) + SourceIndex(4) +1 >Emitted(36, 1) Source(5, 1) + SourceIndex(4) +2 >Emitted(36, 2) Source(5, 2) + SourceIndex(4) +3 >Emitted(36, 2) Source(1, 1) + SourceIndex(4) +4 >Emitted(36, 6) Source(5, 2) + SourceIndex(4) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -1820,14 +1830,14 @@ sourceFile:../../third_part1.ts 6 > C 7 > () 8 > ; -1->Emitted(35, 1) Source(1, 1) + SourceIndex(5) -2 >Emitted(35, 5) Source(1, 5) + SourceIndex(5) -3 >Emitted(35, 6) Source(1, 6) + SourceIndex(5) -4 >Emitted(35, 9) Source(1, 9) + SourceIndex(5) -5 >Emitted(35, 13) Source(1, 13) + SourceIndex(5) -6 >Emitted(35, 14) Source(1, 14) + SourceIndex(5) -7 >Emitted(35, 16) Source(1, 16) + SourceIndex(5) -8 >Emitted(35, 17) Source(1, 17) + SourceIndex(5) +1->Emitted(37, 1) Source(1, 1) + SourceIndex(5) +2 >Emitted(37, 5) Source(1, 5) + SourceIndex(5) +3 >Emitted(37, 6) Source(1, 6) + SourceIndex(5) +4 >Emitted(37, 9) Source(1, 9) + SourceIndex(5) +5 >Emitted(37, 13) Source(1, 13) + SourceIndex(5) +6 >Emitted(37, 14) Source(1, 14) + SourceIndex(5) +7 >Emitted(37, 16) Source(1, 16) + SourceIndex(5) +8 >Emitted(37, 17) Source(1, 17) + SourceIndex(5) --- >>>c.doSomething(); 1-> @@ -1844,12 +1854,12 @@ sourceFile:../../third_part1.ts 4 > doSomething 5 > () 6 > ; -1->Emitted(36, 1) Source(2, 1) + SourceIndex(5) -2 >Emitted(36, 2) Source(2, 2) + SourceIndex(5) -3 >Emitted(36, 3) Source(2, 3) + SourceIndex(5) -4 >Emitted(36, 14) Source(2, 14) + SourceIndex(5) -5 >Emitted(36, 16) Source(2, 16) + SourceIndex(5) -6 >Emitted(36, 17) Source(2, 17) + SourceIndex(5) +1->Emitted(38, 1) Source(2, 1) + SourceIndex(5) +2 >Emitted(38, 2) Source(2, 2) + SourceIndex(5) +3 >Emitted(38, 3) Source(2, 3) + SourceIndex(5) +4 >Emitted(38, 14) Source(2, 14) + SourceIndex(5) +5 >Emitted(38, 16) Source(2, 16) + SourceIndex(5) +6 >Emitted(38, 17) Source(2, 17) + SourceIndex(5) --- >>>//# sourceMappingURL=third-output.js.map @@ -1864,39 +1874,39 @@ sourceFile:../../third_part1.ts "sections": [ { "pos": 0, - "end": 415, + "end": 492, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 417, - "end": 567, + "pos": 494, + "end": 644, "kind": "prepend", "data": "/src/first/bin/first-output.js", "texts": [ { - "pos": 417, - "end": 567, + "pos": 494, + "end": 644, "kind": "text" } ] }, { - "pos": 567, - "end": 971, + "pos": 644, + "end": 1048, "kind": "prepend", "data": "/src/2/second-output.js", "texts": [ { - "pos": 567, - "end": 971, + "pos": 644, + "end": 1048, "kind": "text" } ] }, { - "pos": 971, - "end": 1007, + "pos": 1048, + "end": 1084, "kind": "text" } ] @@ -1944,20 +1954,22 @@ sourceFile:../../third_part1.ts ====================================================================== File:: /src/third/thirdjs/output/third-output.js ---------------------------------------------------------------------- -emitHelpers: (0-415):: typescript:rest +emitHelpers: (0-492):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; ---------------------------------------------------------------------- -prepend: (417-567):: /src/first/bin/first-output.js texts:: 1 +prepend: (494-644):: /src/first/bin/first-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (417-567) +text: (494-644) var s = "Hello, world"; console.log(s); function forfirstfirst_PART1Rest() { } @@ -1967,9 +1979,9 @@ function f() { } ---------------------------------------------------------------------- -prepend: (567-971):: /src/2/second-output.js texts:: 1 +prepend: (644-1048):: /src/2/second-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (567-971) +text: (644-1048) var N; (function (N) { function f() { @@ -1990,7 +2002,7 @@ var C = (function () { }()); ---------------------------------------------------------------------- -text: (971-1007) +text: (1048-1084) var c = new C(); c.doSomething(); diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/multiple-emitHelpers-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/multiple-emitHelpers-in-all-projects.js index 7f7f82dd9d7..5e4c642efeb 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/multiple-emitHelpers-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/multiple-emitHelpers-in-all-projects.js @@ -164,8 +164,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; var __read = (this && this.__read) || function (o, n) { @@ -216,7 +218,7 @@ secondsecond_part2Spread.apply(void 0, __spread([10, 20, 30])); //# sourceMappingURL=second-output.js.map //// [/src/2/second-output.js.map] -{"version":3,"file":"second-output.js","sourceRoot":"","sources":["../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;AACD,SAAS,yBAAyB;IAClC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;ACbD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC;AAED,SAAS,wBAAwB;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AACrD,wBAAwB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE"} +{"version":3,"file":"second-output.js","sourceRoot":"","sources":["../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;AACD,SAAS,yBAAyB;IAClC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;ACbD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC;AAED,SAAS,wBAAwB;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AACrD,wBAAwB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE"} //// [/src/2/second-output.js.map.baseline.txt] =================================================================== @@ -234,8 +236,10 @@ sourceFile:../second/second_part1.ts >>> for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") ->>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) ->>> t[p[i]] = s[p[i]]; +>>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> t[p[i]] = s[p[i]]; +>>> } >>> return t; >>>}; >>>var __read = (this && this.__read) || function (o, n) { @@ -278,10 +282,10 @@ sourceFile:../second/second_part1.ts > > f(); > } -1 >Emitted(30, 1) Source(5, 1) + SourceIndex(0) -2 >Emitted(30, 5) Source(5, 11) + SourceIndex(0) -3 >Emitted(30, 6) Source(5, 12) + SourceIndex(0) -4 >Emitted(30, 7) Source(11, 2) + SourceIndex(0) +1 >Emitted(32, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(32, 5) Source(5, 11) + SourceIndex(0) +3 >Emitted(32, 6) Source(5, 12) + SourceIndex(0) +4 >Emitted(32, 7) Source(11, 2) + SourceIndex(0) --- >>>(function (N) { 1-> @@ -291,9 +295,9 @@ sourceFile:../second/second_part1.ts 1-> 2 >namespace 3 > N -1->Emitted(31, 1) Source(5, 1) + SourceIndex(0) -2 >Emitted(31, 12) Source(5, 11) + SourceIndex(0) -3 >Emitted(31, 13) Source(5, 12) + SourceIndex(0) +1->Emitted(33, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(33, 12) Source(5, 11) + SourceIndex(0) +3 >Emitted(33, 13) Source(5, 12) + SourceIndex(0) --- >>> function f() { 1->^^^^ @@ -304,9 +308,9 @@ sourceFile:../second/second_part1.ts > 2 > function 3 > f -1->Emitted(32, 5) Source(6, 5) + SourceIndex(0) -2 >Emitted(32, 14) Source(6, 14) + SourceIndex(0) -3 >Emitted(32, 15) Source(6, 15) + SourceIndex(0) +1->Emitted(34, 5) Source(6, 5) + SourceIndex(0) +2 >Emitted(34, 14) Source(6, 14) + SourceIndex(0) +3 >Emitted(34, 15) Source(6, 15) + SourceIndex(0) --- >>> console.log('testing'); 1->^^^^^^^^ @@ -326,14 +330,14 @@ sourceFile:../second/second_part1.ts 6 > 'testing' 7 > ) 8 > ; -1->Emitted(33, 9) Source(7, 9) + SourceIndex(0) -2 >Emitted(33, 16) Source(7, 16) + SourceIndex(0) -3 >Emitted(33, 17) Source(7, 17) + SourceIndex(0) -4 >Emitted(33, 20) Source(7, 20) + SourceIndex(0) -5 >Emitted(33, 21) Source(7, 21) + SourceIndex(0) -6 >Emitted(33, 30) Source(7, 30) + SourceIndex(0) -7 >Emitted(33, 31) Source(7, 31) + SourceIndex(0) -8 >Emitted(33, 32) Source(7, 32) + SourceIndex(0) +1->Emitted(35, 9) Source(7, 9) + SourceIndex(0) +2 >Emitted(35, 16) Source(7, 16) + SourceIndex(0) +3 >Emitted(35, 17) Source(7, 17) + SourceIndex(0) +4 >Emitted(35, 20) Source(7, 20) + SourceIndex(0) +5 >Emitted(35, 21) Source(7, 21) + SourceIndex(0) +6 >Emitted(35, 30) Source(7, 30) + SourceIndex(0) +7 >Emitted(35, 31) Source(7, 31) + SourceIndex(0) +8 >Emitted(35, 32) Source(7, 32) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -342,8 +346,8 @@ sourceFile:../second/second_part1.ts 1 > > 2 > } -1 >Emitted(34, 5) Source(8, 5) + SourceIndex(0) -2 >Emitted(34, 6) Source(8, 6) + SourceIndex(0) +1 >Emitted(36, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(36, 6) Source(8, 6) + SourceIndex(0) --- >>> f(); 1->^^^^ @@ -357,10 +361,10 @@ sourceFile:../second/second_part1.ts 2 > f 3 > () 4 > ; -1->Emitted(35, 5) Source(10, 5) + SourceIndex(0) -2 >Emitted(35, 6) Source(10, 6) + SourceIndex(0) -3 >Emitted(35, 8) Source(10, 8) + SourceIndex(0) -4 >Emitted(35, 9) Source(10, 9) + SourceIndex(0) +1->Emitted(37, 5) Source(10, 5) + SourceIndex(0) +2 >Emitted(37, 6) Source(10, 6) + SourceIndex(0) +3 >Emitted(37, 8) Source(10, 8) + SourceIndex(0) +4 >Emitted(37, 9) Source(10, 9) + SourceIndex(0) --- >>>})(N || (N = {})); 1-> @@ -385,13 +389,13 @@ sourceFile:../second/second_part1.ts > > f(); > } -1->Emitted(36, 1) Source(11, 1) + SourceIndex(0) -2 >Emitted(36, 2) Source(11, 2) + SourceIndex(0) -3 >Emitted(36, 4) Source(5, 11) + SourceIndex(0) -4 >Emitted(36, 5) Source(5, 12) + SourceIndex(0) -5 >Emitted(36, 10) Source(5, 11) + SourceIndex(0) -6 >Emitted(36, 11) Source(5, 12) + SourceIndex(0) -7 >Emitted(36, 19) Source(11, 2) + SourceIndex(0) +1->Emitted(38, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(38, 2) Source(11, 2) + SourceIndex(0) +3 >Emitted(38, 4) Source(5, 11) + SourceIndex(0) +4 >Emitted(38, 5) Source(5, 12) + SourceIndex(0) +5 >Emitted(38, 10) Source(5, 11) + SourceIndex(0) +6 >Emitted(38, 11) Source(5, 12) + SourceIndex(0) +7 >Emitted(38, 19) Source(11, 2) + SourceIndex(0) --- >>>function forsecondsecond_part1Rest() { 1-> @@ -402,9 +406,9 @@ sourceFile:../second/second_part1.ts > 2 >function 3 > forsecondsecond_part1Rest -1->Emitted(37, 1) Source(12, 1) + SourceIndex(0) -2 >Emitted(37, 10) Source(12, 10) + SourceIndex(0) -3 >Emitted(37, 35) Source(12, 35) + SourceIndex(0) +1->Emitted(39, 1) Source(12, 1) + SourceIndex(0) +2 >Emitted(39, 10) Source(12, 10) + SourceIndex(0) +3 >Emitted(39, 35) Source(12, 35) + SourceIndex(0) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^ @@ -424,14 +428,14 @@ sourceFile:../second/second_part1.ts 6 > , 7 > ...rest } = { a: 10, b: 30, yy: 30 } 8 > ; -1->Emitted(38, 5) Source(13, 1) + SourceIndex(0) -2 >Emitted(38, 9) Source(13, 7) + SourceIndex(0) -3 >Emitted(38, 38) Source(13, 48) + SourceIndex(0) -4 >Emitted(38, 40) Source(13, 9) + SourceIndex(0) -5 >Emitted(38, 48) Source(13, 10) + SourceIndex(0) -6 >Emitted(38, 50) Source(13, 12) + SourceIndex(0) -7 >Emitted(38, 74) Source(13, 48) + SourceIndex(0) -8 >Emitted(38, 75) Source(13, 49) + SourceIndex(0) +1->Emitted(40, 5) Source(13, 1) + SourceIndex(0) +2 >Emitted(40, 9) Source(13, 7) + SourceIndex(0) +3 >Emitted(40, 38) Source(13, 48) + SourceIndex(0) +4 >Emitted(40, 40) Source(13, 9) + SourceIndex(0) +5 >Emitted(40, 48) Source(13, 10) + SourceIndex(0) +6 >Emitted(40, 50) Source(13, 12) + SourceIndex(0) +7 >Emitted(40, 74) Source(13, 48) + SourceIndex(0) +8 >Emitted(40, 75) Source(13, 49) + SourceIndex(0) --- >>>} 1 > @@ -440,8 +444,8 @@ sourceFile:../second/second_part1.ts 1 > > 2 >} -1 >Emitted(39, 1) Source(14, 1) + SourceIndex(0) -2 >Emitted(39, 2) Source(14, 2) + SourceIndex(0) +1 >Emitted(41, 1) Source(14, 1) + SourceIndex(0) +2 >Emitted(41, 2) Source(14, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/src/2/second-output.js @@ -451,13 +455,13 @@ sourceFile:../second/second_part2.ts 1-> 2 >^^^^^^^^^^^^^^^^^^^-> 1-> -1->Emitted(40, 1) Source(1, 1) + SourceIndex(1) +1->Emitted(42, 1) Source(1, 1) + SourceIndex(1) --- >>> function C() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(41, 5) Source(1, 1) + SourceIndex(1) +1->Emitted(43, 5) Source(1, 1) + SourceIndex(1) --- >>> } 1->^^^^ @@ -469,8 +473,8 @@ sourceFile:../second/second_part2.ts > } > 2 > } -1->Emitted(42, 5) Source(5, 1) + SourceIndex(1) -2 >Emitted(42, 6) Source(5, 2) + SourceIndex(1) +1->Emitted(44, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(44, 6) Source(5, 2) + SourceIndex(1) --- >>> C.prototype.doSomething = function () { 1->^^^^ @@ -480,9 +484,9 @@ sourceFile:../second/second_part2.ts 1-> 2 > doSomething 3 > -1->Emitted(43, 5) Source(2, 5) + SourceIndex(1) -2 >Emitted(43, 28) Source(2, 16) + SourceIndex(1) -3 >Emitted(43, 31) Source(2, 5) + SourceIndex(1) +1->Emitted(45, 5) Source(2, 5) + SourceIndex(1) +2 >Emitted(45, 28) Source(2, 16) + SourceIndex(1) +3 >Emitted(45, 31) Source(2, 5) + SourceIndex(1) --- >>> console.log("something got done"); 1->^^^^^^^^ @@ -502,14 +506,14 @@ sourceFile:../second/second_part2.ts 6 > "something got done" 7 > ) 8 > ; -1->Emitted(44, 9) Source(3, 9) + SourceIndex(1) -2 >Emitted(44, 16) Source(3, 16) + SourceIndex(1) -3 >Emitted(44, 17) Source(3, 17) + SourceIndex(1) -4 >Emitted(44, 20) Source(3, 20) + SourceIndex(1) -5 >Emitted(44, 21) Source(3, 21) + SourceIndex(1) -6 >Emitted(44, 41) Source(3, 41) + SourceIndex(1) -7 >Emitted(44, 42) Source(3, 42) + SourceIndex(1) -8 >Emitted(44, 43) Source(3, 43) + SourceIndex(1) +1->Emitted(46, 9) Source(3, 9) + SourceIndex(1) +2 >Emitted(46, 16) Source(3, 16) + SourceIndex(1) +3 >Emitted(46, 17) Source(3, 17) + SourceIndex(1) +4 >Emitted(46, 20) Source(3, 20) + SourceIndex(1) +5 >Emitted(46, 21) Source(3, 21) + SourceIndex(1) +6 >Emitted(46, 41) Source(3, 41) + SourceIndex(1) +7 >Emitted(46, 42) Source(3, 42) + SourceIndex(1) +8 >Emitted(46, 43) Source(3, 43) + SourceIndex(1) --- >>> }; 1 >^^^^ @@ -518,8 +522,8 @@ sourceFile:../second/second_part2.ts 1 > > 2 > } -1 >Emitted(45, 5) Source(4, 5) + SourceIndex(1) -2 >Emitted(45, 6) Source(4, 6) + SourceIndex(1) +1 >Emitted(47, 5) Source(4, 5) + SourceIndex(1) +2 >Emitted(47, 6) Source(4, 6) + SourceIndex(1) --- >>> return C; 1->^^^^ @@ -527,8 +531,8 @@ sourceFile:../second/second_part2.ts 1-> > 2 > } -1->Emitted(46, 5) Source(5, 1) + SourceIndex(1) -2 >Emitted(46, 13) Source(5, 2) + SourceIndex(1) +1->Emitted(48, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(48, 13) Source(5, 2) + SourceIndex(1) --- >>>}()); 1 > @@ -544,10 +548,10 @@ sourceFile:../second/second_part2.ts > console.log("something got done"); > } > } -1 >Emitted(47, 1) Source(5, 1) + SourceIndex(1) -2 >Emitted(47, 2) Source(5, 2) + SourceIndex(1) -3 >Emitted(47, 2) Source(1, 1) + SourceIndex(1) -4 >Emitted(47, 6) Source(5, 2) + SourceIndex(1) +1 >Emitted(49, 1) Source(5, 1) + SourceIndex(1) +2 >Emitted(49, 2) Source(5, 2) + SourceIndex(1) +3 >Emitted(49, 2) Source(1, 1) + SourceIndex(1) +4 >Emitted(49, 6) Source(5, 2) + SourceIndex(1) --- >>>function secondsecond_part2Spread() { 1-> @@ -558,9 +562,9 @@ sourceFile:../second/second_part2.ts > 2 >function 3 > secondsecond_part2Spread -1->Emitted(48, 1) Source(7, 1) + SourceIndex(1) -2 >Emitted(48, 10) Source(7, 10) + SourceIndex(1) -3 >Emitted(48, 34) Source(7, 34) + SourceIndex(1) +1->Emitted(50, 1) Source(7, 1) + SourceIndex(1) +2 >Emitted(50, 10) Source(7, 10) + SourceIndex(1) +3 >Emitted(50, 34) Source(7, 34) + SourceIndex(1) --- >>> var b = []; 1 >^^^^ @@ -568,8 +572,8 @@ sourceFile:../second/second_part2.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >( 2 > ...b: number[] -1 >Emitted(49, 5) Source(7, 35) + SourceIndex(1) -2 >Emitted(49, 16) Source(7, 49) + SourceIndex(1) +1 >Emitted(51, 5) Source(7, 35) + SourceIndex(1) +2 >Emitted(51, 16) Source(7, 49) + SourceIndex(1) --- >>> for (var _i = 0; _i < arguments.length; _i++) { 1->^^^^^^^^^ @@ -584,20 +588,20 @@ sourceFile:../second/second_part2.ts 4 > ...b: number[] 5 > 6 > ...b: number[] -1->Emitted(50, 10) Source(7, 35) + SourceIndex(1) -2 >Emitted(50, 20) Source(7, 49) + SourceIndex(1) -3 >Emitted(50, 22) Source(7, 35) + SourceIndex(1) -4 >Emitted(50, 43) Source(7, 49) + SourceIndex(1) -5 >Emitted(50, 45) Source(7, 35) + SourceIndex(1) -6 >Emitted(50, 49) Source(7, 49) + SourceIndex(1) +1->Emitted(52, 10) Source(7, 35) + SourceIndex(1) +2 >Emitted(52, 20) Source(7, 49) + SourceIndex(1) +3 >Emitted(52, 22) Source(7, 35) + SourceIndex(1) +4 >Emitted(52, 43) Source(7, 49) + SourceIndex(1) +5 >Emitted(52, 45) Source(7, 35) + SourceIndex(1) +6 >Emitted(52, 49) Source(7, 49) + SourceIndex(1) --- >>> b[_i] = arguments[_i]; 1 >^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^ 1 > 2 > ...b: number[] -1 >Emitted(51, 9) Source(7, 35) + SourceIndex(1) -2 >Emitted(51, 31) Source(7, 49) + SourceIndex(1) +1 >Emitted(53, 9) Source(7, 35) + SourceIndex(1) +2 >Emitted(53, 31) Source(7, 49) + SourceIndex(1) --- >>> } >>>} @@ -606,8 +610,8 @@ sourceFile:../second/second_part2.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >) { 2 >} -1 >Emitted(53, 1) Source(7, 53) + SourceIndex(1) -2 >Emitted(53, 2) Source(7, 54) + SourceIndex(1) +1 >Emitted(55, 1) Source(7, 53) + SourceIndex(1) +2 >Emitted(55, 2) Source(7, 54) + SourceIndex(1) --- >>>secondsecond_part2Spread.apply(void 0, __spread([10, 20, 30])); 1-> @@ -633,17 +637,17 @@ sourceFile:../second/second_part2.ts 9 > 30 10> ] 11> ); -1->Emitted(54, 1) Source(8, 1) + SourceIndex(1) -2 >Emitted(54, 25) Source(8, 25) + SourceIndex(1) -3 >Emitted(54, 49) Source(8, 29) + SourceIndex(1) -4 >Emitted(54, 50) Source(8, 30) + SourceIndex(1) -5 >Emitted(54, 52) Source(8, 32) + SourceIndex(1) -6 >Emitted(54, 54) Source(8, 34) + SourceIndex(1) -7 >Emitted(54, 56) Source(8, 36) + SourceIndex(1) -8 >Emitted(54, 58) Source(8, 38) + SourceIndex(1) -9 >Emitted(54, 60) Source(8, 40) + SourceIndex(1) -10>Emitted(54, 61) Source(8, 41) + SourceIndex(1) -11>Emitted(54, 64) Source(8, 43) + SourceIndex(1) +1->Emitted(56, 1) Source(8, 1) + SourceIndex(1) +2 >Emitted(56, 25) Source(8, 25) + SourceIndex(1) +3 >Emitted(56, 49) Source(8, 29) + SourceIndex(1) +4 >Emitted(56, 50) Source(8, 30) + SourceIndex(1) +5 >Emitted(56, 52) Source(8, 32) + SourceIndex(1) +6 >Emitted(56, 54) Source(8, 34) + SourceIndex(1) +7 >Emitted(56, 56) Source(8, 36) + SourceIndex(1) +8 >Emitted(56, 58) Source(8, 38) + SourceIndex(1) +9 >Emitted(56, 60) Source(8, 40) + SourceIndex(1) +10>Emitted(56, 61) Source(8, 41) + SourceIndex(1) +11>Emitted(56, 64) Source(8, 43) + SourceIndex(1) --- >>>//# sourceMappingURL=second-output.js.map @@ -659,25 +663,25 @@ sourceFile:../second/second_part2.ts "sections": [ { "pos": 0, - "end": 415, + "end": 492, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 417, - "end": 921, + "pos": 494, + "end": 998, "kind": "emitHelpers", "data": "typescript:read" }, { - "pos": 923, - "end": 1093, + "pos": 1000, + "end": 1170, "kind": "emitHelpers", "data": "typescript:spread" }, { - "pos": 1095, - "end": 1715, + "pos": 1172, + "end": 1792, "kind": "text" } ], @@ -706,18 +710,20 @@ sourceFile:../second/second_part2.ts ====================================================================== File:: /src/2/second-output.js ---------------------------------------------------------------------- -emitHelpers: (0-415):: typescript:rest +emitHelpers: (0-492):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; ---------------------------------------------------------------------- -emitHelpers: (417-921):: typescript:read +emitHelpers: (494-998):: typescript:read var __read = (this && this.__read) || function (o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; if (!m) return o; @@ -735,13 +741,13 @@ var __read = (this && this.__read) || function (o, n) { return ar; }; ---------------------------------------------------------------------- -emitHelpers: (923-1093):: typescript:spread +emitHelpers: (1000-1170):: typescript:spread var __spread = (this && this.__spread) || function () { for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); return ar; }; ---------------------------------------------------------------------- -text: (1095-1715) +text: (1172-1792) var N; (function (N) { function f() { @@ -986,8 +992,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; var __read = (this && this.__read) || function (o, n) { @@ -1029,7 +1037,7 @@ firstfirst_part3Spread.apply(void 0, __spread([10, 20, 30])); //# sourceMappingURL=first-output.js.map //// [/src/first/bin/first-output.js.map] -{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB;IAChC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;ACbD,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC;AACD,SAAS,sBAAsB;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AACnD,sBAAsB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE"} +{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB;IAChC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;ACbD,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC;AACD,SAAS,sBAAsB;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AACnD,sBAAsB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE"} //// [/src/first/bin/first-output.js.map.baseline.txt] =================================================================== @@ -1047,8 +1055,10 @@ sourceFile:../first_PART1.ts >>> for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") ->>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) ->>> t[p[i]] = s[p[i]]; +>>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> t[p[i]] = s[p[i]]; +>>> } >>> return t; >>>}; >>>var __read = (this && this.__read) || function (o, n) { @@ -1088,12 +1098,12 @@ sourceFile:../first_PART1.ts 4 > = 5 > "Hello, world" 6 > ; -1 >Emitted(30, 1) Source(5, 1) + SourceIndex(0) -2 >Emitted(30, 5) Source(5, 7) + SourceIndex(0) -3 >Emitted(30, 6) Source(5, 8) + SourceIndex(0) -4 >Emitted(30, 9) Source(5, 11) + SourceIndex(0) -5 >Emitted(30, 23) Source(5, 25) + SourceIndex(0) -6 >Emitted(30, 24) Source(5, 26) + SourceIndex(0) +1 >Emitted(32, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(32, 5) Source(5, 7) + SourceIndex(0) +3 >Emitted(32, 6) Source(5, 8) + SourceIndex(0) +4 >Emitted(32, 9) Source(5, 11) + SourceIndex(0) +5 >Emitted(32, 23) Source(5, 25) + SourceIndex(0) +6 >Emitted(32, 24) Source(5, 26) + SourceIndex(0) --- >>>console.log(s); 1 > @@ -1119,14 +1129,14 @@ sourceFile:../first_PART1.ts 6 > s 7 > ) 8 > ; -1 >Emitted(31, 1) Source(11, 1) + SourceIndex(0) -2 >Emitted(31, 8) Source(11, 8) + SourceIndex(0) -3 >Emitted(31, 9) Source(11, 9) + SourceIndex(0) -4 >Emitted(31, 12) Source(11, 12) + SourceIndex(0) -5 >Emitted(31, 13) Source(11, 13) + SourceIndex(0) -6 >Emitted(31, 14) Source(11, 14) + SourceIndex(0) -7 >Emitted(31, 15) Source(11, 15) + SourceIndex(0) -8 >Emitted(31, 16) Source(11, 16) + SourceIndex(0) +1 >Emitted(33, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(33, 8) Source(11, 8) + SourceIndex(0) +3 >Emitted(33, 9) Source(11, 9) + SourceIndex(0) +4 >Emitted(33, 12) Source(11, 12) + SourceIndex(0) +5 >Emitted(33, 13) Source(11, 13) + SourceIndex(0) +6 >Emitted(33, 14) Source(11, 14) + SourceIndex(0) +7 >Emitted(33, 15) Source(11, 15) + SourceIndex(0) +8 >Emitted(33, 16) Source(11, 16) + SourceIndex(0) --- >>>function forfirstfirst_PART1Rest() { 1-> @@ -1137,9 +1147,9 @@ sourceFile:../first_PART1.ts > 2 >function 3 > forfirstfirst_PART1Rest -1->Emitted(32, 1) Source(12, 1) + SourceIndex(0) -2 >Emitted(32, 10) Source(12, 10) + SourceIndex(0) -3 >Emitted(32, 33) Source(12, 33) + SourceIndex(0) +1->Emitted(34, 1) Source(12, 1) + SourceIndex(0) +2 >Emitted(34, 10) Source(12, 10) + SourceIndex(0) +3 >Emitted(34, 33) Source(12, 33) + SourceIndex(0) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^ @@ -1159,14 +1169,14 @@ sourceFile:../first_PART1.ts 6 > , 7 > ...rest } = { a: 10, b: 30, yy: 30 } 8 > ; -1->Emitted(33, 5) Source(13, 1) + SourceIndex(0) -2 >Emitted(33, 9) Source(13, 7) + SourceIndex(0) -3 >Emitted(33, 38) Source(13, 48) + SourceIndex(0) -4 >Emitted(33, 40) Source(13, 9) + SourceIndex(0) -5 >Emitted(33, 48) Source(13, 10) + SourceIndex(0) -6 >Emitted(33, 50) Source(13, 12) + SourceIndex(0) -7 >Emitted(33, 74) Source(13, 48) + SourceIndex(0) -8 >Emitted(33, 75) Source(13, 49) + SourceIndex(0) +1->Emitted(35, 5) Source(13, 1) + SourceIndex(0) +2 >Emitted(35, 9) Source(13, 7) + SourceIndex(0) +3 >Emitted(35, 38) Source(13, 48) + SourceIndex(0) +4 >Emitted(35, 40) Source(13, 9) + SourceIndex(0) +5 >Emitted(35, 48) Source(13, 10) + SourceIndex(0) +6 >Emitted(35, 50) Source(13, 12) + SourceIndex(0) +7 >Emitted(35, 74) Source(13, 48) + SourceIndex(0) +8 >Emitted(35, 75) Source(13, 49) + SourceIndex(0) --- >>>} 1 > @@ -1175,8 +1185,8 @@ sourceFile:../first_PART1.ts 1 > > 2 >} -1 >Emitted(34, 1) Source(14, 1) + SourceIndex(0) -2 >Emitted(34, 2) Source(14, 2) + SourceIndex(0) +1 >Emitted(36, 1) Source(14, 1) + SourceIndex(0) +2 >Emitted(36, 2) Source(14, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/src/first/bin/first-output.js @@ -1201,15 +1211,15 @@ sourceFile:../first_part2.ts 7 > () 8 > ) 9 > ; -1->Emitted(35, 1) Source(1, 1) + SourceIndex(1) -2 >Emitted(35, 8) Source(1, 8) + SourceIndex(1) -3 >Emitted(35, 9) Source(1, 9) + SourceIndex(1) -4 >Emitted(35, 12) Source(1, 12) + SourceIndex(1) -5 >Emitted(35, 13) Source(1, 13) + SourceIndex(1) -6 >Emitted(35, 14) Source(1, 14) + SourceIndex(1) -7 >Emitted(35, 16) Source(1, 16) + SourceIndex(1) -8 >Emitted(35, 17) Source(1, 17) + SourceIndex(1) -9 >Emitted(35, 18) Source(1, 18) + SourceIndex(1) +1->Emitted(37, 1) Source(1, 1) + SourceIndex(1) +2 >Emitted(37, 8) Source(1, 8) + SourceIndex(1) +3 >Emitted(37, 9) Source(1, 9) + SourceIndex(1) +4 >Emitted(37, 12) Source(1, 12) + SourceIndex(1) +5 >Emitted(37, 13) Source(1, 13) + SourceIndex(1) +6 >Emitted(37, 14) Source(1, 14) + SourceIndex(1) +7 >Emitted(37, 16) Source(1, 16) + SourceIndex(1) +8 >Emitted(37, 17) Source(1, 17) + SourceIndex(1) +9 >Emitted(37, 18) Source(1, 18) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:/src/first/bin/first-output.js @@ -1223,9 +1233,9 @@ sourceFile:../first_part3.ts 1 > 2 >function 3 > f -1 >Emitted(36, 1) Source(1, 1) + SourceIndex(2) -2 >Emitted(36, 10) Source(1, 10) + SourceIndex(2) -3 >Emitted(36, 11) Source(1, 11) + SourceIndex(2) +1 >Emitted(38, 1) Source(1, 1) + SourceIndex(2) +2 >Emitted(38, 10) Source(1, 10) + SourceIndex(2) +3 >Emitted(38, 11) Source(1, 11) + SourceIndex(2) --- >>> return "JS does hoists"; 1->^^^^ @@ -1237,10 +1247,10 @@ sourceFile:../first_part3.ts 2 > return 3 > "JS does hoists" 4 > ; -1->Emitted(37, 5) Source(2, 5) + SourceIndex(2) -2 >Emitted(37, 12) Source(2, 12) + SourceIndex(2) -3 >Emitted(37, 28) Source(2, 28) + SourceIndex(2) -4 >Emitted(37, 29) Source(2, 29) + SourceIndex(2) +1->Emitted(39, 5) Source(2, 5) + SourceIndex(2) +2 >Emitted(39, 12) Source(2, 12) + SourceIndex(2) +3 >Emitted(39, 28) Source(2, 28) + SourceIndex(2) +4 >Emitted(39, 29) Source(2, 29) + SourceIndex(2) --- >>>} 1 > @@ -1249,8 +1259,8 @@ sourceFile:../first_part3.ts 1 > > 2 >} -1 >Emitted(38, 1) Source(3, 1) + SourceIndex(2) -2 >Emitted(38, 2) Source(3, 2) + SourceIndex(2) +1 >Emitted(40, 1) Source(3, 1) + SourceIndex(2) +2 >Emitted(40, 2) Source(3, 2) + SourceIndex(2) --- >>>function firstfirst_part3Spread() { 1-> @@ -1260,9 +1270,9 @@ sourceFile:../first_part3.ts > 2 >function 3 > firstfirst_part3Spread -1->Emitted(39, 1) Source(4, 1) + SourceIndex(2) -2 >Emitted(39, 10) Source(4, 10) + SourceIndex(2) -3 >Emitted(39, 32) Source(4, 32) + SourceIndex(2) +1->Emitted(41, 1) Source(4, 1) + SourceIndex(2) +2 >Emitted(41, 10) Source(4, 10) + SourceIndex(2) +3 >Emitted(41, 32) Source(4, 32) + SourceIndex(2) --- >>> var b = []; 1 >^^^^ @@ -1270,8 +1280,8 @@ sourceFile:../first_part3.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >( 2 > ...b: number[] -1 >Emitted(40, 5) Source(4, 33) + SourceIndex(2) -2 >Emitted(40, 16) Source(4, 47) + SourceIndex(2) +1 >Emitted(42, 5) Source(4, 33) + SourceIndex(2) +2 >Emitted(42, 16) Source(4, 47) + SourceIndex(2) --- >>> for (var _i = 0; _i < arguments.length; _i++) { 1->^^^^^^^^^ @@ -1286,20 +1296,20 @@ sourceFile:../first_part3.ts 4 > ...b: number[] 5 > 6 > ...b: number[] -1->Emitted(41, 10) Source(4, 33) + SourceIndex(2) -2 >Emitted(41, 20) Source(4, 47) + SourceIndex(2) -3 >Emitted(41, 22) Source(4, 33) + SourceIndex(2) -4 >Emitted(41, 43) Source(4, 47) + SourceIndex(2) -5 >Emitted(41, 45) Source(4, 33) + SourceIndex(2) -6 >Emitted(41, 49) Source(4, 47) + SourceIndex(2) +1->Emitted(43, 10) Source(4, 33) + SourceIndex(2) +2 >Emitted(43, 20) Source(4, 47) + SourceIndex(2) +3 >Emitted(43, 22) Source(4, 33) + SourceIndex(2) +4 >Emitted(43, 43) Source(4, 47) + SourceIndex(2) +5 >Emitted(43, 45) Source(4, 33) + SourceIndex(2) +6 >Emitted(43, 49) Source(4, 47) + SourceIndex(2) --- >>> b[_i] = arguments[_i]; 1 >^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^ 1 > 2 > ...b: number[] -1 >Emitted(42, 9) Source(4, 33) + SourceIndex(2) -2 >Emitted(42, 31) Source(4, 47) + SourceIndex(2) +1 >Emitted(44, 9) Source(4, 33) + SourceIndex(2) +2 >Emitted(44, 31) Source(4, 47) + SourceIndex(2) --- >>> } >>>} @@ -1308,8 +1318,8 @@ sourceFile:../first_part3.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >) { 2 >} -1 >Emitted(44, 1) Source(4, 51) + SourceIndex(2) -2 >Emitted(44, 2) Source(4, 52) + SourceIndex(2) +1 >Emitted(46, 1) Source(4, 51) + SourceIndex(2) +2 >Emitted(46, 2) Source(4, 52) + SourceIndex(2) --- >>>firstfirst_part3Spread.apply(void 0, __spread([10, 20, 30])); 1-> @@ -1335,17 +1345,17 @@ sourceFile:../first_part3.ts 9 > 30 10> ] 11> ); -1->Emitted(45, 1) Source(5, 1) + SourceIndex(2) -2 >Emitted(45, 23) Source(5, 23) + SourceIndex(2) -3 >Emitted(45, 47) Source(5, 27) + SourceIndex(2) -4 >Emitted(45, 48) Source(5, 28) + SourceIndex(2) -5 >Emitted(45, 50) Source(5, 30) + SourceIndex(2) -6 >Emitted(45, 52) Source(5, 32) + SourceIndex(2) -7 >Emitted(45, 54) Source(5, 34) + SourceIndex(2) -8 >Emitted(45, 56) Source(5, 36) + SourceIndex(2) -9 >Emitted(45, 58) Source(5, 38) + SourceIndex(2) -10>Emitted(45, 59) Source(5, 39) + SourceIndex(2) -11>Emitted(45, 62) Source(5, 41) + SourceIndex(2) +1->Emitted(47, 1) Source(5, 1) + SourceIndex(2) +2 >Emitted(47, 23) Source(5, 23) + SourceIndex(2) +3 >Emitted(47, 47) Source(5, 27) + SourceIndex(2) +4 >Emitted(47, 48) Source(5, 28) + SourceIndex(2) +5 >Emitted(47, 50) Source(5, 30) + SourceIndex(2) +6 >Emitted(47, 52) Source(5, 32) + SourceIndex(2) +7 >Emitted(47, 54) Source(5, 34) + SourceIndex(2) +8 >Emitted(47, 56) Source(5, 36) + SourceIndex(2) +9 >Emitted(47, 58) Source(5, 38) + SourceIndex(2) +10>Emitted(47, 59) Source(5, 39) + SourceIndex(2) +11>Emitted(47, 62) Source(5, 41) + SourceIndex(2) --- >>>//# sourceMappingURL=first-output.js.map @@ -1362,25 +1372,25 @@ sourceFile:../first_part3.ts "sections": [ { "pos": 0, - "end": 415, + "end": 492, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 417, - "end": 921, + "pos": 494, + "end": 998, "kind": "emitHelpers", "data": "typescript:read" }, { - "pos": 923, - "end": 1093, + "pos": 1000, + "end": 1170, "kind": "emitHelpers", "data": "typescript:spread" }, { - "pos": 1095, - "end": 1534, + "pos": 1172, + "end": 1611, "kind": "text" } ], @@ -1409,18 +1419,20 @@ sourceFile:../first_part3.ts ====================================================================== File:: /src/first/bin/first-output.js ---------------------------------------------------------------------- -emitHelpers: (0-415):: typescript:rest +emitHelpers: (0-492):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; ---------------------------------------------------------------------- -emitHelpers: (417-921):: typescript:read +emitHelpers: (494-998):: typescript:read var __read = (this && this.__read) || function (o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; if (!m) return o; @@ -1438,13 +1450,13 @@ var __read = (this && this.__read) || function (o, n) { return ar; }; ---------------------------------------------------------------------- -emitHelpers: (923-1093):: typescript:spread +emitHelpers: (1000-1170):: typescript:spread var __spread = (this && this.__spread) || function () { for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); return ar; }; ---------------------------------------------------------------------- -text: (1095-1534) +text: (1172-1611) var s = "Hello, world"; console.log(s); function forfirstfirst_PART1Rest() { @@ -1994,8 +2006,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; var __read = (this && this.__read) || function (o, n) { @@ -2074,7 +2088,7 @@ thirdthird_part1Spread.apply(void 0, __spread([10, 20, 30])); //# sourceMappingURL=third-output.js.map //// [/src/third/thirdjs/output/third-output.js.map] -{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../../first/first_PART1.ts","../../../first/first_part2.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts","../../third_part1.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB;IAChC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;ACbD,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC;AACD,SAAS,sBAAsB;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AACnD,sBAAsB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;ACAxC,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;AACD,SAAS,yBAAyB;IAClC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;ACbD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC;AAED,SAAS,wBAAwB;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AACrD,wBAAwB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;ACP1C,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC;AAChB,SAAS,uBAAuB;IAChC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;AACD,SAAS,sBAAsB;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AACnD,sBAAsB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE"} +{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../../first/first_PART1.ts","../../../first/first_part2.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts","../../third_part1.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB;IAChC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;ACbD,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC;AACD,SAAS,sBAAsB;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AACnD,sBAAsB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;ACAxC,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;AACD,SAAS,yBAAyB;IAClC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;ACbD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC;AAED,SAAS,wBAAwB;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AACrD,wBAAwB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;ACP1C,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC;AAChB,SAAS,uBAAuB;IAChC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;AACD,SAAS,sBAAsB;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AACnD,sBAAsB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE"} //// [/src/third/thirdjs/output/third-output.js.map.baseline.txt] =================================================================== @@ -2092,8 +2106,10 @@ sourceFile:../../../first/first_PART1.ts >>> for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") ->>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) ->>> t[p[i]] = s[p[i]]; +>>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> t[p[i]] = s[p[i]]; +>>> } >>> return t; >>>}; >>>var __read = (this && this.__read) || function (o, n) { @@ -2133,12 +2149,12 @@ sourceFile:../../../first/first_PART1.ts 4 > = 5 > "Hello, world" 6 > ; -1 >Emitted(30, 1) Source(5, 1) + SourceIndex(0) -2 >Emitted(30, 5) Source(5, 7) + SourceIndex(0) -3 >Emitted(30, 6) Source(5, 8) + SourceIndex(0) -4 >Emitted(30, 9) Source(5, 11) + SourceIndex(0) -5 >Emitted(30, 23) Source(5, 25) + SourceIndex(0) -6 >Emitted(30, 24) Source(5, 26) + SourceIndex(0) +1 >Emitted(32, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(32, 5) Source(5, 7) + SourceIndex(0) +3 >Emitted(32, 6) Source(5, 8) + SourceIndex(0) +4 >Emitted(32, 9) Source(5, 11) + SourceIndex(0) +5 >Emitted(32, 23) Source(5, 25) + SourceIndex(0) +6 >Emitted(32, 24) Source(5, 26) + SourceIndex(0) --- >>>console.log(s); 1 > @@ -2164,14 +2180,14 @@ sourceFile:../../../first/first_PART1.ts 6 > s 7 > ) 8 > ; -1 >Emitted(31, 1) Source(11, 1) + SourceIndex(0) -2 >Emitted(31, 8) Source(11, 8) + SourceIndex(0) -3 >Emitted(31, 9) Source(11, 9) + SourceIndex(0) -4 >Emitted(31, 12) Source(11, 12) + SourceIndex(0) -5 >Emitted(31, 13) Source(11, 13) + SourceIndex(0) -6 >Emitted(31, 14) Source(11, 14) + SourceIndex(0) -7 >Emitted(31, 15) Source(11, 15) + SourceIndex(0) -8 >Emitted(31, 16) Source(11, 16) + SourceIndex(0) +1 >Emitted(33, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(33, 8) Source(11, 8) + SourceIndex(0) +3 >Emitted(33, 9) Source(11, 9) + SourceIndex(0) +4 >Emitted(33, 12) Source(11, 12) + SourceIndex(0) +5 >Emitted(33, 13) Source(11, 13) + SourceIndex(0) +6 >Emitted(33, 14) Source(11, 14) + SourceIndex(0) +7 >Emitted(33, 15) Source(11, 15) + SourceIndex(0) +8 >Emitted(33, 16) Source(11, 16) + SourceIndex(0) --- >>>function forfirstfirst_PART1Rest() { 1-> @@ -2182,9 +2198,9 @@ sourceFile:../../../first/first_PART1.ts > 2 >function 3 > forfirstfirst_PART1Rest -1->Emitted(32, 1) Source(12, 1) + SourceIndex(0) -2 >Emitted(32, 10) Source(12, 10) + SourceIndex(0) -3 >Emitted(32, 33) Source(12, 33) + SourceIndex(0) +1->Emitted(34, 1) Source(12, 1) + SourceIndex(0) +2 >Emitted(34, 10) Source(12, 10) + SourceIndex(0) +3 >Emitted(34, 33) Source(12, 33) + SourceIndex(0) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^ @@ -2204,14 +2220,14 @@ sourceFile:../../../first/first_PART1.ts 6 > , 7 > ...rest } = { a: 10, b: 30, yy: 30 } 8 > ; -1->Emitted(33, 5) Source(13, 1) + SourceIndex(0) -2 >Emitted(33, 9) Source(13, 7) + SourceIndex(0) -3 >Emitted(33, 38) Source(13, 48) + SourceIndex(0) -4 >Emitted(33, 40) Source(13, 9) + SourceIndex(0) -5 >Emitted(33, 48) Source(13, 10) + SourceIndex(0) -6 >Emitted(33, 50) Source(13, 12) + SourceIndex(0) -7 >Emitted(33, 74) Source(13, 48) + SourceIndex(0) -8 >Emitted(33, 75) Source(13, 49) + SourceIndex(0) +1->Emitted(35, 5) Source(13, 1) + SourceIndex(0) +2 >Emitted(35, 9) Source(13, 7) + SourceIndex(0) +3 >Emitted(35, 38) Source(13, 48) + SourceIndex(0) +4 >Emitted(35, 40) Source(13, 9) + SourceIndex(0) +5 >Emitted(35, 48) Source(13, 10) + SourceIndex(0) +6 >Emitted(35, 50) Source(13, 12) + SourceIndex(0) +7 >Emitted(35, 74) Source(13, 48) + SourceIndex(0) +8 >Emitted(35, 75) Source(13, 49) + SourceIndex(0) --- >>>} 1 > @@ -2220,8 +2236,8 @@ sourceFile:../../../first/first_PART1.ts 1 > > 2 >} -1 >Emitted(34, 1) Source(14, 1) + SourceIndex(0) -2 >Emitted(34, 2) Source(14, 2) + SourceIndex(0) +1 >Emitted(36, 1) Source(14, 1) + SourceIndex(0) +2 >Emitted(36, 2) Source(14, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -2246,15 +2262,15 @@ sourceFile:../../../first/first_part2.ts 7 > () 8 > ) 9 > ; -1->Emitted(35, 1) Source(1, 1) + SourceIndex(1) -2 >Emitted(35, 8) Source(1, 8) + SourceIndex(1) -3 >Emitted(35, 9) Source(1, 9) + SourceIndex(1) -4 >Emitted(35, 12) Source(1, 12) + SourceIndex(1) -5 >Emitted(35, 13) Source(1, 13) + SourceIndex(1) -6 >Emitted(35, 14) Source(1, 14) + SourceIndex(1) -7 >Emitted(35, 16) Source(1, 16) + SourceIndex(1) -8 >Emitted(35, 17) Source(1, 17) + SourceIndex(1) -9 >Emitted(35, 18) Source(1, 18) + SourceIndex(1) +1->Emitted(37, 1) Source(1, 1) + SourceIndex(1) +2 >Emitted(37, 8) Source(1, 8) + SourceIndex(1) +3 >Emitted(37, 9) Source(1, 9) + SourceIndex(1) +4 >Emitted(37, 12) Source(1, 12) + SourceIndex(1) +5 >Emitted(37, 13) Source(1, 13) + SourceIndex(1) +6 >Emitted(37, 14) Source(1, 14) + SourceIndex(1) +7 >Emitted(37, 16) Source(1, 16) + SourceIndex(1) +8 >Emitted(37, 17) Source(1, 17) + SourceIndex(1) +9 >Emitted(37, 18) Source(1, 18) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -2268,9 +2284,9 @@ sourceFile:../../../first/first_part3.ts 1 > 2 >function 3 > f -1 >Emitted(36, 1) Source(1, 1) + SourceIndex(2) -2 >Emitted(36, 10) Source(1, 10) + SourceIndex(2) -3 >Emitted(36, 11) Source(1, 11) + SourceIndex(2) +1 >Emitted(38, 1) Source(1, 1) + SourceIndex(2) +2 >Emitted(38, 10) Source(1, 10) + SourceIndex(2) +3 >Emitted(38, 11) Source(1, 11) + SourceIndex(2) --- >>> return "JS does hoists"; 1->^^^^ @@ -2282,10 +2298,10 @@ sourceFile:../../../first/first_part3.ts 2 > return 3 > "JS does hoists" 4 > ; -1->Emitted(37, 5) Source(2, 5) + SourceIndex(2) -2 >Emitted(37, 12) Source(2, 12) + SourceIndex(2) -3 >Emitted(37, 28) Source(2, 28) + SourceIndex(2) -4 >Emitted(37, 29) Source(2, 29) + SourceIndex(2) +1->Emitted(39, 5) Source(2, 5) + SourceIndex(2) +2 >Emitted(39, 12) Source(2, 12) + SourceIndex(2) +3 >Emitted(39, 28) Source(2, 28) + SourceIndex(2) +4 >Emitted(39, 29) Source(2, 29) + SourceIndex(2) --- >>>} 1 > @@ -2294,8 +2310,8 @@ sourceFile:../../../first/first_part3.ts 1 > > 2 >} -1 >Emitted(38, 1) Source(3, 1) + SourceIndex(2) -2 >Emitted(38, 2) Source(3, 2) + SourceIndex(2) +1 >Emitted(40, 1) Source(3, 1) + SourceIndex(2) +2 >Emitted(40, 2) Source(3, 2) + SourceIndex(2) --- >>>function firstfirst_part3Spread() { 1-> @@ -2305,9 +2321,9 @@ sourceFile:../../../first/first_part3.ts > 2 >function 3 > firstfirst_part3Spread -1->Emitted(39, 1) Source(4, 1) + SourceIndex(2) -2 >Emitted(39, 10) Source(4, 10) + SourceIndex(2) -3 >Emitted(39, 32) Source(4, 32) + SourceIndex(2) +1->Emitted(41, 1) Source(4, 1) + SourceIndex(2) +2 >Emitted(41, 10) Source(4, 10) + SourceIndex(2) +3 >Emitted(41, 32) Source(4, 32) + SourceIndex(2) --- >>> var b = []; 1 >^^^^ @@ -2315,8 +2331,8 @@ sourceFile:../../../first/first_part3.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >( 2 > ...b: number[] -1 >Emitted(40, 5) Source(4, 33) + SourceIndex(2) -2 >Emitted(40, 16) Source(4, 47) + SourceIndex(2) +1 >Emitted(42, 5) Source(4, 33) + SourceIndex(2) +2 >Emitted(42, 16) Source(4, 47) + SourceIndex(2) --- >>> for (var _i = 0; _i < arguments.length; _i++) { 1->^^^^^^^^^ @@ -2331,20 +2347,20 @@ sourceFile:../../../first/first_part3.ts 4 > ...b: number[] 5 > 6 > ...b: number[] -1->Emitted(41, 10) Source(4, 33) + SourceIndex(2) -2 >Emitted(41, 20) Source(4, 47) + SourceIndex(2) -3 >Emitted(41, 22) Source(4, 33) + SourceIndex(2) -4 >Emitted(41, 43) Source(4, 47) + SourceIndex(2) -5 >Emitted(41, 45) Source(4, 33) + SourceIndex(2) -6 >Emitted(41, 49) Source(4, 47) + SourceIndex(2) +1->Emitted(43, 10) Source(4, 33) + SourceIndex(2) +2 >Emitted(43, 20) Source(4, 47) + SourceIndex(2) +3 >Emitted(43, 22) Source(4, 33) + SourceIndex(2) +4 >Emitted(43, 43) Source(4, 47) + SourceIndex(2) +5 >Emitted(43, 45) Source(4, 33) + SourceIndex(2) +6 >Emitted(43, 49) Source(4, 47) + SourceIndex(2) --- >>> b[_i] = arguments[_i]; 1 >^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^ 1 > 2 > ...b: number[] -1 >Emitted(42, 9) Source(4, 33) + SourceIndex(2) -2 >Emitted(42, 31) Source(4, 47) + SourceIndex(2) +1 >Emitted(44, 9) Source(4, 33) + SourceIndex(2) +2 >Emitted(44, 31) Source(4, 47) + SourceIndex(2) --- >>> } >>>} @@ -2353,8 +2369,8 @@ sourceFile:../../../first/first_part3.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >) { 2 >} -1 >Emitted(44, 1) Source(4, 51) + SourceIndex(2) -2 >Emitted(44, 2) Source(4, 52) + SourceIndex(2) +1 >Emitted(46, 1) Source(4, 51) + SourceIndex(2) +2 >Emitted(46, 2) Source(4, 52) + SourceIndex(2) --- >>>firstfirst_part3Spread.apply(void 0, __spread([10, 20, 30])); 1-> @@ -2380,17 +2396,17 @@ sourceFile:../../../first/first_part3.ts 9 > 30 10> ] 11> ); -1->Emitted(45, 1) Source(5, 1) + SourceIndex(2) -2 >Emitted(45, 23) Source(5, 23) + SourceIndex(2) -3 >Emitted(45, 47) Source(5, 27) + SourceIndex(2) -4 >Emitted(45, 48) Source(5, 28) + SourceIndex(2) -5 >Emitted(45, 50) Source(5, 30) + SourceIndex(2) -6 >Emitted(45, 52) Source(5, 32) + SourceIndex(2) -7 >Emitted(45, 54) Source(5, 34) + SourceIndex(2) -8 >Emitted(45, 56) Source(5, 36) + SourceIndex(2) -9 >Emitted(45, 58) Source(5, 38) + SourceIndex(2) -10>Emitted(45, 59) Source(5, 39) + SourceIndex(2) -11>Emitted(45, 62) Source(5, 41) + SourceIndex(2) +1->Emitted(47, 1) Source(5, 1) + SourceIndex(2) +2 >Emitted(47, 23) Source(5, 23) + SourceIndex(2) +3 >Emitted(47, 47) Source(5, 27) + SourceIndex(2) +4 >Emitted(47, 48) Source(5, 28) + SourceIndex(2) +5 >Emitted(47, 50) Source(5, 30) + SourceIndex(2) +6 >Emitted(47, 52) Source(5, 32) + SourceIndex(2) +7 >Emitted(47, 54) Source(5, 34) + SourceIndex(2) +8 >Emitted(47, 56) Source(5, 36) + SourceIndex(2) +9 >Emitted(47, 58) Source(5, 38) + SourceIndex(2) +10>Emitted(47, 59) Source(5, 39) + SourceIndex(2) +11>Emitted(47, 62) Source(5, 41) + SourceIndex(2) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -2416,10 +2432,10 @@ sourceFile:../../../second/second_part1.ts > > f(); > } -1 >Emitted(46, 1) Source(5, 1) + SourceIndex(3) -2 >Emitted(46, 5) Source(5, 11) + SourceIndex(3) -3 >Emitted(46, 6) Source(5, 12) + SourceIndex(3) -4 >Emitted(46, 7) Source(11, 2) + SourceIndex(3) +1 >Emitted(48, 1) Source(5, 1) + SourceIndex(3) +2 >Emitted(48, 5) Source(5, 11) + SourceIndex(3) +3 >Emitted(48, 6) Source(5, 12) + SourceIndex(3) +4 >Emitted(48, 7) Source(11, 2) + SourceIndex(3) --- >>>(function (N) { 1-> @@ -2429,9 +2445,9 @@ sourceFile:../../../second/second_part1.ts 1-> 2 >namespace 3 > N -1->Emitted(47, 1) Source(5, 1) + SourceIndex(3) -2 >Emitted(47, 12) Source(5, 11) + SourceIndex(3) -3 >Emitted(47, 13) Source(5, 12) + SourceIndex(3) +1->Emitted(49, 1) Source(5, 1) + SourceIndex(3) +2 >Emitted(49, 12) Source(5, 11) + SourceIndex(3) +3 >Emitted(49, 13) Source(5, 12) + SourceIndex(3) --- >>> function f() { 1->^^^^ @@ -2442,9 +2458,9 @@ sourceFile:../../../second/second_part1.ts > 2 > function 3 > f -1->Emitted(48, 5) Source(6, 5) + SourceIndex(3) -2 >Emitted(48, 14) Source(6, 14) + SourceIndex(3) -3 >Emitted(48, 15) Source(6, 15) + SourceIndex(3) +1->Emitted(50, 5) Source(6, 5) + SourceIndex(3) +2 >Emitted(50, 14) Source(6, 14) + SourceIndex(3) +3 >Emitted(50, 15) Source(6, 15) + SourceIndex(3) --- >>> console.log('testing'); 1->^^^^^^^^ @@ -2464,14 +2480,14 @@ sourceFile:../../../second/second_part1.ts 6 > 'testing' 7 > ) 8 > ; -1->Emitted(49, 9) Source(7, 9) + SourceIndex(3) -2 >Emitted(49, 16) Source(7, 16) + SourceIndex(3) -3 >Emitted(49, 17) Source(7, 17) + SourceIndex(3) -4 >Emitted(49, 20) Source(7, 20) + SourceIndex(3) -5 >Emitted(49, 21) Source(7, 21) + SourceIndex(3) -6 >Emitted(49, 30) Source(7, 30) + SourceIndex(3) -7 >Emitted(49, 31) Source(7, 31) + SourceIndex(3) -8 >Emitted(49, 32) Source(7, 32) + SourceIndex(3) +1->Emitted(51, 9) Source(7, 9) + SourceIndex(3) +2 >Emitted(51, 16) Source(7, 16) + SourceIndex(3) +3 >Emitted(51, 17) Source(7, 17) + SourceIndex(3) +4 >Emitted(51, 20) Source(7, 20) + SourceIndex(3) +5 >Emitted(51, 21) Source(7, 21) + SourceIndex(3) +6 >Emitted(51, 30) Source(7, 30) + SourceIndex(3) +7 >Emitted(51, 31) Source(7, 31) + SourceIndex(3) +8 >Emitted(51, 32) Source(7, 32) + SourceIndex(3) --- >>> } 1 >^^^^ @@ -2480,8 +2496,8 @@ sourceFile:../../../second/second_part1.ts 1 > > 2 > } -1 >Emitted(50, 5) Source(8, 5) + SourceIndex(3) -2 >Emitted(50, 6) Source(8, 6) + SourceIndex(3) +1 >Emitted(52, 5) Source(8, 5) + SourceIndex(3) +2 >Emitted(52, 6) Source(8, 6) + SourceIndex(3) --- >>> f(); 1->^^^^ @@ -2495,10 +2511,10 @@ sourceFile:../../../second/second_part1.ts 2 > f 3 > () 4 > ; -1->Emitted(51, 5) Source(10, 5) + SourceIndex(3) -2 >Emitted(51, 6) Source(10, 6) + SourceIndex(3) -3 >Emitted(51, 8) Source(10, 8) + SourceIndex(3) -4 >Emitted(51, 9) Source(10, 9) + SourceIndex(3) +1->Emitted(53, 5) Source(10, 5) + SourceIndex(3) +2 >Emitted(53, 6) Source(10, 6) + SourceIndex(3) +3 >Emitted(53, 8) Source(10, 8) + SourceIndex(3) +4 >Emitted(53, 9) Source(10, 9) + SourceIndex(3) --- >>>})(N || (N = {})); 1-> @@ -2523,13 +2539,13 @@ sourceFile:../../../second/second_part1.ts > > f(); > } -1->Emitted(52, 1) Source(11, 1) + SourceIndex(3) -2 >Emitted(52, 2) Source(11, 2) + SourceIndex(3) -3 >Emitted(52, 4) Source(5, 11) + SourceIndex(3) -4 >Emitted(52, 5) Source(5, 12) + SourceIndex(3) -5 >Emitted(52, 10) Source(5, 11) + SourceIndex(3) -6 >Emitted(52, 11) Source(5, 12) + SourceIndex(3) -7 >Emitted(52, 19) Source(11, 2) + SourceIndex(3) +1->Emitted(54, 1) Source(11, 1) + SourceIndex(3) +2 >Emitted(54, 2) Source(11, 2) + SourceIndex(3) +3 >Emitted(54, 4) Source(5, 11) + SourceIndex(3) +4 >Emitted(54, 5) Source(5, 12) + SourceIndex(3) +5 >Emitted(54, 10) Source(5, 11) + SourceIndex(3) +6 >Emitted(54, 11) Source(5, 12) + SourceIndex(3) +7 >Emitted(54, 19) Source(11, 2) + SourceIndex(3) --- >>>function forsecondsecond_part1Rest() { 1-> @@ -2540,9 +2556,9 @@ sourceFile:../../../second/second_part1.ts > 2 >function 3 > forsecondsecond_part1Rest -1->Emitted(53, 1) Source(12, 1) + SourceIndex(3) -2 >Emitted(53, 10) Source(12, 10) + SourceIndex(3) -3 >Emitted(53, 35) Source(12, 35) + SourceIndex(3) +1->Emitted(55, 1) Source(12, 1) + SourceIndex(3) +2 >Emitted(55, 10) Source(12, 10) + SourceIndex(3) +3 >Emitted(55, 35) Source(12, 35) + SourceIndex(3) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^ @@ -2562,14 +2578,14 @@ sourceFile:../../../second/second_part1.ts 6 > , 7 > ...rest } = { a: 10, b: 30, yy: 30 } 8 > ; -1->Emitted(54, 5) Source(13, 1) + SourceIndex(3) -2 >Emitted(54, 9) Source(13, 7) + SourceIndex(3) -3 >Emitted(54, 38) Source(13, 48) + SourceIndex(3) -4 >Emitted(54, 40) Source(13, 9) + SourceIndex(3) -5 >Emitted(54, 48) Source(13, 10) + SourceIndex(3) -6 >Emitted(54, 50) Source(13, 12) + SourceIndex(3) -7 >Emitted(54, 74) Source(13, 48) + SourceIndex(3) -8 >Emitted(54, 75) Source(13, 49) + SourceIndex(3) +1->Emitted(56, 5) Source(13, 1) + SourceIndex(3) +2 >Emitted(56, 9) Source(13, 7) + SourceIndex(3) +3 >Emitted(56, 38) Source(13, 48) + SourceIndex(3) +4 >Emitted(56, 40) Source(13, 9) + SourceIndex(3) +5 >Emitted(56, 48) Source(13, 10) + SourceIndex(3) +6 >Emitted(56, 50) Source(13, 12) + SourceIndex(3) +7 >Emitted(56, 74) Source(13, 48) + SourceIndex(3) +8 >Emitted(56, 75) Source(13, 49) + SourceIndex(3) --- >>>} 1 > @@ -2578,8 +2594,8 @@ sourceFile:../../../second/second_part1.ts 1 > > 2 >} -1 >Emitted(55, 1) Source(14, 1) + SourceIndex(3) -2 >Emitted(55, 2) Source(14, 2) + SourceIndex(3) +1 >Emitted(57, 1) Source(14, 1) + SourceIndex(3) +2 >Emitted(57, 2) Source(14, 2) + SourceIndex(3) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -2589,13 +2605,13 @@ sourceFile:../../../second/second_part2.ts 1-> 2 >^^^^^^^^^^^^^^^^^^^-> 1-> -1->Emitted(56, 1) Source(1, 1) + SourceIndex(4) +1->Emitted(58, 1) Source(1, 1) + SourceIndex(4) --- >>> function C() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(57, 5) Source(1, 1) + SourceIndex(4) +1->Emitted(59, 5) Source(1, 1) + SourceIndex(4) --- >>> } 1->^^^^ @@ -2607,8 +2623,8 @@ sourceFile:../../../second/second_part2.ts > } > 2 > } -1->Emitted(58, 5) Source(5, 1) + SourceIndex(4) -2 >Emitted(58, 6) Source(5, 2) + SourceIndex(4) +1->Emitted(60, 5) Source(5, 1) + SourceIndex(4) +2 >Emitted(60, 6) Source(5, 2) + SourceIndex(4) --- >>> C.prototype.doSomething = function () { 1->^^^^ @@ -2618,9 +2634,9 @@ sourceFile:../../../second/second_part2.ts 1-> 2 > doSomething 3 > -1->Emitted(59, 5) Source(2, 5) + SourceIndex(4) -2 >Emitted(59, 28) Source(2, 16) + SourceIndex(4) -3 >Emitted(59, 31) Source(2, 5) + SourceIndex(4) +1->Emitted(61, 5) Source(2, 5) + SourceIndex(4) +2 >Emitted(61, 28) Source(2, 16) + SourceIndex(4) +3 >Emitted(61, 31) Source(2, 5) + SourceIndex(4) --- >>> console.log("something got done"); 1->^^^^^^^^ @@ -2640,14 +2656,14 @@ sourceFile:../../../second/second_part2.ts 6 > "something got done" 7 > ) 8 > ; -1->Emitted(60, 9) Source(3, 9) + SourceIndex(4) -2 >Emitted(60, 16) Source(3, 16) + SourceIndex(4) -3 >Emitted(60, 17) Source(3, 17) + SourceIndex(4) -4 >Emitted(60, 20) Source(3, 20) + SourceIndex(4) -5 >Emitted(60, 21) Source(3, 21) + SourceIndex(4) -6 >Emitted(60, 41) Source(3, 41) + SourceIndex(4) -7 >Emitted(60, 42) Source(3, 42) + SourceIndex(4) -8 >Emitted(60, 43) Source(3, 43) + SourceIndex(4) +1->Emitted(62, 9) Source(3, 9) + SourceIndex(4) +2 >Emitted(62, 16) Source(3, 16) + SourceIndex(4) +3 >Emitted(62, 17) Source(3, 17) + SourceIndex(4) +4 >Emitted(62, 20) Source(3, 20) + SourceIndex(4) +5 >Emitted(62, 21) Source(3, 21) + SourceIndex(4) +6 >Emitted(62, 41) Source(3, 41) + SourceIndex(4) +7 >Emitted(62, 42) Source(3, 42) + SourceIndex(4) +8 >Emitted(62, 43) Source(3, 43) + SourceIndex(4) --- >>> }; 1 >^^^^ @@ -2656,8 +2672,8 @@ sourceFile:../../../second/second_part2.ts 1 > > 2 > } -1 >Emitted(61, 5) Source(4, 5) + SourceIndex(4) -2 >Emitted(61, 6) Source(4, 6) + SourceIndex(4) +1 >Emitted(63, 5) Source(4, 5) + SourceIndex(4) +2 >Emitted(63, 6) Source(4, 6) + SourceIndex(4) --- >>> return C; 1->^^^^ @@ -2665,8 +2681,8 @@ sourceFile:../../../second/second_part2.ts 1-> > 2 > } -1->Emitted(62, 5) Source(5, 1) + SourceIndex(4) -2 >Emitted(62, 13) Source(5, 2) + SourceIndex(4) +1->Emitted(64, 5) Source(5, 1) + SourceIndex(4) +2 >Emitted(64, 13) Source(5, 2) + SourceIndex(4) --- >>>}()); 1 > @@ -2682,10 +2698,10 @@ sourceFile:../../../second/second_part2.ts > console.log("something got done"); > } > } -1 >Emitted(63, 1) Source(5, 1) + SourceIndex(4) -2 >Emitted(63, 2) Source(5, 2) + SourceIndex(4) -3 >Emitted(63, 2) Source(1, 1) + SourceIndex(4) -4 >Emitted(63, 6) Source(5, 2) + SourceIndex(4) +1 >Emitted(65, 1) Source(5, 1) + SourceIndex(4) +2 >Emitted(65, 2) Source(5, 2) + SourceIndex(4) +3 >Emitted(65, 2) Source(1, 1) + SourceIndex(4) +4 >Emitted(65, 6) Source(5, 2) + SourceIndex(4) --- >>>function secondsecond_part2Spread() { 1-> @@ -2696,9 +2712,9 @@ sourceFile:../../../second/second_part2.ts > 2 >function 3 > secondsecond_part2Spread -1->Emitted(64, 1) Source(7, 1) + SourceIndex(4) -2 >Emitted(64, 10) Source(7, 10) + SourceIndex(4) -3 >Emitted(64, 34) Source(7, 34) + SourceIndex(4) +1->Emitted(66, 1) Source(7, 1) + SourceIndex(4) +2 >Emitted(66, 10) Source(7, 10) + SourceIndex(4) +3 >Emitted(66, 34) Source(7, 34) + SourceIndex(4) --- >>> var b = []; 1 >^^^^ @@ -2706,8 +2722,8 @@ sourceFile:../../../second/second_part2.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >( 2 > ...b: number[] -1 >Emitted(65, 5) Source(7, 35) + SourceIndex(4) -2 >Emitted(65, 16) Source(7, 49) + SourceIndex(4) +1 >Emitted(67, 5) Source(7, 35) + SourceIndex(4) +2 >Emitted(67, 16) Source(7, 49) + SourceIndex(4) --- >>> for (var _i = 0; _i < arguments.length; _i++) { 1->^^^^^^^^^ @@ -2722,20 +2738,20 @@ sourceFile:../../../second/second_part2.ts 4 > ...b: number[] 5 > 6 > ...b: number[] -1->Emitted(66, 10) Source(7, 35) + SourceIndex(4) -2 >Emitted(66, 20) Source(7, 49) + SourceIndex(4) -3 >Emitted(66, 22) Source(7, 35) + SourceIndex(4) -4 >Emitted(66, 43) Source(7, 49) + SourceIndex(4) -5 >Emitted(66, 45) Source(7, 35) + SourceIndex(4) -6 >Emitted(66, 49) Source(7, 49) + SourceIndex(4) +1->Emitted(68, 10) Source(7, 35) + SourceIndex(4) +2 >Emitted(68, 20) Source(7, 49) + SourceIndex(4) +3 >Emitted(68, 22) Source(7, 35) + SourceIndex(4) +4 >Emitted(68, 43) Source(7, 49) + SourceIndex(4) +5 >Emitted(68, 45) Source(7, 35) + SourceIndex(4) +6 >Emitted(68, 49) Source(7, 49) + SourceIndex(4) --- >>> b[_i] = arguments[_i]; 1 >^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^ 1 > 2 > ...b: number[] -1 >Emitted(67, 9) Source(7, 35) + SourceIndex(4) -2 >Emitted(67, 31) Source(7, 49) + SourceIndex(4) +1 >Emitted(69, 9) Source(7, 35) + SourceIndex(4) +2 >Emitted(69, 31) Source(7, 49) + SourceIndex(4) --- >>> } >>>} @@ -2744,8 +2760,8 @@ sourceFile:../../../second/second_part2.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >) { 2 >} -1 >Emitted(69, 1) Source(7, 53) + SourceIndex(4) -2 >Emitted(69, 2) Source(7, 54) + SourceIndex(4) +1 >Emitted(71, 1) Source(7, 53) + SourceIndex(4) +2 >Emitted(71, 2) Source(7, 54) + SourceIndex(4) --- >>>secondsecond_part2Spread.apply(void 0, __spread([10, 20, 30])); 1-> @@ -2771,17 +2787,17 @@ sourceFile:../../../second/second_part2.ts 9 > 30 10> ] 11> ); -1->Emitted(70, 1) Source(8, 1) + SourceIndex(4) -2 >Emitted(70, 25) Source(8, 25) + SourceIndex(4) -3 >Emitted(70, 49) Source(8, 29) + SourceIndex(4) -4 >Emitted(70, 50) Source(8, 30) + SourceIndex(4) -5 >Emitted(70, 52) Source(8, 32) + SourceIndex(4) -6 >Emitted(70, 54) Source(8, 34) + SourceIndex(4) -7 >Emitted(70, 56) Source(8, 36) + SourceIndex(4) -8 >Emitted(70, 58) Source(8, 38) + SourceIndex(4) -9 >Emitted(70, 60) Source(8, 40) + SourceIndex(4) -10>Emitted(70, 61) Source(8, 41) + SourceIndex(4) -11>Emitted(70, 64) Source(8, 43) + SourceIndex(4) +1->Emitted(72, 1) Source(8, 1) + SourceIndex(4) +2 >Emitted(72, 25) Source(8, 25) + SourceIndex(4) +3 >Emitted(72, 49) Source(8, 29) + SourceIndex(4) +4 >Emitted(72, 50) Source(8, 30) + SourceIndex(4) +5 >Emitted(72, 52) Source(8, 32) + SourceIndex(4) +6 >Emitted(72, 54) Source(8, 34) + SourceIndex(4) +7 >Emitted(72, 56) Source(8, 36) + SourceIndex(4) +8 >Emitted(72, 58) Source(8, 38) + SourceIndex(4) +9 >Emitted(72, 60) Source(8, 40) + SourceIndex(4) +10>Emitted(72, 61) Source(8, 41) + SourceIndex(4) +11>Emitted(72, 64) Source(8, 43) + SourceIndex(4) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -2805,14 +2821,14 @@ sourceFile:../../third_part1.ts 6 > C 7 > () 8 > ; -1 >Emitted(71, 1) Source(1, 1) + SourceIndex(5) -2 >Emitted(71, 5) Source(1, 5) + SourceIndex(5) -3 >Emitted(71, 6) Source(1, 6) + SourceIndex(5) -4 >Emitted(71, 9) Source(1, 9) + SourceIndex(5) -5 >Emitted(71, 13) Source(1, 13) + SourceIndex(5) -6 >Emitted(71, 14) Source(1, 14) + SourceIndex(5) -7 >Emitted(71, 16) Source(1, 16) + SourceIndex(5) -8 >Emitted(71, 17) Source(1, 17) + SourceIndex(5) +1 >Emitted(73, 1) Source(1, 1) + SourceIndex(5) +2 >Emitted(73, 5) Source(1, 5) + SourceIndex(5) +3 >Emitted(73, 6) Source(1, 6) + SourceIndex(5) +4 >Emitted(73, 9) Source(1, 9) + SourceIndex(5) +5 >Emitted(73, 13) Source(1, 13) + SourceIndex(5) +6 >Emitted(73, 14) Source(1, 14) + SourceIndex(5) +7 >Emitted(73, 16) Source(1, 16) + SourceIndex(5) +8 >Emitted(73, 17) Source(1, 17) + SourceIndex(5) --- >>>c.doSomething(); 1-> @@ -2829,12 +2845,12 @@ sourceFile:../../third_part1.ts 4 > doSomething 5 > () 6 > ; -1->Emitted(72, 1) Source(2, 1) + SourceIndex(5) -2 >Emitted(72, 2) Source(2, 2) + SourceIndex(5) -3 >Emitted(72, 3) Source(2, 3) + SourceIndex(5) -4 >Emitted(72, 14) Source(2, 14) + SourceIndex(5) -5 >Emitted(72, 16) Source(2, 16) + SourceIndex(5) -6 >Emitted(72, 17) Source(2, 17) + SourceIndex(5) +1->Emitted(74, 1) Source(2, 1) + SourceIndex(5) +2 >Emitted(74, 2) Source(2, 2) + SourceIndex(5) +3 >Emitted(74, 3) Source(2, 3) + SourceIndex(5) +4 >Emitted(74, 14) Source(2, 14) + SourceIndex(5) +5 >Emitted(74, 16) Source(2, 16) + SourceIndex(5) +6 >Emitted(74, 17) Source(2, 17) + SourceIndex(5) --- >>>function forthirdthird_part1Rest() { 1-> @@ -2845,9 +2861,9 @@ sourceFile:../../third_part1.ts > 2 >function 3 > forthirdthird_part1Rest -1->Emitted(73, 1) Source(3, 1) + SourceIndex(5) -2 >Emitted(73, 10) Source(3, 10) + SourceIndex(5) -3 >Emitted(73, 33) Source(3, 33) + SourceIndex(5) +1->Emitted(75, 1) Source(3, 1) + SourceIndex(5) +2 >Emitted(75, 10) Source(3, 10) + SourceIndex(5) +3 >Emitted(75, 33) Source(3, 33) + SourceIndex(5) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^ @@ -2867,14 +2883,14 @@ sourceFile:../../third_part1.ts 6 > , 7 > ...rest } = { a: 10, b: 30, yy: 30 } 8 > ; -1->Emitted(74, 5) Source(4, 1) + SourceIndex(5) -2 >Emitted(74, 9) Source(4, 7) + SourceIndex(5) -3 >Emitted(74, 38) Source(4, 48) + SourceIndex(5) -4 >Emitted(74, 40) Source(4, 9) + SourceIndex(5) -5 >Emitted(74, 48) Source(4, 10) + SourceIndex(5) -6 >Emitted(74, 50) Source(4, 12) + SourceIndex(5) -7 >Emitted(74, 74) Source(4, 48) + SourceIndex(5) -8 >Emitted(74, 75) Source(4, 49) + SourceIndex(5) +1->Emitted(76, 5) Source(4, 1) + SourceIndex(5) +2 >Emitted(76, 9) Source(4, 7) + SourceIndex(5) +3 >Emitted(76, 38) Source(4, 48) + SourceIndex(5) +4 >Emitted(76, 40) Source(4, 9) + SourceIndex(5) +5 >Emitted(76, 48) Source(4, 10) + SourceIndex(5) +6 >Emitted(76, 50) Source(4, 12) + SourceIndex(5) +7 >Emitted(76, 74) Source(4, 48) + SourceIndex(5) +8 >Emitted(76, 75) Source(4, 49) + SourceIndex(5) --- >>>} 1 > @@ -2883,8 +2899,8 @@ sourceFile:../../third_part1.ts 1 > > 2 >} -1 >Emitted(75, 1) Source(5, 1) + SourceIndex(5) -2 >Emitted(75, 2) Source(5, 2) + SourceIndex(5) +1 >Emitted(77, 1) Source(5, 1) + SourceIndex(5) +2 >Emitted(77, 2) Source(5, 2) + SourceIndex(5) --- >>>function thirdthird_part1Spread() { 1-> @@ -2894,9 +2910,9 @@ sourceFile:../../third_part1.ts > 2 >function 3 > thirdthird_part1Spread -1->Emitted(76, 1) Source(6, 1) + SourceIndex(5) -2 >Emitted(76, 10) Source(6, 10) + SourceIndex(5) -3 >Emitted(76, 32) Source(6, 32) + SourceIndex(5) +1->Emitted(78, 1) Source(6, 1) + SourceIndex(5) +2 >Emitted(78, 10) Source(6, 10) + SourceIndex(5) +3 >Emitted(78, 32) Source(6, 32) + SourceIndex(5) --- >>> var b = []; 1 >^^^^ @@ -2904,8 +2920,8 @@ sourceFile:../../third_part1.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >( 2 > ...b: number[] -1 >Emitted(77, 5) Source(6, 33) + SourceIndex(5) -2 >Emitted(77, 16) Source(6, 47) + SourceIndex(5) +1 >Emitted(79, 5) Source(6, 33) + SourceIndex(5) +2 >Emitted(79, 16) Source(6, 47) + SourceIndex(5) --- >>> for (var _i = 0; _i < arguments.length; _i++) { 1->^^^^^^^^^ @@ -2920,20 +2936,20 @@ sourceFile:../../third_part1.ts 4 > ...b: number[] 5 > 6 > ...b: number[] -1->Emitted(78, 10) Source(6, 33) + SourceIndex(5) -2 >Emitted(78, 20) Source(6, 47) + SourceIndex(5) -3 >Emitted(78, 22) Source(6, 33) + SourceIndex(5) -4 >Emitted(78, 43) Source(6, 47) + SourceIndex(5) -5 >Emitted(78, 45) Source(6, 33) + SourceIndex(5) -6 >Emitted(78, 49) Source(6, 47) + SourceIndex(5) +1->Emitted(80, 10) Source(6, 33) + SourceIndex(5) +2 >Emitted(80, 20) Source(6, 47) + SourceIndex(5) +3 >Emitted(80, 22) Source(6, 33) + SourceIndex(5) +4 >Emitted(80, 43) Source(6, 47) + SourceIndex(5) +5 >Emitted(80, 45) Source(6, 33) + SourceIndex(5) +6 >Emitted(80, 49) Source(6, 47) + SourceIndex(5) --- >>> b[_i] = arguments[_i]; 1 >^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^ 1 > 2 > ...b: number[] -1 >Emitted(79, 9) Source(6, 33) + SourceIndex(5) -2 >Emitted(79, 31) Source(6, 47) + SourceIndex(5) +1 >Emitted(81, 9) Source(6, 33) + SourceIndex(5) +2 >Emitted(81, 31) Source(6, 47) + SourceIndex(5) --- >>> } >>>} @@ -2942,8 +2958,8 @@ sourceFile:../../third_part1.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >) { 2 >} -1 >Emitted(81, 1) Source(6, 51) + SourceIndex(5) -2 >Emitted(81, 2) Source(6, 52) + SourceIndex(5) +1 >Emitted(83, 1) Source(6, 51) + SourceIndex(5) +2 >Emitted(83, 2) Source(6, 52) + SourceIndex(5) --- >>>thirdthird_part1Spread.apply(void 0, __spread([10, 20, 30])); 1-> @@ -2969,17 +2985,17 @@ sourceFile:../../third_part1.ts 9 > 30 10> ] 11> ); -1->Emitted(82, 1) Source(7, 1) + SourceIndex(5) -2 >Emitted(82, 23) Source(7, 23) + SourceIndex(5) -3 >Emitted(82, 47) Source(7, 27) + SourceIndex(5) -4 >Emitted(82, 48) Source(7, 28) + SourceIndex(5) -5 >Emitted(82, 50) Source(7, 30) + SourceIndex(5) -6 >Emitted(82, 52) Source(7, 32) + SourceIndex(5) -7 >Emitted(82, 54) Source(7, 34) + SourceIndex(5) -8 >Emitted(82, 56) Source(7, 36) + SourceIndex(5) -9 >Emitted(82, 58) Source(7, 38) + SourceIndex(5) -10>Emitted(82, 59) Source(7, 39) + SourceIndex(5) -11>Emitted(82, 62) Source(7, 41) + SourceIndex(5) +1->Emitted(84, 1) Source(7, 1) + SourceIndex(5) +2 >Emitted(84, 23) Source(7, 23) + SourceIndex(5) +3 >Emitted(84, 47) Source(7, 27) + SourceIndex(5) +4 >Emitted(84, 48) Source(7, 28) + SourceIndex(5) +5 >Emitted(84, 50) Source(7, 30) + SourceIndex(5) +6 >Emitted(84, 52) Source(7, 32) + SourceIndex(5) +7 >Emitted(84, 54) Source(7, 34) + SourceIndex(5) +8 >Emitted(84, 56) Source(7, 36) + SourceIndex(5) +9 >Emitted(84, 58) Source(7, 38) + SourceIndex(5) +10>Emitted(84, 59) Source(7, 39) + SourceIndex(5) +11>Emitted(84, 62) Source(7, 41) + SourceIndex(5) --- >>>//# sourceMappingURL=third-output.js.map @@ -2994,51 +3010,51 @@ sourceFile:../../third_part1.ts "sections": [ { "pos": 0, - "end": 415, + "end": 492, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 417, - "end": 921, + "pos": 494, + "end": 998, "kind": "emitHelpers", "data": "typescript:read" }, { - "pos": 923, - "end": 1093, + "pos": 1000, + "end": 1170, "kind": "emitHelpers", "data": "typescript:spread" }, { - "pos": 1095, - "end": 1534, + "pos": 1172, + "end": 1611, "kind": "prepend", "data": "/src/first/bin/first-output.js", "texts": [ { - "pos": 1095, - "end": 1534, + "pos": 1172, + "end": 1611, "kind": "text" } ] }, { - "pos": 1534, - "end": 2154, + "pos": 1611, + "end": 2231, "kind": "prepend", "data": "/src/2/second-output.js", "texts": [ { - "pos": 1534, - "end": 2154, + "pos": 1611, + "end": 2231, "kind": "text" } ] }, { - "pos": 2154, - "end": 2519, + "pos": 2231, + "end": 2596, "kind": "text" } ], @@ -3093,18 +3109,20 @@ sourceFile:../../third_part1.ts ====================================================================== File:: /src/third/thirdjs/output/third-output.js ---------------------------------------------------------------------- -emitHelpers: (0-415):: typescript:rest +emitHelpers: (0-492):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; ---------------------------------------------------------------------- -emitHelpers: (417-921):: typescript:read +emitHelpers: (494-998):: typescript:read var __read = (this && this.__read) || function (o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; if (!m) return o; @@ -3122,15 +3140,15 @@ var __read = (this && this.__read) || function (o, n) { return ar; }; ---------------------------------------------------------------------- -emitHelpers: (923-1093):: typescript:spread +emitHelpers: (1000-1170):: typescript:spread var __spread = (this && this.__spread) || function () { for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); return ar; }; ---------------------------------------------------------------------- -prepend: (1095-1534):: /src/first/bin/first-output.js texts:: 1 +prepend: (1172-1611):: /src/first/bin/first-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (1095-1534) +text: (1172-1611) var s = "Hello, world"; console.log(s); function forfirstfirst_PART1Rest() { @@ -3149,9 +3167,9 @@ function firstfirst_part3Spread() { firstfirst_part3Spread.apply(void 0, __spread([10, 20, 30])); ---------------------------------------------------------------------- -prepend: (1534-2154):: /src/2/second-output.js texts:: 1 +prepend: (1611-2231):: /src/2/second-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (1534-2154) +text: (1611-2231) var N; (function (N) { function f() { @@ -3179,7 +3197,7 @@ function secondsecond_part2Spread() { secondsecond_part2Spread.apply(void 0, __spread([10, 20, 30])); ---------------------------------------------------------------------- -text: (2154-2519) +text: (2231-2596) var c = new C(); c.doSomething(); function forthirdthird_part1Rest() { diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/multiple-emitHelpers-in-different-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/multiple-emitHelpers-in-different-projects.js index a72bd86b35c..57f2f0c389b 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/multiple-emitHelpers-in-different-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/multiple-emitHelpers-in-different-projects.js @@ -844,8 +844,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; var s = "Hello, world"; @@ -860,7 +862,7 @@ function f() { //# sourceMappingURL=first-output.js.map //// [/src/first/bin/first-output.js.map] -{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":";;;;;;;;;AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB;IAChC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;ACbD,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC"} +{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":";;;;;;;;;;;AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB;IAChC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;ACbD,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC"} //// [/src/first/bin/first-output.js.map.baseline.txt] =================================================================== @@ -878,8 +880,10 @@ sourceFile:../first_PART1.ts >>> for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") ->>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) ->>> t[p[i]] = s[p[i]]; +>>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> t[p[i]] = s[p[i]]; +>>> } >>> return t; >>>}; >>>var s = "Hello, world"; @@ -899,12 +903,12 @@ sourceFile:../first_PART1.ts 4 > = 5 > "Hello, world" 6 > ; -1 >Emitted(10, 1) Source(5, 1) + SourceIndex(0) -2 >Emitted(10, 5) Source(5, 7) + SourceIndex(0) -3 >Emitted(10, 6) Source(5, 8) + SourceIndex(0) -4 >Emitted(10, 9) Source(5, 11) + SourceIndex(0) -5 >Emitted(10, 23) Source(5, 25) + SourceIndex(0) -6 >Emitted(10, 24) Source(5, 26) + SourceIndex(0) +1 >Emitted(12, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(12, 5) Source(5, 7) + SourceIndex(0) +3 >Emitted(12, 6) Source(5, 8) + SourceIndex(0) +4 >Emitted(12, 9) Source(5, 11) + SourceIndex(0) +5 >Emitted(12, 23) Source(5, 25) + SourceIndex(0) +6 >Emitted(12, 24) Source(5, 26) + SourceIndex(0) --- >>>console.log(s); 1 > @@ -930,14 +934,14 @@ sourceFile:../first_PART1.ts 6 > s 7 > ) 8 > ; -1 >Emitted(11, 1) Source(11, 1) + SourceIndex(0) -2 >Emitted(11, 8) Source(11, 8) + SourceIndex(0) -3 >Emitted(11, 9) Source(11, 9) + SourceIndex(0) -4 >Emitted(11, 12) Source(11, 12) + SourceIndex(0) -5 >Emitted(11, 13) Source(11, 13) + SourceIndex(0) -6 >Emitted(11, 14) Source(11, 14) + SourceIndex(0) -7 >Emitted(11, 15) Source(11, 15) + SourceIndex(0) -8 >Emitted(11, 16) Source(11, 16) + SourceIndex(0) +1 >Emitted(13, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(13, 8) Source(11, 8) + SourceIndex(0) +3 >Emitted(13, 9) Source(11, 9) + SourceIndex(0) +4 >Emitted(13, 12) Source(11, 12) + SourceIndex(0) +5 >Emitted(13, 13) Source(11, 13) + SourceIndex(0) +6 >Emitted(13, 14) Source(11, 14) + SourceIndex(0) +7 >Emitted(13, 15) Source(11, 15) + SourceIndex(0) +8 >Emitted(13, 16) Source(11, 16) + SourceIndex(0) --- >>>function forfirstfirst_PART1Rest() { 1-> @@ -948,9 +952,9 @@ sourceFile:../first_PART1.ts > 2 >function 3 > forfirstfirst_PART1Rest -1->Emitted(12, 1) Source(12, 1) + SourceIndex(0) -2 >Emitted(12, 10) Source(12, 10) + SourceIndex(0) -3 >Emitted(12, 33) Source(12, 33) + SourceIndex(0) +1->Emitted(14, 1) Source(12, 1) + SourceIndex(0) +2 >Emitted(14, 10) Source(12, 10) + SourceIndex(0) +3 >Emitted(14, 33) Source(12, 33) + SourceIndex(0) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^ @@ -970,14 +974,14 @@ sourceFile:../first_PART1.ts 6 > , 7 > ...rest } = { a: 10, b: 30, yy: 30 } 8 > ; -1->Emitted(13, 5) Source(13, 1) + SourceIndex(0) -2 >Emitted(13, 9) Source(13, 7) + SourceIndex(0) -3 >Emitted(13, 38) Source(13, 48) + SourceIndex(0) -4 >Emitted(13, 40) Source(13, 9) + SourceIndex(0) -5 >Emitted(13, 48) Source(13, 10) + SourceIndex(0) -6 >Emitted(13, 50) Source(13, 12) + SourceIndex(0) -7 >Emitted(13, 74) Source(13, 48) + SourceIndex(0) -8 >Emitted(13, 75) Source(13, 49) + SourceIndex(0) +1->Emitted(15, 5) Source(13, 1) + SourceIndex(0) +2 >Emitted(15, 9) Source(13, 7) + SourceIndex(0) +3 >Emitted(15, 38) Source(13, 48) + SourceIndex(0) +4 >Emitted(15, 40) Source(13, 9) + SourceIndex(0) +5 >Emitted(15, 48) Source(13, 10) + SourceIndex(0) +6 >Emitted(15, 50) Source(13, 12) + SourceIndex(0) +7 >Emitted(15, 74) Source(13, 48) + SourceIndex(0) +8 >Emitted(15, 75) Source(13, 49) + SourceIndex(0) --- >>>} 1 > @@ -986,8 +990,8 @@ sourceFile:../first_PART1.ts 1 > > 2 >} -1 >Emitted(14, 1) Source(14, 1) + SourceIndex(0) -2 >Emitted(14, 2) Source(14, 2) + SourceIndex(0) +1 >Emitted(16, 1) Source(14, 1) + SourceIndex(0) +2 >Emitted(16, 2) Source(14, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/src/first/bin/first-output.js @@ -1012,15 +1016,15 @@ sourceFile:../first_part2.ts 7 > () 8 > ) 9 > ; -1->Emitted(15, 1) Source(1, 1) + SourceIndex(1) -2 >Emitted(15, 8) Source(1, 8) + SourceIndex(1) -3 >Emitted(15, 9) Source(1, 9) + SourceIndex(1) -4 >Emitted(15, 12) Source(1, 12) + SourceIndex(1) -5 >Emitted(15, 13) Source(1, 13) + SourceIndex(1) -6 >Emitted(15, 14) Source(1, 14) + SourceIndex(1) -7 >Emitted(15, 16) Source(1, 16) + SourceIndex(1) -8 >Emitted(15, 17) Source(1, 17) + SourceIndex(1) -9 >Emitted(15, 18) Source(1, 18) + SourceIndex(1) +1->Emitted(17, 1) Source(1, 1) + SourceIndex(1) +2 >Emitted(17, 8) Source(1, 8) + SourceIndex(1) +3 >Emitted(17, 9) Source(1, 9) + SourceIndex(1) +4 >Emitted(17, 12) Source(1, 12) + SourceIndex(1) +5 >Emitted(17, 13) Source(1, 13) + SourceIndex(1) +6 >Emitted(17, 14) Source(1, 14) + SourceIndex(1) +7 >Emitted(17, 16) Source(1, 16) + SourceIndex(1) +8 >Emitted(17, 17) Source(1, 17) + SourceIndex(1) +9 >Emitted(17, 18) Source(1, 18) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:/src/first/bin/first-output.js @@ -1034,9 +1038,9 @@ sourceFile:../first_part3.ts 1 > 2 >function 3 > f -1 >Emitted(16, 1) Source(1, 1) + SourceIndex(2) -2 >Emitted(16, 10) Source(1, 10) + SourceIndex(2) -3 >Emitted(16, 11) Source(1, 11) + SourceIndex(2) +1 >Emitted(18, 1) Source(1, 1) + SourceIndex(2) +2 >Emitted(18, 10) Source(1, 10) + SourceIndex(2) +3 >Emitted(18, 11) Source(1, 11) + SourceIndex(2) --- >>> return "JS does hoists"; 1->^^^^ @@ -1048,10 +1052,10 @@ sourceFile:../first_part3.ts 2 > return 3 > "JS does hoists" 4 > ; -1->Emitted(17, 5) Source(2, 5) + SourceIndex(2) -2 >Emitted(17, 12) Source(2, 12) + SourceIndex(2) -3 >Emitted(17, 28) Source(2, 28) + SourceIndex(2) -4 >Emitted(17, 29) Source(2, 29) + SourceIndex(2) +1->Emitted(19, 5) Source(2, 5) + SourceIndex(2) +2 >Emitted(19, 12) Source(2, 12) + SourceIndex(2) +3 >Emitted(19, 28) Source(2, 28) + SourceIndex(2) +4 >Emitted(19, 29) Source(2, 29) + SourceIndex(2) --- >>>} 1 > @@ -1060,8 +1064,8 @@ sourceFile:../first_part3.ts 1 > > 2 >} -1 >Emitted(18, 1) Source(3, 1) + SourceIndex(2) -2 >Emitted(18, 2) Source(3, 2) + SourceIndex(2) +1 >Emitted(20, 1) Source(3, 1) + SourceIndex(2) +2 >Emitted(20, 2) Source(3, 2) + SourceIndex(2) --- >>>//# sourceMappingURL=first-output.js.map @@ -1078,13 +1082,13 @@ sourceFile:../first_part3.ts "sections": [ { "pos": 0, - "end": 415, + "end": 492, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 417, - "end": 644, + "pos": 494, + "end": 721, "kind": "text" } ], @@ -1111,18 +1115,20 @@ sourceFile:../first_part3.ts ====================================================================== File:: /src/first/bin/first-output.js ---------------------------------------------------------------------- -emitHelpers: (0-415):: typescript:rest +emitHelpers: (0-492):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; ---------------------------------------------------------------------- -text: (417-644) +text: (494-721) var s = "Hello, world"; console.log(s); function forfirstfirst_PART1Rest() { @@ -1542,8 +1548,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; var __read = (this && this.__read) || function (o, n) { @@ -1605,7 +1613,7 @@ function forthirdthird_part1Rest() { //# sourceMappingURL=third-output.js.map //// [/src/third/thirdjs/output/third-output.js.map] -{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../../first/first_PART1.ts","../../../first/first_part2.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts","../../third_part1.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB;IAChC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;ACbD,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC;ACED,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;AAED,SAAS,wBAAwB;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AACrD,wBAAwB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;ACb1C;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC;ACJD,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC;AAChB,SAAS,uBAAuB;IAChC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC"} +{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../../first/first_PART1.ts","../../../first/first_part2.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts","../../third_part1.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACf,SAAS,uBAAuB;IAChC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC;ACbD,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC;ACED,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;AAED,SAAS,wBAAwB;IAAC,WAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,sBAAc;;AAAI,CAAC;AACrD,wBAAwB,wBAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAE;ACb1C;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC;ACJD,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC;AAChB,SAAS,uBAAuB;IAChC,IAAM,6BAAyC,EAAvC,QAAC,EAAE,wBAAoC,CAAC;AAChD,CAAC"} //// [/src/third/thirdjs/output/third-output.js.map.baseline.txt] =================================================================== @@ -1623,8 +1631,10 @@ sourceFile:../../../first/first_PART1.ts >>> for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") ->>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) ->>> t[p[i]] = s[p[i]]; +>>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> t[p[i]] = s[p[i]]; +>>> } >>> return t; >>>}; >>>var __read = (this && this.__read) || function (o, n) { @@ -1664,12 +1674,12 @@ sourceFile:../../../first/first_PART1.ts 4 > = 5 > "Hello, world" 6 > ; -1 >Emitted(30, 1) Source(5, 1) + SourceIndex(0) -2 >Emitted(30, 5) Source(5, 7) + SourceIndex(0) -3 >Emitted(30, 6) Source(5, 8) + SourceIndex(0) -4 >Emitted(30, 9) Source(5, 11) + SourceIndex(0) -5 >Emitted(30, 23) Source(5, 25) + SourceIndex(0) -6 >Emitted(30, 24) Source(5, 26) + SourceIndex(0) +1 >Emitted(32, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(32, 5) Source(5, 7) + SourceIndex(0) +3 >Emitted(32, 6) Source(5, 8) + SourceIndex(0) +4 >Emitted(32, 9) Source(5, 11) + SourceIndex(0) +5 >Emitted(32, 23) Source(5, 25) + SourceIndex(0) +6 >Emitted(32, 24) Source(5, 26) + SourceIndex(0) --- >>>console.log(s); 1 > @@ -1695,14 +1705,14 @@ sourceFile:../../../first/first_PART1.ts 6 > s 7 > ) 8 > ; -1 >Emitted(31, 1) Source(11, 1) + SourceIndex(0) -2 >Emitted(31, 8) Source(11, 8) + SourceIndex(0) -3 >Emitted(31, 9) Source(11, 9) + SourceIndex(0) -4 >Emitted(31, 12) Source(11, 12) + SourceIndex(0) -5 >Emitted(31, 13) Source(11, 13) + SourceIndex(0) -6 >Emitted(31, 14) Source(11, 14) + SourceIndex(0) -7 >Emitted(31, 15) Source(11, 15) + SourceIndex(0) -8 >Emitted(31, 16) Source(11, 16) + SourceIndex(0) +1 >Emitted(33, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(33, 8) Source(11, 8) + SourceIndex(0) +3 >Emitted(33, 9) Source(11, 9) + SourceIndex(0) +4 >Emitted(33, 12) Source(11, 12) + SourceIndex(0) +5 >Emitted(33, 13) Source(11, 13) + SourceIndex(0) +6 >Emitted(33, 14) Source(11, 14) + SourceIndex(0) +7 >Emitted(33, 15) Source(11, 15) + SourceIndex(0) +8 >Emitted(33, 16) Source(11, 16) + SourceIndex(0) --- >>>function forfirstfirst_PART1Rest() { 1-> @@ -1713,9 +1723,9 @@ sourceFile:../../../first/first_PART1.ts > 2 >function 3 > forfirstfirst_PART1Rest -1->Emitted(32, 1) Source(12, 1) + SourceIndex(0) -2 >Emitted(32, 10) Source(12, 10) + SourceIndex(0) -3 >Emitted(32, 33) Source(12, 33) + SourceIndex(0) +1->Emitted(34, 1) Source(12, 1) + SourceIndex(0) +2 >Emitted(34, 10) Source(12, 10) + SourceIndex(0) +3 >Emitted(34, 33) Source(12, 33) + SourceIndex(0) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^ @@ -1735,14 +1745,14 @@ sourceFile:../../../first/first_PART1.ts 6 > , 7 > ...rest } = { a: 10, b: 30, yy: 30 } 8 > ; -1->Emitted(33, 5) Source(13, 1) + SourceIndex(0) -2 >Emitted(33, 9) Source(13, 7) + SourceIndex(0) -3 >Emitted(33, 38) Source(13, 48) + SourceIndex(0) -4 >Emitted(33, 40) Source(13, 9) + SourceIndex(0) -5 >Emitted(33, 48) Source(13, 10) + SourceIndex(0) -6 >Emitted(33, 50) Source(13, 12) + SourceIndex(0) -7 >Emitted(33, 74) Source(13, 48) + SourceIndex(0) -8 >Emitted(33, 75) Source(13, 49) + SourceIndex(0) +1->Emitted(35, 5) Source(13, 1) + SourceIndex(0) +2 >Emitted(35, 9) Source(13, 7) + SourceIndex(0) +3 >Emitted(35, 38) Source(13, 48) + SourceIndex(0) +4 >Emitted(35, 40) Source(13, 9) + SourceIndex(0) +5 >Emitted(35, 48) Source(13, 10) + SourceIndex(0) +6 >Emitted(35, 50) Source(13, 12) + SourceIndex(0) +7 >Emitted(35, 74) Source(13, 48) + SourceIndex(0) +8 >Emitted(35, 75) Source(13, 49) + SourceIndex(0) --- >>>} 1 > @@ -1751,8 +1761,8 @@ sourceFile:../../../first/first_PART1.ts 1 > > 2 >} -1 >Emitted(34, 1) Source(14, 1) + SourceIndex(0) -2 >Emitted(34, 2) Source(14, 2) + SourceIndex(0) +1 >Emitted(36, 1) Source(14, 1) + SourceIndex(0) +2 >Emitted(36, 2) Source(14, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -1777,15 +1787,15 @@ sourceFile:../../../first/first_part2.ts 7 > () 8 > ) 9 > ; -1->Emitted(35, 1) Source(1, 1) + SourceIndex(1) -2 >Emitted(35, 8) Source(1, 8) + SourceIndex(1) -3 >Emitted(35, 9) Source(1, 9) + SourceIndex(1) -4 >Emitted(35, 12) Source(1, 12) + SourceIndex(1) -5 >Emitted(35, 13) Source(1, 13) + SourceIndex(1) -6 >Emitted(35, 14) Source(1, 14) + SourceIndex(1) -7 >Emitted(35, 16) Source(1, 16) + SourceIndex(1) -8 >Emitted(35, 17) Source(1, 17) + SourceIndex(1) -9 >Emitted(35, 18) Source(1, 18) + SourceIndex(1) +1->Emitted(37, 1) Source(1, 1) + SourceIndex(1) +2 >Emitted(37, 8) Source(1, 8) + SourceIndex(1) +3 >Emitted(37, 9) Source(1, 9) + SourceIndex(1) +4 >Emitted(37, 12) Source(1, 12) + SourceIndex(1) +5 >Emitted(37, 13) Source(1, 13) + SourceIndex(1) +6 >Emitted(37, 14) Source(1, 14) + SourceIndex(1) +7 >Emitted(37, 16) Source(1, 16) + SourceIndex(1) +8 >Emitted(37, 17) Source(1, 17) + SourceIndex(1) +9 >Emitted(37, 18) Source(1, 18) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -1799,9 +1809,9 @@ sourceFile:../../../first/first_part3.ts 1 > 2 >function 3 > f -1 >Emitted(36, 1) Source(1, 1) + SourceIndex(2) -2 >Emitted(36, 10) Source(1, 10) + SourceIndex(2) -3 >Emitted(36, 11) Source(1, 11) + SourceIndex(2) +1 >Emitted(38, 1) Source(1, 1) + SourceIndex(2) +2 >Emitted(38, 10) Source(1, 10) + SourceIndex(2) +3 >Emitted(38, 11) Source(1, 11) + SourceIndex(2) --- >>> return "JS does hoists"; 1->^^^^ @@ -1813,10 +1823,10 @@ sourceFile:../../../first/first_part3.ts 2 > return 3 > "JS does hoists" 4 > ; -1->Emitted(37, 5) Source(2, 5) + SourceIndex(2) -2 >Emitted(37, 12) Source(2, 12) + SourceIndex(2) -3 >Emitted(37, 28) Source(2, 28) + SourceIndex(2) -4 >Emitted(37, 29) Source(2, 29) + SourceIndex(2) +1->Emitted(39, 5) Source(2, 5) + SourceIndex(2) +2 >Emitted(39, 12) Source(2, 12) + SourceIndex(2) +3 >Emitted(39, 28) Source(2, 28) + SourceIndex(2) +4 >Emitted(39, 29) Source(2, 29) + SourceIndex(2) --- >>>} 1 > @@ -1825,8 +1835,8 @@ sourceFile:../../../first/first_part3.ts 1 > > 2 >} -1 >Emitted(38, 1) Source(3, 1) + SourceIndex(2) -2 >Emitted(38, 2) Source(3, 2) + SourceIndex(2) +1 >Emitted(40, 1) Source(3, 1) + SourceIndex(2) +2 >Emitted(40, 2) Source(3, 2) + SourceIndex(2) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -1852,10 +1862,10 @@ sourceFile:../../../second/second_part1.ts > > f(); > } -1->Emitted(39, 1) Source(5, 1) + SourceIndex(3) -2 >Emitted(39, 5) Source(5, 11) + SourceIndex(3) -3 >Emitted(39, 6) Source(5, 12) + SourceIndex(3) -4 >Emitted(39, 7) Source(11, 2) + SourceIndex(3) +1->Emitted(41, 1) Source(5, 1) + SourceIndex(3) +2 >Emitted(41, 5) Source(5, 11) + SourceIndex(3) +3 >Emitted(41, 6) Source(5, 12) + SourceIndex(3) +4 >Emitted(41, 7) Source(11, 2) + SourceIndex(3) --- >>>(function (N) { 1-> @@ -1865,9 +1875,9 @@ sourceFile:../../../second/second_part1.ts 1-> 2 >namespace 3 > N -1->Emitted(40, 1) Source(5, 1) + SourceIndex(3) -2 >Emitted(40, 12) Source(5, 11) + SourceIndex(3) -3 >Emitted(40, 13) Source(5, 12) + SourceIndex(3) +1->Emitted(42, 1) Source(5, 1) + SourceIndex(3) +2 >Emitted(42, 12) Source(5, 11) + SourceIndex(3) +3 >Emitted(42, 13) Source(5, 12) + SourceIndex(3) --- >>> function f() { 1->^^^^ @@ -1878,9 +1888,9 @@ sourceFile:../../../second/second_part1.ts > 2 > function 3 > f -1->Emitted(41, 5) Source(6, 5) + SourceIndex(3) -2 >Emitted(41, 14) Source(6, 14) + SourceIndex(3) -3 >Emitted(41, 15) Source(6, 15) + SourceIndex(3) +1->Emitted(43, 5) Source(6, 5) + SourceIndex(3) +2 >Emitted(43, 14) Source(6, 14) + SourceIndex(3) +3 >Emitted(43, 15) Source(6, 15) + SourceIndex(3) --- >>> console.log('testing'); 1->^^^^^^^^ @@ -1900,14 +1910,14 @@ sourceFile:../../../second/second_part1.ts 6 > 'testing' 7 > ) 8 > ; -1->Emitted(42, 9) Source(7, 9) + SourceIndex(3) -2 >Emitted(42, 16) Source(7, 16) + SourceIndex(3) -3 >Emitted(42, 17) Source(7, 17) + SourceIndex(3) -4 >Emitted(42, 20) Source(7, 20) + SourceIndex(3) -5 >Emitted(42, 21) Source(7, 21) + SourceIndex(3) -6 >Emitted(42, 30) Source(7, 30) + SourceIndex(3) -7 >Emitted(42, 31) Source(7, 31) + SourceIndex(3) -8 >Emitted(42, 32) Source(7, 32) + SourceIndex(3) +1->Emitted(44, 9) Source(7, 9) + SourceIndex(3) +2 >Emitted(44, 16) Source(7, 16) + SourceIndex(3) +3 >Emitted(44, 17) Source(7, 17) + SourceIndex(3) +4 >Emitted(44, 20) Source(7, 20) + SourceIndex(3) +5 >Emitted(44, 21) Source(7, 21) + SourceIndex(3) +6 >Emitted(44, 30) Source(7, 30) + SourceIndex(3) +7 >Emitted(44, 31) Source(7, 31) + SourceIndex(3) +8 >Emitted(44, 32) Source(7, 32) + SourceIndex(3) --- >>> } 1 >^^^^ @@ -1916,8 +1926,8 @@ sourceFile:../../../second/second_part1.ts 1 > > 2 > } -1 >Emitted(43, 5) Source(8, 5) + SourceIndex(3) -2 >Emitted(43, 6) Source(8, 6) + SourceIndex(3) +1 >Emitted(45, 5) Source(8, 5) + SourceIndex(3) +2 >Emitted(45, 6) Source(8, 6) + SourceIndex(3) --- >>> f(); 1->^^^^ @@ -1931,10 +1941,10 @@ sourceFile:../../../second/second_part1.ts 2 > f 3 > () 4 > ; -1->Emitted(44, 5) Source(10, 5) + SourceIndex(3) -2 >Emitted(44, 6) Source(10, 6) + SourceIndex(3) -3 >Emitted(44, 8) Source(10, 8) + SourceIndex(3) -4 >Emitted(44, 9) Source(10, 9) + SourceIndex(3) +1->Emitted(46, 5) Source(10, 5) + SourceIndex(3) +2 >Emitted(46, 6) Source(10, 6) + SourceIndex(3) +3 >Emitted(46, 8) Source(10, 8) + SourceIndex(3) +4 >Emitted(46, 9) Source(10, 9) + SourceIndex(3) --- >>>})(N || (N = {})); 1-> @@ -1959,13 +1969,13 @@ sourceFile:../../../second/second_part1.ts > > f(); > } -1->Emitted(45, 1) Source(11, 1) + SourceIndex(3) -2 >Emitted(45, 2) Source(11, 2) + SourceIndex(3) -3 >Emitted(45, 4) Source(5, 11) + SourceIndex(3) -4 >Emitted(45, 5) Source(5, 12) + SourceIndex(3) -5 >Emitted(45, 10) Source(5, 11) + SourceIndex(3) -6 >Emitted(45, 11) Source(5, 12) + SourceIndex(3) -7 >Emitted(45, 19) Source(11, 2) + SourceIndex(3) +1->Emitted(47, 1) Source(11, 1) + SourceIndex(3) +2 >Emitted(47, 2) Source(11, 2) + SourceIndex(3) +3 >Emitted(47, 4) Source(5, 11) + SourceIndex(3) +4 >Emitted(47, 5) Source(5, 12) + SourceIndex(3) +5 >Emitted(47, 10) Source(5, 11) + SourceIndex(3) +6 >Emitted(47, 11) Source(5, 12) + SourceIndex(3) +7 >Emitted(47, 19) Source(11, 2) + SourceIndex(3) --- >>>function secondsecond_part1Spread() { 1-> @@ -1976,9 +1986,9 @@ sourceFile:../../../second/second_part1.ts > 2 >function 3 > secondsecond_part1Spread -1->Emitted(46, 1) Source(13, 1) + SourceIndex(3) -2 >Emitted(46, 10) Source(13, 10) + SourceIndex(3) -3 >Emitted(46, 34) Source(13, 34) + SourceIndex(3) +1->Emitted(48, 1) Source(13, 1) + SourceIndex(3) +2 >Emitted(48, 10) Source(13, 10) + SourceIndex(3) +3 >Emitted(48, 34) Source(13, 34) + SourceIndex(3) --- >>> var b = []; 1 >^^^^ @@ -1986,8 +1996,8 @@ sourceFile:../../../second/second_part1.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >( 2 > ...b: number[] -1 >Emitted(47, 5) Source(13, 35) + SourceIndex(3) -2 >Emitted(47, 16) Source(13, 49) + SourceIndex(3) +1 >Emitted(49, 5) Source(13, 35) + SourceIndex(3) +2 >Emitted(49, 16) Source(13, 49) + SourceIndex(3) --- >>> for (var _i = 0; _i < arguments.length; _i++) { 1->^^^^^^^^^ @@ -2002,20 +2012,20 @@ sourceFile:../../../second/second_part1.ts 4 > ...b: number[] 5 > 6 > ...b: number[] -1->Emitted(48, 10) Source(13, 35) + SourceIndex(3) -2 >Emitted(48, 20) Source(13, 49) + SourceIndex(3) -3 >Emitted(48, 22) Source(13, 35) + SourceIndex(3) -4 >Emitted(48, 43) Source(13, 49) + SourceIndex(3) -5 >Emitted(48, 45) Source(13, 35) + SourceIndex(3) -6 >Emitted(48, 49) Source(13, 49) + SourceIndex(3) +1->Emitted(50, 10) Source(13, 35) + SourceIndex(3) +2 >Emitted(50, 20) Source(13, 49) + SourceIndex(3) +3 >Emitted(50, 22) Source(13, 35) + SourceIndex(3) +4 >Emitted(50, 43) Source(13, 49) + SourceIndex(3) +5 >Emitted(50, 45) Source(13, 35) + SourceIndex(3) +6 >Emitted(50, 49) Source(13, 49) + SourceIndex(3) --- >>> b[_i] = arguments[_i]; 1 >^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^ 1 > 2 > ...b: number[] -1 >Emitted(49, 9) Source(13, 35) + SourceIndex(3) -2 >Emitted(49, 31) Source(13, 49) + SourceIndex(3) +1 >Emitted(51, 9) Source(13, 35) + SourceIndex(3) +2 >Emitted(51, 31) Source(13, 49) + SourceIndex(3) --- >>> } >>>} @@ -2024,8 +2034,8 @@ sourceFile:../../../second/second_part1.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >) { 2 >} -1 >Emitted(51, 1) Source(13, 53) + SourceIndex(3) -2 >Emitted(51, 2) Source(13, 54) + SourceIndex(3) +1 >Emitted(53, 1) Source(13, 53) + SourceIndex(3) +2 >Emitted(53, 2) Source(13, 54) + SourceIndex(3) --- >>>secondsecond_part1Spread.apply(void 0, __spread([10, 20, 30])); 1-> @@ -2051,17 +2061,17 @@ sourceFile:../../../second/second_part1.ts 9 > 30 10> ] 11> ); -1->Emitted(52, 1) Source(14, 1) + SourceIndex(3) -2 >Emitted(52, 25) Source(14, 25) + SourceIndex(3) -3 >Emitted(52, 49) Source(14, 29) + SourceIndex(3) -4 >Emitted(52, 50) Source(14, 30) + SourceIndex(3) -5 >Emitted(52, 52) Source(14, 32) + SourceIndex(3) -6 >Emitted(52, 54) Source(14, 34) + SourceIndex(3) -7 >Emitted(52, 56) Source(14, 36) + SourceIndex(3) -8 >Emitted(52, 58) Source(14, 38) + SourceIndex(3) -9 >Emitted(52, 60) Source(14, 40) + SourceIndex(3) -10>Emitted(52, 61) Source(14, 41) + SourceIndex(3) -11>Emitted(52, 64) Source(14, 43) + SourceIndex(3) +1->Emitted(54, 1) Source(14, 1) + SourceIndex(3) +2 >Emitted(54, 25) Source(14, 25) + SourceIndex(3) +3 >Emitted(54, 49) Source(14, 29) + SourceIndex(3) +4 >Emitted(54, 50) Source(14, 30) + SourceIndex(3) +5 >Emitted(54, 52) Source(14, 32) + SourceIndex(3) +6 >Emitted(54, 54) Source(14, 34) + SourceIndex(3) +7 >Emitted(54, 56) Source(14, 36) + SourceIndex(3) +8 >Emitted(54, 58) Source(14, 38) + SourceIndex(3) +9 >Emitted(54, 60) Source(14, 40) + SourceIndex(3) +10>Emitted(54, 61) Source(14, 41) + SourceIndex(3) +11>Emitted(54, 64) Source(14, 43) + SourceIndex(3) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -2071,13 +2081,13 @@ sourceFile:../../../second/second_part2.ts 1 > 2 >^^^^^^^^^^^^^^^^^^^-> 1 > -1 >Emitted(53, 1) Source(1, 1) + SourceIndex(4) +1 >Emitted(55, 1) Source(1, 1) + SourceIndex(4) --- >>> function C() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(54, 5) Source(1, 1) + SourceIndex(4) +1->Emitted(56, 5) Source(1, 1) + SourceIndex(4) --- >>> } 1->^^^^ @@ -2089,8 +2099,8 @@ sourceFile:../../../second/second_part2.ts > } > 2 > } -1->Emitted(55, 5) Source(5, 1) + SourceIndex(4) -2 >Emitted(55, 6) Source(5, 2) + SourceIndex(4) +1->Emitted(57, 5) Source(5, 1) + SourceIndex(4) +2 >Emitted(57, 6) Source(5, 2) + SourceIndex(4) --- >>> C.prototype.doSomething = function () { 1->^^^^ @@ -2100,9 +2110,9 @@ sourceFile:../../../second/second_part2.ts 1-> 2 > doSomething 3 > -1->Emitted(56, 5) Source(2, 5) + SourceIndex(4) -2 >Emitted(56, 28) Source(2, 16) + SourceIndex(4) -3 >Emitted(56, 31) Source(2, 5) + SourceIndex(4) +1->Emitted(58, 5) Source(2, 5) + SourceIndex(4) +2 >Emitted(58, 28) Source(2, 16) + SourceIndex(4) +3 >Emitted(58, 31) Source(2, 5) + SourceIndex(4) --- >>> console.log("something got done"); 1->^^^^^^^^ @@ -2122,14 +2132,14 @@ sourceFile:../../../second/second_part2.ts 6 > "something got done" 7 > ) 8 > ; -1->Emitted(57, 9) Source(3, 9) + SourceIndex(4) -2 >Emitted(57, 16) Source(3, 16) + SourceIndex(4) -3 >Emitted(57, 17) Source(3, 17) + SourceIndex(4) -4 >Emitted(57, 20) Source(3, 20) + SourceIndex(4) -5 >Emitted(57, 21) Source(3, 21) + SourceIndex(4) -6 >Emitted(57, 41) Source(3, 41) + SourceIndex(4) -7 >Emitted(57, 42) Source(3, 42) + SourceIndex(4) -8 >Emitted(57, 43) Source(3, 43) + SourceIndex(4) +1->Emitted(59, 9) Source(3, 9) + SourceIndex(4) +2 >Emitted(59, 16) Source(3, 16) + SourceIndex(4) +3 >Emitted(59, 17) Source(3, 17) + SourceIndex(4) +4 >Emitted(59, 20) Source(3, 20) + SourceIndex(4) +5 >Emitted(59, 21) Source(3, 21) + SourceIndex(4) +6 >Emitted(59, 41) Source(3, 41) + SourceIndex(4) +7 >Emitted(59, 42) Source(3, 42) + SourceIndex(4) +8 >Emitted(59, 43) Source(3, 43) + SourceIndex(4) --- >>> }; 1 >^^^^ @@ -2138,8 +2148,8 @@ sourceFile:../../../second/second_part2.ts 1 > > 2 > } -1 >Emitted(58, 5) Source(4, 5) + SourceIndex(4) -2 >Emitted(58, 6) Source(4, 6) + SourceIndex(4) +1 >Emitted(60, 5) Source(4, 5) + SourceIndex(4) +2 >Emitted(60, 6) Source(4, 6) + SourceIndex(4) --- >>> return C; 1->^^^^ @@ -2147,8 +2157,8 @@ sourceFile:../../../second/second_part2.ts 1-> > 2 > } -1->Emitted(59, 5) Source(5, 1) + SourceIndex(4) -2 >Emitted(59, 13) Source(5, 2) + SourceIndex(4) +1->Emitted(61, 5) Source(5, 1) + SourceIndex(4) +2 >Emitted(61, 13) Source(5, 2) + SourceIndex(4) --- >>>}()); 1 > @@ -2164,10 +2174,10 @@ sourceFile:../../../second/second_part2.ts > console.log("something got done"); > } > } -1 >Emitted(60, 1) Source(5, 1) + SourceIndex(4) -2 >Emitted(60, 2) Source(5, 2) + SourceIndex(4) -3 >Emitted(60, 2) Source(1, 1) + SourceIndex(4) -4 >Emitted(60, 6) Source(5, 2) + SourceIndex(4) +1 >Emitted(62, 1) Source(5, 1) + SourceIndex(4) +2 >Emitted(62, 2) Source(5, 2) + SourceIndex(4) +3 >Emitted(62, 2) Source(1, 1) + SourceIndex(4) +4 >Emitted(62, 6) Source(5, 2) + SourceIndex(4) --- ------------------------------------------------------------------- emittedFile:/src/third/thirdjs/output/third-output.js @@ -2191,14 +2201,14 @@ sourceFile:../../third_part1.ts 6 > C 7 > () 8 > ; -1->Emitted(61, 1) Source(1, 1) + SourceIndex(5) -2 >Emitted(61, 5) Source(1, 5) + SourceIndex(5) -3 >Emitted(61, 6) Source(1, 6) + SourceIndex(5) -4 >Emitted(61, 9) Source(1, 9) + SourceIndex(5) -5 >Emitted(61, 13) Source(1, 13) + SourceIndex(5) -6 >Emitted(61, 14) Source(1, 14) + SourceIndex(5) -7 >Emitted(61, 16) Source(1, 16) + SourceIndex(5) -8 >Emitted(61, 17) Source(1, 17) + SourceIndex(5) +1->Emitted(63, 1) Source(1, 1) + SourceIndex(5) +2 >Emitted(63, 5) Source(1, 5) + SourceIndex(5) +3 >Emitted(63, 6) Source(1, 6) + SourceIndex(5) +4 >Emitted(63, 9) Source(1, 9) + SourceIndex(5) +5 >Emitted(63, 13) Source(1, 13) + SourceIndex(5) +6 >Emitted(63, 14) Source(1, 14) + SourceIndex(5) +7 >Emitted(63, 16) Source(1, 16) + SourceIndex(5) +8 >Emitted(63, 17) Source(1, 17) + SourceIndex(5) --- >>>c.doSomething(); 1-> @@ -2215,12 +2225,12 @@ sourceFile:../../third_part1.ts 4 > doSomething 5 > () 6 > ; -1->Emitted(62, 1) Source(2, 1) + SourceIndex(5) -2 >Emitted(62, 2) Source(2, 2) + SourceIndex(5) -3 >Emitted(62, 3) Source(2, 3) + SourceIndex(5) -4 >Emitted(62, 14) Source(2, 14) + SourceIndex(5) -5 >Emitted(62, 16) Source(2, 16) + SourceIndex(5) -6 >Emitted(62, 17) Source(2, 17) + SourceIndex(5) +1->Emitted(64, 1) Source(2, 1) + SourceIndex(5) +2 >Emitted(64, 2) Source(2, 2) + SourceIndex(5) +3 >Emitted(64, 3) Source(2, 3) + SourceIndex(5) +4 >Emitted(64, 14) Source(2, 14) + SourceIndex(5) +5 >Emitted(64, 16) Source(2, 16) + SourceIndex(5) +6 >Emitted(64, 17) Source(2, 17) + SourceIndex(5) --- >>>function forthirdthird_part1Rest() { 1-> @@ -2231,9 +2241,9 @@ sourceFile:../../third_part1.ts > 2 >function 3 > forthirdthird_part1Rest -1->Emitted(63, 1) Source(3, 1) + SourceIndex(5) -2 >Emitted(63, 10) Source(3, 10) + SourceIndex(5) -3 >Emitted(63, 33) Source(3, 33) + SourceIndex(5) +1->Emitted(65, 1) Source(3, 1) + SourceIndex(5) +2 >Emitted(65, 10) Source(3, 10) + SourceIndex(5) +3 >Emitted(65, 33) Source(3, 33) + SourceIndex(5) --- >>> var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); 1->^^^^ @@ -2253,14 +2263,14 @@ sourceFile:../../third_part1.ts 6 > , 7 > ...rest } = { a: 10, b: 30, yy: 30 } 8 > ; -1->Emitted(64, 5) Source(4, 1) + SourceIndex(5) -2 >Emitted(64, 9) Source(4, 7) + SourceIndex(5) -3 >Emitted(64, 38) Source(4, 48) + SourceIndex(5) -4 >Emitted(64, 40) Source(4, 9) + SourceIndex(5) -5 >Emitted(64, 48) Source(4, 10) + SourceIndex(5) -6 >Emitted(64, 50) Source(4, 12) + SourceIndex(5) -7 >Emitted(64, 74) Source(4, 48) + SourceIndex(5) -8 >Emitted(64, 75) Source(4, 49) + SourceIndex(5) +1->Emitted(66, 5) Source(4, 1) + SourceIndex(5) +2 >Emitted(66, 9) Source(4, 7) + SourceIndex(5) +3 >Emitted(66, 38) Source(4, 48) + SourceIndex(5) +4 >Emitted(66, 40) Source(4, 9) + SourceIndex(5) +5 >Emitted(66, 48) Source(4, 10) + SourceIndex(5) +6 >Emitted(66, 50) Source(4, 12) + SourceIndex(5) +7 >Emitted(66, 74) Source(4, 48) + SourceIndex(5) +8 >Emitted(66, 75) Source(4, 49) + SourceIndex(5) --- >>>} 1 > @@ -2269,8 +2279,8 @@ sourceFile:../../third_part1.ts 1 > > 2 >} -1 >Emitted(65, 1) Source(5, 1) + SourceIndex(5) -2 >Emitted(65, 2) Source(5, 2) + SourceIndex(5) +1 >Emitted(67, 1) Source(5, 1) + SourceIndex(5) +2 >Emitted(67, 2) Source(5, 2) + SourceIndex(5) --- >>>//# sourceMappingURL=third-output.js.map @@ -2285,51 +2295,51 @@ sourceFile:../../third_part1.ts "sections": [ { "pos": 0, - "end": 415, + "end": 492, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 417, - "end": 921, + "pos": 494, + "end": 998, "kind": "emitHelpers", "data": "typescript:read" }, { - "pos": 923, - "end": 1093, + "pos": 1000, + "end": 1170, "kind": "emitHelpers", "data": "typescript:spread" }, { - "pos": 1095, - "end": 1322, + "pos": 1172, + "end": 1399, "kind": "prepend", "data": "/src/first/bin/first-output.js", "texts": [ { - "pos": 1095, - "end": 1322, + "pos": 1172, + "end": 1399, "kind": "text" } ] }, { - "pos": 1322, - "end": 1823, + "pos": 1399, + "end": 1900, "kind": "prepend", "data": "/src/2/second-output.js", "texts": [ { - "pos": 1322, - "end": 1823, + "pos": 1399, + "end": 1900, "kind": "text" } ] }, { - "pos": 1823, - "end": 1976, + "pos": 1900, + "end": 2053, "kind": "text" } ], @@ -2382,18 +2392,20 @@ sourceFile:../../third_part1.ts ====================================================================== File:: /src/third/thirdjs/output/third-output.js ---------------------------------------------------------------------- -emitHelpers: (0-415):: typescript:rest +emitHelpers: (0-492):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + t[p[i]] = s[p[i]]; + } return t; }; ---------------------------------------------------------------------- -emitHelpers: (417-921):: typescript:read +emitHelpers: (494-998):: typescript:read var __read = (this && this.__read) || function (o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; if (!m) return o; @@ -2411,15 +2423,15 @@ var __read = (this && this.__read) || function (o, n) { return ar; }; ---------------------------------------------------------------------- -emitHelpers: (923-1093):: typescript:spread +emitHelpers: (1000-1170):: typescript:spread var __spread = (this && this.__spread) || function () { for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); return ar; }; ---------------------------------------------------------------------- -prepend: (1095-1322):: /src/first/bin/first-output.js texts:: 1 +prepend: (1172-1399):: /src/first/bin/first-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (1095-1322) +text: (1172-1399) var s = "Hello, world"; console.log(s); function forfirstfirst_PART1Rest() { @@ -2431,9 +2443,9 @@ function f() { } ---------------------------------------------------------------------- -prepend: (1322-1823):: /src/2/second-output.js texts:: 1 +prepend: (1399-1900):: /src/2/second-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (1322-1823) +text: (1399-1900) var N; (function (N) { function f() { @@ -2458,7 +2470,7 @@ var C = (function () { }()); ---------------------------------------------------------------------- -text: (1823-1976) +text: (1900-2053) var c = new C(); c.doSomething(); function forthirdthird_part1Rest() { From 0da305bee5978319b53b14d9d6e882bbe3c18b67 Mon Sep 17 00:00:00 2001 From: Nicholas Yang Date: Fri, 26 Apr 2019 02:58:57 -0400 Subject: [PATCH 16/45] Adjusted baseline for tests. --- src/compiler/transformers/destructuring.ts | 2 +- .../baselines/reference/asyncFunctionTempVariableScoping.js | 2 +- .../destructuringAssignmentWithStrictNullChecks.js | 2 +- .../destructuringInitializerContextualTypeFromContext.js | 2 +- .../destructuringObjectBindingPatternAndAssignment5.js | 2 +- ...orLoopWithDestructuringDoesNotElideFollowingStatement.js | 2 +- tests/baselines/reference/genericIsNeverEmptyObject.js | 2 +- tests/baselines/reference/genericObjectRest.js | 2 +- tests/baselines/reference/literalTypeWidening.js | 2 +- tests/baselines/reference/mappedTypeConstraints.js | 2 +- tests/baselines/reference/nonPrimitiveAccessProperty.js | 2 +- tests/baselines/reference/objectRest.js | 2 +- tests/baselines/reference/objectRestAssignment.js | 2 +- tests/baselines/reference/objectRestForOf.js | 2 +- tests/baselines/reference/objectRestNegative.js | 2 +- tests/baselines/reference/objectRestParameter.js | 2 +- tests/baselines/reference/objectRestParameterES5.js | 2 +- tests/baselines/reference/objectRestReadonly.js | 2 +- tests/baselines/reference/restPropertyWithBindingPattern.js | 6 ++++-- .../baselines/reference/trailingCommasInBindingPatterns.js | 2 +- tests/baselines/reference/unknownType1.js | 2 +- 21 files changed, 24 insertions(+), 22 deletions(-) diff --git a/src/compiler/transformers/destructuring.ts b/src/compiler/transformers/destructuring.ts index 404fde2bfec..8946db3f60b 100644 --- a/src/compiler/transformers/destructuring.ts +++ b/src/compiler/transformers/destructuring.ts @@ -522,7 +522,7 @@ namespace ts { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; diff --git a/tests/baselines/reference/asyncFunctionTempVariableScoping.js b/tests/baselines/reference/asyncFunctionTempVariableScoping.js index 51a589e8526..0e258b81284 100644 --- a/tests/baselines/reference/asyncFunctionTempVariableScoping.js +++ b/tests/baselines/reference/asyncFunctionTempVariableScoping.js @@ -46,7 +46,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; diff --git a/tests/baselines/reference/destructuringAssignmentWithStrictNullChecks.js b/tests/baselines/reference/destructuringAssignmentWithStrictNullChecks.js index 3c21233ea8e..78f0941415f 100644 --- a/tests/baselines/reference/destructuringAssignmentWithStrictNullChecks.js +++ b/tests/baselines/reference/destructuringAssignmentWithStrictNullChecks.js @@ -10,7 +10,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; diff --git a/tests/baselines/reference/destructuringInitializerContextualTypeFromContext.js b/tests/baselines/reference/destructuringInitializerContextualTypeFromContext.js index f297eb31dfc..ad434acada1 100644 --- a/tests/baselines/reference/destructuringInitializerContextualTypeFromContext.js +++ b/tests/baselines/reference/destructuringInitializerContextualTypeFromContext.js @@ -44,7 +44,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; diff --git a/tests/baselines/reference/destructuringObjectBindingPatternAndAssignment5.js b/tests/baselines/reference/destructuringObjectBindingPatternAndAssignment5.js index e1b13dc239a..3ad27f3bcf0 100644 --- a/tests/baselines/reference/destructuringObjectBindingPatternAndAssignment5.js +++ b/tests/baselines/reference/destructuringObjectBindingPatternAndAssignment5.js @@ -13,7 +13,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; diff --git a/tests/baselines/reference/forLoopWithDestructuringDoesNotElideFollowingStatement.js b/tests/baselines/reference/forLoopWithDestructuringDoesNotElideFollowingStatement.js index 5ba3c5e545d..10e30294bfc 100644 --- a/tests/baselines/reference/forLoopWithDestructuringDoesNotElideFollowingStatement.js +++ b/tests/baselines/reference/forLoopWithDestructuringDoesNotElideFollowingStatement.js @@ -10,7 +10,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; diff --git a/tests/baselines/reference/genericIsNeverEmptyObject.js b/tests/baselines/reference/genericIsNeverEmptyObject.js index ef53c353007..692f34bfcc4 100644 --- a/tests/baselines/reference/genericIsNeverEmptyObject.js +++ b/tests/baselines/reference/genericIsNeverEmptyObject.js @@ -30,7 +30,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; diff --git a/tests/baselines/reference/genericObjectRest.js b/tests/baselines/reference/genericObjectRest.js index d7b395e7d01..33815e1bb98 100644 --- a/tests/baselines/reference/genericObjectRest.js +++ b/tests/baselines/reference/genericObjectRest.js @@ -36,7 +36,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; diff --git a/tests/baselines/reference/literalTypeWidening.js b/tests/baselines/reference/literalTypeWidening.js index 42dbacdd4ca..ff1f41aa7eb 100644 --- a/tests/baselines/reference/literalTypeWidening.js +++ b/tests/baselines/reference/literalTypeWidening.js @@ -157,7 +157,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; diff --git a/tests/baselines/reference/mappedTypeConstraints.js b/tests/baselines/reference/mappedTypeConstraints.js index 7a969a33269..3f701cee86e 100644 --- a/tests/baselines/reference/mappedTypeConstraints.js +++ b/tests/baselines/reference/mappedTypeConstraints.js @@ -43,7 +43,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; diff --git a/tests/baselines/reference/nonPrimitiveAccessProperty.js b/tests/baselines/reference/nonPrimitiveAccessProperty.js index 834149360b0..fb678ef3218 100644 --- a/tests/baselines/reference/nonPrimitiveAccessProperty.js +++ b/tests/baselines/reference/nonPrimitiveAccessProperty.js @@ -14,7 +14,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; diff --git a/tests/baselines/reference/objectRest.js b/tests/baselines/reference/objectRest.js index 04fe41d7ed3..12abea0e339 100644 --- a/tests/baselines/reference/objectRest.js +++ b/tests/baselines/reference/objectRest.js @@ -54,7 +54,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; diff --git a/tests/baselines/reference/objectRestAssignment.js b/tests/baselines/reference/objectRestAssignment.js index 88fa2d18989..0d4eb6ffb63 100644 --- a/tests/baselines/reference/objectRestAssignment.js +++ b/tests/baselines/reference/objectRestAssignment.js @@ -21,7 +21,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; diff --git a/tests/baselines/reference/objectRestForOf.js b/tests/baselines/reference/objectRestForOf.js index a995281b72e..f946e42444c 100644 --- a/tests/baselines/reference/objectRestForOf.js +++ b/tests/baselines/reference/objectRestForOf.js @@ -21,7 +21,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; diff --git a/tests/baselines/reference/objectRestNegative.js b/tests/baselines/reference/objectRestNegative.js index fad2efd4eaa..46172e25bbe 100644 --- a/tests/baselines/reference/objectRestNegative.js +++ b/tests/baselines/reference/objectRestNegative.js @@ -25,7 +25,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; diff --git a/tests/baselines/reference/objectRestParameter.js b/tests/baselines/reference/objectRestParameter.js index 52740d916b6..4f90b723a0e 100644 --- a/tests/baselines/reference/objectRestParameter.js +++ b/tests/baselines/reference/objectRestParameter.js @@ -28,7 +28,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; diff --git a/tests/baselines/reference/objectRestParameterES5.js b/tests/baselines/reference/objectRestParameterES5.js index bdcf24f5032..1d7f518b54a 100644 --- a/tests/baselines/reference/objectRestParameterES5.js +++ b/tests/baselines/reference/objectRestParameterES5.js @@ -28,7 +28,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; diff --git a/tests/baselines/reference/objectRestReadonly.js b/tests/baselines/reference/objectRestReadonly.js index 9bc561fa5b5..b00846861d9 100644 --- a/tests/baselines/reference/objectRestReadonly.js +++ b/tests/baselines/reference/objectRestReadonly.js @@ -24,7 +24,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; diff --git a/tests/baselines/reference/restPropertyWithBindingPattern.js b/tests/baselines/reference/restPropertyWithBindingPattern.js index c4a4795d682..9b260f5cefd 100644 --- a/tests/baselines/reference/restPropertyWithBindingPattern.js +++ b/tests/baselines/reference/restPropertyWithBindingPattern.js @@ -10,8 +10,10 @@ var __rest = (this && this.__rest) || function (s, e) { for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } return t; }; var _a, _b; diff --git a/tests/baselines/reference/trailingCommasInBindingPatterns.js b/tests/baselines/reference/trailingCommasInBindingPatterns.js index 4b828873d4d..e25c1cbbdb5 100644 --- a/tests/baselines/reference/trailingCommasInBindingPatterns.js +++ b/tests/baselines/reference/trailingCommasInBindingPatterns.js @@ -20,7 +20,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; diff --git a/tests/baselines/reference/unknownType1.js b/tests/baselines/reference/unknownType1.js index febf595aa5b..a5183fd5029 100644 --- a/tests/baselines/reference/unknownType1.js +++ b/tests/baselines/reference/unknownType1.js @@ -202,7 +202,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; From 61e100965ec31720ce3910e1974053a9e882c39f Mon Sep 17 00:00:00 2001 From: Nicholas Yang Date: Tue, 30 Apr 2019 00:34:47 -0400 Subject: [PATCH 17/45] More test baseline adjustments. --- ...dingPattern_restElementWithPropertyName.js | 2 +- ...meterInitializerBeforeDestructuringEmit.js | 2 +- tests/baselines/reference/restIntersection.js | 2 +- .../reference/restInvalidArgumentType.js | 2 +- .../restParameterWithBindingPattern3.js | 2 +- tests/baselines/reference/restUnion.js | 2 +- tests/baselines/reference/restUnion2.js | 2 +- tests/baselines/reference/restUnion3.js | 2 +- .../multiple-emitHelpers-in-all-projects.js | 44 +++---- .../multiple-emitHelpers-in-all-projects.js | 28 ++--- .../multiple-emitHelpers-in-all-projects.js | 44 +++---- .../emitHelpers-in-all-projects.js | 56 ++++----- .../emitHelpers-in-all-projects.js | 56 ++++----- ...tHelpers-in-only-one-dependency-project.js | 40 +++---- .../multiple-emitHelpers-in-all-projects.js | 80 ++++++------- ...tiple-emitHelpers-in-different-projects.js | 68 +++++------ .../emitHelpers-in-all-projects.js | 40 +++---- ...tHelpers-in-only-one-dependency-project.js | 56 ++++----- .../multiple-emitHelpers-in-all-projects.js | 40 +++---- ...tiple-emitHelpers-in-different-projects.js | 40 +++---- .../emitHelpers-in-all-projects.js | 72 ++++++------ ...tHelpers-in-only-one-dependency-project.js | 56 ++++----- .../multiple-emitHelpers-in-all-projects.js | 108 +++++++++--------- ...tiple-emitHelpers-in-different-projects.js | 68 +++++------ .../reference/unusedLocalsAndObjectSpread.js | 2 +- .../reference/unusedLocalsAndObjectSpread2.js | 2 +- 26 files changed, 458 insertions(+), 458 deletions(-) diff --git a/tests/baselines/reference/objectBindingPattern_restElementWithPropertyName.js b/tests/baselines/reference/objectBindingPattern_restElementWithPropertyName.js index fa92c7409c0..580dc2b606f 100644 --- a/tests/baselines/reference/objectBindingPattern_restElementWithPropertyName.js +++ b/tests/baselines/reference/objectBindingPattern_restElementWithPropertyName.js @@ -9,7 +9,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; diff --git a/tests/baselines/reference/parameterInitializerBeforeDestructuringEmit.js b/tests/baselines/reference/parameterInitializerBeforeDestructuringEmit.js index ffee9029d30..294b76e1335 100644 --- a/tests/baselines/reference/parameterInitializerBeforeDestructuringEmit.js +++ b/tests/baselines/reference/parameterInitializerBeforeDestructuringEmit.js @@ -27,7 +27,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; diff --git a/tests/baselines/reference/restIntersection.js b/tests/baselines/reference/restIntersection.js index b225b132880..8fc9be83d14 100644 --- a/tests/baselines/reference/restIntersection.js +++ b/tests/baselines/reference/restIntersection.js @@ -12,7 +12,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; diff --git a/tests/baselines/reference/restInvalidArgumentType.js b/tests/baselines/reference/restInvalidArgumentType.js index a591da4a929..b28c69226f0 100644 --- a/tests/baselines/reference/restInvalidArgumentType.js +++ b/tests/baselines/reference/restInvalidArgumentType.js @@ -62,7 +62,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; diff --git a/tests/baselines/reference/restParameterWithBindingPattern3.js b/tests/baselines/reference/restParameterWithBindingPattern3.js index 87652a5302c..9f52594f7cb 100644 --- a/tests/baselines/reference/restParameterWithBindingPattern3.js +++ b/tests/baselines/reference/restParameterWithBindingPattern3.js @@ -16,7 +16,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; diff --git a/tests/baselines/reference/restUnion.js b/tests/baselines/reference/restUnion.js index 80d52281173..14f0c65acbc 100644 --- a/tests/baselines/reference/restUnion.js +++ b/tests/baselines/reference/restUnion.js @@ -22,7 +22,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; diff --git a/tests/baselines/reference/restUnion2.js b/tests/baselines/reference/restUnion2.js index 21ae81b3381..4506e85b220 100644 --- a/tests/baselines/reference/restUnion2.js +++ b/tests/baselines/reference/restUnion2.js @@ -16,7 +16,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; diff --git a/tests/baselines/reference/restUnion3.js b/tests/baselines/reference/restUnion3.js index bbb60ae1dae..69b1e74af81 100644 --- a/tests/baselines/reference/restUnion3.js +++ b/tests/baselines/reference/restUnion3.js @@ -16,7 +16,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; diff --git a/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-declaration-doesnt-change/multiple-emitHelpers-in-all-projects.js b/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-declaration-doesnt-change/multiple-emitHelpers-in-all-projects.js index 34285f33593..e71e158b6bc 100644 --- a/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-declaration-doesnt-change/multiple-emitHelpers-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-declaration-doesnt-change/multiple-emitHelpers-in-all-projects.js @@ -25,7 +25,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; @@ -111,7 +111,7 @@ sourceFile:../lib/file0.ts >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") >>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { ->>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) >>> t[p[i]] = s[p[i]]; >>> } >>> return t; @@ -614,26 +614,26 @@ sourceFile:file4.ts }, { "pos": 678, - "end": 1170, + "end": 1178, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 1172, - "end": 1927, + "pos": 1180, + "end": 1935, "kind": "prepend", "data": "/src/lib/module.js", "texts": [ { - "pos": 1172, - "end": 1927, + "pos": 1180, + "end": 1935, "kind": "text" } ] }, { - "pos": 1927, - "end": 2445, + "pos": 1935, + "end": 2453, "kind": "text" } ], @@ -699,22 +699,22 @@ var __spread = (this && this.__spread) || function () { return ar; }; ---------------------------------------------------------------------- -emitHelpers: (678-1170):: typescript:rest +emitHelpers: (678-1178):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; ---------------------------------------------------------------------- -prepend: (1172-1927):: /src/lib/module.js texts:: 1 +prepend: (1180-1935):: /src/lib/module.js texts:: 1 >>-------------------------------------------------------------------- -text: (1172-1927) +text: (1180-1935) var myGlob = 20; function libfile0Spread() { var b = []; @@ -740,7 +740,7 @@ define("file2", ["require", "exports"], function (require, exports) { var globalConst = 10; ---------------------------------------------------------------------- -text: (1927-2445) +text: (1935-2453) define("file3", ["require", "exports"], function (require, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -817,7 +817,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; @@ -887,7 +887,7 @@ sourceFile:file0.ts >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") >>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { ->>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) >>> t[p[i]] = s[p[i]]; >>> } >>> return t; @@ -1194,13 +1194,13 @@ sourceFile:global.ts }, { "pos": 678, - "end": 1170, + "end": 1178, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 1172, - "end": 1927, + "pos": 1180, + "end": 1935, "kind": "text" } ], @@ -1253,20 +1253,20 @@ var __spread = (this && this.__spread) || function () { return ar; }; ---------------------------------------------------------------------- -emitHelpers: (678-1170):: typescript:rest +emitHelpers: (678-1178):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; ---------------------------------------------------------------------- -text: (1172-1927) +text: (1180-1935) var myGlob = 20; function libfile0Spread() { var b = []; diff --git a/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-headers-change-without-dts-changes/multiple-emitHelpers-in-all-projects.js b/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-headers-change-without-dts-changes/multiple-emitHelpers-in-all-projects.js index 6fe32f3b11e..dd4ab0b77fd 100644 --- a/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-headers-change-without-dts-changes/multiple-emitHelpers-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-headers-change-without-dts-changes/multiple-emitHelpers-in-all-projects.js @@ -25,7 +25,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; @@ -108,7 +108,7 @@ sourceFile:../lib/file0.ts >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") >>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { ->>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) >>> t[p[i]] = s[p[i]]; >>> } >>> return t; @@ -553,26 +553,26 @@ sourceFile:file4.ts }, { "pos": 678, - "end": 1170, + "end": 1178, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 1172, - "end": 1813, + "pos": 1180, + "end": 1821, "kind": "prepend", "data": "/src/lib/module.js", "texts": [ { - "pos": 1172, - "end": 1813, + "pos": 1180, + "end": 1821, "kind": "text" } ] }, { - "pos": 1813, - "end": 2331, + "pos": 1821, + "end": 2339, "kind": "text" } ], @@ -638,22 +638,22 @@ var __spread = (this && this.__spread) || function () { return ar; }; ---------------------------------------------------------------------- -emitHelpers: (678-1170):: typescript:rest +emitHelpers: (678-1178):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; ---------------------------------------------------------------------- -prepend: (1172-1813):: /src/lib/module.js texts:: 1 +prepend: (1180-1821):: /src/lib/module.js texts:: 1 >>-------------------------------------------------------------------- -text: (1172-1813) +text: (1180-1821) var myGlob = 20; function libfile0Spread() { var b = []; @@ -676,7 +676,7 @@ define("file2", ["require", "exports"], function (require, exports) { var globalConst = 10; ---------------------------------------------------------------------- -text: (1813-2331) +text: (1821-2339) define("file3", ["require", "exports"], function (require, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/tsbuild/amdModulesWithOut/initial-Build/multiple-emitHelpers-in-all-projects.js b/tests/baselines/reference/tsbuild/amdModulesWithOut/initial-Build/multiple-emitHelpers-in-all-projects.js index d8a20bac2e8..52b1fff8303 100644 --- a/tests/baselines/reference/tsbuild/amdModulesWithOut/initial-Build/multiple-emitHelpers-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/amdModulesWithOut/initial-Build/multiple-emitHelpers-in-all-projects.js @@ -286,7 +286,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; @@ -371,7 +371,7 @@ sourceFile:../lib/file0.ts >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") >>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { ->>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) >>> t[p[i]] = s[p[i]]; >>> } >>> return t; @@ -847,26 +847,26 @@ sourceFile:file4.ts }, { "pos": 678, - "end": 1170, + "end": 1178, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 1172, - "end": 1898, + "pos": 1180, + "end": 1906, "kind": "prepend", "data": "/src/lib/module.js", "texts": [ { - "pos": 1172, - "end": 1898, + "pos": 1180, + "end": 1906, "kind": "text" } ] }, { - "pos": 1898, - "end": 2416, + "pos": 1906, + "end": 2424, "kind": "text" } ], @@ -932,22 +932,22 @@ var __spread = (this && this.__spread) || function () { return ar; }; ---------------------------------------------------------------------- -emitHelpers: (678-1170):: typescript:rest +emitHelpers: (678-1178):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; ---------------------------------------------------------------------- -prepend: (1172-1898):: /src/lib/module.js texts:: 1 +prepend: (1180-1906):: /src/lib/module.js texts:: 1 >>-------------------------------------------------------------------- -text: (1172-1898) +text: (1180-1906) var myGlob = 20; function libfile0Spread() { var b = []; @@ -972,7 +972,7 @@ define("file2", ["require", "exports"], function (require, exports) { var globalConst = 10; ---------------------------------------------------------------------- -text: (1898-2416) +text: (1906-2424) define("file3", ["require", "exports"], function (require, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -1234,7 +1234,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; @@ -1303,7 +1303,7 @@ sourceFile:file0.ts >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") >>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { ->>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) >>> t[p[i]] = s[p[i]]; >>> } >>> return t; @@ -1583,13 +1583,13 @@ sourceFile:global.ts }, { "pos": 678, - "end": 1170, + "end": 1178, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 1172, - "end": 1898, + "pos": 1180, + "end": 1906, "kind": "text" } ], @@ -1642,20 +1642,20 @@ var __spread = (this && this.__spread) || function () { return ar; }; ---------------------------------------------------------------------- -emitHelpers: (678-1170):: typescript:rest +emitHelpers: (678-1178):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; ---------------------------------------------------------------------- -text: (1172-1898) +text: (1180-1906) var myGlob = 20; function libfile0Spread() { var b = []; diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/emitHelpers-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/emitHelpers-in-all-projects.js index fd3ea4a1390..6271da6473a 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/emitHelpers-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/emitHelpers-in-all-projects.js @@ -169,7 +169,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; @@ -205,7 +205,7 @@ sourceFile:../first_PART1.ts >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") >>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { ->>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) >>> t[p[i]] = s[p[i]]; >>> } >>> return t; @@ -406,13 +406,13 @@ sourceFile:../first_part3.ts "sections": [ { "pos": 0, - "end": 492, + "end": 500, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 494, - "end": 720, + "pos": 502, + "end": 728, "kind": "text" } ], @@ -439,20 +439,20 @@ sourceFile:../first_part3.ts ====================================================================== File:: /src/first/bin/first-output.js ---------------------------------------------------------------------- -emitHelpers: (0-492):: typescript:rest +emitHelpers: (0-500):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; ---------------------------------------------------------------------- -text: (494-720) +text: (502-728) var s = "Hola, world"; console.log(s); function forfirstfirst_PART1Rest() { @@ -824,7 +824,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; @@ -883,7 +883,7 @@ sourceFile:../../../first/first_PART1.ts >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") >>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { ->>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) >>> t[p[i]] = s[p[i]]; >>> } >>> return t; @@ -1480,39 +1480,39 @@ sourceFile:../../third_part1.ts "sections": [ { "pos": 0, - "end": 492, + "end": 500, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 494, - "end": 720, + "pos": 502, + "end": 728, "kind": "prepend", "data": "/src/first/bin/first-output.js", "texts": [ { - "pos": 494, - "end": 720, + "pos": 502, + "end": 728, "kind": "text" } ] }, { - "pos": 720, - "end": 1124, + "pos": 728, + "end": 1132, "kind": "prepend", "data": "/src/2/second-output.js", "texts": [ { - "pos": 720, - "end": 1124, + "pos": 728, + "end": 1132, "kind": "text" } ] }, { - "pos": 1124, - "end": 1277, + "pos": 1132, + "end": 1285, "kind": "text" } ], @@ -1565,22 +1565,22 @@ sourceFile:../../third_part1.ts ====================================================================== File:: /src/third/thirdjs/output/third-output.js ---------------------------------------------------------------------- -emitHelpers: (0-492):: typescript:rest +emitHelpers: (0-500):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; ---------------------------------------------------------------------- -prepend: (494-720):: /src/first/bin/first-output.js texts:: 1 +prepend: (502-728):: /src/first/bin/first-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (494-720) +text: (502-728) var s = "Hola, world"; console.log(s); function forfirstfirst_PART1Rest() { @@ -1592,9 +1592,9 @@ function f() { } ---------------------------------------------------------------------- -prepend: (720-1124):: /src/2/second-output.js texts:: 1 +prepend: (728-1132):: /src/2/second-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (720-1124) +text: (728-1132) var N; (function (N) { function f() { @@ -1615,7 +1615,7 @@ var C = (function () { }()); ---------------------------------------------------------------------- -text: (1124-1277) +text: (1132-1285) var c = new C(); c.doSomething(); function forthirdthird_part1Rest() { diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/emitHelpers-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/emitHelpers-in-all-projects.js index 6792ddaa099..828d013c259 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/emitHelpers-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/emitHelpers-in-all-projects.js @@ -5,7 +5,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; @@ -42,7 +42,7 @@ sourceFile:../first_PART1.ts >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") >>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { ->>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) >>> t[p[i]] = s[p[i]]; >>> } >>> return t; @@ -270,13 +270,13 @@ sourceFile:../first_part3.ts "sections": [ { "pos": 0, - "end": 492, + "end": 500, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 494, - "end": 738, + "pos": 502, + "end": 746, "kind": "text" } ], @@ -303,20 +303,20 @@ sourceFile:../first_part3.ts ====================================================================== File:: /src/first/bin/first-output.js ---------------------------------------------------------------------- -emitHelpers: (0-492):: typescript:rest +emitHelpers: (0-500):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; ---------------------------------------------------------------------- -text: (494-738) +text: (502-746) var s = "Hello, world"; console.log(s); function forfirstfirst_PART1Rest() { @@ -368,7 +368,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; @@ -428,7 +428,7 @@ sourceFile:../../../first/first_PART1.ts >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") >>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { ->>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) >>> t[p[i]] = s[p[i]]; >>> } >>> return t; @@ -1052,39 +1052,39 @@ sourceFile:../../third_part1.ts "sections": [ { "pos": 0, - "end": 492, + "end": 500, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 494, - "end": 738, + "pos": 502, + "end": 746, "kind": "prepend", "data": "/src/first/bin/first-output.js", "texts": [ { - "pos": 494, - "end": 738, + "pos": 502, + "end": 746, "kind": "text" } ] }, { - "pos": 738, - "end": 1142, + "pos": 746, + "end": 1150, "kind": "prepend", "data": "/src/2/second-output.js", "texts": [ { - "pos": 738, - "end": 1142, + "pos": 746, + "end": 1150, "kind": "text" } ] }, { - "pos": 1142, - "end": 1295, + "pos": 1150, + "end": 1303, "kind": "text" } ], @@ -1137,22 +1137,22 @@ sourceFile:../../third_part1.ts ====================================================================== File:: /src/third/thirdjs/output/third-output.js ---------------------------------------------------------------------- -emitHelpers: (0-492):: typescript:rest +emitHelpers: (0-500):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; ---------------------------------------------------------------------- -prepend: (494-738):: /src/first/bin/first-output.js texts:: 1 +prepend: (502-746):: /src/first/bin/first-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (494-738) +text: (502-746) var s = "Hello, world"; console.log(s); function forfirstfirst_PART1Rest() { @@ -1165,9 +1165,9 @@ function f() { } ---------------------------------------------------------------------- -prepend: (738-1142):: /src/2/second-output.js texts:: 1 +prepend: (746-1150):: /src/2/second-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (738-1142) +text: (746-1150) var N; (function (N) { function f() { @@ -1188,7 +1188,7 @@ var C = (function () { }()); ---------------------------------------------------------------------- -text: (1142-1295) +text: (1150-1303) var c = new C(); c.doSomething(); function forthirdthird_part1Rest() { diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/emitHelpers-in-only-one-dependency-project.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/emitHelpers-in-only-one-dependency-project.js index d0e7ceca502..44e22ae289e 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/emitHelpers-in-only-one-dependency-project.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/emitHelpers-in-only-one-dependency-project.js @@ -284,7 +284,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; @@ -339,7 +339,7 @@ sourceFile:../../../first/first_PART1.ts >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") >>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { ->>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) >>> t[p[i]] = s[p[i]]; >>> } >>> return t; @@ -881,39 +881,39 @@ sourceFile:../../third_part1.ts "sections": [ { "pos": 0, - "end": 492, + "end": 500, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 494, - "end": 661, + "pos": 502, + "end": 669, "kind": "prepend", "data": "/src/first/bin/first-output.js", "texts": [ { - "pos": 494, - "end": 661, + "pos": 502, + "end": 669, "kind": "text" } ] }, { - "pos": 661, - "end": 1065, + "pos": 669, + "end": 1073, "kind": "prepend", "data": "/src/2/second-output.js", "texts": [ { - "pos": 661, - "end": 1065, + "pos": 669, + "end": 1073, "kind": "text" } ] }, { - "pos": 1065, - "end": 1101, + "pos": 1073, + "end": 1109, "kind": "text" } ] @@ -961,22 +961,22 @@ sourceFile:../../third_part1.ts ====================================================================== File:: /src/third/thirdjs/output/third-output.js ---------------------------------------------------------------------- -emitHelpers: (0-492):: typescript:rest +emitHelpers: (0-500):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; ---------------------------------------------------------------------- -prepend: (494-661):: /src/first/bin/first-output.js texts:: 1 +prepend: (502-669):: /src/first/bin/first-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (494-661) +text: (502-669) var s = "Hello, world"; console.log(s); function forfirstfirst_PART1Rest() { } @@ -987,9 +987,9 @@ function f() { } ---------------------------------------------------------------------- -prepend: (661-1065):: /src/2/second-output.js texts:: 1 +prepend: (669-1073):: /src/2/second-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (661-1065) +text: (669-1073) var N; (function (N) { function f() { @@ -1010,7 +1010,7 @@ var C = (function () { }()); ---------------------------------------------------------------------- -text: (1065-1101) +text: (1073-1109) var c = new C(); c.doSomething(); diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/multiple-emitHelpers-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/multiple-emitHelpers-in-all-projects.js index c9159e1408b..2efa78454c0 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/multiple-emitHelpers-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/multiple-emitHelpers-in-all-projects.js @@ -5,7 +5,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; @@ -69,7 +69,7 @@ sourceFile:../first_PART1.ts >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") >>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { ->>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) >>> t[p[i]] = s[p[i]]; >>> } >>> return t; @@ -412,25 +412,25 @@ sourceFile:../first_part3.ts "sections": [ { "pos": 0, - "end": 492, + "end": 500, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 494, - "end": 998, + "pos": 502, + "end": 1006, "kind": "emitHelpers", "data": "typescript:read" }, { - "pos": 1000, - "end": 1170, + "pos": 1008, + "end": 1178, "kind": "emitHelpers", "data": "typescript:spread" }, { - "pos": 1172, - "end": 1628, + "pos": 1180, + "end": 1636, "kind": "text" } ], @@ -459,20 +459,20 @@ sourceFile:../first_part3.ts ====================================================================== File:: /src/first/bin/first-output.js ---------------------------------------------------------------------- -emitHelpers: (0-492):: typescript:rest +emitHelpers: (0-500):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; ---------------------------------------------------------------------- -emitHelpers: (494-998):: typescript:read +emitHelpers: (502-1006):: typescript:read var __read = (this && this.__read) || function (o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; if (!m) return o; @@ -490,13 +490,13 @@ var __read = (this && this.__read) || function (o, n) { return ar; }; ---------------------------------------------------------------------- -emitHelpers: (1000-1170):: typescript:spread +emitHelpers: (1008-1178):: typescript:spread var __spread = (this && this.__spread) || function () { for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); return ar; }; ---------------------------------------------------------------------- -text: (1172-1628) +text: (1180-1636) var s = "Hello, world"; console.log(s); function forfirstfirst_PART1Rest() { @@ -556,7 +556,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; @@ -657,7 +657,7 @@ sourceFile:../../../first/first_PART1.ts >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") >>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { ->>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) >>> t[p[i]] = s[p[i]]; >>> } >>> return t; @@ -1587,51 +1587,51 @@ sourceFile:../../third_part1.ts "sections": [ { "pos": 0, - "end": 492, + "end": 500, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 494, - "end": 998, + "pos": 502, + "end": 1006, "kind": "emitHelpers", "data": "typescript:read" }, { - "pos": 1000, - "end": 1170, + "pos": 1008, + "end": 1178, "kind": "emitHelpers", "data": "typescript:spread" }, { - "pos": 1172, - "end": 1628, + "pos": 1180, + "end": 1636, "kind": "prepend", "data": "/src/first/bin/first-output.js", "texts": [ { - "pos": 1172, - "end": 1628, + "pos": 1180, + "end": 1636, "kind": "text" } ] }, { - "pos": 1628, - "end": 2248, + "pos": 1636, + "end": 2256, "kind": "prepend", "data": "/src/2/second-output.js", "texts": [ { - "pos": 1628, - "end": 2248, + "pos": 1636, + "end": 2256, "kind": "text" } ] }, { - "pos": 2248, - "end": 2613, + "pos": 2256, + "end": 2621, "kind": "text" } ], @@ -1686,20 +1686,20 @@ sourceFile:../../third_part1.ts ====================================================================== File:: /src/third/thirdjs/output/third-output.js ---------------------------------------------------------------------- -emitHelpers: (0-492):: typescript:rest +emitHelpers: (0-500):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; ---------------------------------------------------------------------- -emitHelpers: (494-998):: typescript:read +emitHelpers: (502-1006):: typescript:read var __read = (this && this.__read) || function (o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; if (!m) return o; @@ -1717,15 +1717,15 @@ var __read = (this && this.__read) || function (o, n) { return ar; }; ---------------------------------------------------------------------- -emitHelpers: (1000-1170):: typescript:spread +emitHelpers: (1008-1178):: typescript:spread var __spread = (this && this.__spread) || function () { for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); return ar; }; ---------------------------------------------------------------------- -prepend: (1172-1628):: /src/first/bin/first-output.js texts:: 1 +prepend: (1180-1636):: /src/first/bin/first-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (1172-1628) +text: (1180-1636) var s = "Hello, world"; console.log(s); function forfirstfirst_PART1Rest() { @@ -1745,9 +1745,9 @@ function firstfirst_part3Spread() { firstfirst_part3Spread.apply(void 0, __spread([10, 20, 30])); ---------------------------------------------------------------------- -prepend: (1628-2248):: /src/2/second-output.js texts:: 1 +prepend: (1636-2256):: /src/2/second-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (1628-2248) +text: (1636-2256) var N; (function (N) { function f() { @@ -1775,7 +1775,7 @@ function secondsecond_part2Spread() { secondsecond_part2Spread.apply(void 0, __spread([10, 20, 30])); ---------------------------------------------------------------------- -text: (2248-2613) +text: (2256-2621) var c = new C(); c.doSomething(); function forthirdthird_part1Rest() { diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/multiple-emitHelpers-in-different-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/multiple-emitHelpers-in-different-projects.js index 740d1baffcd..fc441e6a919 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/multiple-emitHelpers-in-different-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/multiple-emitHelpers-in-different-projects.js @@ -5,7 +5,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; @@ -42,7 +42,7 @@ sourceFile:../first_PART1.ts >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") >>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { ->>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) >>> t[p[i]] = s[p[i]]; >>> } >>> return t; @@ -270,13 +270,13 @@ sourceFile:../first_part3.ts "sections": [ { "pos": 0, - "end": 492, + "end": 500, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 494, - "end": 738, + "pos": 502, + "end": 746, "kind": "text" } ], @@ -303,20 +303,20 @@ sourceFile:../first_part3.ts ====================================================================== File:: /src/first/bin/first-output.js ---------------------------------------------------------------------- -emitHelpers: (0-492):: typescript:rest +emitHelpers: (0-500):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; ---------------------------------------------------------------------- -text: (494-738) +text: (502-746) var s = "Hello, world"; console.log(s); function forfirstfirst_PART1Rest() { @@ -368,7 +368,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; @@ -452,7 +452,7 @@ sourceFile:../../../first/first_PART1.ts >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") >>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { ->>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) >>> t[p[i]] = s[p[i]]; >>> } >>> return t; @@ -1142,51 +1142,51 @@ sourceFile:../../third_part1.ts "sections": [ { "pos": 0, - "end": 492, + "end": 500, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 494, - "end": 998, + "pos": 502, + "end": 1006, "kind": "emitHelpers", "data": "typescript:read" }, { - "pos": 1000, - "end": 1170, + "pos": 1008, + "end": 1178, "kind": "emitHelpers", "data": "typescript:spread" }, { - "pos": 1172, - "end": 1416, + "pos": 1180, + "end": 1424, "kind": "prepend", "data": "/src/first/bin/first-output.js", "texts": [ { - "pos": 1172, - "end": 1416, + "pos": 1180, + "end": 1424, "kind": "text" } ] }, { - "pos": 1416, - "end": 1917, + "pos": 1424, + "end": 1925, "kind": "prepend", "data": "/src/2/second-output.js", "texts": [ { - "pos": 1416, - "end": 1917, + "pos": 1424, + "end": 1925, "kind": "text" } ] }, { - "pos": 1917, - "end": 2070, + "pos": 1925, + "end": 2078, "kind": "text" } ], @@ -1239,20 +1239,20 @@ sourceFile:../../third_part1.ts ====================================================================== File:: /src/third/thirdjs/output/third-output.js ---------------------------------------------------------------------- -emitHelpers: (0-492):: typescript:rest +emitHelpers: (0-500):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; ---------------------------------------------------------------------- -emitHelpers: (494-998):: typescript:read +emitHelpers: (502-1006):: typescript:read var __read = (this && this.__read) || function (o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; if (!m) return o; @@ -1270,15 +1270,15 @@ var __read = (this && this.__read) || function (o, n) { return ar; }; ---------------------------------------------------------------------- -emitHelpers: (1000-1170):: typescript:spread +emitHelpers: (1008-1178):: typescript:spread var __spread = (this && this.__spread) || function () { for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); return ar; }; ---------------------------------------------------------------------- -prepend: (1172-1416):: /src/first/bin/first-output.js texts:: 1 +prepend: (1180-1424):: /src/first/bin/first-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (1172-1416) +text: (1180-1424) var s = "Hello, world"; console.log(s); function forfirstfirst_PART1Rest() { @@ -1291,9 +1291,9 @@ function f() { } ---------------------------------------------------------------------- -prepend: (1416-1917):: /src/2/second-output.js texts:: 1 +prepend: (1424-1925):: /src/2/second-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (1416-1917) +text: (1424-1925) var N; (function (N) { function f() { @@ -1318,7 +1318,7 @@ var C = (function () { }()); ---------------------------------------------------------------------- -text: (1917-2070) +text: (1925-2078) var c = new C(); c.doSomething(); function forthirdthird_part1Rest() { diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/emitHelpers-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/emitHelpers-in-all-projects.js index 77e9d4bb912..f168d0562a0 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/emitHelpers-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/emitHelpers-in-all-projects.js @@ -702,7 +702,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; @@ -759,7 +759,7 @@ sourceFile:../../../first/first_PART1.ts >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") >>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { ->>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) >>> t[p[i]] = s[p[i]]; >>> } >>> return t; @@ -1324,39 +1324,39 @@ sourceFile:../../third_part1.ts "sections": [ { "pos": 0, - "end": 492, + "end": 500, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 494, - "end": 644, + "pos": 502, + "end": 652, "kind": "prepend", "data": "/src/first/bin/first-output.js", "texts": [ { - "pos": 494, - "end": 644, + "pos": 502, + "end": 652, "kind": "text" } ] }, { - "pos": 644, - "end": 1048, + "pos": 652, + "end": 1056, "kind": "prepend", "data": "/src/2/second-output.js", "texts": [ { - "pos": 644, - "end": 1048, + "pos": 652, + "end": 1056, "kind": "text" } ] }, { - "pos": 1048, - "end": 1201, + "pos": 1056, + "end": 1209, "kind": "text" } ], @@ -1409,22 +1409,22 @@ sourceFile:../../third_part1.ts ====================================================================== File:: /src/third/thirdjs/output/third-output.js ---------------------------------------------------------------------- -emitHelpers: (0-492):: typescript:rest +emitHelpers: (0-500):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; ---------------------------------------------------------------------- -prepend: (494-644):: /src/first/bin/first-output.js texts:: 1 +prepend: (502-652):: /src/first/bin/first-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (494-644) +text: (502-652) var s = "Hello, world"; console.log(s); function forfirstfirst_PART1Rest() { } @@ -1434,9 +1434,9 @@ function f() { } ---------------------------------------------------------------------- -prepend: (644-1048):: /src/2/second-output.js texts:: 1 +prepend: (652-1056):: /src/2/second-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (644-1048) +text: (652-1056) var N; (function (N) { function f() { @@ -1457,7 +1457,7 @@ var C = (function () { }()); ---------------------------------------------------------------------- -text: (1048-1201) +text: (1056-1209) var c = new C(); c.doSomething(); function forthirdthird_part1Rest() { diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/emitHelpers-in-only-one-dependency-project.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/emitHelpers-in-only-one-dependency-project.js index 33927ceed5d..d043ab564b2 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/emitHelpers-in-only-one-dependency-project.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/emitHelpers-in-only-one-dependency-project.js @@ -157,7 +157,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; @@ -193,7 +193,7 @@ sourceFile:../first_PART1.ts >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") >>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { ->>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) >>> t[p[i]] = s[p[i]]; >>> } >>> return t; @@ -394,13 +394,13 @@ sourceFile:../first_part3.ts "sections": [ { "pos": 0, - "end": 492, + "end": 500, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 494, - "end": 721, + "pos": 502, + "end": 729, "kind": "text" } ], @@ -427,20 +427,20 @@ sourceFile:../first_part3.ts ====================================================================== File:: /src/first/bin/first-output.js ---------------------------------------------------------------------- -emitHelpers: (0-492):: typescript:rest +emitHelpers: (0-500):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; ---------------------------------------------------------------------- -text: (494-721) +text: (502-729) var s = "Hello, world"; console.log(s); function forfirstfirst_PART1Rest() { @@ -772,7 +772,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; @@ -828,7 +828,7 @@ sourceFile:../../../first/first_PART1.ts >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") >>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { ->>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) >>> t[p[i]] = s[p[i]]; >>> } >>> return t; @@ -1375,39 +1375,39 @@ sourceFile:../../third_part1.ts "sections": [ { "pos": 0, - "end": 492, + "end": 500, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 494, - "end": 721, + "pos": 502, + "end": 729, "kind": "prepend", "data": "/src/first/bin/first-output.js", "texts": [ { - "pos": 494, - "end": 721, + "pos": 502, + "end": 729, "kind": "text" } ] }, { - "pos": 721, - "end": 1125, + "pos": 729, + "end": 1133, "kind": "prepend", "data": "/src/2/second-output.js", "texts": [ { - "pos": 721, - "end": 1125, + "pos": 729, + "end": 1133, "kind": "text" } ] }, { - "pos": 1125, - "end": 1161, + "pos": 1133, + "end": 1169, "kind": "text" } ] @@ -1455,22 +1455,22 @@ sourceFile:../../third_part1.ts ====================================================================== File:: /src/third/thirdjs/output/third-output.js ---------------------------------------------------------------------- -emitHelpers: (0-492):: typescript:rest +emitHelpers: (0-500):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; ---------------------------------------------------------------------- -prepend: (494-721):: /src/first/bin/first-output.js texts:: 1 +prepend: (502-729):: /src/first/bin/first-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (494-721) +text: (502-729) var s = "Hello, world"; console.log(s); function forfirstfirst_PART1Rest() { @@ -1482,9 +1482,9 @@ function f() { } ---------------------------------------------------------------------- -prepend: (721-1125):: /src/2/second-output.js texts:: 1 +prepend: (729-1133):: /src/2/second-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (721-1125) +text: (729-1133) var N; (function (N) { function f() { @@ -1505,7 +1505,7 @@ var C = (function () { }()); ---------------------------------------------------------------------- -text: (1125-1161) +text: (1133-1169) var c = new C(); c.doSomething(); diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/multiple-emitHelpers-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/multiple-emitHelpers-in-all-projects.js index a035efb8d8f..eee32672ff5 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/multiple-emitHelpers-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/multiple-emitHelpers-in-all-projects.js @@ -1037,7 +1037,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; @@ -1135,7 +1135,7 @@ sourceFile:../../../first/first_PART1.ts >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") >>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { ->>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) >>> t[p[i]] = s[p[i]]; >>> } >>> return t; @@ -1998,39 +1998,39 @@ sourceFile:../../third_part1.ts }, { "pos": 678, - "end": 1170, + "end": 1178, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 1172, - "end": 1534, + "pos": 1180, + "end": 1542, "kind": "prepend", "data": "/src/first/bin/first-output.js", "texts": [ { - "pos": 1172, - "end": 1534, + "pos": 1180, + "end": 1542, "kind": "text" } ] }, { - "pos": 1534, - "end": 2154, + "pos": 1542, + "end": 2162, "kind": "prepend", "data": "/src/2/second-output.js", "texts": [ { - "pos": 1534, - "end": 2154, + "pos": 1542, + "end": 2162, "kind": "text" } ] }, { - "pos": 2154, - "end": 2519, + "pos": 2162, + "end": 2527, "kind": "text" } ], @@ -2109,22 +2109,22 @@ var __spread = (this && this.__spread) || function () { return ar; }; ---------------------------------------------------------------------- -emitHelpers: (678-1170):: typescript:rest +emitHelpers: (678-1178):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; ---------------------------------------------------------------------- -prepend: (1172-1534):: /src/first/bin/first-output.js texts:: 1 +prepend: (1180-1542):: /src/first/bin/first-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (1172-1534) +text: (1180-1542) var s = "Hello, world"; console.log(s); function forfirstfirst_PART1Rest() { } @@ -2141,9 +2141,9 @@ function firstfirst_part3Spread() { firstfirst_part3Spread.apply(void 0, __spread([10, 20, 30])); ---------------------------------------------------------------------- -prepend: (1534-2154):: /src/2/second-output.js texts:: 1 +prepend: (1542-2162):: /src/2/second-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (1534-2154) +text: (1542-2162) var N; (function (N) { function f() { @@ -2171,7 +2171,7 @@ function secondsecond_part2Spread() { secondsecond_part2Spread.apply(void 0, __spread([10, 20, 30])); ---------------------------------------------------------------------- -text: (2154-2519) +text: (2162-2527) var c = new C(); c.doSomething(); function forthirdthird_part1Rest() { diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/multiple-emitHelpers-in-different-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/multiple-emitHelpers-in-different-projects.js index 36176e67722..73bbca16dff 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/multiple-emitHelpers-in-different-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/multiple-emitHelpers-in-different-projects.js @@ -736,7 +736,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; @@ -817,7 +817,7 @@ sourceFile:../../../first/first_PART1.ts >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") >>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { ->>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) >>> t[p[i]] = s[p[i]]; >>> } >>> return t; @@ -1440,39 +1440,39 @@ sourceFile:../../third_part1.ts }, { "pos": 678, - "end": 1170, + "end": 1178, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 1172, - "end": 1322, + "pos": 1180, + "end": 1330, "kind": "prepend", "data": "/src/first/bin/first-output.js", "texts": [ { - "pos": 1172, - "end": 1322, + "pos": 1180, + "end": 1330, "kind": "text" } ] }, { - "pos": 1322, - "end": 1823, + "pos": 1330, + "end": 1831, "kind": "prepend", "data": "/src/2/second-output.js", "texts": [ { - "pos": 1322, - "end": 1823, + "pos": 1330, + "end": 1831, "kind": "text" } ] }, { - "pos": 1823, - "end": 1976, + "pos": 1831, + "end": 1984, "kind": "text" } ], @@ -1549,22 +1549,22 @@ var __spread = (this && this.__spread) || function () { return ar; }; ---------------------------------------------------------------------- -emitHelpers: (678-1170):: typescript:rest +emitHelpers: (678-1178):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; ---------------------------------------------------------------------- -prepend: (1172-1322):: /src/first/bin/first-output.js texts:: 1 +prepend: (1180-1330):: /src/first/bin/first-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (1172-1322) +text: (1180-1330) var s = "Hello, world"; console.log(s); function forfirstfirst_PART1Rest() { } @@ -1574,9 +1574,9 @@ function f() { } ---------------------------------------------------------------------- -prepend: (1322-1823):: /src/2/second-output.js texts:: 1 +prepend: (1330-1831):: /src/2/second-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (1322-1823) +text: (1330-1831) var N; (function (N) { function f() { @@ -1601,7 +1601,7 @@ var C = (function () { }()); ---------------------------------------------------------------------- -text: (1823-1976) +text: (1831-1984) var c = new C(); c.doSomething(); function forthirdthird_part1Rest() { diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/emitHelpers-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/emitHelpers-in-all-projects.js index ffc0d67b134..72f24e18ec0 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/emitHelpers-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/emitHelpers-in-all-projects.js @@ -133,7 +133,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; @@ -178,7 +178,7 @@ sourceFile:../second/second_part1.ts >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") >>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { ->>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) >>> t[p[i]] = s[p[i]]; >>> } >>> return t; @@ -488,13 +488,13 @@ sourceFile:../second/second_part2.ts "sections": [ { "pos": 0, - "end": 492, + "end": 500, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 494, - "end": 898, + "pos": 502, + "end": 906, "kind": "text" } ], @@ -521,20 +521,20 @@ sourceFile:../second/second_part2.ts ====================================================================== File:: /src/2/second-output.js ---------------------------------------------------------------------- -emitHelpers: (0-492):: typescript:rest +emitHelpers: (0-500):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; ---------------------------------------------------------------------- -text: (494-898) +text: (502-906) var N; (function (N) { function f() { @@ -741,7 +741,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; @@ -777,7 +777,7 @@ sourceFile:../first_PART1.ts >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") >>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { ->>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) >>> t[p[i]] = s[p[i]]; >>> } >>> return t; @@ -978,13 +978,13 @@ sourceFile:../first_part3.ts "sections": [ { "pos": 0, - "end": 492, + "end": 500, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 494, - "end": 721, + "pos": 502, + "end": 729, "kind": "text" } ], @@ -1011,20 +1011,20 @@ sourceFile:../first_part3.ts ====================================================================== File:: /src/first/bin/first-output.js ---------------------------------------------------------------------- -emitHelpers: (0-492):: typescript:rest +emitHelpers: (0-500):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; ---------------------------------------------------------------------- -text: (494-721) +text: (502-729) var s = "Hello, world"; console.log(s); function forfirstfirst_PART1Rest() { @@ -1412,7 +1412,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; @@ -1471,7 +1471,7 @@ sourceFile:../../../first/first_PART1.ts >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") >>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { ->>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) >>> t[p[i]] = s[p[i]]; >>> } >>> return t; @@ -2068,39 +2068,39 @@ sourceFile:../../third_part1.ts "sections": [ { "pos": 0, - "end": 492, + "end": 500, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 494, - "end": 721, + "pos": 502, + "end": 729, "kind": "prepend", "data": "/src/first/bin/first-output.js", "texts": [ { - "pos": 494, - "end": 721, + "pos": 502, + "end": 729, "kind": "text" } ] }, { - "pos": 721, - "end": 1125, + "pos": 729, + "end": 1133, "kind": "prepend", "data": "/src/2/second-output.js", "texts": [ { - "pos": 721, - "end": 1125, + "pos": 729, + "end": 1133, "kind": "text" } ] }, { - "pos": 1125, - "end": 1278, + "pos": 1133, + "end": 1286, "kind": "text" } ], @@ -2153,22 +2153,22 @@ sourceFile:../../third_part1.ts ====================================================================== File:: /src/third/thirdjs/output/third-output.js ---------------------------------------------------------------------- -emitHelpers: (0-492):: typescript:rest +emitHelpers: (0-500):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; ---------------------------------------------------------------------- -prepend: (494-721):: /src/first/bin/first-output.js texts:: 1 +prepend: (502-729):: /src/first/bin/first-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (494-721) +text: (502-729) var s = "Hello, world"; console.log(s); function forfirstfirst_PART1Rest() { @@ -2180,9 +2180,9 @@ function f() { } ---------------------------------------------------------------------- -prepend: (721-1125):: /src/2/second-output.js texts:: 1 +prepend: (729-1133):: /src/2/second-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (721-1125) +text: (729-1133) var N; (function (N) { function f() { @@ -2203,7 +2203,7 @@ var C = (function () { }()); ---------------------------------------------------------------------- -text: (1125-1278) +text: (1133-1286) var c = new C(); c.doSomething(); function forthirdthird_part1Rest() { diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/emitHelpers-in-only-one-dependency-project.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/emitHelpers-in-only-one-dependency-project.js index 3e3d2c010a5..d97e63db8a3 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/emitHelpers-in-only-one-dependency-project.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/emitHelpers-in-only-one-dependency-project.js @@ -133,7 +133,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; @@ -178,7 +178,7 @@ sourceFile:../second/second_part1.ts >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") >>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { ->>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) >>> t[p[i]] = s[p[i]]; >>> } >>> return t; @@ -488,13 +488,13 @@ sourceFile:../second/second_part2.ts "sections": [ { "pos": 0, - "end": 492, + "end": 500, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 494, - "end": 898, + "pos": 502, + "end": 906, "kind": "text" } ], @@ -521,20 +521,20 @@ sourceFile:../second/second_part2.ts ====================================================================== File:: /src/2/second-output.js ---------------------------------------------------------------------- -emitHelpers: (0-492):: typescript:rest +emitHelpers: (0-500):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; ---------------------------------------------------------------------- -text: (494-898) +text: (502-906) var N; (function (N) { function f() { @@ -1305,7 +1305,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; @@ -1359,7 +1359,7 @@ sourceFile:../../../first/first_PART1.ts >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") >>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { ->>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) >>> t[p[i]] = s[p[i]]; >>> } >>> return t; @@ -1874,39 +1874,39 @@ sourceFile:../../third_part1.ts "sections": [ { "pos": 0, - "end": 492, + "end": 500, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 494, - "end": 644, + "pos": 502, + "end": 652, "kind": "prepend", "data": "/src/first/bin/first-output.js", "texts": [ { - "pos": 494, - "end": 644, + "pos": 502, + "end": 652, "kind": "text" } ] }, { - "pos": 644, - "end": 1048, + "pos": 652, + "end": 1056, "kind": "prepend", "data": "/src/2/second-output.js", "texts": [ { - "pos": 644, - "end": 1048, + "pos": 652, + "end": 1056, "kind": "text" } ] }, { - "pos": 1048, - "end": 1084, + "pos": 1056, + "end": 1092, "kind": "text" } ] @@ -1954,22 +1954,22 @@ sourceFile:../../third_part1.ts ====================================================================== File:: /src/third/thirdjs/output/third-output.js ---------------------------------------------------------------------- -emitHelpers: (0-492):: typescript:rest +emitHelpers: (0-500):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; ---------------------------------------------------------------------- -prepend: (494-644):: /src/first/bin/first-output.js texts:: 1 +prepend: (502-652):: /src/first/bin/first-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (494-644) +text: (502-652) var s = "Hello, world"; console.log(s); function forfirstfirst_PART1Rest() { } @@ -1979,9 +1979,9 @@ function f() { } ---------------------------------------------------------------------- -prepend: (644-1048):: /src/2/second-output.js texts:: 1 +prepend: (652-1056):: /src/2/second-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (644-1048) +text: (652-1056) var N; (function (N) { function f() { @@ -2002,7 +2002,7 @@ var C = (function () { }()); ---------------------------------------------------------------------- -text: (1048-1084) +text: (1056-1092) var c = new C(); c.doSomething(); diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/multiple-emitHelpers-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/multiple-emitHelpers-in-all-projects.js index 5e4c642efeb..95fea18598d 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/multiple-emitHelpers-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/multiple-emitHelpers-in-all-projects.js @@ -165,7 +165,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; @@ -237,7 +237,7 @@ sourceFile:../second/second_part1.ts >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") >>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { ->>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) >>> t[p[i]] = s[p[i]]; >>> } >>> return t; @@ -663,25 +663,25 @@ sourceFile:../second/second_part2.ts "sections": [ { "pos": 0, - "end": 492, + "end": 500, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 494, - "end": 998, + "pos": 502, + "end": 1006, "kind": "emitHelpers", "data": "typescript:read" }, { - "pos": 1000, - "end": 1170, + "pos": 1008, + "end": 1178, "kind": "emitHelpers", "data": "typescript:spread" }, { - "pos": 1172, - "end": 1792, + "pos": 1180, + "end": 1800, "kind": "text" } ], @@ -710,20 +710,20 @@ sourceFile:../second/second_part2.ts ====================================================================== File:: /src/2/second-output.js ---------------------------------------------------------------------- -emitHelpers: (0-492):: typescript:rest +emitHelpers: (0-500):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; ---------------------------------------------------------------------- -emitHelpers: (494-998):: typescript:read +emitHelpers: (502-1006):: typescript:read var __read = (this && this.__read) || function (o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; if (!m) return o; @@ -741,13 +741,13 @@ var __read = (this && this.__read) || function (o, n) { return ar; }; ---------------------------------------------------------------------- -emitHelpers: (1000-1170):: typescript:spread +emitHelpers: (1008-1178):: typescript:spread var __spread = (this && this.__spread) || function () { for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); return ar; }; ---------------------------------------------------------------------- -text: (1172-1792) +text: (1180-1800) var N; (function (N) { function f() { @@ -993,7 +993,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; @@ -1056,7 +1056,7 @@ sourceFile:../first_PART1.ts >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") >>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { ->>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) >>> t[p[i]] = s[p[i]]; >>> } >>> return t; @@ -1372,25 +1372,25 @@ sourceFile:../first_part3.ts "sections": [ { "pos": 0, - "end": 492, + "end": 500, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 494, - "end": 998, + "pos": 502, + "end": 1006, "kind": "emitHelpers", "data": "typescript:read" }, { - "pos": 1000, - "end": 1170, + "pos": 1008, + "end": 1178, "kind": "emitHelpers", "data": "typescript:spread" }, { - "pos": 1172, - "end": 1611, + "pos": 1180, + "end": 1619, "kind": "text" } ], @@ -1419,20 +1419,20 @@ sourceFile:../first_part3.ts ====================================================================== File:: /src/first/bin/first-output.js ---------------------------------------------------------------------- -emitHelpers: (0-492):: typescript:rest +emitHelpers: (0-500):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; ---------------------------------------------------------------------- -emitHelpers: (494-998):: typescript:read +emitHelpers: (502-1006):: typescript:read var __read = (this && this.__read) || function (o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; if (!m) return o; @@ -1450,13 +1450,13 @@ var __read = (this && this.__read) || function (o, n) { return ar; }; ---------------------------------------------------------------------- -emitHelpers: (1000-1170):: typescript:spread +emitHelpers: (1008-1178):: typescript:spread var __spread = (this && this.__spread) || function () { for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); return ar; }; ---------------------------------------------------------------------- -text: (1172-1611) +text: (1180-1619) var s = "Hello, world"; console.log(s); function forfirstfirst_PART1Rest() { @@ -2007,7 +2007,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; @@ -2107,7 +2107,7 @@ sourceFile:../../../first/first_PART1.ts >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") >>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { ->>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) >>> t[p[i]] = s[p[i]]; >>> } >>> return t; @@ -3010,51 +3010,51 @@ sourceFile:../../third_part1.ts "sections": [ { "pos": 0, - "end": 492, + "end": 500, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 494, - "end": 998, + "pos": 502, + "end": 1006, "kind": "emitHelpers", "data": "typescript:read" }, { - "pos": 1000, - "end": 1170, + "pos": 1008, + "end": 1178, "kind": "emitHelpers", "data": "typescript:spread" }, { - "pos": 1172, - "end": 1611, + "pos": 1180, + "end": 1619, "kind": "prepend", "data": "/src/first/bin/first-output.js", "texts": [ { - "pos": 1172, - "end": 1611, + "pos": 1180, + "end": 1619, "kind": "text" } ] }, { - "pos": 1611, - "end": 2231, + "pos": 1619, + "end": 2239, "kind": "prepend", "data": "/src/2/second-output.js", "texts": [ { - "pos": 1611, - "end": 2231, + "pos": 1619, + "end": 2239, "kind": "text" } ] }, { - "pos": 2231, - "end": 2596, + "pos": 2239, + "end": 2604, "kind": "text" } ], @@ -3109,20 +3109,20 @@ sourceFile:../../third_part1.ts ====================================================================== File:: /src/third/thirdjs/output/third-output.js ---------------------------------------------------------------------- -emitHelpers: (0-492):: typescript:rest +emitHelpers: (0-500):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; ---------------------------------------------------------------------- -emitHelpers: (494-998):: typescript:read +emitHelpers: (502-1006):: typescript:read var __read = (this && this.__read) || function (o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; if (!m) return o; @@ -3140,15 +3140,15 @@ var __read = (this && this.__read) || function (o, n) { return ar; }; ---------------------------------------------------------------------- -emitHelpers: (1000-1170):: typescript:spread +emitHelpers: (1008-1178):: typescript:spread var __spread = (this && this.__spread) || function () { for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); return ar; }; ---------------------------------------------------------------------- -prepend: (1172-1611):: /src/first/bin/first-output.js texts:: 1 +prepend: (1180-1619):: /src/first/bin/first-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (1172-1611) +text: (1180-1619) var s = "Hello, world"; console.log(s); function forfirstfirst_PART1Rest() { @@ -3167,9 +3167,9 @@ function firstfirst_part3Spread() { firstfirst_part3Spread.apply(void 0, __spread([10, 20, 30])); ---------------------------------------------------------------------- -prepend: (1611-2231):: /src/2/second-output.js texts:: 1 +prepend: (1619-2239):: /src/2/second-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (1611-2231) +text: (1619-2239) var N; (function (N) { function f() { @@ -3197,7 +3197,7 @@ function secondsecond_part2Spread() { secondsecond_part2Spread.apply(void 0, __spread([10, 20, 30])); ---------------------------------------------------------------------- -text: (2231-2596) +text: (2239-2604) var c = new C(); c.doSomething(); function forthirdthird_part1Rest() { diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/multiple-emitHelpers-in-different-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/multiple-emitHelpers-in-different-projects.js index 57f2f0c389b..571327e08d6 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/multiple-emitHelpers-in-different-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/multiple-emitHelpers-in-different-projects.js @@ -845,7 +845,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; @@ -881,7 +881,7 @@ sourceFile:../first_PART1.ts >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") >>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { ->>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) >>> t[p[i]] = s[p[i]]; >>> } >>> return t; @@ -1082,13 +1082,13 @@ sourceFile:../first_part3.ts "sections": [ { "pos": 0, - "end": 492, + "end": 500, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 494, - "end": 721, + "pos": 502, + "end": 729, "kind": "text" } ], @@ -1115,20 +1115,20 @@ sourceFile:../first_part3.ts ====================================================================== File:: /src/first/bin/first-output.js ---------------------------------------------------------------------- -emitHelpers: (0-492):: typescript:rest +emitHelpers: (0-500):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; ---------------------------------------------------------------------- -text: (494-721) +text: (502-729) var s = "Hello, world"; console.log(s); function forfirstfirst_PART1Rest() { @@ -1549,7 +1549,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; @@ -1632,7 +1632,7 @@ sourceFile:../../../first/first_PART1.ts >>> t[p] = s[p]; >>> if (s != null && typeof Object.getOwnPropertySymbols === "function") >>> for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { ->>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) +>>> if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) >>> t[p[i]] = s[p[i]]; >>> } >>> return t; @@ -2295,51 +2295,51 @@ sourceFile:../../third_part1.ts "sections": [ { "pos": 0, - "end": 492, + "end": 500, "kind": "emitHelpers", "data": "typescript:rest" }, { - "pos": 494, - "end": 998, + "pos": 502, + "end": 1006, "kind": "emitHelpers", "data": "typescript:read" }, { - "pos": 1000, - "end": 1170, + "pos": 1008, + "end": 1178, "kind": "emitHelpers", "data": "typescript:spread" }, { - "pos": 1172, - "end": 1399, + "pos": 1180, + "end": 1407, "kind": "prepend", "data": "/src/first/bin/first-output.js", "texts": [ { - "pos": 1172, - "end": 1399, + "pos": 1180, + "end": 1407, "kind": "text" } ] }, { - "pos": 1399, - "end": 1900, + "pos": 1407, + "end": 1908, "kind": "prepend", "data": "/src/2/second-output.js", "texts": [ { - "pos": 1399, - "end": 1900, + "pos": 1407, + "end": 1908, "kind": "text" } ] }, { - "pos": 1900, - "end": 2053, + "pos": 1908, + "end": 2061, "kind": "text" } ], @@ -2392,20 +2392,20 @@ sourceFile:../../third_part1.ts ====================================================================== File:: /src/third/thirdjs/output/third-output.js ---------------------------------------------------------------------- -emitHelpers: (0-492):: typescript:rest +emitHelpers: (0-500):: typescript:rest var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; ---------------------------------------------------------------------- -emitHelpers: (494-998):: typescript:read +emitHelpers: (502-1006):: typescript:read var __read = (this && this.__read) || function (o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; if (!m) return o; @@ -2423,15 +2423,15 @@ var __read = (this && this.__read) || function (o, n) { return ar; }; ---------------------------------------------------------------------- -emitHelpers: (1000-1170):: typescript:spread +emitHelpers: (1008-1178):: typescript:spread var __spread = (this && this.__spread) || function () { for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); return ar; }; ---------------------------------------------------------------------- -prepend: (1172-1399):: /src/first/bin/first-output.js texts:: 1 +prepend: (1180-1407):: /src/first/bin/first-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (1172-1399) +text: (1180-1407) var s = "Hello, world"; console.log(s); function forfirstfirst_PART1Rest() { @@ -2443,9 +2443,9 @@ function f() { } ---------------------------------------------------------------------- -prepend: (1399-1900):: /src/2/second-output.js texts:: 1 +prepend: (1407-1908):: /src/2/second-output.js texts:: 1 >>-------------------------------------------------------------------- -text: (1399-1900) +text: (1407-1908) var N; (function (N) { function f() { @@ -2470,7 +2470,7 @@ var C = (function () { }()); ---------------------------------------------------------------------- -text: (1900-2053) +text: (1908-2061) var c = new C(); c.doSomething(); function forthirdthird_part1Rest() { diff --git a/tests/baselines/reference/unusedLocalsAndObjectSpread.js b/tests/baselines/reference/unusedLocalsAndObjectSpread.js index 8eea55ca1f8..416107d34a6 100644 --- a/tests/baselines/reference/unusedLocalsAndObjectSpread.js +++ b/tests/baselines/reference/unusedLocalsAndObjectSpread.js @@ -37,7 +37,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; diff --git a/tests/baselines/reference/unusedLocalsAndObjectSpread2.js b/tests/baselines/reference/unusedLocalsAndObjectSpread2.js index b2be424b146..66ec2a1a2ec 100644 --- a/tests/baselines/reference/unusedLocalsAndObjectSpread2.js +++ b/tests/baselines/reference/unusedLocalsAndObjectSpread2.js @@ -24,7 +24,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable(p[i])) + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; From 1818218d59c911fb522499ed011efcfe1a121d7e Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Tue, 30 Apr 2019 09:23:52 -0700 Subject: [PATCH 18/45] Move substitution type elimination to getActualTypeVariable --- src/compiler/checker.ts | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 970f020f5f9..bca3ca1bf1f 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -10318,8 +10318,16 @@ namespace ts { return links.resolvedType; } - function getActualTypeVariable(type: Type) { - return type.flags & TypeFlags.Substitution ? (type).typeVariable : type; + function getActualTypeVariable(type: Type): Type { + if (type.flags & TypeFlags.Substitution) { + return (type).typeVariable; + } + if (type.flags & TypeFlags.IndexedAccess && ( + (type).objectType.flags & TypeFlags.Substitution || + (type).indexType.flags & TypeFlags.Substitution)) { + return getIndexedAccessType(getActualTypeVariable((type).objectType), getActualTypeVariable((type).indexType)); + } + return type; } /** @@ -14860,13 +14868,8 @@ namespace ts { target = removeTypesFromUnionOrIntersection(target, matchingTypes); } } - else if (target.flags & TypeFlags.Substitution) { - target = (target as SubstitutionType).typeVariable; - } - else if (target.flags & TypeFlags.IndexedAccess && ( - (target).objectType.flags & TypeFlags.Substitution || - (target).indexType.flags & TypeFlags.Substitution)) { - target = getIndexedAccessType(getActualTypeVariable((target).objectType), getActualTypeVariable((target).indexType)); + else if (target.flags & (TypeFlags.IndexedAccess | TypeFlags.Substitution)) { + target = getActualTypeVariable(target); } if (target.flags & TypeFlags.TypeVariable) { // If target is a type parameter, make an inference, unless the source type contains From e8161efc3aee4e12f729002ddeb5584e862e1889 Mon Sep 17 00:00:00 2001 From: TypeScript Bot Date: Wed, 1 May 2019 09:47:59 -0700 Subject: [PATCH 19/45] Update user baselines (#31188) --- .../user/chrome-devtools-frontend.log | 103 +++++++++++++++++- tests/baselines/reference/user/webpack.log | 3 + 2 files changed, 104 insertions(+), 2 deletions(-) diff --git a/tests/baselines/reference/user/chrome-devtools-frontend.log b/tests/baselines/reference/user/chrome-devtools-frontend.log index 45ba3fc971a..4fd3354a2bb 100644 --- a/tests/baselines/reference/user/chrome-devtools-frontend.log +++ b/tests/baselines/reference/user/chrome-devtools-frontend.log @@ -698,6 +698,13 @@ node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighth node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(10092,16): error TS2304: Cannot find name 'd41d8cd98f00b204e9800998ecf8427e_LibraryDetectorTests'. node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(10513,19): error TS2488: Type 'NodeListOf' must have a '[Symbol.iterator]()' method that returns an iterator. node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(10811,19): error TS2304: Cannot find name 'getElementsInDocument'. +node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(11441,1): error TS2322: Type 'unknown' is not assignable to type 'number'. +node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(11444,1): error TS2322: Type 'unknown' is not assignable to type 'number'. +node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(11447,15): error TS2339: Property 'textLength' does not exist on type 'unknown'. +node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(11447,28): error TS2339: Property 'textLength' does not exist on type 'unknown'. +node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(11450,43): error TS2339: Property 'node' does not exist on type 'unknown'. +node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(11453,6): error TS2339: Property 'cssRule' does not exist on type 'unknown'. +node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(11460,6): error TS2339: Property 'cssRule' does not exist on type 'unknown'. node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(12197,34): error TS2554: Expected 0 arguments, but got 2. node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(12327,36): error TS2554: Expected 0 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(13607,7): error TS2339: Property 'protocolMethod' does not exist on type 'Error'. @@ -3090,11 +3097,14 @@ node_modules/chrome-devtools-frontend/front_end/bindings/BreakpointManager.js(60 Types of parameters 'debuggerModel' and 'model' are incompatible. Type 'T' is not assignable to type 'DebuggerModel'. node_modules/chrome-devtools-frontend/front_end/bindings/BreakpointManager.js(97,56): error TS2345: Argument of type 'string' is not assignable to parameter of type 'K'. + 'string' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/bindings/BreakpointManager.js(122,22): error TS2339: Property 'remove' does not exist on type 'V'. node_modules/chrome-devtools-frontend/front_end/bindings/BreakpointManager.js(153,44): error TS2345: Argument of type 'string' is not assignable to parameter of type 'K'. + 'string' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/bindings/BreakpointManager.js(158,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/bindings/BreakpointManager.js(166,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/bindings/BreakpointManager.js(181,42): error TS2345: Argument of type 'string' is not assignable to parameter of type 'K'. + 'string' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/bindings/BreakpointManager.js(183,45): error TS2339: Property 'remove' does not exist on type 'Map'. node_modules/chrome-devtools-frontend/front_end/bindings/BreakpointManager.js(237,46): error TS2339: Property 'valuesArray' does not exist on type 'Map'. node_modules/chrome-devtools-frontend/front_end/bindings/BreakpointManager.js(300,73): error TS2339: Property 'valuesArray' does not exist on type 'Map>'. @@ -3104,6 +3114,7 @@ node_modules/chrome-devtools-frontend/front_end/bindings/BreakpointManager.js(33 node_modules/chrome-devtools-frontend/front_end/bindings/BreakpointManager.js(350,58): error TS2339: Property 'keysArray' does not exist on type 'Map>>'. node_modules/chrome-devtools-frontend/front_end/bindings/BreakpointManager.js(396,17): error TS2339: Property 'remove' does not exist on type 'Breakpoint[]'. node_modules/chrome-devtools-frontend/front_end/bindings/BreakpointManager.js(399,41): error TS2345: Argument of type 'string' is not assignable to parameter of type 'K'. + 'string' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/bindings/BreakpointManager.js(442,23): error TS2339: Property 'remove' does not exist on type 'Breakpoint[]'. node_modules/chrome-devtools-frontend/front_end/bindings/BreakpointManager.js(444,23): error TS2339: Property 'remove' does not exist on type 'Map'. node_modules/chrome-devtools-frontend/front_end/bindings/BreakpointManager.js(446,19): error TS2339: Property 'remove' does not exist on type 'Map>'. @@ -3140,17 +3151,25 @@ node_modules/chrome-devtools-frontend/front_end/bindings/CSSWorkspaceBinding.js( node_modules/chrome-devtools-frontend/front_end/bindings/CSSWorkspaceBinding.js(132,15): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. node_modules/chrome-devtools-frontend/front_end/bindings/CSSWorkspaceBinding.js(160,14): error TS7014: Function type, which lacks return-type annotation, implicitly has an 'any' return type. node_modules/chrome-devtools-frontend/front_end/bindings/CSSWorkspaceBinding.js(169,27): error TS2345: Argument of type 'CSSStyleSheetHeader' is not assignable to parameter of type 'K'. + 'CSSStyleSheetHeader' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/bindings/CSSWorkspaceBinding.js(172,34): error TS2345: Argument of type 'string' is not assignable to parameter of type 'K'. + 'string' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/bindings/CSSWorkspaceBinding.js(182,48): error TS2345: Argument of type 'LiveLocation' is not assignable to parameter of type 'V'. + 'LiveLocation' is assignable to the constraint of type 'V', but 'V' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/bindings/CSSWorkspaceBinding.js(184,37): error TS2345: Argument of type 'string' is not assignable to parameter of type 'K'. + 'string' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/bindings/CSSWorkspaceBinding.js(191,46): error TS2345: Argument of type 'CSSStyleSheetHeader' is not assignable to parameter of type 'K'. + 'CSSStyleSheetHeader' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/bindings/CSSWorkspaceBinding.js(196,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/bindings/CSSWorkspaceBinding.js(204,16): error TS2339: Property '_header' does not exist on type 'V'. node_modules/chrome-devtools-frontend/front_end/bindings/CSSWorkspaceBinding.js(205,27): error TS2345: Argument of type 'CSSStyleSheetHeader' is not assignable to parameter of type 'K'. + 'CSSStyleSheetHeader' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/bindings/CSSWorkspaceBinding.js(206,16): error TS2339: Property 'update' does not exist on type 'V'. node_modules/chrome-devtools-frontend/front_end/bindings/CSSWorkspaceBinding.js(212,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/bindings/CSSWorkspaceBinding.js(216,46): error TS2345: Argument of type 'CSSStyleSheetHeader' is not assignable to parameter of type 'K'. + 'CSSStyleSheetHeader' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/bindings/CSSWorkspaceBinding.js(221,31): error TS2345: Argument of type 'CSSStyleSheetHeader' is not assignable to parameter of type 'K'. + 'CSSStyleSheetHeader' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/bindings/CSSWorkspaceBinding.js(261,14): error TS7014: Function type, which lacks return-type annotation, implicitly has an 'any' return type. node_modules/chrome-devtools-frontend/front_end/bindings/CompilerScriptMapping.js(184,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/bindings/CompilerScriptMapping.js(194,22): error TS2694: Namespace 'Common' has no exported member 'Event'. @@ -3178,8 +3197,11 @@ node_modules/chrome-devtools-frontend/front_end/bindings/DebuggerWorkspaceBindin node_modules/chrome-devtools-frontend/front_end/bindings/DebuggerWorkspaceBinding.js(230,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/bindings/DebuggerWorkspaceBinding.js(267,14): error TS7014: Function type, which lacks return-type annotation, implicitly has an 'any' return type. node_modules/chrome-devtools-frontend/front_end/bindings/DebuggerWorkspaceBinding.js(276,25): error TS2345: Argument of type 'Script' is not assignable to parameter of type 'K'. + 'Script' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/bindings/DebuggerWorkspaceBinding.js(285,28): error TS2345: Argument of type 'Script' is not assignable to parameter of type 'K'. + 'Script' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/bindings/DebuggerWorkspaceBinding.js(292,46): error TS2345: Argument of type 'Script' is not assignable to parameter of type 'K'. + 'Script' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/bindings/DebuggerWorkspaceBinding.js(349,14): error TS7014: Function type, which lacks return-type annotation, implicitly has an 'any' return type. node_modules/chrome-devtools-frontend/front_end/bindings/DebuggerWorkspaceBinding.js(389,14): error TS7014: Function type, which lacks return-type annotation, implicitly has an 'any' return type. node_modules/chrome-devtools-frontend/front_end/bindings/DebuggerWorkspaceBinding.js(452,15): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. @@ -3367,7 +3389,7 @@ node_modules/chrome-devtools-frontend/front_end/cm/codemirror.js(2765,22): error node_modules/chrome-devtools-frontend/front_end/cm/codemirror.js(2785,91): error TS2339: Property 'xRel' does not exist on type 'Pos'. node_modules/chrome-devtools-frontend/front_end/cm/codemirror.js(2855,32): error TS2339: Property 'left' does not exist on type 'never'. node_modules/chrome-devtools-frontend/front_end/cm/codemirror.js(2855,49): error TS2339: Property 'right' does not exist on type 'never'. -node_modules/chrome-devtools-frontend/front_end/cm/codemirror.js(2856,10): error TS2365: Operator '+' cannot be applied to types 'null' and '1 | 0'. +node_modules/chrome-devtools-frontend/front_end/cm/codemirror.js(2856,10): error TS2365: Operator '+' cannot be applied to types 'null' and '0 | 1'. node_modules/chrome-devtools-frontend/front_end/cm/codemirror.js(2858,32): error TS2339: Property 'left' does not exist on type 'never'. node_modules/chrome-devtools-frontend/front_end/cm/codemirror.js(2858,49): error TS2339: Property 'right' does not exist on type 'never'. node_modules/chrome-devtools-frontend/front_end/cm/codemirror.js(3034,25): error TS2339: Property 'xRel' does not exist on type 'Pos'. @@ -4419,7 +4441,9 @@ node_modules/chrome-devtools-frontend/front_end/cookie_table/CookiesTable.js(461 node_modules/chrome-devtools-frontend/front_end/cookie_table/CookiesTable.js(470,51): error TS2339: Property 'asParsedURL' does not exist on type 'string'. node_modules/chrome-devtools-frontend/front_end/cookie_table/CookiesTable.js(489,49): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/coverage/CoverageDecorationManager.js(50,72): error TS2345: Argument of type '{ contentURL(): string; contentType(): ResourceType; contentEncoded(): Promise; requestContent(): Promise; searchInContent(query: string, caseSensitive: boolean, isRegex: boolean): Promise<...>; }' is not assignable to parameter of type 'K'. + '{ contentURL(): string; contentType(): ResourceType; contentEncoded(): Promise; requestContent(): Promise; searchInContent(query: string, caseSensitive: boolean, isRegex: boolean): Promise<...>; }' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/coverage/CoverageDecorationManager.js(115,72): error TS2345: Argument of type 'UISourceCode' is not assignable to parameter of type 'V'. + 'UISourceCode' is assignable to the constraint of type 'V', but 'V' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/coverage/CoverageDecorationManager.js(135,32): error TS2694: Namespace 'Coverage' has no exported member 'RawLocation'. node_modules/chrome-devtools-frontend/front_end/coverage/CoverageDecorationManager.js(169,16): error TS2403: Subsequent variable declarations must have the same type. Variable 'location' must be of type 'Location', but here has type 'CSSLocation'. node_modules/chrome-devtools-frontend/front_end/coverage/CoverageDecorationManager.js(170,31): error TS2339: Property 'header' does not exist on type 'Location'. @@ -4509,6 +4533,7 @@ node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(94,42): er node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(96,45): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(98,48): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(109,26): error TS2352: Conversion of type 'DataGridNode' to type 'NODE_TYPE' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. + 'DataGridNode' is assignable to the constraint of type 'NODE_TYPE', but 'NODE_TYPE' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(121,17): error TS7014: Function type, which lacks return-type annotation, implicitly has an 'any' return type. node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(123,17): error TS7014: Function type, which lacks return-type annotation, implicitly has an 'any' return type. node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(134,45): error TS2554: Expected 0 arguments, but got 1. @@ -4552,11 +4577,13 @@ node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(375,13): e node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(421,32): error TS2339: Property 'isCreationNode' does not exist on type 'DataGridNode'. node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(435,32): error TS2339: Property 'isCreationNode' does not exist on type 'DataGridNode'. node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(472,24): error TS2345: Argument of type 'DataGridNode' is not assignable to parameter of type 'NODE_TYPE'. + 'DataGridNode' is assignable to the constraint of type 'NODE_TYPE', but 'NODE_TYPE' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(474,27): error TS2339: Property 'isCreationNode' does not exist on type 'DataGridNode'. node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(591,44): error TS2345: Argument of type 'NODE_TYPE' is not assignable to parameter of type 'DataGridNode'. node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(595,25): error TS2339: Property 'data' does not exist on type 'NODE_TYPE'. node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(622,5): error TS2322: Type 'DataGridNode[]' is not assignable to type 'NODE_TYPE[]'. Type 'DataGridNode' is not assignable to type 'NODE_TYPE'. + 'DataGridNode' is assignable to the constraint of type 'NODE_TYPE', but 'NODE_TYPE' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(641,56): error TS2339: Property 'offsetWidth' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(648,37): error TS2339: Property 'offsetWidth' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(649,41): error TS2339: Property 'rows' does not exist on type 'Element'. @@ -4690,12 +4717,15 @@ node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(1736,37): node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(1741,33): error TS2339: Property 'children' does not exist on type 'NODE_TYPE'. node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(1756,24): error TS2339: Property 'revealed' does not exist on type 'NODE_TYPE'. node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(1764,43): error TS2345: Argument of type 'this' is not assignable to parameter of type 'NODE_TYPE'. - Type 'DataGridNode' is not assignable to type 'NODE_TYPE'. + 'this' is assignable to the constraint of type 'NODE_TYPE', but 'NODE_TYPE' could be instantiated with a different subtype of constraint '{}'. + Type 'DataGridNode' is not assignable to type 'NODE_TYPE'. + 'DataGridNode' is assignable to the constraint of type 'NODE_TYPE', but 'NODE_TYPE' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(1779,26): error TS2339: Property 'revealed' does not exist on type 'NODE_TYPE'. node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(1784,26): error TS2339: Property '_detach' does not exist on type 'NODE_TYPE'. node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(1792,19): error TS2339: Property 'revealed' does not exist on type 'NODE_TYPE'. node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(1793,17): error TS2339: Property '_attach' does not exist on type 'NODE_TYPE'. node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(1810,43): error TS2345: Argument of type 'this' is not assignable to parameter of type 'NODE_TYPE'. + 'this' is assignable to the constraint of type 'NODE_TYPE', but 'NODE_TYPE' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(1818,48): error TS2339: Property '_isRoot' does not exist on type 'NODE_TYPE'. node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(1819,28): error TS2339: Property 'expanded' does not exist on type 'NODE_TYPE'. node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(1820,25): error TS2339: Property 'expand' does not exist on type 'NODE_TYPE'. @@ -4703,6 +4733,7 @@ node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(1821,41): node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(1824,20): error TS2339: Property 'scrollIntoViewIfNeeded' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(1892,9): error TS2367: This condition will always return 'false' since the types 'this' and 'NODE_TYPE' have no overlap. node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(1899,5): error TS2322: Type 'this' is not assignable to type 'NODE_TYPE'. + 'this' is assignable to the constraint of type 'NODE_TYPE', but 'NODE_TYPE' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(1900,26): error TS2339: Property '_isRoot' does not exist on type 'NODE_TYPE'. node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(1900,60): error TS2339: Property 'revealed' does not exist on type 'NODE_TYPE'. node_modules/chrome-devtools-frontend/front_end/data_grid/DataGrid.js(1900,77): error TS2339: Property 'nextSibling' does not exist on type 'NODE_TYPE'. @@ -4740,6 +4771,7 @@ node_modules/chrome-devtools-frontend/front_end/data_grid/SortableDataGrid.js(19 Types of parameters 'a' and 'arg0' are incompatible. Type 'NODE_TYPE' is not assignable to type 'SortableDataGridNode'. node_modules/chrome-devtools-frontend/front_end/data_grid/SortableDataGrid.js(20,80): error TS2345: Argument of type 'SortableDataGridNode' is not assignable to parameter of type 'NODE_TYPE'. + 'SortableDataGridNode' is assignable to the constraint of type 'NODE_TYPE', but 'NODE_TYPE' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/data_grid/SortableDataGrid.js(82,56): error TS2694: Namespace 'DataGrid.DataGrid' has no exported member 'ColumnDescriptor'. node_modules/chrome-devtools-frontend/front_end/data_grid/SortableDataGrid.js(131,20): error TS2352: Conversion of type 'NODE_TYPE' to type 'SortableDataGridNode' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. node_modules/chrome-devtools-frontend/front_end/data_grid/SortableDataGrid.js(141,21): error TS2339: Property 'recalculateSiblings' does not exist on type 'NODE_TYPE'. @@ -4759,6 +4791,7 @@ node_modules/chrome-devtools-frontend/front_end/data_grid/ViewportDataGrid.js(9, Type '{ ViewportCalculated: symbol; }' is not assignable to type '{ SelectedNode: symbol; DeselectedNode: symbol; OpenedNode: symbol; SortingChanged: symbol; PaddingChanged: symbol; }'. node_modules/chrome-devtools-frontend/front_end/data_grid/ViewportDataGrid.js(11,41): error TS2694: Namespace 'DataGrid.DataGrid' has no exported member 'ColumnDescriptor'. node_modules/chrome-devtools-frontend/front_end/data_grid/ViewportDataGrid.js(32,22): error TS2345: Argument of type 'ViewportDataGridNode' is not assignable to parameter of type 'NODE_TYPE'. + 'ViewportDataGridNode' is assignable to the constraint of type 'NODE_TYPE', but 'NODE_TYPE' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/data_grid/ViewportDataGrid.js(43,41): error TS2339: Property 'flatChildren' does not exist on type 'NODE_TYPE'. node_modules/chrome-devtools-frontend/front_end/data_grid/ViewportDataGrid.js(87,49): error TS2339: Property 'isScrolledToBottom' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/data_grid/ViewportDataGrid.js(104,51): error TS2339: Property 'isScrolledToBottom' does not exist on type 'Element'. @@ -5659,11 +5692,17 @@ node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(11 node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(1131,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(1145,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(1232,7): error TS2322: Type 'StylePropertiesSection' is not assignable to type 'this'. + 'StylePropertiesSection' is assignable to the constraint of type 'this', but 'this' could be instantiated with a different subtype of constraint 'StylePropertiesSection'. node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(1236,7): error TS2322: Type 'StylePropertiesSection' is not assignable to type 'this'. + 'StylePropertiesSection' is assignable to the constraint of type 'this', but 'this' could be instantiated with a different subtype of constraint 'StylePropertiesSection'. node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(1238,9): error TS2322: Type 'StylePropertiesSection' is not assignable to type 'this'. + 'StylePropertiesSection' is assignable to the constraint of type 'this', but 'this' could be instantiated with a different subtype of constraint 'StylePropertiesSection'. node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(1250,7): error TS2322: Type 'StylePropertiesSection' is not assignable to type 'this'. + 'StylePropertiesSection' is assignable to the constraint of type 'this', but 'this' could be instantiated with a different subtype of constraint 'StylePropertiesSection'. node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(1254,7): error TS2322: Type 'StylePropertiesSection' is not assignable to type 'this'. + 'StylePropertiesSection' is assignable to the constraint of type 'this', but 'this' could be instantiated with a different subtype of constraint 'StylePropertiesSection'. node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(1256,9): error TS2322: Type 'StylePropertiesSection' is not assignable to type 'this'. + 'StylePropertiesSection' is assignable to the constraint of type 'this', but 'this' could be instantiated with a different subtype of constraint 'StylePropertiesSection'. node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(1273,15): error TS2339: Property 'setOverloaded' does not exist on type 'TreeElement'. node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(1273,62): error TS2339: Property 'property' does not exist on type 'TreeElement'. node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(1296,13): error TS2339: Property 'consume' does not exist on type 'Event'. @@ -5769,6 +5808,7 @@ node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(27 node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(2750,49): error TS2694: Namespace 'Elements.StylePropertyTreeElement' has no exported member 'Context'. node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(2765,40): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(2769,7): error TS2322: Type 'StylePropertyTreeElement' is not assignable to type 'this'. + 'StylePropertyTreeElement' is assignable to the constraint of type 'this', but 'this' could be instantiated with a different subtype of constraint 'StylePropertyTreeElement'. node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(2780,32): error TS2339: Property 'isWhitespace' does not exist on type 'string'. node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(2785,32): error TS2339: Property 'focus' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(2788,77): error TS2339: Property 'isWhitespace' does not exist on type 'string'. @@ -5779,6 +5819,7 @@ node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(28 node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(2839,25): error TS2339: Property 'startEditing' does not exist on type 'TreeElement'. node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(2849,61): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(2857,9): error TS2322: Type 'StylePropertyTreeElement' is not assignable to type 'this'. + 'StylePropertyTreeElement' is assignable to the constraint of type 'this', but 'this' could be instantiated with a different subtype of constraint 'StylePropertyTreeElement'. node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(2906,7): error TS2322: Type 'Promise' is not assignable to type 'Promise'. node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(2910,7): error TS2322: Type 'Promise' is not assignable to type 'Promise'. node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(2918,7): error TS2322: Type 'Promise' is not assignable to type 'Promise'. @@ -8089,6 +8130,7 @@ node_modules/chrome-devtools-frontend/front_end/performance_test_runner/Timeline node_modules/chrome-devtools-frontend/front_end/performance_test_runner/TimelineTestRunner.js(220,44): error TS2339: Property 'peekLast' does not exist on type 'any[]'. node_modules/chrome-devtools-frontend/front_end/performance_test_runner/TimelineTestRunner.js(255,46): error TS2554: Expected 2 arguments, but got 3. node_modules/chrome-devtools-frontend/front_end/performance_test_runner/TimelineTestRunner.js(321,53): error TS2345: Argument of type 'number' is not assignable to parameter of type 'V'. + 'number' is assignable to the constraint of type 'V', but 'V' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/performance_test_runner/TimelineTestRunner.js(347,30): error TS2339: Property 'timeline' does not exist on type 'any[]'. node_modules/chrome-devtools-frontend/front_end/performance_test_runner/TimelineTestRunner.js(355,13): error TS2339: Property 'timeline' does not exist on type 'any[]'. node_modules/chrome-devtools-frontend/front_end/persistence/Automapping.js(12,14): error TS7014: Function type, which lacks return-type annotation, implicitly has an 'any' return type. @@ -8185,6 +8227,7 @@ node_modules/chrome-devtools-frontend/front_end/persistence/IsolatedFileSystemMa node_modules/chrome-devtools-frontend/front_end/persistence/IsolatedFileSystemManager.js(171,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/persistence/IsolatedFileSystemManager.js(185,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/persistence/IsolatedFileSystemManager.js(211,21): error TS2345: Argument of type 'string' is not assignable to parameter of type 'K'. + 'string' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/persistence/IsolatedFileSystemManager.js(222,30): error TS2339: Property 'valuesArray' does not exist on type 'Map'. node_modules/chrome-devtools-frontend/front_end/persistence/IsolatedFileSystemManager.js(264,14): error TS7014: Function type, which lacks return-type annotation, implicitly has an 'any' return type. node_modules/chrome-devtools-frontend/front_end/persistence/IsolatedFileSystemManager.js(284,22): error TS2694: Namespace 'Common' has no exported member 'Event'. @@ -8204,10 +8247,14 @@ node_modules/chrome-devtools-frontend/front_end/persistence/Persistence.js(176,2 node_modules/chrome-devtools-frontend/front_end/persistence/Persistence.js(218,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/persistence/Persistence.js(323,14): error TS7014: Function type, which lacks return-type annotation, implicitly has an 'any' return type. node_modules/chrome-devtools-frontend/front_end/persistence/Persistence.js(326,47): error TS2345: Argument of type 'UISourceCode' is not assignable to parameter of type 'K'. + 'UISourceCode' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/persistence/Persistence.js(331,14): error TS7014: Function type, which lacks return-type annotation, implicitly has an 'any' return type. node_modules/chrome-devtools-frontend/front_end/persistence/Persistence.js(334,50): error TS2345: Argument of type 'UISourceCode' is not assignable to parameter of type 'K'. + 'UISourceCode' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/persistence/Persistence.js(341,52): error TS2345: Argument of type 'UISourceCode' is not assignable to parameter of type 'K'. + 'UISourceCode' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/persistence/Persistence.js(343,74): error TS2345: Argument of type 'UISourceCode' is not assignable to parameter of type 'K'. + 'UISourceCode' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/persistence/PersistenceActions.js(30,44): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/persistence/PersistenceActions.js(34,9): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/persistence/PersistenceActions.js(39,44): error TS2555: Expected at least 2 arguments, but got 1. @@ -8278,8 +8325,10 @@ node_modules/chrome-devtools-frontend/front_end/platform/utilities.js(944,41): e node_modules/chrome-devtools-frontend/front_end/platform/utilities.js(954,49): error TS1110: Type expected. node_modules/chrome-devtools-frontend/front_end/platform/utilities.js(961,8): error TS2339: Property 'format' does not exist on type 'StringConstructor'. node_modules/chrome-devtools-frontend/front_end/platform/utilities.js(963,51): error TS2345: Argument of type 'string' is not assignable to parameter of type 'Q'. + 'string' is assignable to the constraint of type 'Q', but 'Q' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/platform/utilities.js(978,42): error TS2339: Property 'tokenizeFormatString' does not exist on type 'StringConstructor'. node_modules/chrome-devtools-frontend/front_end/platform/utilities.js(1000,31): error TS2345: Argument of type 'string' is not assignable to parameter of type 'Q'. + 'string' is assignable to the constraint of type 'Q', but 'Q' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/platform/utilities.js(1057,39): error TS2339: Property 'regexSpecialCharacters' does not exist on type 'StringConstructor'. node_modules/chrome-devtools-frontend/front_end/platform/utilities.js(1108,15): error TS2339: Property 'valuesArray' does not exist on type 'Set'. node_modules/chrome-devtools-frontend/front_end/platform/utilities.js(1116,15): error TS2339: Property 'firstValue' does not exist on type 'Set'. @@ -8294,9 +8343,12 @@ node_modules/chrome-devtools-frontend/front_end/platform/utilities.js(1169,24): node_modules/chrome-devtools-frontend/front_end/platform/utilities.js(1169,30): error TS2304: Cannot find name 'VALUE'. node_modules/chrome-devtools-frontend/front_end/platform/utilities.js(1171,15): error TS2339: Property 'inverse' does not exist on type 'Map'. node_modules/chrome-devtools-frontend/front_end/platform/utilities.js(1200,13): error TS2345: Argument of type 'V' is not assignable to parameter of type 'V'. + 'V' is assignable to the constraint of type 'V', but 'V' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/platform/utilities.js(1211,5): error TS2719: Type 'Set' is not assignable to type 'Set'. Two different types with this name exist, but they are unrelated. Type 'V' is not assignable to type 'V'. Two different types with this name exist, but they are unrelated. + 'V' is assignable to the constraint of type 'V', but 'V' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/platform/utilities.js(1231,20): error TS2345: Argument of type 'V' is not assignable to parameter of type 'V'. + 'V' is assignable to the constraint of type 'V', but 'V' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/platform/utilities.js(1267,22): error TS2339: Property 'keysArray' does not exist on type 'Map>'. node_modules/chrome-devtools-frontend/front_end/platform/utilities.js(1277,14): error TS2339: Property 'pushAll' does not exist on type 'any[]'. node_modules/chrome-devtools-frontend/front_end/platform/utilities.js(1277,40): error TS2339: Property 'valuesArray' does not exist on type 'Set'. @@ -8777,6 +8829,7 @@ node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotGridNodes.j node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotGridNodes.js(1289,22): error TS2339: Property 'withThousandsSeparator' does not exist on type 'NumberConstructor'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotGridNodes.js(1306,40): error TS2339: Property 'snapshot' does not exist on type 'HeapSnapshotSortableDataGrid'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotGridNodes.js(1314,7): error TS2322: Type 'AllocationGridNode' is not assignable to type 'this'. + 'AllocationGridNode' is assignable to the constraint of type 'this', but 'this' could be instantiated with a different subtype of constraint 'AllocationGridNode'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotGridNodes.js(1321,39): error TS2339: Property '_createComparator' does not exist on type 'HeapSnapshotSortableDataGrid'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotGridNodes.js(1347,44): error TS2339: Property 'heapProfilerModel' does not exist on type 'HeapSnapshotSortableDataGrid'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotGridNodes.js(1349,38): error TS2339: Property '_linkifier' does not exist on type 'HeapSnapshotSortableDataGrid'. @@ -9038,7 +9091,9 @@ node_modules/chrome-devtools-frontend/front_end/profiler/TopDownProfileDataGrid. Property 'populate' does not exist on type 'TopDownProfileDataGridTree'. node_modules/chrome-devtools-frontend/front_end/protocol/InspectorBackend.js(148,14): error TS7014: Function type, which lacks return-type annotation, implicitly has an 'any' return type. node_modules/chrome-devtools-frontend/front_end/protocol/InspectorBackend.js(168,40): error TS2345: Argument of type 'S' is not assignable to parameter of type 'S'. + 'S' is assignable to the constraint of type 'S', but 'S' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/protocol/InspectorBackend.js(170,24): error TS2345: Argument of type 'S' is not assignable to parameter of type 'T'. + 'S' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/protocol/InspectorBackend.js(194,15): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. node_modules/chrome-devtools-frontend/front_end/protocol/InspectorBackend.js(201,17): error TS7014: Function type, which lacks return-type annotation, implicitly has an 'any' return type. node_modules/chrome-devtools-frontend/front_end/protocol/InspectorBackend.js(202,20): error TS7014: Function type, which lacks return-type annotation, implicitly has an 'any' return type. @@ -9744,6 +9799,7 @@ node_modules/chrome-devtools-frontend/front_end/sdk/DOMModel.js(853,65): error T node_modules/chrome-devtools-frontend/front_end/sdk/DOMModel.js(860,24): error TS2694: Namespace 'Protocol' has no exported member 'Runtime'. node_modules/chrome-devtools-frontend/front_end/sdk/DOMModel.js(880,34): error TS2694: Namespace 'Protocol' has no exported member 'DOM'. node_modules/chrome-devtools-frontend/front_end/sdk/DOMModel.js(896,7): error TS2322: Type 'DOMNode' is not assignable to type 'this'. + 'DOMNode' is assignable to the constraint of type 'this', but 'this' could be instantiated with a different subtype of constraint 'DOMNode'. node_modules/chrome-devtools-frontend/front_end/sdk/DOMModel.js(928,12): error TS2339: Property 'scrollIntoViewIfNeeded' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/sdk/DOMModel.js(940,29): error TS2339: Property 'pageAgent' does not exist on type 'Target'. node_modules/chrome-devtools-frontend/front_end/sdk/DOMModel.js(947,12): error TS2339: Property 'focus' does not exist on type 'Element'. @@ -9758,6 +9814,7 @@ node_modules/chrome-devtools-frontend/front_end/sdk/DOMModel.js(1176,34): error node_modules/chrome-devtools-frontend/front_end/sdk/DOMModel.js(1188,46): error TS2339: Property 'valuesArray' does not exist on type 'Set'. node_modules/chrome-devtools-frontend/front_end/sdk/DOMModel.js(1202,14): error TS7014: Function type, which lacks return-type annotation, implicitly has an 'any' return type. node_modules/chrome-devtools-frontend/front_end/sdk/DOMModel.js(1214,16): error TS2345: Argument of type 'T' is not assignable to parameter of type 'T'. + 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/sdk/DOMModel.js(1220,24): error TS2694: Namespace 'Protocol' has no exported member 'DOM'. node_modules/chrome-devtools-frontend/front_end/sdk/DOMModel.js(1235,24): error TS2694: Namespace 'Protocol' has no exported member 'DOM'. node_modules/chrome-devtools-frontend/front_end/sdk/DOMModel.js(1248,31): error TS2694: Namespace 'Protocol' has no exported member 'DOM'. @@ -10477,23 +10534,35 @@ node_modules/chrome-devtools-frontend/front_end/sdk/SourceMap.js(558,18): error node_modules/chrome-devtools-frontend/front_end/sdk/SourceMap.js(559,29): error TS2339: Property 'upperBound' does not exist on type 'SourceMapEntry[]'. node_modules/chrome-devtools-frontend/front_end/sdk/SourceMapManager.js(52,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/sdk/SourceMapManager.js(85,41): error TS2345: Argument of type 'string' is not assignable to parameter of type 'K'. + 'string' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/sdk/SourceMapManager.js(86,46): error TS2345: Argument of type 'string' is not assignable to parameter of type 'K'. + 'string' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/sdk/SourceMapManager.js(87,51): error TS2345: Argument of type 'string' is not assignable to parameter of type 'K'. + 'string' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/sdk/SourceMapManager.js(141,49): error TS2345: Argument of type 'string' is not assignable to parameter of type 'K'. + 'string' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/sdk/SourceMapManager.js(146,44): error TS2345: Argument of type 'string' is not assignable to parameter of type 'K'. + 'string' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/sdk/SourceMapManager.js(159,36): error TS2352: Conversion of type 'TextSourceMap' to type '{ compiledURL(): string; url(): string; sourceURLs(): string[]; sourceContentProvider(sourceURL: string, contentType: ResourceType): { contentURL(): string; contentType(): ResourceType; contentEncoded(): Promise<...>; requestContent(): Promise<...>; searchInContent(query: string, caseSensitive: boolean, isRegex: boo...' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. node_modules/chrome-devtools-frontend/front_end/sdk/SourceMapManager.js(159,36): error TS2352: Conversion of type 'TextSourceMap' to type '{ compiledURL(): string; url(): string; sourceURLs(): string[]; sourceContentProvider(sourceURL: string, contentType: ResourceType): { contentURL(): string; contentType(): ResourceType; contentEncoded(): Promise<...>; requestContent(): Promise<...>; searchInContent(query: string, caseSensitive: boolean, isRegex: boo...' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. Property '_json' does not exist on type '{ compiledURL(): string; url(): string; sourceURLs(): string[]; sourceContentProvider(sourceURL: string, contentType: ResourceType): { contentURL(): string; contentType(): ResourceType; contentEncoded(): Promise<...>; requestContent(): Promise<...>; searchInContent(query: string, caseSensitive: boolean, isRegex: boo...'. node_modules/chrome-devtools-frontend/front_end/sdk/SourceMapManager.js(163,12): error TS2339: Property 'catchException' does not exist on type 'Promise'. node_modules/chrome-devtools-frontend/front_end/sdk/SourceMapManager.js(173,60): error TS2345: Argument of type 'string' is not assignable to parameter of type 'K'. + 'string' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/sdk/SourceMapManager.js(174,52): error TS2345: Argument of type 'string' is not assignable to parameter of type 'K'. + 'string' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/sdk/SourceMapManager.js(193,39): error TS2345: Argument of type 'string' is not assignable to parameter of type 'K'. + 'string' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/sdk/SourceMapManager.js(208,39): error TS2339: Property 'runtime' does not exist on type 'Window'. node_modules/chrome-devtools-frontend/front_end/sdk/SourceMapManager.js(210,31): error TS2339: Property 'containsAll' does not exist on type 'Set'. node_modules/chrome-devtools-frontend/front_end/sdk/SourceMapManager.js(227,47): error TS2345: Argument of type 'string' is not assignable to parameter of type 'K'. + 'string' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/sdk/SourceMapManager.js(228,53): error TS2345: Argument of type 'string' is not assignable to parameter of type 'K'. + 'string' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/sdk/SourceMapManager.js(232,40): error TS2345: Argument of type 'string' is not assignable to parameter of type 'K'. + 'string' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/sdk/SourceMapManager.js(234,42): error TS2345: Argument of type 'string' is not assignable to parameter of type 'K'. + 'string' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/sdk/Target.js(16,52): error TS2694: Namespace 'Protocol.InspectorBackend.Connection' has no exported member 'Factory'. node_modules/chrome-devtools-frontend/front_end/sdk/Target.js(148,48): error TS2339: Property 'valuesArray' does not exist on type 'Map'. node_modules/chrome-devtools-frontend/front_end/sdk/Target.js(159,53): error TS2345: Argument of type 'new (arg1: Target) => T' is not assignable to parameter of type 'new (arg1: Target) => SDKModel'. @@ -10509,13 +10578,16 @@ node_modules/chrome-devtools-frontend/front_end/sdk/TargetManager.js(104,35): er node_modules/chrome-devtools-frontend/front_end/sdk/TargetManager.js(105,32): error TS2345: Argument of type 'new (arg1: Target) => T' is not assignable to parameter of type 'new (arg1: Target) => SDKModel'. node_modules/chrome-devtools-frontend/front_end/sdk/TargetManager.js(106,30): error TS2345: Argument of type 'new (arg1: Target) => T' is not assignable to parameter of type 'new (arg1: Target) => SDKModel'. node_modules/chrome-devtools-frontend/front_end/sdk/TargetManager.js(108,27): error TS2345: Argument of type 'T' is not assignable to parameter of type 'T'. + 'T' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/sdk/TargetManager.js(117,35): error TS2345: Argument of type 'new (arg1: Target) => T' is not assignable to parameter of type 'new (arg1: Target) => SDKModel'. Type 'T' is not assignable to type 'SDKModel'. node_modules/chrome-devtools-frontend/front_end/sdk/TargetManager.js(119,46): error TS2345: Argument of type 'new (arg1: Target) => T' is not assignable to parameter of type 'new (arg1: Target) => SDKModel'. node_modules/chrome-devtools-frontend/front_end/sdk/TargetManager.js(120,15): error TS2339: Property 'remove' does not exist on type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }[]'. node_modules/chrome-devtools-frontend/front_end/sdk/TargetManager.js(122,35): error TS2345: Argument of type 'new (arg1: Target) => T' is not assignable to parameter of type 'new (arg1: Target) => SDKModel'. node_modules/chrome-devtools-frontend/front_end/sdk/TargetManager.js(134,27): error TS2345: Argument of type 'SDKModel' is not assignable to parameter of type 'T'. + 'SDKModel' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/sdk/TargetManager.js(146,29): error TS2345: Argument of type 'SDKModel' is not assignable to parameter of type 'T'. + 'SDKModel' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/sdk/TargetManager.js(152,14): error TS7014: Function type, which lacks return-type annotation, implicitly has an 'any' return type. node_modules/chrome-devtools-frontend/front_end/sdk/TargetManager.js(152,31): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/sdk/TargetManager.js(157,42): error TS2345: Argument of type 'Function' is not assignable to parameter of type 'new (arg1: Target) => any'. @@ -11043,6 +11115,7 @@ node_modules/chrome-devtools-frontend/front_end/sources/JavaScriptBreakpointsSid node_modules/chrome-devtools-frontend/front_end/sources/JavaScriptBreakpointsSidebarPane.js(41,27): error TS2339: Property 'removeChildren' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/sources/JavaScriptBreakpointsSidebarPane.js(42,47): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/sources/JavaScriptBreakpointsSidebarPane.js(53,28): error TS2345: Argument of type 'string' is not assignable to parameter of type 'K'. + 'string' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/sources/JavaScriptBreakpointsSidebarPane.js(66,35): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/sources/JavaScriptBreakpointsSidebarPane.js(73,36): error TS2339: Property 'createChild' does not exist on type 'ChildNode'. node_modules/chrome-devtools-frontend/front_end/sources/JavaScriptBreakpointsSidebarPane.js(78,37): error TS2339: Property 'uiLocation' does not exist on type 'V'. @@ -11146,14 +11219,18 @@ node_modules/chrome-devtools-frontend/front_end/sources/NavigatorView.js(167,22) node_modules/chrome-devtools-frontend/front_end/sources/NavigatorView.js(175,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/sources/NavigatorView.js(183,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/sources/NavigatorView.js(189,52): error TS2345: Argument of type 'UISourceCode' is not assignable to parameter of type 'K'. + 'UISourceCode' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/sources/NavigatorView.js(191,19): error TS2339: Property 'updateTitle' does not exist on type 'V'. node_modules/chrome-devtools-frontend/front_end/sources/NavigatorView.js(192,55): error TS2345: Argument of type 'UISourceCode' is not assignable to parameter of type 'K'. + 'UISourceCode' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/sources/NavigatorView.js(194,22): error TS2339: Property 'updateTitle' does not exist on type 'V'. node_modules/chrome-devtools-frontend/front_end/sources/NavigatorView.js(212,22): error TS2339: Property 'updateTitle' does not exist on type 'NavigatorTreeNode'. node_modules/chrome-devtools-frontend/front_end/sources/NavigatorView.js(262,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/sources/NavigatorView.js(275,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/sources/NavigatorView.js(283,55): error TS2345: Argument of type 'UISourceCode' is not assignable to parameter of type 'K'. + 'UISourceCode' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/sources/NavigatorView.js(336,33): error TS2345: Argument of type 'UISourceCode' is not assignable to parameter of type 'K'. + 'UISourceCode' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/sources/NavigatorView.js(346,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/sources/NavigatorView.js(354,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/sources/NavigatorView.js(388,58): error TS2339: Property 'reverse' does not exist on type 'string'. @@ -11161,10 +11238,13 @@ node_modules/chrome-devtools-frontend/front_end/sources/NavigatorView.js(499,29) node_modules/chrome-devtools-frontend/front_end/sources/NavigatorView.js(527,28): error TS2339: Property '_boostOrder' does not exist on type 'TreeElement'. node_modules/chrome-devtools-frontend/front_end/sources/NavigatorView.js(578,14): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/sources/NavigatorView.js(592,45): error TS2345: Argument of type 'UISourceCode' is not assignable to parameter of type 'K'. + 'UISourceCode' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/sources/NavigatorView.js(593,22): error TS2339: Property 'firstValue' does not exist on type 'Set'. node_modules/chrome-devtools-frontend/front_end/sources/NavigatorView.js(623,45): error TS2345: Argument of type 'UISourceCode' is not assignable to parameter of type 'K'. + 'UISourceCode' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/sources/NavigatorView.js(625,36): error TS2345: Argument of type 'V' is not assignable to parameter of type 'NavigatorUISourceCodeTreeNode'. node_modules/chrome-devtools-frontend/front_end/sources/NavigatorView.js(633,36): error TS2345: Argument of type 'UISourceCode' is not assignable to parameter of type 'K'. + 'UISourceCode' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/sources/NavigatorView.js(638,27): error TS2339: Property 'parent' does not exist on type 'NavigatorUISourceCodeTreeNode'. node_modules/chrome-devtools-frontend/front_end/sources/NavigatorView.js(643,25): error TS2339: Property 'parent' does not exist on type 'NavigatorUISourceCodeTreeNode'. node_modules/chrome-devtools-frontend/front_end/sources/NavigatorView.js(655,93): error TS2339: Property '_folderPath' does not exist on type '(NavigatorUISourceCodeTreeNode & NavigatorGroupTreeNode) | (NavigatorUISourceCodeTreeNode & NavigatorFolderTreeNode)'. @@ -11720,13 +11800,17 @@ node_modules/chrome-devtools-frontend/front_end/text_editor/CodeMirrorTextEditor node_modules/chrome-devtools-frontend/front_end/text_editor/CodeMirrorTextEditor.js(735,14): error TS7014: Function type, which lacks return-type annotation, implicitly has an 'any' return type. node_modules/chrome-devtools-frontend/front_end/text_editor/CodeMirrorTextEditor.js(796,14): error TS7014: Function type, which lacks return-type annotation, implicitly has an 'any' return type. node_modules/chrome-devtools-frontend/front_end/text_editor/CodeMirrorTextEditor.js(842,27): error TS2345: Argument of type 'number' is not assignable to parameter of type 'K'. + 'number' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/text_editor/CodeMirrorTextEditor.js(855,13): error TS2339: Property 'style' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/text_editor/CodeMirrorTextEditor.js(856,13): error TS2339: Property 'style' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/text_editor/CodeMirrorTextEditor.js(863,27): error TS2345: Argument of type 'number' is not assignable to parameter of type 'K'. + 'number' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/text_editor/CodeMirrorTextEditor.js(866,49): error TS2694: Namespace 'TextEditor.CodeMirrorTextEditor' has no exported member 'Decoration'. node_modules/chrome-devtools-frontend/front_end/text_editor/CodeMirrorTextEditor.js(879,27): error TS2345: Argument of type 'number' is not assignable to parameter of type 'K'. + 'number' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/text_editor/CodeMirrorTextEditor.js(883,49): error TS2694: Namespace 'TextEditor.CodeMirrorTextEditor' has no exported member 'Decoration'. node_modules/chrome-devtools-frontend/front_end/text_editor/CodeMirrorTextEditor.js(889,32): error TS2345: Argument of type 'number' is not assignable to parameter of type 'K'. + 'number' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/text_editor/CodeMirrorTextEditor.js(899,25): error TS2339: Property 'constrain' does not exist on type 'NumberConstructor'. node_modules/chrome-devtools-frontend/front_end/text_editor/CodeMirrorTextEditor.js(902,27): error TS2339: Property 'constrain' does not exist on type 'NumberConstructor'. node_modules/chrome-devtools-frontend/front_end/text_editor/CodeMirrorTextEditor.js(955,5): error TS2322: Type 'string' is not assignable to type 'number'. @@ -12587,6 +12671,7 @@ node_modules/chrome-devtools-frontend/front_end/timeline_model/TimelineProfileTr node_modules/chrome-devtools-frontend/front_end/timeline_model/TimelineProfileTree.js(501,46): error TS2322: Type 'Node' is not assignable to type 'this'. node_modules/chrome-devtools-frontend/front_end/timeline_model/TimelineProfileTree.js(508,11): error TS2403: Subsequent variable declarations must have the same type. Variable 'node' must be of type 'this', but here has type 'Node'. node_modules/chrome-devtools-frontend/front_end/timeline_model/TimelineProfileTree.js(512,9): error TS2322: Type 'BottomUpNode' is not assignable to type 'this'. + 'BottomUpNode' is assignable to the constraint of type 'this', but 'this' could be instantiated with a different subtype of constraint 'BottomUpNode'. node_modules/chrome-devtools-frontend/front_end/timeline_model/TimelineProfileTree.js(559,23): error TS2694: Namespace 'Protocol' has no exported member 'Runtime'. node_modules/chrome-devtools-frontend/front_end/timeline_model/TimelineProfileTree.js(563,33): error TS2694: Namespace 'Protocol' has no exported member 'Runtime'. node_modules/chrome-devtools-frontend/front_end/timeline_model/TracingLayerTree.js(6,41): error TS2694: Namespace 'TimelineModel' has no exported member 'TracingLayerPayload'. @@ -12958,12 +13043,16 @@ node_modules/chrome-devtools-frontend/front_end/ui/SettingsUI.js(155,15): error node_modules/chrome-devtools-frontend/front_end/ui/ShortcutRegistry.js(16,56): error TS2694: Namespace 'UI.KeyboardShortcut' has no exported member 'Descriptor'. node_modules/chrome-devtools-frontend/front_end/ui/ShortcutRegistry.js(26,83): error TS2339: Property 'valuesArray' does not exist on type 'Set'. node_modules/chrome-devtools-frontend/front_end/ui/ShortcutRegistry.js(34,42): error TS2345: Argument of type 'string' is not assignable to parameter of type 'K'. + 'string' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/ui/ShortcutRegistry.js(39,44): error TS2694: Namespace 'UI.KeyboardShortcut' has no exported member 'Descriptor'. node_modules/chrome-devtools-frontend/front_end/ui/ShortcutRegistry.js(42,46): error TS2345: Argument of type 'string' is not assignable to parameter of type 'K'. + 'string' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/ui/ShortcutRegistry.js(88,15): error TS2339: Property 'consume' does not exist on type 'KeyboardEvent'. node_modules/chrome-devtools-frontend/front_end/ui/ShortcutRegistry.js(94,15): error TS2339: Property 'consume' does not exist on type 'KeyboardEvent'. node_modules/chrome-devtools-frontend/front_end/ui/ShortcutRegistry.js(147,39): error TS2345: Argument of type 'string' is not assignable to parameter of type 'K'. + 'string' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/ui/ShortcutRegistry.js(148,35): error TS2345: Argument of type 'string' is not assignable to parameter of type 'K'. + 'string' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/ui/ShortcutRegistry.js(163,27): error TS2339: Property 'runtime' does not exist on type 'Window'. node_modules/chrome-devtools-frontend/front_end/ui/ShortcutsScreen.js(42,54): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/ui/ShortcutsScreen.js(46,46): error TS2555: Expected at least 2 arguments, but got 1. @@ -13047,6 +13136,7 @@ node_modules/chrome-devtools-frontend/front_end/ui/SoftContextMenu.js(147,47): e node_modules/chrome-devtools-frontend/front_end/ui/SoftContextMenu.js(162,22): error TS2339: Property '_isSeparator' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/ui/SoftContextMenu.js(163,22): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/ui/SoftContextMenu.js(183,7): error TS2322: Type 'SoftContextMenu' is not assignable to type 'this'. + 'SoftContextMenu' is assignable to the constraint of type 'this', but 'this' could be instantiated with a different subtype of constraint 'SoftContextMenu'. node_modules/chrome-devtools-frontend/front_end/ui/SoftDropDown.js(20,37): error TS2339: Property 'createChild' does not exist on type 'DocumentFragment'. node_modules/chrome-devtools-frontend/front_end/ui/SoftDropDown.js(25,39): error TS2345: Argument of type 'symbol' is not assignable to parameter of type 'boolean'. node_modules/chrome-devtools-frontend/front_end/ui/SoftDropDown.js(40,30): error TS2339: Property 'disabled' does not exist on type 'Element'. @@ -13502,12 +13592,15 @@ node_modules/chrome-devtools-frontend/front_end/ui/Widget.js(669,14): error TS70 node_modules/chrome-devtools-frontend/front_end/ui/Widget.js(693,51): error TS2339: Property 'deepActiveElement' does not exist on type 'Document'. node_modules/chrome-devtools-frontend/front_end/ui/Widget.js(713,1): error TS2322: Type '(child: Node) => Node' is not assignable to type '(newChild: T) => T'. Type 'Node' is not assignable to type 'T'. + 'Node' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Node'. node_modules/chrome-devtools-frontend/front_end/ui/Widget.js(715,14): error TS2339: Property '__widget' does not exist on type 'Node'. node_modules/chrome-devtools-frontend/front_end/ui/Widget.js(726,1): error TS2322: Type '(child: Node, anchor: Node) => Node' is not assignable to type '(newChild: T, refChild: Node) => T'. Type 'Node' is not assignable to type 'T'. + 'Node' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Node'. node_modules/chrome-devtools-frontend/front_end/ui/Widget.js(728,14): error TS2339: Property '__widget' does not exist on type 'Node'. node_modules/chrome-devtools-frontend/front_end/ui/Widget.js(738,1): error TS2322: Type '(child: Node) => Node' is not assignable to type '(oldChild: T) => T'. Type 'Node' is not assignable to type 'T'. + 'Node' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Node'. node_modules/chrome-devtools-frontend/front_end/ui/Widget.js(740,14): error TS2339: Property '__widgetCounter' does not exist on type 'Node'. node_modules/chrome-devtools-frontend/front_end/ui/Widget.js(740,40): error TS2339: Property '__widget' does not exist on type 'Node'. node_modules/chrome-devtools-frontend/front_end/ui/Widget.js(745,19): error TS2339: Property 'removeChildren' does not exist on type 'Element'. @@ -13602,7 +13695,9 @@ node_modules/chrome-devtools-frontend/front_end/ui/treeoutline.js(838,11): error node_modules/chrome-devtools-frontend/front_end/ui/treeoutline.js(850,17): error TS2339: Property 'treeElement' does not exist on type 'EventTarget'. node_modules/chrome-devtools-frontend/front_end/ui/treeoutline.js(864,29): error TS2339: Property 'treeElement' does not exist on type 'EventTarget'. node_modules/chrome-devtools-frontend/front_end/ui/treeoutline.js(896,7): error TS2322: Type 'TreeElement' is not assignable to type 'this'. + 'TreeElement' is assignable to the constraint of type 'this', but 'this' could be instantiated with a different subtype of constraint 'TreeElement'. node_modules/chrome-devtools-frontend/front_end/ui/treeoutline.js(945,7): error TS2322: Type 'TreeElement' is not assignable to type 'this'. + 'TreeElement' is assignable to the constraint of type 'this', but 'this' could be instantiated with a different subtype of constraint 'TreeElement'. node_modules/chrome-devtools-frontend/front_end/ui/treeoutline.js(1063,55): error TS2339: Property 'hasFocus' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/ui/treeoutline.js(1064,28): error TS2339: Property 'focus' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/ui/treeoutline.js(1078,51): error TS2345: Argument of type '0' is not assignable to parameter of type 'string'. @@ -13628,11 +13723,15 @@ node_modules/chrome-devtools-frontend/front_end/workspace/UISourceCode.js(45,25) node_modules/chrome-devtools-frontend/front_end/workspace/UISourceCode.js(136,14): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/workspace/UISourceCode.js(298,26): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/workspace/UISourceCode.js(546,27): error TS2345: Argument of type 'string' is not assignable to parameter of type 'K'. + 'string' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/workspace/UISourceCode.js(556,41): error TS2345: Argument of type 'string' is not assignable to parameter of type 'K'. + 'string' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/workspace/UISourceCode.js(557,33): error TS2345: Argument of type 'string' is not assignable to parameter of type 'K'. + 'string' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/workspace/UISourceCode.js(567,5): error TS2322: Type 'V[]' is not assignable to type 'LineMarker[]'. Type 'V' is not assignable to type 'LineMarker'. node_modules/chrome-devtools-frontend/front_end/workspace/UISourceCode.js(584,54): error TS2345: Argument of type 'string' is not assignable to parameter of type 'K'. + 'string' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint '{}'. node_modules/chrome-devtools-frontend/front_end/workspace/Workspace.js(37,15): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. node_modules/chrome-devtools-frontend/front_end/workspace/Workspace.js(42,15): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. node_modules/chrome-devtools-frontend/front_end/workspace/Workspace.js(47,15): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. diff --git a/tests/baselines/reference/user/webpack.log b/tests/baselines/reference/user/webpack.log index 03a6b924f88..0cde6bb1623 100644 --- a/tests/baselines/reference/user/webpack.log +++ b/tests/baselines/reference/user/webpack.log @@ -2,6 +2,9 @@ Exit Code: 1 Standard output: ../../../../../built/local/lib.dom.d.ts(17676,19): error TS2451: Cannot redeclare block-scoped variable 'WebAssembly'. declarations.d.ts(258,15): error TS2451: Cannot redeclare block-scoped variable 'WebAssembly'. +lib/ContextModuleFactory.js(253,50): error TS2339: Property 'concat' does not exist on type 'unknown'. +lib/web/JsonpChunkTemplatePlugin.js(13,6): error TS2339: Property 'id' does not exist on type 'unknown'. +lib/web/JsonpMainTemplatePlugin.js(501,11): error TS2339: Property 'id' does not exist on type 'unknown'. From 3df65a7a856ecfadf3940290e849bc4dc97db04b Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Wed, 1 May 2019 10:07:00 -0700 Subject: [PATCH 20/45] Add test when module resolution includes .ts file from node_modules --- ...positeWithNodeModulesSourceFile.errors.txt | 18 +++++++++++++++++ .../compositeWithNodeModulesSourceFile.js | 20 +++++++++++++++++++ ...compositeWithNodeModulesSourceFile.symbols | 14 +++++++++++++ .../compositeWithNodeModulesSourceFile.types | 15 ++++++++++++++ .../compositeWithNodeModulesSourceFile.ts | 13 ++++++++++++ 5 files changed, 80 insertions(+) create mode 100644 tests/baselines/reference/compositeWithNodeModulesSourceFile.errors.txt create mode 100644 tests/baselines/reference/compositeWithNodeModulesSourceFile.js create mode 100644 tests/baselines/reference/compositeWithNodeModulesSourceFile.symbols create mode 100644 tests/baselines/reference/compositeWithNodeModulesSourceFile.types create mode 100644 tests/cases/compiler/compositeWithNodeModulesSourceFile.ts diff --git a/tests/baselines/reference/compositeWithNodeModulesSourceFile.errors.txt b/tests/baselines/reference/compositeWithNodeModulesSourceFile.errors.txt new file mode 100644 index 00000000000..be5aebfd5bc --- /dev/null +++ b/tests/baselines/reference/compositeWithNodeModulesSourceFile.errors.txt @@ -0,0 +1,18 @@ +error TS6307: File '/foo/node_modules/myModule/index.ts' is not in project file list. Projects must list all files or use an 'include' pattern. + + +!!! error TS6307: File '/foo/node_modules/myModule/index.ts' is not in project file list. Projects must list all files or use an 'include' pattern. +==== /foo/tsconfig.json (0 errors) ==== + { + "compilerOptions": { "composite": true }, + "exclude": [ "node_modules" ] + } + +==== /foo/test.ts (0 errors) ==== + import myModule = require("myModule"); + new myModule.c(); + + +==== /foo/node_modules/myModule/index.ts (0 errors) ==== + export class c { } + \ No newline at end of file diff --git a/tests/baselines/reference/compositeWithNodeModulesSourceFile.js b/tests/baselines/reference/compositeWithNodeModulesSourceFile.js new file mode 100644 index 00000000000..9a2caf39c61 --- /dev/null +++ b/tests/baselines/reference/compositeWithNodeModulesSourceFile.js @@ -0,0 +1,20 @@ +//// [tests/cases/compiler/compositeWithNodeModulesSourceFile.ts] //// + +//// [index.ts] +export class c { } + +//// [test.ts] +import myModule = require("myModule"); +new myModule.c(); + + + +//// [test.js] +"use strict"; +exports.__esModule = true; +var myModule = require("myModule"); +new myModule.c(); + + +//// [test.d.ts] +export {}; diff --git a/tests/baselines/reference/compositeWithNodeModulesSourceFile.symbols b/tests/baselines/reference/compositeWithNodeModulesSourceFile.symbols new file mode 100644 index 00000000000..9daaf1ad5ff --- /dev/null +++ b/tests/baselines/reference/compositeWithNodeModulesSourceFile.symbols @@ -0,0 +1,14 @@ +=== /foo/test.ts === +import myModule = require("myModule"); +>myModule : Symbol(myModule, Decl(test.ts, 0, 0)) + +new myModule.c(); +>myModule.c : Symbol(myModule.c, Decl(index.ts, 0, 0)) +>myModule : Symbol(myModule, Decl(test.ts, 0, 0)) +>c : Symbol(myModule.c, Decl(index.ts, 0, 0)) + + +=== /foo/node_modules/myModule/index.ts === +export class c { } +>c : Symbol(c, Decl(index.ts, 0, 0)) + diff --git a/tests/baselines/reference/compositeWithNodeModulesSourceFile.types b/tests/baselines/reference/compositeWithNodeModulesSourceFile.types new file mode 100644 index 00000000000..d34838ae88a --- /dev/null +++ b/tests/baselines/reference/compositeWithNodeModulesSourceFile.types @@ -0,0 +1,15 @@ +=== /foo/test.ts === +import myModule = require("myModule"); +>myModule : typeof myModule + +new myModule.c(); +>new myModule.c() : myModule.c +>myModule.c : typeof myModule.c +>myModule : typeof myModule +>c : typeof myModule.c + + +=== /foo/node_modules/myModule/index.ts === +export class c { } +>c : c + diff --git a/tests/cases/compiler/compositeWithNodeModulesSourceFile.ts b/tests/cases/compiler/compositeWithNodeModulesSourceFile.ts new file mode 100644 index 00000000000..b2d00201567 --- /dev/null +++ b/tests/cases/compiler/compositeWithNodeModulesSourceFile.ts @@ -0,0 +1,13 @@ +// @filename: /foo/tsconfig.json +{ + "compilerOptions": { "composite": true }, + "exclude": [ "node_modules" ] +} + +// @filename: /foo/node_modules/myModule/index.ts +export class c { } + +// @filename: /foo/test.ts +import myModule = require("myModule"); +new myModule.c(); + From a58fdf2b35f33fd7bfb29b65eafd43e920d1ab8c Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Wed, 1 May 2019 10:14:11 -0700 Subject: [PATCH 21/45] Include only files that can be emitted into the source file directory check for composite projects Fixes #31181 --- src/compiler/program.ts | 6 ++---- ...mpositeWithNodeModulesSourceFile.errors.txt | 18 ------------------ 2 files changed, 2 insertions(+), 22 deletions(-) delete mode 100644 tests/baselines/reference/compositeWithNodeModulesSourceFile.errors.txt diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 7e01e56f069..6f7ffc2c3a9 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -2768,10 +2768,8 @@ namespace ts { if (options.composite) { const rootPaths = rootNames.map(toPath); for (const file of files) { - // Ignore declaration files - if (file.isDeclarationFile) continue; - // Ignore json file thats from project reference - if (isJsonSourceFile(file) && getResolvedProjectReferenceToRedirect(file.fileName)) continue; + // Ignore file that is not emitted + if (!sourceFileMayBeEmitted(file, options, isSourceFileFromExternalLibrary, getResolvedProjectReferenceToRedirect)) continue; if (rootPaths.indexOf(file.path) === -1) { programDiagnostics.add(createCompilerDiagnostic(Diagnostics.File_0_is_not_in_project_file_list_Projects_must_list_all_files_or_use_an_include_pattern, file.fileName)); } diff --git a/tests/baselines/reference/compositeWithNodeModulesSourceFile.errors.txt b/tests/baselines/reference/compositeWithNodeModulesSourceFile.errors.txt deleted file mode 100644 index be5aebfd5bc..00000000000 --- a/tests/baselines/reference/compositeWithNodeModulesSourceFile.errors.txt +++ /dev/null @@ -1,18 +0,0 @@ -error TS6307: File '/foo/node_modules/myModule/index.ts' is not in project file list. Projects must list all files or use an 'include' pattern. - - -!!! error TS6307: File '/foo/node_modules/myModule/index.ts' is not in project file list. Projects must list all files or use an 'include' pattern. -==== /foo/tsconfig.json (0 errors) ==== - { - "compilerOptions": { "composite": true }, - "exclude": [ "node_modules" ] - } - -==== /foo/test.ts (0 errors) ==== - import myModule = require("myModule"); - new myModule.c(); - - -==== /foo/node_modules/myModule/index.ts (0 errors) ==== - export class c { } - \ No newline at end of file From b0143bb4464b88cd4fb4aded467bc8848edc9d84 Mon Sep 17 00:00:00 2001 From: uhyo Date: Thu, 2 May 2019 01:09:29 +0900 Subject: [PATCH 22/45] add relatedInfo to error message for 'await' used in non-async function --- src/compiler/checker.ts | 15 ++++++++++++++- src/compiler/diagnosticMessages.json | 6 +++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 97897092731..2ae614b2dd8 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -23087,7 +23087,20 @@ namespace ts { // Grammar checking if (produceDiagnostics) { if (!(node.flags & NodeFlags.AwaitContext)) { - grammarErrorOnFirstToken(node, Diagnostics.await_expression_is_only_allowed_within_an_async_function); + // use of 'await' in non-async function + const sourceFile = getSourceFileOfNode(node); + if (!hasParseDiagnostics(sourceFile)) { + const span = getSpanOfTokenAtPosition(sourceFile, node.pos); + const diagnostic = createFileDiagnostic(sourceFile, span.start, span.length, Diagnostics.await_expression_is_only_allowed_within_an_async_function); + const func = getContainingFunction(node); + if (func) { + Debug.assert((getFunctionFlags(func) & FunctionFlags.Async) === 0, "Enclosing function should never be an async function."); + const relatedInfo = createDiagnosticForNode(func, Diagnostics.Did_you_mean_to_mark_this_function_as_async); + addRelatedInfo(diagnostic, relatedInfo); + + } + diagnostics.add(diagnostic); + } } if (isInParameterInitializerBeforeContainingFunction(node)) { diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 75a21022adb..8342a4dd6c4 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -1035,6 +1035,10 @@ "category": "Error", "code": 1355 }, + "Did you mean to mark this function as 'async'?": { + "category": "Error", + "code": 1356 + }, "Duplicate identifier '{0}'.": { "category": "Error", @@ -2959,7 +2963,7 @@ "category": "Error", "code": 4104 }, - + "The current host does not support the '{0}' option.": { "category": "Error", "code": 5001 From 246b66c714aa6ac93e6e168a933cc1f18807c10c Mon Sep 17 00:00:00 2001 From: uhyo Date: Thu, 2 May 2019 01:16:25 +0900 Subject: [PATCH 23/45] add related info to error for use of for-await-of in non-async function --- src/compiler/checker.ts | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 2ae614b2dd8..728c10dcf56 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -31598,7 +31598,20 @@ namespace ts { if (forInOrOfStatement.kind === SyntaxKind.ForOfStatement && forInOrOfStatement.awaitModifier) { if ((forInOrOfStatement.flags & NodeFlags.AwaitContext) === NodeFlags.None) { - return grammarErrorOnNode(forInOrOfStatement.awaitModifier, Diagnostics.A_for_await_of_statement_is_only_allowed_within_an_async_function_or_async_generator); + // use of 'for-await-of' in non-async function + const sourceFile = getSourceFileOfNode(forInOrOfStatement); + if (!hasParseDiagnostics(sourceFile)) { + const diagnostic = createDiagnosticForNode(forInOrOfStatement.awaitModifier, Diagnostics.A_for_await_of_statement_is_only_allowed_within_an_async_function_or_async_generator); + const func = getContainingFunction(forInOrOfStatement); + if (func) { + Debug.assert((getFunctionFlags(func) & FunctionFlags.Async) === 0, "Enclosing function should never be an async function."); + const relatedInfo = createDiagnosticForNode(func, Diagnostics.Did_you_mean_to_mark_this_function_as_async); + addRelatedInfo(diagnostic, relatedInfo); + } + diagnostics.add(diagnostic); + return true; + } + return false; } } From 8e9556a86065fe83abf04f4a06fa67a362f77fe0 Mon Sep 17 00:00:00 2001 From: uhyo Date: Thu, 2 May 2019 01:37:26 +0900 Subject: [PATCH 24/45] fix existing tests to accept new behavior --- tests/baselines/reference/awaitLiteralValues.errors.txt | 6 ++++++ tests/baselines/reference/parser.forAwait.es2018.errors.txt | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/tests/baselines/reference/awaitLiteralValues.errors.txt b/tests/baselines/reference/awaitLiteralValues.errors.txt index cf3e155c280..eb3237186e3 100644 --- a/tests/baselines/reference/awaitLiteralValues.errors.txt +++ b/tests/baselines/reference/awaitLiteralValues.errors.txt @@ -11,35 +11,41 @@ tests/cases/compiler/awaitLiteralValues.ts(22,5): error TS1308: 'await' expressi await 'literal'; ~~~~~ !!! error TS1308: 'await' expression is only allowed within an async function. +!!! related TS1356 tests/cases/compiler/awaitLiteralValues.ts:1:10: Did you mean to mark this function as 'async'? } function awaitNumber() { await 1; ~~~~~ !!! error TS1308: 'await' expression is only allowed within an async function. +!!! related TS1356 tests/cases/compiler/awaitLiteralValues.ts:5:10: Did you mean to mark this function as 'async'? } function awaitTrue() { await true; ~~~~~ !!! error TS1308: 'await' expression is only allowed within an async function. +!!! related TS1356 tests/cases/compiler/awaitLiteralValues.ts:9:10: Did you mean to mark this function as 'async'? } function awaitFalse() { await false; ~~~~~ !!! error TS1308: 'await' expression is only allowed within an async function. +!!! related TS1356 tests/cases/compiler/awaitLiteralValues.ts:13:10: Did you mean to mark this function as 'async'? } function awaitNull() { await null; ~~~~~ !!! error TS1308: 'await' expression is only allowed within an async function. +!!! related TS1356 tests/cases/compiler/awaitLiteralValues.ts:17:10: Did you mean to mark this function as 'async'? } function awaitUndefined() { await undefined; ~~~~~ !!! error TS1308: 'await' expression is only allowed within an async function. +!!! related TS1356 tests/cases/compiler/awaitLiteralValues.ts:21:10: Did you mean to mark this function as 'async'? } \ No newline at end of file diff --git a/tests/baselines/reference/parser.forAwait.es2018.errors.txt b/tests/baselines/reference/parser.forAwait.es2018.errors.txt index e0e848db769..a6eeaf670b7 100644 --- a/tests/baselines/reference/parser.forAwait.es2018.errors.txt +++ b/tests/baselines/reference/parser.forAwait.es2018.errors.txt @@ -52,6 +52,7 @@ tests/cases/conformance/parser/ecmascript2018/forAwait/topLevelWithExprIsError.t for await (const x of y) { ~~~~~ !!! error TS1103: A 'for-await-of' statement is only allowed within an async function or async generator. +!!! related TS1356 tests/cases/conformance/parser/ecmascript2018/forAwait/inFunctionDeclWithDeclIsError.ts:1:10: Did you mean to mark this function as 'async'? } } ==== tests/cases/conformance/parser/ecmascript2018/forAwait/inFunctionDeclWithExprIsError.ts (1 errors) ==== @@ -60,6 +61,7 @@ tests/cases/conformance/parser/ecmascript2018/forAwait/topLevelWithExprIsError.t for await (x of y) { ~~~~~ !!! error TS1103: A 'for-await-of' statement is only allowed within an async function or async generator. +!!! related TS1356 tests/cases/conformance/parser/ecmascript2018/forAwait/inFunctionDeclWithExprIsError.ts:1:10: Did you mean to mark this function as 'async'? } } ==== tests/cases/conformance/parser/ecmascript2018/forAwait/inAsyncFunctionWithDeclIsOk.ts (0 errors) ==== @@ -92,6 +94,7 @@ tests/cases/conformance/parser/ecmascript2018/forAwait/topLevelWithExprIsError.t for await (const x of y) { ~~~~~ !!! error TS1103: A 'for-await-of' statement is only allowed within an async function or async generator. +!!! related TS1356 tests/cases/conformance/parser/ecmascript2018/forAwait/inGeneratorWithDeclIsError.ts:1:11: Did you mean to mark this function as 'async'? } } ==== tests/cases/conformance/parser/ecmascript2018/forAwait/inGeneratorWithExprIsError.ts (1 errors) ==== @@ -100,6 +103,7 @@ tests/cases/conformance/parser/ecmascript2018/forAwait/topLevelWithExprIsError.t for await (x of y) { ~~~~~ !!! error TS1103: A 'for-await-of' statement is only allowed within an async function or async generator. +!!! related TS1356 tests/cases/conformance/parser/ecmascript2018/forAwait/inGeneratorWithExprIsError.ts:1:11: Did you mean to mark this function as 'async'? } } \ No newline at end of file From 1fd9de321473909199929faf38cbfcd181a13815 Mon Sep 17 00:00:00 2001 From: uhyo Date: Thu, 2 May 2019 01:57:41 +0900 Subject: [PATCH 25/45] do not suggest to mark constructor 'async' --- src/compiler/checker.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 728c10dcf56..19f4c3b055d 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -23093,7 +23093,7 @@ namespace ts { const span = getSpanOfTokenAtPosition(sourceFile, node.pos); const diagnostic = createFileDiagnostic(sourceFile, span.start, span.length, Diagnostics.await_expression_is_only_allowed_within_an_async_function); const func = getContainingFunction(node); - if (func) { + if (func && func.kind !== SyntaxKind.Constructor) { Debug.assert((getFunctionFlags(func) & FunctionFlags.Async) === 0, "Enclosing function should never be an async function."); const relatedInfo = createDiagnosticForNode(func, Diagnostics.Did_you_mean_to_mark_this_function_as_async); addRelatedInfo(diagnostic, relatedInfo); @@ -31603,7 +31603,7 @@ namespace ts { if (!hasParseDiagnostics(sourceFile)) { const diagnostic = createDiagnosticForNode(forInOrOfStatement.awaitModifier, Diagnostics.A_for_await_of_statement_is_only_allowed_within_an_async_function_or_async_generator); const func = getContainingFunction(forInOrOfStatement); - if (func) { + if (func && func.kind !== SyntaxKind.Constructor) { Debug.assert((getFunctionFlags(func) & FunctionFlags.Async) === 0, "Enclosing function should never be an async function."); const relatedInfo = createDiagnosticForNode(func, Diagnostics.Did_you_mean_to_mark_this_function_as_async); addRelatedInfo(diagnostic, relatedInfo); From 55bffe361682cf4e5dc0e935da0a79e51950e860 Mon Sep 17 00:00:00 2001 From: uhyo Date: Thu, 2 May 2019 02:07:44 +0900 Subject: [PATCH 26/45] add tests to check errors for use of 'await' in non-async function --- .../awaitInNonAsyncFunction.errors.txt | 103 +++++++++++++++++ .../reference/awaitInNonAsyncFunction.js | 84 ++++++++++++++ .../reference/awaitInNonAsyncFunction.symbols | 94 +++++++++++++++ .../reference/awaitInNonAsyncFunction.types | 108 ++++++++++++++++++ .../cases/compiler/awaitInNonAsyncFunction.ts | 41 +++++++ 5 files changed, 430 insertions(+) create mode 100644 tests/baselines/reference/awaitInNonAsyncFunction.errors.txt create mode 100644 tests/baselines/reference/awaitInNonAsyncFunction.js create mode 100644 tests/baselines/reference/awaitInNonAsyncFunction.symbols create mode 100644 tests/baselines/reference/awaitInNonAsyncFunction.types create mode 100644 tests/cases/compiler/awaitInNonAsyncFunction.ts diff --git a/tests/baselines/reference/awaitInNonAsyncFunction.errors.txt b/tests/baselines/reference/awaitInNonAsyncFunction.errors.txt new file mode 100644 index 00000000000..5cd8468ac3e --- /dev/null +++ b/tests/baselines/reference/awaitInNonAsyncFunction.errors.txt @@ -0,0 +1,103 @@ +tests/cases/compiler/awaitInNonAsyncFunction.ts(4,7): error TS1103: A 'for-await-of' statement is only allowed within an async function or async generator. +tests/cases/compiler/awaitInNonAsyncFunction.ts(5,10): error TS1308: 'await' expression is only allowed within an async function. +tests/cases/compiler/awaitInNonAsyncFunction.ts(9,7): error TS1103: A 'for-await-of' statement is only allowed within an async function or async generator. +tests/cases/compiler/awaitInNonAsyncFunction.ts(10,10): error TS1308: 'await' expression is only allowed within an async function. +tests/cases/compiler/awaitInNonAsyncFunction.ts(14,7): error TS1103: A 'for-await-of' statement is only allowed within an async function or async generator. +tests/cases/compiler/awaitInNonAsyncFunction.ts(15,3): error TS1308: 'await' expression is only allowed within an async function. +tests/cases/compiler/awaitInNonAsyncFunction.ts(19,7): error TS1103: A 'for-await-of' statement is only allowed within an async function or async generator. +tests/cases/compiler/awaitInNonAsyncFunction.ts(20,10): error TS1308: 'await' expression is only allowed within an async function. +tests/cases/compiler/awaitInNonAsyncFunction.ts(24,7): error TS1103: A 'for-await-of' statement is only allowed within an async function or async generator. +tests/cases/compiler/awaitInNonAsyncFunction.ts(25,9): error TS1308: 'await' expression is only allowed within an async function. +tests/cases/compiler/awaitInNonAsyncFunction.ts(30,9): error TS1103: A 'for-await-of' statement is only allowed within an async function or async generator. +tests/cases/compiler/awaitInNonAsyncFunction.ts(31,5): error TS1308: 'await' expression is only allowed within an async function. +tests/cases/compiler/awaitInNonAsyncFunction.ts(34,7): error TS1103: A 'for-await-of' statement is only allowed within an async function or async generator. +tests/cases/compiler/awaitInNonAsyncFunction.ts(35,5): error TS1308: 'await' expression is only allowed within an async function. +tests/cases/compiler/awaitInNonAsyncFunction.ts(39,5): error TS1103: A 'for-await-of' statement is only allowed within an async function or async generator. +tests/cases/compiler/awaitInNonAsyncFunction.ts(40,1): error TS1308: 'await' expression is only allowed within an async function. + + +==== tests/cases/compiler/awaitInNonAsyncFunction.ts (16 errors) ==== + // https://github.com/Microsoft/TypeScript/issues/26586 + + function normalFunc(p: Promise) { + for await (const _ of []); + ~~~~~ +!!! error TS1103: A 'for-await-of' statement is only allowed within an async function or async generator. +!!! related TS1356 tests/cases/compiler/awaitInNonAsyncFunction.ts:3:10: Did you mean to mark this function as 'async'? + return await p; + ~~~~~ +!!! error TS1308: 'await' expression is only allowed within an async function. +!!! related TS1356 tests/cases/compiler/awaitInNonAsyncFunction.ts:3:10: Did you mean to mark this function as 'async'? + } + + export function exportedFunc(p: Promise) { + for await (const _ of []); + ~~~~~ +!!! error TS1103: A 'for-await-of' statement is only allowed within an async function or async generator. +!!! related TS1356 tests/cases/compiler/awaitInNonAsyncFunction.ts:8:17: Did you mean to mark this function as 'async'? + return await p; + ~~~~~ +!!! error TS1308: 'await' expression is only allowed within an async function. +!!! related TS1356 tests/cases/compiler/awaitInNonAsyncFunction.ts:8:17: Did you mean to mark this function as 'async'? + } + + const functionExpression = function(p: Promise) { + for await (const _ of []); + ~~~~~ +!!! error TS1103: A 'for-await-of' statement is only allowed within an async function or async generator. +!!! related TS1356 tests/cases/compiler/awaitInNonAsyncFunction.ts:13:28: Did you mean to mark this function as 'async'? + await p; + ~~~~~ +!!! error TS1308: 'await' expression is only allowed within an async function. +!!! related TS1356 tests/cases/compiler/awaitInNonAsyncFunction.ts:13:28: Did you mean to mark this function as 'async'? + } + + const arrowFunc = (p: Promise) => { + for await (const _ of []); + ~~~~~ +!!! error TS1103: A 'for-await-of' statement is only allowed within an async function or async generator. +!!! related TS1356 tests/cases/compiler/awaitInNonAsyncFunction.ts:18:19: Did you mean to mark this function as 'async'? + return await p; + ~~~~~ +!!! error TS1308: 'await' expression is only allowed within an async function. +!!! related TS1356 tests/cases/compiler/awaitInNonAsyncFunction.ts:18:19: Did you mean to mark this function as 'async'? + }; + + function* generatorFunc(p: Promise) { + for await (const _ of []); + ~~~~~ +!!! error TS1103: A 'for-await-of' statement is only allowed within an async function or async generator. +!!! related TS1356 tests/cases/compiler/awaitInNonAsyncFunction.ts:23:11: Did you mean to mark this function as 'async'? + yield await p; + ~~~~~ +!!! error TS1308: 'await' expression is only allowed within an async function. +!!! related TS1356 tests/cases/compiler/awaitInNonAsyncFunction.ts:23:11: Did you mean to mark this function as 'async'? + } + + class clazz { + constructor(p: Promise) { + for await (const _ of []); + ~~~~~ +!!! error TS1103: A 'for-await-of' statement is only allowed within an async function or async generator. + await p; + ~~~~~ +!!! error TS1308: 'await' expression is only allowed within an async function. + } + method(p: Promise) { + for await (const _ of []); + ~~~~~ +!!! error TS1103: A 'for-await-of' statement is only allowed within an async function or async generator. +!!! related TS1356 tests/cases/compiler/awaitInNonAsyncFunction.ts:33:3: Did you mean to mark this function as 'async'? + await p; + ~~~~~ +!!! error TS1308: 'await' expression is only allowed within an async function. +!!! related TS1356 tests/cases/compiler/awaitInNonAsyncFunction.ts:33:3: Did you mean to mark this function as 'async'? + } + } + + for await (const _ of []); + ~~~~~ +!!! error TS1103: A 'for-await-of' statement is only allowed within an async function or async generator. + await null; + ~~~~~ +!!! error TS1308: 'await' expression is only allowed within an async function. \ No newline at end of file diff --git a/tests/baselines/reference/awaitInNonAsyncFunction.js b/tests/baselines/reference/awaitInNonAsyncFunction.js new file mode 100644 index 00000000000..83f75aa5633 --- /dev/null +++ b/tests/baselines/reference/awaitInNonAsyncFunction.js @@ -0,0 +1,84 @@ +//// [awaitInNonAsyncFunction.ts] +// https://github.com/Microsoft/TypeScript/issues/26586 + +function normalFunc(p: Promise) { + for await (const _ of []); + return await p; +} + +export function exportedFunc(p: Promise) { + for await (const _ of []); + return await p; +} + +const functionExpression = function(p: Promise) { + for await (const _ of []); + await p; +} + +const arrowFunc = (p: Promise) => { + for await (const _ of []); + return await p; +}; + +function* generatorFunc(p: Promise) { + for await (const _ of []); + yield await p; +} + +class clazz { + constructor(p: Promise) { + for await (const _ of []); + await p; + } + method(p: Promise) { + for await (const _ of []); + await p; + } +} + +for await (const _ of []); +await null; + +//// [awaitInNonAsyncFunction.js] +// https://github.com/Microsoft/TypeScript/issues/26586 +function normalFunc(p) { + for await (const _ of []) + ; + return await p; +} +export function exportedFunc(p) { + for await (const _ of []) + ; + return await p; +} +const functionExpression = function (p) { + for await (const _ of []) + ; + await p; +}; +const arrowFunc = (p) => { + for await (const _ of []) + ; + return await p; +}; +function* generatorFunc(p) { + for await (const _ of []) + ; + yield await p; +} +class clazz { + constructor(p) { + for await (const _ of []) + ; + await p; + } + method(p) { + for await (const _ of []) + ; + await p; + } +} +for await (const _ of []) + ; +await null; diff --git a/tests/baselines/reference/awaitInNonAsyncFunction.symbols b/tests/baselines/reference/awaitInNonAsyncFunction.symbols new file mode 100644 index 00000000000..cf184637e6f --- /dev/null +++ b/tests/baselines/reference/awaitInNonAsyncFunction.symbols @@ -0,0 +1,94 @@ +=== tests/cases/compiler/awaitInNonAsyncFunction.ts === +// https://github.com/Microsoft/TypeScript/issues/26586 + +function normalFunc(p: Promise) { +>normalFunc : Symbol(normalFunc, Decl(awaitInNonAsyncFunction.ts, 0, 0)) +>p : Symbol(p, Decl(awaitInNonAsyncFunction.ts, 2, 20)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.promise.d.ts, --, --)) + + for await (const _ of []); +>_ : Symbol(_, Decl(awaitInNonAsyncFunction.ts, 3, 18)) + + return await p; +>p : Symbol(p, Decl(awaitInNonAsyncFunction.ts, 2, 20)) +} + +export function exportedFunc(p: Promise) { +>exportedFunc : Symbol(exportedFunc, Decl(awaitInNonAsyncFunction.ts, 5, 1)) +>p : Symbol(p, Decl(awaitInNonAsyncFunction.ts, 7, 29)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.promise.d.ts, --, --)) + + for await (const _ of []); +>_ : Symbol(_, Decl(awaitInNonAsyncFunction.ts, 8, 18)) + + return await p; +>p : Symbol(p, Decl(awaitInNonAsyncFunction.ts, 7, 29)) +} + +const functionExpression = function(p: Promise) { +>functionExpression : Symbol(functionExpression, Decl(awaitInNonAsyncFunction.ts, 12, 5)) +>p : Symbol(p, Decl(awaitInNonAsyncFunction.ts, 12, 36)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.promise.d.ts, --, --)) + + for await (const _ of []); +>_ : Symbol(_, Decl(awaitInNonAsyncFunction.ts, 13, 18)) + + await p; +>p : Symbol(p, Decl(awaitInNonAsyncFunction.ts, 12, 36)) +} + +const arrowFunc = (p: Promise) => { +>arrowFunc : Symbol(arrowFunc, Decl(awaitInNonAsyncFunction.ts, 17, 5)) +>p : Symbol(p, Decl(awaitInNonAsyncFunction.ts, 17, 19)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.promise.d.ts, --, --)) + + for await (const _ of []); +>_ : Symbol(_, Decl(awaitInNonAsyncFunction.ts, 18, 18)) + + return await p; +>p : Symbol(p, Decl(awaitInNonAsyncFunction.ts, 17, 19)) + +}; + +function* generatorFunc(p: Promise) { +>generatorFunc : Symbol(generatorFunc, Decl(awaitInNonAsyncFunction.ts, 20, 2)) +>p : Symbol(p, Decl(awaitInNonAsyncFunction.ts, 22, 24)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.promise.d.ts, --, --)) + + for await (const _ of []); +>_ : Symbol(_, Decl(awaitInNonAsyncFunction.ts, 23, 18)) + + yield await p; +>p : Symbol(p, Decl(awaitInNonAsyncFunction.ts, 22, 24)) +} + +class clazz { +>clazz : Symbol(clazz, Decl(awaitInNonAsyncFunction.ts, 25, 1)) + + constructor(p: Promise) { +>p : Symbol(p, Decl(awaitInNonAsyncFunction.ts, 28, 14)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.promise.d.ts, --, --)) + + for await (const _ of []); +>_ : Symbol(_, Decl(awaitInNonAsyncFunction.ts, 29, 20)) + + await p; +>p : Symbol(p, Decl(awaitInNonAsyncFunction.ts, 28, 14)) + } + method(p: Promise) { +>method : Symbol(clazz.method, Decl(awaitInNonAsyncFunction.ts, 31, 3)) +>p : Symbol(p, Decl(awaitInNonAsyncFunction.ts, 32, 9)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.promise.d.ts, --, --)) + + for await (const _ of []); +>_ : Symbol(_, Decl(awaitInNonAsyncFunction.ts, 33, 18)) + + await p; +>p : Symbol(p, Decl(awaitInNonAsyncFunction.ts, 32, 9)) + } +} + +for await (const _ of []); +>_ : Symbol(_, Decl(awaitInNonAsyncFunction.ts, 38, 16)) + +await null; diff --git a/tests/baselines/reference/awaitInNonAsyncFunction.types b/tests/baselines/reference/awaitInNonAsyncFunction.types new file mode 100644 index 00000000000..78b9a6c5a90 --- /dev/null +++ b/tests/baselines/reference/awaitInNonAsyncFunction.types @@ -0,0 +1,108 @@ +=== tests/cases/compiler/awaitInNonAsyncFunction.ts === +// https://github.com/Microsoft/TypeScript/issues/26586 + +function normalFunc(p: Promise) { +>normalFunc : (p: Promise) => number +>p : Promise + + for await (const _ of []); +>_ : any +>[] : undefined[] + + return await p; +>await p : number +>p : Promise +} + +export function exportedFunc(p: Promise) { +>exportedFunc : (p: Promise) => number +>p : Promise + + for await (const _ of []); +>_ : any +>[] : undefined[] + + return await p; +>await p : number +>p : Promise +} + +const functionExpression = function(p: Promise) { +>functionExpression : (p: Promise) => void +>function(p: Promise) { for await (const _ of []); await p;} : (p: Promise) => void +>p : Promise + + for await (const _ of []); +>_ : any +>[] : undefined[] + + await p; +>await p : number +>p : Promise +} + +const arrowFunc = (p: Promise) => { +>arrowFunc : (p: Promise) => number +>(p: Promise) => { for await (const _ of []); return await p;} : (p: Promise) => number +>p : Promise + + for await (const _ of []); +>_ : any +>[] : undefined[] + + return await p; +>await p : number +>p : Promise + +}; + +function* generatorFunc(p: Promise) { +>generatorFunc : (p: Promise) => IterableIterator +>p : Promise + + for await (const _ of []); +>_ : any +>[] : undefined[] + + yield await p; +>yield await p : any +>await p : number +>p : Promise +} + +class clazz { +>clazz : clazz + + constructor(p: Promise) { +>p : Promise + + for await (const _ of []); +>_ : any +>[] : undefined[] + + await p; +>await p : number +>p : Promise + } + method(p: Promise) { +>method : (p: Promise) => void +>p : Promise + + for await (const _ of []); +>_ : any +>[] : undefined[] + + await p; +>await p : number +>p : Promise + } +} + +for await (const _ of []); +>_ : any +>[] : undefined[] + +await null; +>await null : null +>null : null + diff --git a/tests/cases/compiler/awaitInNonAsyncFunction.ts b/tests/cases/compiler/awaitInNonAsyncFunction.ts new file mode 100644 index 00000000000..5ebf37dc7ed --- /dev/null +++ b/tests/cases/compiler/awaitInNonAsyncFunction.ts @@ -0,0 +1,41 @@ +// @target: esnext +// https://github.com/Microsoft/TypeScript/issues/26586 + +function normalFunc(p: Promise) { + for await (const _ of []); + return await p; +} + +export function exportedFunc(p: Promise) { + for await (const _ of []); + return await p; +} + +const functionExpression = function(p: Promise) { + for await (const _ of []); + await p; +} + +const arrowFunc = (p: Promise) => { + for await (const _ of []); + return await p; +}; + +function* generatorFunc(p: Promise) { + for await (const _ of []); + yield await p; +} + +class clazz { + constructor(p: Promise) { + for await (const _ of []); + await p; + } + method(p: Promise) { + for await (const _ of []); + await p; + } +} + +for await (const _ of []); +await null; \ No newline at end of file From bafdf4baf869896920cec59df90e1823a3c715fa Mon Sep 17 00:00:00 2001 From: uhyo Date: Thu, 2 May 2019 03:45:17 +0900 Subject: [PATCH 27/45] remove extra newline --- src/compiler/checker.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 19f4c3b055d..9284465eefc 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -23097,7 +23097,6 @@ namespace ts { Debug.assert((getFunctionFlags(func) & FunctionFlags.Async) === 0, "Enclosing function should never be an async function."); const relatedInfo = createDiagnosticForNode(func, Diagnostics.Did_you_mean_to_mark_this_function_as_async); addRelatedInfo(diagnostic, relatedInfo); - } diagnostics.add(diagnostic); } From a86fa20b029af1079b3e4ea54c55ae3777adb1d3 Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Wed, 1 May 2019 13:59:55 -0700 Subject: [PATCH 28/45] Don't pass a candidates array to getResolvedSignature (#31203) Found when investigating #30505 --- src/services/symbolDisplay.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/services/symbolDisplay.ts b/src/services/symbolDisplay.ts index 1c710b8cd78..0bdfde9fad0 100644 --- a/src/services/symbolDisplay.ts +++ b/src/services/symbolDisplay.ts @@ -171,8 +171,7 @@ namespace ts.SymbolDisplay { } if (callExpressionLike) { - const candidateSignatures: Signature[] = []; - signature = typeChecker.getResolvedSignature(callExpressionLike, candidateSignatures)!; // TODO: GH#18217 + signature = typeChecker.getResolvedSignature(callExpressionLike)!; // TODO: GH#18217 const useConstructSignatures = callExpressionLike.kind === SyntaxKind.NewExpression || (isCallExpression(callExpressionLike) && callExpressionLike.expression.kind === SyntaxKind.SuperKeyword); From b5ffc26b950330022b71536e2c6ed5036d429a46 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 1 May 2019 11:48:09 -0700 Subject: [PATCH 29/45] Don't use 'any[]' - return type are bivariant when relating to overloads. --- src/compiler/core.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/core.ts b/src/compiler/core.ts index b99304ddfed..2642ea1bf62 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -1400,8 +1400,8 @@ namespace ts { /** Shims `Array.from`. */ export function arrayFrom(iterator: Iterator | IterableIterator, map: (t: T) => U): U[]; export function arrayFrom(iterator: Iterator | IterableIterator): T[]; - export function arrayFrom(iterator: Iterator | IterableIterator, map?: (t: any) => any): any[] { - const result: any[] = []; + export function arrayFrom(iterator: Iterator | IterableIterator, map?: (t: T) => U): (T | U)[] { + const result: (T | U)[] = []; for (let { value, done } = iterator.next(); !done; { value, done } = iterator.next()) { result.push(map ? map(value) : value); } From fa4d5a2cf1832e52a03ac2a181cdff04692321e0 Mon Sep 17 00:00:00 2001 From: Tapan Prakash Date: Thu, 2 May 2019 23:32:00 +0530 Subject: [PATCH 30/45] Fixed broken twitter account link in README.md (#31210) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ad43c9abefa..db157f74b2c 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ [![Join the chat at https://gitter.im/Microsoft/TypeScript](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Microsoft/TypeScript?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -[TypeScript](https://www.typescriptlang.org/) is a language for application-scale JavaScript. TypeScript adds optional types to JavaScript that support tools for large-scale JavaScript applications for any browser, for any host, on any OS. TypeScript compiles to readable, standards-based JavaScript. Try it out at the [playground](https://www.typescriptlang.org/play/), and stay up to date via [our blog](https://blogs.msdn.microsoft.com/typescript) and [Twitter account](https://twitter.com/typescriptlang). +[TypeScript](https://www.typescriptlang.org/) is a language for application-scale JavaScript. TypeScript adds optional types to JavaScript that support tools for large-scale JavaScript applications for any browser, for any host, on any OS. TypeScript compiles to readable, standards-based JavaScript. Try it out at the [playground](https://www.typescriptlang.org/play/), and stay up to date via [our blog](https://blogs.msdn.microsoft.com/typescript) and [Twitter account](https://twitter.com/typescript). ## Installing From 45d72d077ff7a3765ad2cfcddabfd110450a092c Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Thu, 2 May 2019 11:06:18 -0700 Subject: [PATCH 31/45] Fix accidental internal parameter to public API --- src/compiler/commandLineParser.ts | 2 +- tests/baselines/reference/api/tsserverlibrary.d.ts | 2 +- tests/baselines/reference/api/typescript.d.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 104f3576e3a..15f470f45e1 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -1996,7 +1996,7 @@ namespace ts { * @param basePath A root directory to resolve relative path entries in the config * file to. e.g. outDir */ - export function parseJsonSourceFileConfigFileContent(sourceFile: TsConfigSourceFile, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions, configFileName?: string, resolutionStack?: Path[], extraFileExtensions?: ReadonlyArray, /*@internal*/ extendedConfigCache?: Map): ParsedCommandLine { + export function parseJsonSourceFileConfigFileContent(sourceFile: TsConfigSourceFile, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions, configFileName?: string, resolutionStack?: Path[], extraFileExtensions?: ReadonlyArray, extendedConfigCache?: Map): ParsedCommandLine { return parseJsonConfigFileContentWorker(/*json*/ undefined, sourceFile, host, basePath, existingOptions, configFileName, resolutionStack, extraFileExtensions, extendedConfigCache); } diff --git a/tests/baselines/reference/api/tsserverlibrary.d.ts b/tests/baselines/reference/api/tsserverlibrary.d.ts index fb95102e791..6a7f9c8af1d 100644 --- a/tests/baselines/reference/api/tsserverlibrary.d.ts +++ b/tests/baselines/reference/api/tsserverlibrary.d.ts @@ -3675,7 +3675,7 @@ declare namespace ts { * @param basePath A root directory to resolve relative path entries in the config * file to. e.g. outDir */ - function parseJsonSourceFileConfigFileContent(sourceFile: TsConfigSourceFile, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions, configFileName?: string, resolutionStack?: Path[], extraFileExtensions?: ReadonlyArray, /*@internal*/ extendedConfigCache?: Map): ParsedCommandLine; + function parseJsonSourceFileConfigFileContent(sourceFile: TsConfigSourceFile, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions, configFileName?: string, resolutionStack?: Path[], extraFileExtensions?: ReadonlyArray, extendedConfigCache?: Map): ParsedCommandLine; interface ParsedTsconfig { raw: any; options?: CompilerOptions; diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index 170cb00b9e8..e24ef05c0fe 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -3675,7 +3675,7 @@ declare namespace ts { * @param basePath A root directory to resolve relative path entries in the config * file to. e.g. outDir */ - function parseJsonSourceFileConfigFileContent(sourceFile: TsConfigSourceFile, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions, configFileName?: string, resolutionStack?: Path[], extraFileExtensions?: ReadonlyArray, /*@internal*/ extendedConfigCache?: Map): ParsedCommandLine; + function parseJsonSourceFileConfigFileContent(sourceFile: TsConfigSourceFile, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions, configFileName?: string, resolutionStack?: Path[], extraFileExtensions?: ReadonlyArray, extendedConfigCache?: Map): ParsedCommandLine; interface ParsedTsconfig { raw: any; options?: CompilerOptions; From 883b00df35c8eb57ebdf9c78f25f8c6ee0859003 Mon Sep 17 00:00:00 2001 From: Klaus Meinhardt Date: Thu, 2 May 2019 21:24:58 +0200 Subject: [PATCH 32/45] parseJsonConfigFileContent: add extendedConfigCache parameter --- src/compiler/commandLineParser.ts | 4 ++-- tests/baselines/reference/api/tsserverlibrary.d.ts | 2 +- tests/baselines/reference/api/typescript.d.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 104f3576e3a..9c5c345b6e9 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -1985,8 +1985,8 @@ namespace ts { * @param basePath A root directory to resolve relative path entries in the config * file to. e.g. outDir */ - export function parseJsonConfigFileContent(json: any, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions, configFileName?: string, resolutionStack?: Path[], extraFileExtensions?: ReadonlyArray): ParsedCommandLine { - return parseJsonConfigFileContentWorker(json, /*sourceFile*/ undefined, host, basePath, existingOptions, configFileName, resolutionStack, extraFileExtensions); + export function parseJsonConfigFileContent(json: any, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions, configFileName?: string, resolutionStack?: Path[], extraFileExtensions?: ReadonlyArray, extendedConfigCache?: Map): ParsedCommandLine { + return parseJsonConfigFileContentWorker(json, /*sourceFile*/ undefined, host, basePath, existingOptions, configFileName, resolutionStack, extraFileExtensions, extendedConfigCache); } /** diff --git a/tests/baselines/reference/api/tsserverlibrary.d.ts b/tests/baselines/reference/api/tsserverlibrary.d.ts index fb95102e791..1a0c0a7cea0 100644 --- a/tests/baselines/reference/api/tsserverlibrary.d.ts +++ b/tests/baselines/reference/api/tsserverlibrary.d.ts @@ -3667,7 +3667,7 @@ declare namespace ts { * @param basePath A root directory to resolve relative path entries in the config * file to. e.g. outDir */ - function parseJsonConfigFileContent(json: any, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions, configFileName?: string, resolutionStack?: Path[], extraFileExtensions?: ReadonlyArray): ParsedCommandLine; + function parseJsonConfigFileContent(json: any, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions, configFileName?: string, resolutionStack?: Path[], extraFileExtensions?: ReadonlyArray, extendedConfigCache?: Map): ParsedCommandLine; /** * Parse the contents of a config file (tsconfig.json). * @param jsonNode The contents of the config file to parse diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index 170cb00b9e8..76e474e4359 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -3667,7 +3667,7 @@ declare namespace ts { * @param basePath A root directory to resolve relative path entries in the config * file to. e.g. outDir */ - function parseJsonConfigFileContent(json: any, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions, configFileName?: string, resolutionStack?: Path[], extraFileExtensions?: ReadonlyArray): ParsedCommandLine; + function parseJsonConfigFileContent(json: any, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions, configFileName?: string, resolutionStack?: Path[], extraFileExtensions?: ReadonlyArray, extendedConfigCache?: Map): ParsedCommandLine; /** * Parse the contents of a config file (tsconfig.json). * @param jsonNode The contents of the config file to parse From 66d40102345606bb6e92bbb2ff7f6c1cd6b16cf5 Mon Sep 17 00:00:00 2001 From: TypeScript Bot Date: Thu, 2 May 2019 20:28:22 -0700 Subject: [PATCH 33/45] Update user baselines (#31207) --- tests/baselines/reference/user/uglify-js.log | 128 +++++++++---------- 1 file changed, 64 insertions(+), 64 deletions(-) diff --git a/tests/baselines/reference/user/uglify-js.log b/tests/baselines/reference/user/uglify-js.log index c5feff00abc..a01fffa63cf 100644 --- a/tests/baselines/reference/user/uglify-js.log +++ b/tests/baselines/reference/user/uglify-js.log @@ -1,74 +1,74 @@ Exit Code: 1 Standard output: -node_modules/uglify-js/lib/ast.js(207,38): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/ast.js(328,33): error TS2339: Property 'transform' does not exist on type 'string'. -node_modules/uglify-js/lib/ast.js(869,5): error TS2322: Type '{ _visit: (node: any, descend: any) => any; parent: (n: any) => any; push: typeof push; pop: typeof pop; self: () => any; find_parent: (type: any) => any; has_directive: (type: any) => any; loopcontrol_target: (node: any) => any; in_boolean_context: () => boolean | undefined; }' is not assignable to type 'TreeWalker'. +node_modules/uglify-js/lib/ast.js(223,38): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/ast.js(344,33): error TS2339: Property 'transform' does not exist on type 'string'. +node_modules/uglify-js/lib/ast.js(885,5): error TS2322: Type '{ _visit: (node: any, descend: any) => any; parent: (n: any) => any; push: typeof push; pop: typeof pop; self: () => any; find_parent: (type: any) => any; has_directive: (type: any) => any; loopcontrol_target: (node: any) => any; in_boolean_context: () => boolean | undefined; }' is not assignable to type 'TreeWalker'. Object literal may only specify known properties, but '_visit' does not exist in type 'TreeWalker'. Did you mean to write 'visit'? -node_modules/uglify-js/lib/ast.js(870,14): error TS2339: Property 'push' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/ast.js(877,14): error TS2339: Property 'pop' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/ast.js(932,25): error TS2339: Property 'self' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/ast.js(933,37): error TS2339: Property 'parent' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/compress.js(175,42): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(532,41): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(858,33): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(1114,38): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. -node_modules/uglify-js/lib/compress.js(1128,51): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'true | ((node: any) => any)' has no compatible call signatures. -node_modules/uglify-js/lib/compress.js(1192,53): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. -node_modules/uglify-js/lib/compress.js(1233,112): error TS2454: Variable 'args' is used before being assigned. -node_modules/uglify-js/lib/compress.js(1234,29): error TS2532: Object is possibly 'undefined'. -node_modules/uglify-js/lib/compress.js(1243,87): error TS2322: Type 'false' is not assignable to type 'number'. -node_modules/uglify-js/lib/compress.js(1251,29): error TS2322: Type 'false' is not assignable to type 'never'. -node_modules/uglify-js/lib/compress.js(1359,53): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(1460,38): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. -node_modules/uglify-js/lib/compress.js(1570,42): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(1602,41): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(1714,49): error TS2345: Argument of type 'number[]' is not assignable to parameter of type '[number, number, ...never[]]'. +node_modules/uglify-js/lib/ast.js(886,14): error TS2339: Property 'push' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/ast.js(893,14): error TS2339: Property 'pop' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/ast.js(948,25): error TS2339: Property 'self' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/ast.js(949,37): error TS2339: Property 'parent' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/compress.js(173,42): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(512,41): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(838,33): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(1094,38): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. +node_modules/uglify-js/lib/compress.js(1108,51): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'true | ((node: any) => any)' has no compatible call signatures. +node_modules/uglify-js/lib/compress.js(1172,53): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. +node_modules/uglify-js/lib/compress.js(1213,112): error TS2454: Variable 'args' is used before being assigned. +node_modules/uglify-js/lib/compress.js(1214,29): error TS2532: Object is possibly 'undefined'. +node_modules/uglify-js/lib/compress.js(1223,87): error TS2322: Type 'false' is not assignable to type 'number'. +node_modules/uglify-js/lib/compress.js(1231,29): error TS2322: Type 'false' is not assignable to type 'never'. +node_modules/uglify-js/lib/compress.js(1339,53): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(1440,38): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. +node_modules/uglify-js/lib/compress.js(1550,42): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(1582,41): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(1694,49): error TS2345: Argument of type 'number[]' is not assignable to parameter of type '[number, number, ...never[]]'. Type 'number[]' is missing the following properties from type '[number, number, ...never[]]': 0, 1 -node_modules/uglify-js/lib/compress.js(2037,59): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(2075,53): error TS2345: Argument of type 'any[]' is not assignable to parameter of type '[number, number, ...never[]]'. +node_modules/uglify-js/lib/compress.js(2017,59): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(2055,53): error TS2345: Argument of type 'any[]' is not assignable to parameter of type '[number, number, ...never[]]'. Type 'any[]' is missing the following properties from type '[number, number, ...never[]]': 0, 1 -node_modules/uglify-js/lib/compress.js(2223,34): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(2948,42): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(3400,38): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(3413,33): error TS2322: Type '"f"' is not assignable to type 'boolean'. -node_modules/uglify-js/lib/compress.js(3547,33): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(3600,29): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(3617,29): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. -node_modules/uglify-js/lib/compress.js(3642,75): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(3715,63): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(3900,38): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(3921,24): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. -node_modules/uglify-js/lib/compress.js(3931,28): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. -node_modules/uglify-js/lib/compress.js(4090,21): error TS2403: Subsequent variable declarations must have the same type. Variable 'defs' must be of type 'Dictionary & { set: (key: any, val: any) => Dictionary & { set: ...; add: (key: any, val: any) => Dictionary & { set: ...; add: ...; get: (key: any) => any; del: (key: any) => Dictionary & { set: ...; ... 8 more ...; toObject: () => any; }; ... 5 more ...; toObject: () => any; }; ... 7 more ...; toObject: () => any;...', but here has type 'any'. -node_modules/uglify-js/lib/compress.js(4142,17): error TS2447: The '|=' operator is not allowed for boolean types. Consider using '||' instead. -node_modules/uglify-js/lib/compress.js(4203,45): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(4315,33): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(4614,17): error TS2403: Subsequent variable declarations must have the same type. Variable 'body' must be of type 'any[]', but here has type 'any'. -node_modules/uglify-js/lib/compress.js(4698,37): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(4906,57): error TS2345: Argument of type 'any[]' is not assignable to parameter of type '[RegExp, (string | undefined)?]'. +node_modules/uglify-js/lib/compress.js(2203,34): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(2925,42): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(3378,38): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(3391,33): error TS2322: Type '"f"' is not assignable to type 'boolean'. +node_modules/uglify-js/lib/compress.js(3525,33): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(3578,29): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(3595,29): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. +node_modules/uglify-js/lib/compress.js(3620,75): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(3693,63): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(3878,38): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(3899,24): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. +node_modules/uglify-js/lib/compress.js(3909,28): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. +node_modules/uglify-js/lib/compress.js(4068,21): error TS2403: Subsequent variable declarations must have the same type. Variable 'defs' must be of type 'Dictionary & { set: (key: any, val: any) => Dictionary & { set: ...; add: (key: any, val: any) => Dictionary & { set: ...; add: ...; get: (key: any) => any; del: (key: any) => Dictionary & { set: ...; ... 8 more ...; toObject: () => any; }; ... 5 more ...; toObject: () => any; }; ... 7 more ...; toObject: () => any;...', but here has type 'any'. +node_modules/uglify-js/lib/compress.js(4120,17): error TS2447: The '|=' operator is not allowed for boolean types. Consider using '||' instead. +node_modules/uglify-js/lib/compress.js(4181,45): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(4291,33): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(4588,17): error TS2403: Subsequent variable declarations must have the same type. Variable 'body' must be of type 'any[]', but here has type 'any'. +node_modules/uglify-js/lib/compress.js(4672,37): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(4880,57): error TS2345: Argument of type 'any[]' is not assignable to parameter of type '[RegExp, (string | undefined)?]'. Property '0' is missing in type 'any[]' but required in type '[RegExp, (string | undefined)?]'. -node_modules/uglify-js/lib/compress.js(5070,45): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(5077,25): error TS2403: Subsequent variable declarations must have the same type. Variable 'code' must be of type 'string', but here has type '{ get: () => string; toString: () => string; indent: () => void; indentation: () => number; current_width: () => number; should_break: () => boolean; has_parens: () => boolean; newline: () => void; print: (str: any) => void; ... 24 more ...; parent: (n: any) => any; }'. -node_modules/uglify-js/lib/compress.js(5081,36): error TS2532: Object is possibly 'undefined'. -node_modules/uglify-js/lib/compress.js(5086,41): error TS2339: Property 'get' does not exist on type 'string'. -node_modules/uglify-js/lib/compress.js(5589,18): error TS2454: Variable 'is_strict_comparison' is used before being assigned. -node_modules/uglify-js/lib/compress.js(6084,25): error TS2367: This condition will always return 'false' since the types 'boolean' and '"f"' have no overlap. -node_modules/uglify-js/lib/compress.js(6111,47): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(6185,39): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(6257,39): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(6263,41): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(6696,43): error TS2454: Variable 'property' is used before being assigned. -node_modules/uglify-js/lib/compress.js(6711,25): error TS2403: Subsequent variable declarations must have the same type. Variable 'value' must be of type 'number', but here has type 'any'. -node_modules/uglify-js/lib/compress.js(6714,46): error TS2339: Property 'has_side_effects' does not exist on type 'number'. -node_modules/uglify-js/lib/compress.js(6720,25): error TS2403: Subsequent variable declarations must have the same type. Variable 'value' must be of type 'number', but here has type 'any'. -node_modules/uglify-js/lib/compress.js(6748,34): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/minify.js(170,75): error TS2339: Property 'compress' does not exist on type 'Compressor'. +node_modules/uglify-js/lib/compress.js(5044,45): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(5051,25): error TS2403: Subsequent variable declarations must have the same type. Variable 'code' must be of type 'string', but here has type '{ get: () => string; toString: () => string; indent: () => void; indentation: () => number; current_width: () => number; should_break: () => boolean; has_parens: () => boolean; newline: () => void; print: (str: any) => void; ... 24 more ...; parent: (n: any) => any; }'. +node_modules/uglify-js/lib/compress.js(5055,36): error TS2532: Object is possibly 'undefined'. +node_modules/uglify-js/lib/compress.js(5060,41): error TS2339: Property 'get' does not exist on type 'string'. +node_modules/uglify-js/lib/compress.js(5563,18): error TS2454: Variable 'is_strict_comparison' is used before being assigned. +node_modules/uglify-js/lib/compress.js(6058,25): error TS2367: This condition will always return 'false' since the types 'boolean' and '"f"' have no overlap. +node_modules/uglify-js/lib/compress.js(6085,47): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(6159,39): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(6231,39): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(6237,41): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(6670,43): error TS2454: Variable 'property' is used before being assigned. +node_modules/uglify-js/lib/compress.js(6685,25): error TS2403: Subsequent variable declarations must have the same type. Variable 'value' must be of type 'number', but here has type 'any'. +node_modules/uglify-js/lib/compress.js(6688,46): error TS2339: Property 'has_side_effects' does not exist on type 'number'. +node_modules/uglify-js/lib/compress.js(6694,25): error TS2403: Subsequent variable declarations must have the same type. Variable 'value' must be of type 'number', but here has type 'any'. +node_modules/uglify-js/lib/compress.js(6722,34): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/minify.js(166,75): error TS2339: Property 'compress' does not exist on type 'Compressor'. node_modules/uglify-js/lib/mozilla-ast.js(566,33): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/output.js(246,25): error TS2554: Expected 0 arguments, but got 2. -node_modules/uglify-js/lib/output.js(475,37): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/output.js(767,38): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/output.js(1163,44): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/output.js(1445,58): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +node_modules/uglify-js/lib/output.js(235,25): error TS2554: Expected 0 arguments, but got 2. +node_modules/uglify-js/lib/output.js(464,37): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/output.js(756,38): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/output.js(1152,44): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/output.js(1434,58): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. node_modules/uglify-js/lib/parse.js(361,20): error TS2345: Argument of type 'number | undefined' is not assignable to parameter of type 'number'. Type 'undefined' is not assignable to type 'number'. node_modules/uglify-js/lib/parse.js(443,32): error TS2345: Argument of type 'any' is not assignable to parameter of type 'never'. From b365e657d421e95994d5b796d239bab3d333e98f Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Fri, 3 May 2019 14:42:17 -0700 Subject: [PATCH 34/45] Add unmeasurable variance kind for marking types whose variance result is unreliable (#30416) * Add unmeasurable variance kind for marking types whose variance result is unreliable * Remove now-unneeded nongeneric checks * Add rule allowing `Readonly` to be `any` instead of `{readonly [index: string]: any}` * All Unmeasurable variances to still shortcut structural comparisons in some cases * Separate unmeasurable from unreliable to reduce the impact of this change, for now * Fix lint * Remove Readonly -> any callout * Add fix for circularity error triggered by deep signature return type comparisons with `this` types --- src/compiler/checker.ts | 106 ++++++++++----- src/compiler/types.ts | 20 +-- ...eckInfiniteExpansionTermination.errors.txt | 32 +++++ .../reference/conditionalTypes1.errors.txt | 8 -- ...ntAliasVsNonAliasRecordBehavior.errors.txt | 55 ++++++++ ...consistentAliasVsNonAliasRecordBehavior.js | 70 ++++++++++ ...stentAliasVsNonAliasRecordBehavior.symbols | 125 ++++++++++++++++++ ...sistentAliasVsNonAliasRecordBehavior.types | 99 ++++++++++++++ ...nvariantGenericErrorElaboration.errors.txt | 52 ++++++++ .../invariantGenericErrorElaboration.types | 4 +- .../reference/mappedTypes5.errors.txt | 4 - .../recursiveTypeComparison.errors.txt | 27 ++++ ...appedTypeModifierTrumpsVariance.errors.txt | 61 +++++++++ ...equiredMappedTypeModifierTrumpsVariance.js | 43 ++++++ ...edMappedTypeModifierTrumpsVariance.symbols | 92 +++++++++++++ ...iredMappedTypeModifierTrumpsVariance.types | 109 +++++++++++++++ .../strictFunctionTypesErrors.errors.txt | 16 ++- ...ditionalOnMethodReturnOfGenericInstance.js | 59 +++++++++ ...nalOnMethodReturnOfGenericInstance.symbols | 47 +++++++ ...ionalOnMethodReturnOfGenericInstance.types | 41 ++++++ ...consistentAliasVsNonAliasRecordBehavior.ts | 39 ++++++ ...equiredMappedTypeModifierTrumpsVariance.ts | 22 +++ ...ditionalOnMethodReturnOfGenericInstance.ts | 18 +++ 23 files changed, 1092 insertions(+), 57 deletions(-) create mode 100644 tests/baselines/reference/checkInfiniteExpansionTermination.errors.txt create mode 100644 tests/baselines/reference/consistentAliasVsNonAliasRecordBehavior.errors.txt create mode 100644 tests/baselines/reference/consistentAliasVsNonAliasRecordBehavior.js create mode 100644 tests/baselines/reference/consistentAliasVsNonAliasRecordBehavior.symbols create mode 100644 tests/baselines/reference/consistentAliasVsNonAliasRecordBehavior.types create mode 100644 tests/baselines/reference/invariantGenericErrorElaboration.errors.txt create mode 100644 tests/baselines/reference/recursiveTypeComparison.errors.txt create mode 100644 tests/baselines/reference/requiredMappedTypeModifierTrumpsVariance.errors.txt create mode 100644 tests/baselines/reference/requiredMappedTypeModifierTrumpsVariance.js create mode 100644 tests/baselines/reference/requiredMappedTypeModifierTrumpsVariance.symbols create mode 100644 tests/baselines/reference/requiredMappedTypeModifierTrumpsVariance.types create mode 100644 tests/baselines/reference/thisConditionalOnMethodReturnOfGenericInstance.js create mode 100644 tests/baselines/reference/thisConditionalOnMethodReturnOfGenericInstance.symbols create mode 100644 tests/baselines/reference/thisConditionalOnMethodReturnOfGenericInstance.types create mode 100644 tests/cases/compiler/consistentAliasVsNonAliasRecordBehavior.ts create mode 100644 tests/cases/compiler/requiredMappedTypeModifierTrumpsVariance.ts create mode 100644 tests/cases/compiler/thisConditionalOnMethodReturnOfGenericInstance.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index f9c87e94961..dbb0180dfdb 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -678,6 +678,7 @@ namespace ts { let _jsxNamespace: __String; let _jsxFactoryEntity: EntityName | undefined; + let outofbandVarianceMarkerHandler: ((onlyUnreliable: boolean) => void) | undefined; const subtypeRelation = createMap(); const assignableRelation = createMap(); @@ -12062,12 +12063,14 @@ namespace ts { } if (!ignoreReturnTypes) { - const targetReturnType = (target.declaration && isJSConstructor(target.declaration)) ? + // If a signature reolution is already in-flight, skip issuing a circularity error + // here and just use the `any` type directly + const targetReturnType = isResolvingReturnTypeOfSignature(target) ? anyType : (target.declaration && isJSConstructor(target.declaration)) ? getJSClassType(target.declaration.symbol)! : getReturnTypeOfSignature(target); if (targetReturnType === voidType) { return result; } - const sourceReturnType = (source.declaration && isJSConstructor(source.declaration)) ? + const sourceReturnType = isResolvingReturnTypeOfSignature(source) ? anyType : (source.declaration && isJSConstructor(source.declaration)) ? getJSClassType(source.declaration.symbol)! : getReturnTypeOfSignature(source); // The following block preserves behavior forbidding boolean returning functions from being assignable to type guard returning functions @@ -12852,7 +12855,7 @@ namespace ts { return result; } - function typeArgumentsRelatedTo(sources: ReadonlyArray = emptyArray, targets: ReadonlyArray = emptyArray, variances: ReadonlyArray = emptyArray, reportErrors: boolean): Ternary { + function typeArgumentsRelatedTo(sources: ReadonlyArray = emptyArray, targets: ReadonlyArray = emptyArray, variances: ReadonlyArray = emptyArray, reportErrors: boolean): Ternary { if (sources.length !== targets.length && relation === identityRelation) { return Ternary.False; } @@ -12862,19 +12865,26 @@ namespace ts { // When variance information isn't available we default to covariance. This happens // in the process of computing variance information for recursive types and when // comparing 'this' type arguments. - const variance = i < variances.length ? variances[i] : Variance.Covariant; + const varianceFlags = i < variances.length ? variances[i] : VarianceFlags.Covariant; + const variance = varianceFlags & VarianceFlags.VarianceMask; // We ignore arguments for independent type parameters (because they're never witnessed). - if (variance !== Variance.Independent) { + if (variance !== VarianceFlags.Independent) { const s = sources[i]; const t = targets[i]; let related = Ternary.True; - if (variance === Variance.Covariant) { + if (varianceFlags & VarianceFlags.Unmeasurable) { + // Even an `Unmeasurable` variance works out without a structural check if the source and target are _identical_. + // We can't simply assume invariance, because `Unmeasurable` marks nonlinear relations, for example, a relation tained by + // the `-?` modifier in a mapped type (where, no matter how the inputs are related, the outputs still might not be) + related = relation === identityRelation ? isRelatedTo(s, t, /*reportErrors*/ false) : compareTypesIdentical(s, t); + } + else if (variance === VarianceFlags.Covariant) { related = isRelatedTo(s, t, reportErrors); } - else if (variance === Variance.Contravariant) { + else if (variance === VarianceFlags.Contravariant) { related = isRelatedTo(t, s, reportErrors); } - else if (variance === Variance.Bivariant) { + else if (variance === VarianceFlags.Bivariant) { // In the bivariant case we first compare contravariantly without reporting // errors. Then, if that doesn't succeed, we compare covariantly with error // reporting. Thus, error elaboration will be based on the the covariant check, @@ -13254,21 +13264,20 @@ namespace ts { } return Ternary.False; - function isNonGeneric(type: Type) { - // If we're already in identity relationship checking, we should use `isRelatedTo` - // to catch the `Maybe` from an excessively deep type (which we then assume means - // that the type could possibly contain a generic) - if (relation === identityRelation) { - return isRelatedTo(type, getPermissiveInstantiation(type)) === Ternary.True; - } - return isTypeIdenticalTo(type, getPermissiveInstantiation(type)); - } - - function relateVariances(sourceTypeArguments: ReadonlyArray | undefined, targetTypeArguments: ReadonlyArray | undefined, variances: Variance[]) { + function relateVariances(sourceTypeArguments: ReadonlyArray | undefined, targetTypeArguments: ReadonlyArray | undefined, variances: VarianceFlags[]) { if (result = typeArgumentsRelatedTo(sourceTypeArguments, targetTypeArguments, variances, reportErrors)) { return result; } - const allowStructuralFallback = (targetTypeArguments && hasCovariantVoidArgument(targetTypeArguments, variances)) || isNonGeneric(source) || isNonGeneric(target); + if (some(variances, v => !!(v & VarianceFlags.AllowsStructuralFallback))) { + // If some type parameter was `Unmeasurable` or `Unreliable`, and we couldn't pass by assuming it was identical, then we + // have to allow a structural fallback check + // We elide the variance-based error elaborations, since those might not be too helpful, since we'll potentially + // be assuming identity of the type parameter. + originalErrorInfo = undefined; + errorInfo = saveErrorInfo; + return undefined; + } + const allowStructuralFallback = targetTypeArguments && hasCovariantVoidArgument(targetTypeArguments, variances); varianceCheckFailed = !allowStructuralFallback; // The type arguments did not relate appropriately, but it may be because we have no variance // information (in which case typeArgumentsRelatedTo defaulted to covariance for all type @@ -13286,7 +13295,7 @@ namespace ts { // reveal the reason). // We can switch on `reportErrors` here, since varianceCheckFailed guarantees we return `False`, // we can return `False` early here to skip calculating the structural error message we don't need. - if (varianceCheckFailed && !(reportErrors && some(variances, v => v === Variance.Invariant))) { + if (varianceCheckFailed && !(reportErrors && some(variances, v => (v & VarianceFlags.VarianceMask) === VarianceFlags.Invariant))) { return Ternary.False; } // We remember the original error information so we can restore it in case the structural @@ -13298,6 +13307,20 @@ namespace ts { } } + function reportUnmeasurableMarkers(p: TypeParameter) { + if (outofbandVarianceMarkerHandler && (p === markerSuperType || p === markerSubType || p === markerOtherType)) { + outofbandVarianceMarkerHandler(/*onlyUnreliable*/ false); + } + return p; + } + + function reportUnreliableMarkers(p: TypeParameter) { + if (outofbandVarianceMarkerHandler && (p === markerSuperType || p === markerSubType || p === markerOtherType)) { + outofbandVarianceMarkerHandler(/*onlyUnreliable*/ true); + } + return p; + } + // A type [P in S]: X is related to a type [Q in T]: Y if T is related to S and X' is // related to Y, where X' is an instantiation of X in which P is replaced with Q. Notice // that S and T are contra-variant whereas X and Y are co-variant. @@ -13306,7 +13329,9 @@ namespace ts { getCombinedMappedTypeOptionality(source) <= getCombinedMappedTypeOptionality(target)); if (modifiersRelated) { let result: Ternary; - if (result = isRelatedTo(getConstraintTypeFromMappedType(target), getConstraintTypeFromMappedType(source), reportErrors)) { + const targetConstraint = getConstraintTypeFromMappedType(target); + const sourceConstraint = instantiateType(getConstraintTypeFromMappedType(source), getCombinedMappedTypeOptionality(source) < 0 ? reportUnmeasurableMarkers : reportUnreliableMarkers); + if (result = isRelatedTo(targetConstraint, sourceConstraint, reportErrors)) { const mapper = createTypeMapper([getTypeParameterFromMappedType(source)], [getTypeParameterFromMappedType(target)]); return result & isRelatedTo(instantiateType(getTemplateTypeFromMappedType(source), mapper), getTemplateTypeFromMappedType(target), reportErrors); } @@ -13896,26 +13921,45 @@ namespace ts { // instantiations of the generic type for type arguments with known relations. The function // returns the emptyArray singleton if we're not in strictFunctionTypes mode or if the function // has been invoked recursively for the given generic type. - function getVariancesWorker(typeParameters: ReadonlyArray = emptyArray, cache: TCache, createMarkerType: (input: TCache, param: TypeParameter, marker: Type) => Type): Variance[] { + function getVariancesWorker(typeParameters: ReadonlyArray = emptyArray, cache: TCache, createMarkerType: (input: TCache, param: TypeParameter, marker: Type) => Type): VarianceFlags[] { let variances = cache.variances; if (!variances) { // The emptyArray singleton is used to signal a recursive invocation. cache.variances = emptyArray; variances = []; for (const tp of typeParameters) { + let unmeasurable = false; + let unreliable = false; + const oldHandler = outofbandVarianceMarkerHandler; + outofbandVarianceMarkerHandler = (onlyUnreliable) => onlyUnreliable ? unreliable = true : unmeasurable = true; // We first compare instantiations where the type parameter is replaced with // marker types that have a known subtype relationship. From this we can infer // invariance, covariance, contravariance or bivariance. const typeWithSuper = createMarkerType(cache, tp, markerSuperType); const typeWithSub = createMarkerType(cache, tp, markerSubType); - let variance = (isTypeAssignableTo(typeWithSub, typeWithSuper) ? Variance.Covariant : 0) | - (isTypeAssignableTo(typeWithSuper, typeWithSub) ? Variance.Contravariant : 0); + let variance = (isTypeAssignableTo(typeWithSub, typeWithSuper) ? VarianceFlags.Covariant : 0) | + (isTypeAssignableTo(typeWithSuper, typeWithSub) ? VarianceFlags.Contravariant : 0); // If the instantiations appear to be related bivariantly it may be because the // type parameter is independent (i.e. it isn't witnessed anywhere in the generic // type). To determine this we compare instantiations where the type parameter is // replaced with marker types that are known to be unrelated. - if (variance === Variance.Bivariant && isTypeAssignableTo(createMarkerType(cache, tp, markerOtherType), typeWithSuper)) { - variance = Variance.Independent; + if (variance === VarianceFlags.Bivariant && isTypeAssignableTo(createMarkerType(cache, tp, markerOtherType), typeWithSuper)) { + variance = VarianceFlags.Independent; + } + outofbandVarianceMarkerHandler = oldHandler; + if (unmeasurable || unreliable) { + if (unmeasurable) { + variance |= VarianceFlags.Unmeasurable; + } + if (unreliable) { + variance |= VarianceFlags.Unreliable; + } + const covariantID = getRelationKey(typeWithSub, typeWithSuper, assignableRelation); + const contravariantID = getRelationKey(typeWithSuper, typeWithSub, assignableRelation); + // We delete the results of these checks, as we want them to actually be run, see the `Unmeasurable` variance we cache, + // And then fall back to a structural result. + assignableRelation.delete(covariantID); + assignableRelation.delete(contravariantID); } variances.push(variance); } @@ -13924,7 +13968,7 @@ namespace ts { return variances; } - function getVariances(type: GenericType): Variance[] { + function getVariances(type: GenericType): VarianceFlags[] { // Arrays and tuples are known to be covariant, no need to spend time computing this (emptyArray implies covariance for all parameters) if (type === globalArrayType || type === globalReadonlyArrayType || type.objectFlags & ObjectFlags.Tuple) { return emptyArray; @@ -13934,9 +13978,9 @@ namespace ts { // Return true if the given type reference has a 'void' type argument for a covariant type parameter. // See comment at call in recursiveTypeRelatedTo for when this case matters. - function hasCovariantVoidArgument(typeArguments: ReadonlyArray, variances: Variance[]): boolean { + function hasCovariantVoidArgument(typeArguments: ReadonlyArray, variances: VarianceFlags[]): boolean { for (let i = 0; i < variances.length; i++) { - if (variances[i] === Variance.Covariant && typeArguments[i].flags & TypeFlags.Void) { + if ((variances[i] & VarianceFlags.VarianceMask) === VarianceFlags.Covariant && typeArguments[i].flags & TypeFlags.Void) { return true; } } @@ -15109,7 +15153,7 @@ namespace ts { const count = sourceTypes.length < targetTypes.length ? sourceTypes.length : targetTypes.length; const variances = getVariances((source).target); for (let i = 0; i < count; i++) { - if (i < variances.length && variances[i] === Variance.Contravariant) { + if (i < variances.length && (variances[i] & VarianceFlags.VarianceMask) === VarianceFlags.Contravariant) { inferFromContravariantTypes(sourceTypes[i], targetTypes[i]); } else { diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 5e2d6aba474..af4194a9c69 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -3735,7 +3735,7 @@ namespace ts { specifierCache?: Map; // For symbols corresponding to external modules, a cache of incoming path -> module specifier name mappings extendedContainers?: Symbol[]; // Containers (other than the parent) which this symbol is aliased in extendedContainersByFile?: Map; // Containers (other than the parent) which this symbol is aliased in - variances?: Variance[]; // Alias symbol type argument variance cache + variances?: VarianceFlags[]; // Alias symbol type argument variance cache } /* @internal */ @@ -4131,12 +4131,16 @@ namespace ts { } /* @internal */ - export const enum Variance { - Invariant = 0, // Neither covariant nor contravariant - Covariant = 1, // Covariant - Contravariant = 2, // Contravariant - Bivariant = 3, // Both covariant and contravariant - Independent = 4, // Unwitnessed type parameter + export const enum VarianceFlags { + Invariant = 0, // Neither covariant nor contravariant + Covariant = 1 << 0, // Covariant + Contravariant = 1 << 1, // Contravariant + Bivariant = Covariant | Contravariant, // Both covariant and contravariant + Independent = 1 << 2, // Unwitnessed type parameter + VarianceMask = Invariant | Covariant | Contravariant | Independent, // Mask containing all measured variances without the unmeasurable flag + Unmeasurable = 1 << 3, // Variance result is unusable - relationship relies on structural comparisons which are not reflected in generic relationships + Unreliable = 1 << 4, // Variance result is unreliable - relationship relies on structural comparisons which are not reflected in generic relationships + AllowsStructuralFallback = Unmeasurable | Unreliable, } // Generic class and interface types @@ -4144,7 +4148,7 @@ namespace ts { /* @internal */ instantiations: Map; // Generic instantiation cache /* @internal */ - variances?: Variance[]; // Variance of each type parameter + variances?: VarianceFlags[]; // Variance of each type parameter } export interface TupleType extends GenericType { diff --git a/tests/baselines/reference/checkInfiniteExpansionTermination.errors.txt b/tests/baselines/reference/checkInfiniteExpansionTermination.errors.txt new file mode 100644 index 00000000000..014087ff627 --- /dev/null +++ b/tests/baselines/reference/checkInfiniteExpansionTermination.errors.txt @@ -0,0 +1,32 @@ +tests/cases/compiler/checkInfiniteExpansionTermination.ts(16,1): error TS2322: Type 'ISubject' is not assignable to type 'IObservable'. + Types of property 'n' are incompatible. + Type 'IObservable' is not assignable to type 'IObservable'. + Type 'Bar[]' is not assignable to type 'Foo[]'. + Property 'x' is missing in type 'Bar' but required in type 'Foo'. + + +==== tests/cases/compiler/checkInfiniteExpansionTermination.ts (1 errors) ==== + // Regression test for #1002 + // Before fix this code would cause infinite loop + + interface IObservable { + n: IObservable; // Needed, must be T[] + } + + // Needed + interface ISubject extends IObservable { } + + interface Foo { x } + interface Bar { y } + + var values: IObservable; + var values2: ISubject; + values = values2; + ~~~~~~ +!!! error TS2322: Type 'ISubject' is not assignable to type 'IObservable'. +!!! error TS2322: Types of property 'n' are incompatible. +!!! error TS2322: Type 'IObservable' is not assignable to type 'IObservable'. +!!! error TS2322: Type 'Bar[]' is not assignable to type 'Foo[]'. +!!! error TS2322: Property 'x' is missing in type 'Bar' but required in type 'Foo'. +!!! related TS2728 tests/cases/compiler/checkInfiniteExpansionTermination.ts:11:17: 'x' is declared here. + \ No newline at end of file diff --git a/tests/baselines/reference/conditionalTypes1.errors.txt b/tests/baselines/reference/conditionalTypes1.errors.txt index c84ce90642a..7abcf55b8e7 100644 --- a/tests/baselines/reference/conditionalTypes1.errors.txt +++ b/tests/baselines/reference/conditionalTypes1.errors.txt @@ -19,12 +19,8 @@ tests/cases/conformance/types/conditional/conditionalTypes1.ts(104,5): error TS2 'Pick' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. tests/cases/conformance/types/conditional/conditionalTypes1.ts(106,5): error TS2322: Type 'Pick' is not assignable to type 'Pick'. Type 'T[keyof T] extends Function ? keyof T : never' is not assignable to type 'T[keyof T] extends Function ? never : keyof T'. - Type 'keyof T' is not assignable to type 'never'. - Type 'string | number | symbol' is not assignable to type 'never'. - Type 'string' is not assignable to type 'never'. tests/cases/conformance/types/conditional/conditionalTypes1.ts(108,5): error TS2322: Type 'Pick' is not assignable to type 'Pick'. Type 'T[keyof T] extends Function ? never : keyof T' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'. - Type 'keyof T' is not assignable to type 'never'. tests/cases/conformance/types/conditional/conditionalTypes1.ts(114,5): error TS2322: Type 'keyof T' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'. Type 'string | number | symbol' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'. Type 'string' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'. @@ -195,15 +191,11 @@ tests/cases/conformance/types/conditional/conditionalTypes1.ts(288,43): error TS ~ !!! error TS2322: Type 'Pick' is not assignable to type 'Pick'. !!! error TS2322: Type 'T[keyof T] extends Function ? keyof T : never' is not assignable to type 'T[keyof T] extends Function ? never : keyof T'. -!!! error TS2322: Type 'keyof T' is not assignable to type 'never'. -!!! error TS2322: Type 'string | number | symbol' is not assignable to type 'never'. -!!! error TS2322: Type 'string' is not assignable to type 'never'. z = x; z = y; // Error ~ !!! error TS2322: Type 'Pick' is not assignable to type 'Pick'. !!! error TS2322: Type 'T[keyof T] extends Function ? never : keyof T' is not assignable to type 'T[keyof T] extends Function ? keyof T : never'. -!!! error TS2322: Type 'keyof T' is not assignable to type 'never'. } function f8(x: keyof T, y: FunctionPropertyNames, z: NonFunctionPropertyNames) { diff --git a/tests/baselines/reference/consistentAliasVsNonAliasRecordBehavior.errors.txt b/tests/baselines/reference/consistentAliasVsNonAliasRecordBehavior.errors.txt new file mode 100644 index 00000000000..76de0b10e47 --- /dev/null +++ b/tests/baselines/reference/consistentAliasVsNonAliasRecordBehavior.errors.txt @@ -0,0 +1,55 @@ +tests/cases/compiler/consistentAliasVsNonAliasRecordBehavior.ts(18,5): error TS2741: Property 'a' is missing in type 'Record' but required in type 'Record2<"a", string>'. +tests/cases/compiler/consistentAliasVsNonAliasRecordBehavior.ts(22,5): error TS2741: Property 'a' is missing in type 'Record2' but required in type 'Record<"a", string>'. +tests/cases/compiler/consistentAliasVsNonAliasRecordBehavior.ts(34,5): error TS2741: Property 'a' is missing in type 'Record' but required in type 'Record2<"a", T>'. +tests/cases/compiler/consistentAliasVsNonAliasRecordBehavior.ts(38,5): error TS2741: Property 'a' is missing in type 'Record2' but required in type 'Record<"a", T>'. + + +==== tests/cases/compiler/consistentAliasVsNonAliasRecordBehavior.ts (4 errors) ==== + // TODO: FIXME: All the below cases labeled `no error` _should be an error_, and are only prevented from so being + // by incorrect variance-based relationships + // Ref: https://github.com/Microsoft/TypeScript/issues/29698 + + type Record2 = { + [P in K]: T; + }; + + function defaultRecord(x: Record<'a', string>, y: Record) { + x = y; // no error, but error expected. + } + + function customRecord(x: Record2<'a', string>, y: Record2) { + x = y; // no error, but error expected. + } + + function mixed1(x: Record2<'a', string>, y: Record) { + x = y; // error + ~ +!!! error TS2741: Property 'a' is missing in type 'Record' but required in type 'Record2<"a", string>'. + } + + function mixed2(x: Record<'a', string>, y: Record2) { + x = y; // error + ~ +!!! error TS2741: Property 'a' is missing in type 'Record2' but required in type 'Record<"a", string>'. + } + + function defaultRecord2(x: Record<'a', T>, y: Record) { + x = y; // no error, but error expected. + } + + function customRecord2(x: Record2<'a', T>, y: Record2) { + x = y; // no error, but error expected. + } + + function mixed3(x: Record2<'a', T>, y: Record) { + x = y; // error + ~ +!!! error TS2741: Property 'a' is missing in type 'Record' but required in type 'Record2<"a", T>'. + } + + function mixed4(x: Record<'a', T>, y: Record2) { + x = y; // error + ~ +!!! error TS2741: Property 'a' is missing in type 'Record2' but required in type 'Record<"a", T>'. + } + \ No newline at end of file diff --git a/tests/baselines/reference/consistentAliasVsNonAliasRecordBehavior.js b/tests/baselines/reference/consistentAliasVsNonAliasRecordBehavior.js new file mode 100644 index 00000000000..0e127e3acb7 --- /dev/null +++ b/tests/baselines/reference/consistentAliasVsNonAliasRecordBehavior.js @@ -0,0 +1,70 @@ +//// [consistentAliasVsNonAliasRecordBehavior.ts] +// TODO: FIXME: All the below cases labeled `no error` _should be an error_, and are only prevented from so being +// by incorrect variance-based relationships +// Ref: https://github.com/Microsoft/TypeScript/issues/29698 + +type Record2 = { + [P in K]: T; +}; + +function defaultRecord(x: Record<'a', string>, y: Record) { + x = y; // no error, but error expected. +} + +function customRecord(x: Record2<'a', string>, y: Record2) { + x = y; // no error, but error expected. +} + +function mixed1(x: Record2<'a', string>, y: Record) { + x = y; // error +} + +function mixed2(x: Record<'a', string>, y: Record2) { + x = y; // error +} + +function defaultRecord2(x: Record<'a', T>, y: Record) { + x = y; // no error, but error expected. +} + +function customRecord2(x: Record2<'a', T>, y: Record2) { + x = y; // no error, but error expected. +} + +function mixed3(x: Record2<'a', T>, y: Record) { + x = y; // error +} + +function mixed4(x: Record<'a', T>, y: Record2) { + x = y; // error +} + + +//// [consistentAliasVsNonAliasRecordBehavior.js] +// TODO: FIXME: All the below cases labeled `no error` _should be an error_, and are only prevented from so being +// by incorrect variance-based relationships +// Ref: https://github.com/Microsoft/TypeScript/issues/29698 +function defaultRecord(x, y) { + x = y; // no error, but error expected. +} +function customRecord(x, y) { + x = y; // no error, but error expected. +} +function mixed1(x, y) { + x = y; // error +} +function mixed2(x, y) { + x = y; // error +} +function defaultRecord2(x, y) { + x = y; // no error, but error expected. +} +function customRecord2(x, y) { + x = y; // no error, but error expected. +} +function mixed3(x, y) { + x = y; // error +} +function mixed4(x, y) { + x = y; // error +} diff --git a/tests/baselines/reference/consistentAliasVsNonAliasRecordBehavior.symbols b/tests/baselines/reference/consistentAliasVsNonAliasRecordBehavior.symbols new file mode 100644 index 00000000000..8757e1371ac --- /dev/null +++ b/tests/baselines/reference/consistentAliasVsNonAliasRecordBehavior.symbols @@ -0,0 +1,125 @@ +=== tests/cases/compiler/consistentAliasVsNonAliasRecordBehavior.ts === +// TODO: FIXME: All the below cases labeled `no error` _should be an error_, and are only prevented from so being +// by incorrect variance-based relationships +// Ref: https://github.com/Microsoft/TypeScript/issues/29698 + +type Record2 = { +>Record2 : Symbol(Record2, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 0, 0)) +>K : Symbol(K, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 4, 13)) +>T : Symbol(T, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 4, 33)) + + [P in K]: T; +>P : Symbol(P, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 5, 5)) +>K : Symbol(K, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 4, 13)) +>T : Symbol(T, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 4, 33)) + +}; + +function defaultRecord(x: Record<'a', string>, y: Record) { +>defaultRecord : Symbol(defaultRecord, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 6, 2)) +>x : Symbol(x, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 8, 23)) +>Record : Symbol(Record, Decl(lib.es5.d.ts, --, --)) +>y : Symbol(y, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 8, 46)) +>Record : Symbol(Record, Decl(lib.es5.d.ts, --, --)) + + x = y; // no error, but error expected. +>x : Symbol(x, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 8, 23)) +>y : Symbol(y, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 8, 46)) +} + +function customRecord(x: Record2<'a', string>, y: Record2) { +>customRecord : Symbol(customRecord, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 10, 1)) +>x : Symbol(x, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 12, 22)) +>Record2 : Symbol(Record2, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 0, 0)) +>y : Symbol(y, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 12, 46)) +>Record2 : Symbol(Record2, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 0, 0)) + + x = y; // no error, but error expected. +>x : Symbol(x, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 12, 22)) +>y : Symbol(y, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 12, 46)) +} + +function mixed1(x: Record2<'a', string>, y: Record) { +>mixed1 : Symbol(mixed1, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 14, 1)) +>x : Symbol(x, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 16, 16)) +>Record2 : Symbol(Record2, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 0, 0)) +>y : Symbol(y, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 16, 40)) +>Record : Symbol(Record, Decl(lib.es5.d.ts, --, --)) + + x = y; // error +>x : Symbol(x, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 16, 16)) +>y : Symbol(y, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 16, 40)) +} + +function mixed2(x: Record<'a', string>, y: Record2) { +>mixed2 : Symbol(mixed2, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 18, 1)) +>x : Symbol(x, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 20, 16)) +>Record : Symbol(Record, Decl(lib.es5.d.ts, --, --)) +>y : Symbol(y, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 20, 39)) +>Record2 : Symbol(Record2, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 0, 0)) + + x = y; // error +>x : Symbol(x, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 20, 16)) +>y : Symbol(y, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 20, 39)) +} + +function defaultRecord2(x: Record<'a', T>, y: Record) { +>defaultRecord2 : Symbol(defaultRecord2, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 22, 1)) +>T : Symbol(T, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 24, 24)) +>x : Symbol(x, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 24, 27)) +>Record : Symbol(Record, Decl(lib.es5.d.ts, --, --)) +>T : Symbol(T, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 24, 24)) +>y : Symbol(y, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 24, 45)) +>Record : Symbol(Record, Decl(lib.es5.d.ts, --, --)) +>T : Symbol(T, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 24, 24)) + + x = y; // no error, but error expected. +>x : Symbol(x, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 24, 27)) +>y : Symbol(y, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 24, 45)) +} + +function customRecord2(x: Record2<'a', T>, y: Record2) { +>customRecord2 : Symbol(customRecord2, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 26, 1)) +>T : Symbol(T, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 28, 23)) +>x : Symbol(x, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 28, 26)) +>Record2 : Symbol(Record2, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 0, 0)) +>T : Symbol(T, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 28, 23)) +>y : Symbol(y, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 28, 45)) +>Record2 : Symbol(Record2, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 0, 0)) +>T : Symbol(T, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 28, 23)) + + x = y; // no error, but error expected. +>x : Symbol(x, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 28, 26)) +>y : Symbol(y, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 28, 45)) +} + +function mixed3(x: Record2<'a', T>, y: Record) { +>mixed3 : Symbol(mixed3, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 30, 1)) +>T : Symbol(T, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 32, 16)) +>x : Symbol(x, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 32, 19)) +>Record2 : Symbol(Record2, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 0, 0)) +>T : Symbol(T, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 32, 16)) +>y : Symbol(y, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 32, 38)) +>Record : Symbol(Record, Decl(lib.es5.d.ts, --, --)) +>T : Symbol(T, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 32, 16)) + + x = y; // error +>x : Symbol(x, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 32, 19)) +>y : Symbol(y, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 32, 38)) +} + +function mixed4(x: Record<'a', T>, y: Record2) { +>mixed4 : Symbol(mixed4, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 34, 1)) +>T : Symbol(T, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 36, 16)) +>x : Symbol(x, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 36, 19)) +>Record : Symbol(Record, Decl(lib.es5.d.ts, --, --)) +>T : Symbol(T, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 36, 16)) +>y : Symbol(y, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 36, 37)) +>Record2 : Symbol(Record2, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 0, 0)) +>T : Symbol(T, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 36, 16)) + + x = y; // error +>x : Symbol(x, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 36, 19)) +>y : Symbol(y, Decl(consistentAliasVsNonAliasRecordBehavior.ts, 36, 37)) +} + diff --git a/tests/baselines/reference/consistentAliasVsNonAliasRecordBehavior.types b/tests/baselines/reference/consistentAliasVsNonAliasRecordBehavior.types new file mode 100644 index 00000000000..b37089039e1 --- /dev/null +++ b/tests/baselines/reference/consistentAliasVsNonAliasRecordBehavior.types @@ -0,0 +1,99 @@ +=== tests/cases/compiler/consistentAliasVsNonAliasRecordBehavior.ts === +// TODO: FIXME: All the below cases labeled `no error` _should be an error_, and are only prevented from so being +// by incorrect variance-based relationships +// Ref: https://github.com/Microsoft/TypeScript/issues/29698 + +type Record2 = { +>Record2 : Record2 + + [P in K]: T; +}; + +function defaultRecord(x: Record<'a', string>, y: Record) { +>defaultRecord : (x: Record<"a", string>, y: Record) => void +>x : Record<"a", string> +>y : Record + + x = y; // no error, but error expected. +>x = y : Record +>x : Record<"a", string> +>y : Record +} + +function customRecord(x: Record2<'a', string>, y: Record2) { +>customRecord : (x: Record2<"a", string>, y: Record2) => void +>x : Record2<"a", string> +>y : Record2 + + x = y; // no error, but error expected. +>x = y : Record2 +>x : Record2<"a", string> +>y : Record2 +} + +function mixed1(x: Record2<'a', string>, y: Record) { +>mixed1 : (x: Record2<"a", string>, y: Record) => void +>x : Record2<"a", string> +>y : Record + + x = y; // error +>x = y : Record +>x : Record2<"a", string> +>y : Record +} + +function mixed2(x: Record<'a', string>, y: Record2) { +>mixed2 : (x: Record<"a", string>, y: Record2) => void +>x : Record<"a", string> +>y : Record2 + + x = y; // error +>x = y : Record2 +>x : Record<"a", string> +>y : Record2 +} + +function defaultRecord2(x: Record<'a', T>, y: Record) { +>defaultRecord2 : (x: Record<"a", T>, y: Record) => void +>x : Record<"a", T> +>y : Record + + x = y; // no error, but error expected. +>x = y : Record +>x : Record<"a", T> +>y : Record +} + +function customRecord2(x: Record2<'a', T>, y: Record2) { +>customRecord2 : (x: Record2<"a", T>, y: Record2) => void +>x : Record2<"a", T> +>y : Record2 + + x = y; // no error, but error expected. +>x = y : Record2 +>x : Record2<"a", T> +>y : Record2 +} + +function mixed3(x: Record2<'a', T>, y: Record) { +>mixed3 : (x: Record2<"a", T>, y: Record) => void +>x : Record2<"a", T> +>y : Record + + x = y; // error +>x = y : Record +>x : Record2<"a", T> +>y : Record +} + +function mixed4(x: Record<'a', T>, y: Record2) { +>mixed4 : (x: Record<"a", T>, y: Record2) => void +>x : Record<"a", T> +>y : Record2 + + x = y; // error +>x = y : Record2 +>x : Record<"a", T> +>y : Record2 +} + diff --git a/tests/baselines/reference/invariantGenericErrorElaboration.errors.txt b/tests/baselines/reference/invariantGenericErrorElaboration.errors.txt new file mode 100644 index 00000000000..0bd79bcf11d --- /dev/null +++ b/tests/baselines/reference/invariantGenericErrorElaboration.errors.txt @@ -0,0 +1,52 @@ +tests/cases/compiler/invariantGenericErrorElaboration.ts(3,7): error TS2322: Type 'Num' is not assignable to type 'Runtype'. + Types of property 'constraint' are incompatible. + Type 'Constraint' is not assignable to type 'Constraint>'. + Types of property 'constraint' are incompatible. + Type 'Constraint>' is not assignable to type 'Constraint>>'. + Types of property 'constraint' are incompatible. + Type 'Constraint>>' is not assignable to type 'Constraint>>>'. + Type 'Constraint>>' is not assignable to type 'Constraint>'. + Types of property 'underlying' are incompatible. + Type 'Constraint>' is not assignable to type 'Constraint'. +tests/cases/compiler/invariantGenericErrorElaboration.ts(4,19): error TS2322: Type 'Num' is not assignable to type 'Runtype'. + + +==== tests/cases/compiler/invariantGenericErrorElaboration.ts (2 errors) ==== + // Repro from #19746 + + const wat: Runtype = Num; + ~~~ +!!! error TS2322: Type 'Num' is not assignable to type 'Runtype'. +!!! error TS2322: Types of property 'constraint' are incompatible. +!!! error TS2322: Type 'Constraint' is not assignable to type 'Constraint>'. +!!! error TS2322: Types of property 'constraint' are incompatible. +!!! error TS2322: Type 'Constraint>' is not assignable to type 'Constraint>>'. +!!! error TS2322: Types of property 'constraint' are incompatible. +!!! error TS2322: Type 'Constraint>>' is not assignable to type 'Constraint>>>'. +!!! error TS2322: Type 'Constraint>>' is not assignable to type 'Constraint>'. +!!! error TS2322: Types of property 'underlying' are incompatible. +!!! error TS2322: Type 'Constraint>' is not assignable to type 'Constraint'. +!!! related TS2728 tests/cases/compiler/invariantGenericErrorElaboration.ts:12:3: 'tag' is declared here. + const Foo = Obj({ foo: Num }) + ~~~ +!!! error TS2322: Type 'Num' is not assignable to type 'Runtype'. +!!! related TS6501 tests/cases/compiler/invariantGenericErrorElaboration.ts:17:34: The expected type comes from this index signature. + + interface Runtype { + constraint: Constraint + witness: A + } + + interface Num extends Runtype { + tag: 'number' + } + declare const Num: Num + + interface Obj }> extends Runtype<{[K in keyof O]: O[K]['witness'] }> {} + declare function Obj }>(fields: O): Obj; + + interface Constraint> extends Runtype { + underlying: A, + check: (x: A['witness']) => void, + } + \ No newline at end of file diff --git a/tests/baselines/reference/invariantGenericErrorElaboration.types b/tests/baselines/reference/invariantGenericErrorElaboration.types index 86aec86face..7c4bdd46d03 100644 --- a/tests/baselines/reference/invariantGenericErrorElaboration.types +++ b/tests/baselines/reference/invariantGenericErrorElaboration.types @@ -6,8 +6,8 @@ const wat: Runtype = Num; >Num : Num const Foo = Obj({ foo: Num }) ->Foo : Obj<{ foo: Num; }> ->Obj({ foo: Num }) : Obj<{ foo: Num; }> +>Foo : any +>Obj({ foo: Num }) : any >Obj : ; }>(fields: O) => Obj >{ foo: Num } : { foo: Num; } >foo : Num diff --git a/tests/baselines/reference/mappedTypes5.errors.txt b/tests/baselines/reference/mappedTypes5.errors.txt index 3b9f3423941..d0c32cd1dd9 100644 --- a/tests/baselines/reference/mappedTypes5.errors.txt +++ b/tests/baselines/reference/mappedTypes5.errors.txt @@ -1,8 +1,6 @@ tests/cases/conformance/types/mapped/mappedTypes5.ts(6,9): error TS2322: Type 'Partial' is not assignable to type 'Readonly'. tests/cases/conformance/types/mapped/mappedTypes5.ts(8,9): error TS2322: Type 'Partial>' is not assignable to type 'Readonly'. tests/cases/conformance/types/mapped/mappedTypes5.ts(9,9): error TS2322: Type 'Readonly>' is not assignable to type 'Readonly'. - Type 'Partial' is not assignable to type 'T'. - 'Partial' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. ==== tests/cases/conformance/types/mapped/mappedTypes5.ts (3 errors) ==== @@ -21,8 +19,6 @@ tests/cases/conformance/types/mapped/mappedTypes5.ts(9,9): error TS2322: Type 'R let b4: Readonly = rp; // Error ~~ !!! error TS2322: Type 'Readonly>' is not assignable to type 'Readonly'. -!!! error TS2322: Type 'Partial' is not assignable to type 'T'. -!!! error TS2322: 'Partial' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'. let c1: Partial> = p; let c2: Partial> = r; let c3: Partial> = pr; diff --git a/tests/baselines/reference/recursiveTypeComparison.errors.txt b/tests/baselines/reference/recursiveTypeComparison.errors.txt new file mode 100644 index 00000000000..f647763b2e2 --- /dev/null +++ b/tests/baselines/reference/recursiveTypeComparison.errors.txt @@ -0,0 +1,27 @@ +tests/cases/compiler/recursiveTypeComparison.ts(14,5): error TS2322: Type 'Observable<{}>' is not assignable to type 'Property'. + Types of property 'needThisOne' are incompatible. + Type 'Observable<{}>' is not assignable to type 'Observable'. + Type '{}' is not assignable to type 'number'. + + +==== tests/cases/compiler/recursiveTypeComparison.ts (1 errors) ==== + // Before fix this would take an exceeding long time to complete (#1170) + + interface Observable { + // This member can't be of type T, Property, or Observable + needThisOne: Observable; + // Add more to make it slower + expo1: Property; // 0.31 seconds in check + expo2: Property; // 3.11 seconds + expo3: Property; // 82.28 seconds + } + interface Property extends Observable { } + + var p: Observable<{}>; + var stuck: Property = p; + ~~~~~ +!!! error TS2322: Type 'Observable<{}>' is not assignable to type 'Property'. +!!! error TS2322: Types of property 'needThisOne' are incompatible. +!!! error TS2322: Type 'Observable<{}>' is not assignable to type 'Observable'. +!!! error TS2322: Type '{}' is not assignable to type 'number'. + \ No newline at end of file diff --git a/tests/baselines/reference/requiredMappedTypeModifierTrumpsVariance.errors.txt b/tests/baselines/reference/requiredMappedTypeModifierTrumpsVariance.errors.txt new file mode 100644 index 00000000000..83871b29096 --- /dev/null +++ b/tests/baselines/reference/requiredMappedTypeModifierTrumpsVariance.errors.txt @@ -0,0 +1,61 @@ +tests/cases/compiler/requiredMappedTypeModifierTrumpsVariance.ts(5,1): error TS2741: Property 'a' is missing in type 'Required<{ b?: 1; x: 1; }>' but required in type 'Required<{ a?: 1; x: 1; }>'. +tests/cases/compiler/requiredMappedTypeModifierTrumpsVariance.ts(6,1): error TS2741: Property 'b' is missing in type 'Required<{ a?: 1; x: 1; }>' but required in type 'Required<{ b?: 1; x: 1; }>'. +tests/cases/compiler/requiredMappedTypeModifierTrumpsVariance.ts(8,3): error TS2339: Property 'b' does not exist on type 'Required<{ a?: 1; x: 1; }>'. +tests/cases/compiler/requiredMappedTypeModifierTrumpsVariance.ts(9,3): error TS2339: Property 'a' does not exist on type 'Required<{ b?: 1; x: 1; }>'. +tests/cases/compiler/requiredMappedTypeModifierTrumpsVariance.ts(18,1): error TS2322: Type 'Foo<{ b?: 1; x: 1; }>' is not assignable to type 'Foo<{ a?: 1; x: 1; }>'. + Types of property 'a' are incompatible. + Property 'a' is missing in type 'Required<{ b?: 1; x: 1; }>' but required in type 'Required<{ a?: 1; x: 1; }>'. +tests/cases/compiler/requiredMappedTypeModifierTrumpsVariance.ts(19,1): error TS2322: Type 'Foo<{ a?: 1; x: 1; }>' is not assignable to type 'Foo<{ b?: 1; x: 1; }>'. + Types of property 'a' are incompatible. + Property 'b' is missing in type 'Required<{ a?: 1; x: 1; }>' but required in type 'Required<{ b?: 1; x: 1; }>'. +tests/cases/compiler/requiredMappedTypeModifierTrumpsVariance.ts(21,6): error TS2339: Property 'b' does not exist on type 'Required<{ a?: 1; x: 1; }>'. +tests/cases/compiler/requiredMappedTypeModifierTrumpsVariance.ts(22,6): error TS2339: Property 'a' does not exist on type 'Required<{ b?: 1; x: 1; }>'. + + +==== tests/cases/compiler/requiredMappedTypeModifierTrumpsVariance.ts (8 errors) ==== + const a: Required<{ a?: 1; x: 1 }> = { a: 1, x: 1 }; + const b: Required<{ b?: 1; x: 1 }> = { b: 1, x: 1 }; + export let A = a; + export let B = b; + A = b; // Should Error + ~ +!!! error TS2741: Property 'a' is missing in type 'Required<{ b?: 1; x: 1; }>' but required in type 'Required<{ a?: 1; x: 1; }>'. +!!! related TS2728 tests/cases/compiler/requiredMappedTypeModifierTrumpsVariance.ts:1:21: 'a' is declared here. + B = a; // Should Error + ~ +!!! error TS2741: Property 'b' is missing in type 'Required<{ a?: 1; x: 1; }>' but required in type 'Required<{ b?: 1; x: 1; }>'. +!!! related TS2728 tests/cases/compiler/requiredMappedTypeModifierTrumpsVariance.ts:2:21: 'b' is declared here. + + a.b; // Property 'b' does not exist on type 'Required<{ a?: 1; x: 1; }>'. + ~ +!!! error TS2339: Property 'b' does not exist on type 'Required<{ a?: 1; x: 1; }>'. + b.a; // Property 'a' does not exist on type 'Required<{ b?: 1; x: 1; }>'. + ~ +!!! error TS2339: Property 'a' does not exist on type 'Required<{ b?: 1; x: 1; }>'. + + interface Foo { + a: Required; + } + const aa: Foo<{ a?: 1; x: 1 }> = { a: { a: 1, x: 1 } }; + const bb: Foo<{ b?: 1; x: 1 }> = { a: { b: 1, x: 1 } }; + export let AA = aa; + export let BB = bb; + AA = bb; // Should Error + ~~ +!!! error TS2322: Type 'Foo<{ b?: 1; x: 1; }>' is not assignable to type 'Foo<{ a?: 1; x: 1; }>'. +!!! error TS2322: Types of property 'a' are incompatible. +!!! error TS2322: Property 'a' is missing in type 'Required<{ b?: 1; x: 1; }>' but required in type 'Required<{ a?: 1; x: 1; }>'. +!!! related TS2728 tests/cases/compiler/requiredMappedTypeModifierTrumpsVariance.ts:14:17: 'a' is declared here. + BB = aa; // Should Error + ~~ +!!! error TS2322: Type 'Foo<{ a?: 1; x: 1; }>' is not assignable to type 'Foo<{ b?: 1; x: 1; }>'. +!!! error TS2322: Types of property 'a' are incompatible. +!!! error TS2322: Property 'b' is missing in type 'Required<{ a?: 1; x: 1; }>' but required in type 'Required<{ b?: 1; x: 1; }>'. +!!! related TS2728 tests/cases/compiler/requiredMappedTypeModifierTrumpsVariance.ts:15:17: 'b' is declared here. + + aa.a.b; // Property 'b' does not exist on type 'Required<{ a?: 1; x: 1; }>'. + ~ +!!! error TS2339: Property 'b' does not exist on type 'Required<{ a?: 1; x: 1; }>'. + bb.a.a; // Property 'a' does not exist on type 'Required<{ b?: 1; x: 1; }>'. + ~ +!!! error TS2339: Property 'a' does not exist on type 'Required<{ b?: 1; x: 1; }>'. \ No newline at end of file diff --git a/tests/baselines/reference/requiredMappedTypeModifierTrumpsVariance.js b/tests/baselines/reference/requiredMappedTypeModifierTrumpsVariance.js new file mode 100644 index 00000000000..b84c28781eb --- /dev/null +++ b/tests/baselines/reference/requiredMappedTypeModifierTrumpsVariance.js @@ -0,0 +1,43 @@ +//// [requiredMappedTypeModifierTrumpsVariance.ts] +const a: Required<{ a?: 1; x: 1 }> = { a: 1, x: 1 }; +const b: Required<{ b?: 1; x: 1 }> = { b: 1, x: 1 }; +export let A = a; +export let B = b; +A = b; // Should Error +B = a; // Should Error + +a.b; // Property 'b' does not exist on type 'Required<{ a?: 1; x: 1; }>'. +b.a; // Property 'a' does not exist on type 'Required<{ b?: 1; x: 1; }>'. + +interface Foo { + a: Required; +} +const aa: Foo<{ a?: 1; x: 1 }> = { a: { a: 1, x: 1 } }; +const bb: Foo<{ b?: 1; x: 1 }> = { a: { b: 1, x: 1 } }; +export let AA = aa; +export let BB = bb; +AA = bb; // Should Error +BB = aa; // Should Error + +aa.a.b; // Property 'b' does not exist on type 'Required<{ a?: 1; x: 1; }>'. +bb.a.a; // Property 'a' does not exist on type 'Required<{ b?: 1; x: 1; }>'. + +//// [requiredMappedTypeModifierTrumpsVariance.js] +"use strict"; +exports.__esModule = true; +var a = { a: 1, x: 1 }; +var b = { b: 1, x: 1 }; +exports.A = a; +exports.B = b; +exports.A = b; // Should Error +exports.B = a; // Should Error +a.b; // Property 'b' does not exist on type 'Required<{ a?: 1; x: 1; }>'. +b.a; // Property 'a' does not exist on type 'Required<{ b?: 1; x: 1; }>'. +var aa = { a: { a: 1, x: 1 } }; +var bb = { a: { b: 1, x: 1 } }; +exports.AA = aa; +exports.BB = bb; +exports.AA = bb; // Should Error +exports.BB = aa; // Should Error +aa.a.b; // Property 'b' does not exist on type 'Required<{ a?: 1; x: 1; }>'. +bb.a.a; // Property 'a' does not exist on type 'Required<{ b?: 1; x: 1; }>'. diff --git a/tests/baselines/reference/requiredMappedTypeModifierTrumpsVariance.symbols b/tests/baselines/reference/requiredMappedTypeModifierTrumpsVariance.symbols new file mode 100644 index 00000000000..726e89040f2 --- /dev/null +++ b/tests/baselines/reference/requiredMappedTypeModifierTrumpsVariance.symbols @@ -0,0 +1,92 @@ +=== tests/cases/compiler/requiredMappedTypeModifierTrumpsVariance.ts === +const a: Required<{ a?: 1; x: 1 }> = { a: 1, x: 1 }; +>a : Symbol(a, Decl(requiredMappedTypeModifierTrumpsVariance.ts, 0, 5)) +>Required : Symbol(Required, Decl(lib.es5.d.ts, --, --)) +>a : Symbol(a, Decl(requiredMappedTypeModifierTrumpsVariance.ts, 0, 19)) +>x : Symbol(x, Decl(requiredMappedTypeModifierTrumpsVariance.ts, 0, 26)) +>a : Symbol(a, Decl(requiredMappedTypeModifierTrumpsVariance.ts, 0, 38)) +>x : Symbol(x, Decl(requiredMappedTypeModifierTrumpsVariance.ts, 0, 44)) + +const b: Required<{ b?: 1; x: 1 }> = { b: 1, x: 1 }; +>b : Symbol(b, Decl(requiredMappedTypeModifierTrumpsVariance.ts, 1, 5)) +>Required : Symbol(Required, Decl(lib.es5.d.ts, --, --)) +>b : Symbol(b, Decl(requiredMappedTypeModifierTrumpsVariance.ts, 1, 19)) +>x : Symbol(x, Decl(requiredMappedTypeModifierTrumpsVariance.ts, 1, 26)) +>b : Symbol(b, Decl(requiredMappedTypeModifierTrumpsVariance.ts, 1, 38)) +>x : Symbol(x, Decl(requiredMappedTypeModifierTrumpsVariance.ts, 1, 44)) + +export let A = a; +>A : Symbol(A, Decl(requiredMappedTypeModifierTrumpsVariance.ts, 2, 10)) +>a : Symbol(a, Decl(requiredMappedTypeModifierTrumpsVariance.ts, 0, 5)) + +export let B = b; +>B : Symbol(B, Decl(requiredMappedTypeModifierTrumpsVariance.ts, 3, 10)) +>b : Symbol(b, Decl(requiredMappedTypeModifierTrumpsVariance.ts, 1, 5)) + +A = b; // Should Error +>A : Symbol(A, Decl(requiredMappedTypeModifierTrumpsVariance.ts, 2, 10)) +>b : Symbol(b, Decl(requiredMappedTypeModifierTrumpsVariance.ts, 1, 5)) + +B = a; // Should Error +>B : Symbol(B, Decl(requiredMappedTypeModifierTrumpsVariance.ts, 3, 10)) +>a : Symbol(a, Decl(requiredMappedTypeModifierTrumpsVariance.ts, 0, 5)) + +a.b; // Property 'b' does not exist on type 'Required<{ a?: 1; x: 1; }>'. +>a : Symbol(a, Decl(requiredMappedTypeModifierTrumpsVariance.ts, 0, 5)) + +b.a; // Property 'a' does not exist on type 'Required<{ b?: 1; x: 1; }>'. +>b : Symbol(b, Decl(requiredMappedTypeModifierTrumpsVariance.ts, 1, 5)) + +interface Foo { +>Foo : Symbol(Foo, Decl(requiredMappedTypeModifierTrumpsVariance.ts, 8, 4)) +>T : Symbol(T, Decl(requiredMappedTypeModifierTrumpsVariance.ts, 10, 14)) + + a: Required; +>a : Symbol(Foo.a, Decl(requiredMappedTypeModifierTrumpsVariance.ts, 10, 18)) +>Required : Symbol(Required, Decl(lib.es5.d.ts, --, --)) +>T : Symbol(T, Decl(requiredMappedTypeModifierTrumpsVariance.ts, 10, 14)) +} +const aa: Foo<{ a?: 1; x: 1 }> = { a: { a: 1, x: 1 } }; +>aa : Symbol(aa, Decl(requiredMappedTypeModifierTrumpsVariance.ts, 13, 5)) +>Foo : Symbol(Foo, Decl(requiredMappedTypeModifierTrumpsVariance.ts, 8, 4)) +>a : Symbol(a, Decl(requiredMappedTypeModifierTrumpsVariance.ts, 13, 15)) +>x : Symbol(x, Decl(requiredMappedTypeModifierTrumpsVariance.ts, 13, 22)) +>a : Symbol(a, Decl(requiredMappedTypeModifierTrumpsVariance.ts, 13, 34)) +>a : Symbol(a, Decl(requiredMappedTypeModifierTrumpsVariance.ts, 13, 39)) +>x : Symbol(x, Decl(requiredMappedTypeModifierTrumpsVariance.ts, 13, 45)) + +const bb: Foo<{ b?: 1; x: 1 }> = { a: { b: 1, x: 1 } }; +>bb : Symbol(bb, Decl(requiredMappedTypeModifierTrumpsVariance.ts, 14, 5)) +>Foo : Symbol(Foo, Decl(requiredMappedTypeModifierTrumpsVariance.ts, 8, 4)) +>b : Symbol(b, Decl(requiredMappedTypeModifierTrumpsVariance.ts, 14, 15)) +>x : Symbol(x, Decl(requiredMappedTypeModifierTrumpsVariance.ts, 14, 22)) +>a : Symbol(a, Decl(requiredMappedTypeModifierTrumpsVariance.ts, 14, 34)) +>b : Symbol(b, Decl(requiredMappedTypeModifierTrumpsVariance.ts, 14, 39)) +>x : Symbol(x, Decl(requiredMappedTypeModifierTrumpsVariance.ts, 14, 45)) + +export let AA = aa; +>AA : Symbol(AA, Decl(requiredMappedTypeModifierTrumpsVariance.ts, 15, 10)) +>aa : Symbol(aa, Decl(requiredMappedTypeModifierTrumpsVariance.ts, 13, 5)) + +export let BB = bb; +>BB : Symbol(BB, Decl(requiredMappedTypeModifierTrumpsVariance.ts, 16, 10)) +>bb : Symbol(bb, Decl(requiredMappedTypeModifierTrumpsVariance.ts, 14, 5)) + +AA = bb; // Should Error +>AA : Symbol(AA, Decl(requiredMappedTypeModifierTrumpsVariance.ts, 15, 10)) +>bb : Symbol(bb, Decl(requiredMappedTypeModifierTrumpsVariance.ts, 14, 5)) + +BB = aa; // Should Error +>BB : Symbol(BB, Decl(requiredMappedTypeModifierTrumpsVariance.ts, 16, 10)) +>aa : Symbol(aa, Decl(requiredMappedTypeModifierTrumpsVariance.ts, 13, 5)) + +aa.a.b; // Property 'b' does not exist on type 'Required<{ a?: 1; x: 1; }>'. +>aa.a : Symbol(Foo.a, Decl(requiredMappedTypeModifierTrumpsVariance.ts, 10, 18)) +>aa : Symbol(aa, Decl(requiredMappedTypeModifierTrumpsVariance.ts, 13, 5)) +>a : Symbol(Foo.a, Decl(requiredMappedTypeModifierTrumpsVariance.ts, 10, 18)) + +bb.a.a; // Property 'a' does not exist on type 'Required<{ b?: 1; x: 1; }>'. +>bb.a : Symbol(Foo.a, Decl(requiredMappedTypeModifierTrumpsVariance.ts, 10, 18)) +>bb : Symbol(bb, Decl(requiredMappedTypeModifierTrumpsVariance.ts, 14, 5)) +>a : Symbol(Foo.a, Decl(requiredMappedTypeModifierTrumpsVariance.ts, 10, 18)) + diff --git a/tests/baselines/reference/requiredMappedTypeModifierTrumpsVariance.types b/tests/baselines/reference/requiredMappedTypeModifierTrumpsVariance.types new file mode 100644 index 00000000000..f9d482c8fc3 --- /dev/null +++ b/tests/baselines/reference/requiredMappedTypeModifierTrumpsVariance.types @@ -0,0 +1,109 @@ +=== tests/cases/compiler/requiredMappedTypeModifierTrumpsVariance.ts === +const a: Required<{ a?: 1; x: 1 }> = { a: 1, x: 1 }; +>a : Required<{ a?: 1; x: 1; }> +>a : 1 +>x : 1 +>{ a: 1, x: 1 } : { a: 1; x: 1; } +>a : 1 +>1 : 1 +>x : 1 +>1 : 1 + +const b: Required<{ b?: 1; x: 1 }> = { b: 1, x: 1 }; +>b : Required<{ b?: 1; x: 1; }> +>b : 1 +>x : 1 +>{ b: 1, x: 1 } : { b: 1; x: 1; } +>b : 1 +>1 : 1 +>x : 1 +>1 : 1 + +export let A = a; +>A : Required<{ a?: 1; x: 1; }> +>a : Required<{ a?: 1; x: 1; }> + +export let B = b; +>B : Required<{ b?: 1; x: 1; }> +>b : Required<{ b?: 1; x: 1; }> + +A = b; // Should Error +>A = b : Required<{ b?: 1; x: 1; }> +>A : Required<{ a?: 1; x: 1; }> +>b : Required<{ b?: 1; x: 1; }> + +B = a; // Should Error +>B = a : Required<{ a?: 1; x: 1; }> +>B : Required<{ b?: 1; x: 1; }> +>a : Required<{ a?: 1; x: 1; }> + +a.b; // Property 'b' does not exist on type 'Required<{ a?: 1; x: 1; }>'. +>a.b : any +>a : Required<{ a?: 1; x: 1; }> +>b : any + +b.a; // Property 'a' does not exist on type 'Required<{ b?: 1; x: 1; }>'. +>b.a : any +>b : Required<{ b?: 1; x: 1; }> +>a : any + +interface Foo { + a: Required; +>a : Required +} +const aa: Foo<{ a?: 1; x: 1 }> = { a: { a: 1, x: 1 } }; +>aa : Foo<{ a?: 1; x: 1; }> +>a : 1 +>x : 1 +>{ a: { a: 1, x: 1 } } : { a: { a: 1; x: 1; }; } +>a : { a: 1; x: 1; } +>{ a: 1, x: 1 } : { a: 1; x: 1; } +>a : 1 +>1 : 1 +>x : 1 +>1 : 1 + +const bb: Foo<{ b?: 1; x: 1 }> = { a: { b: 1, x: 1 } }; +>bb : Foo<{ b?: 1; x: 1; }> +>b : 1 +>x : 1 +>{ a: { b: 1, x: 1 } } : { a: { b: 1; x: 1; }; } +>a : { b: 1; x: 1; } +>{ b: 1, x: 1 } : { b: 1; x: 1; } +>b : 1 +>1 : 1 +>x : 1 +>1 : 1 + +export let AA = aa; +>AA : Foo<{ a?: 1; x: 1; }> +>aa : Foo<{ a?: 1; x: 1; }> + +export let BB = bb; +>BB : Foo<{ b?: 1; x: 1; }> +>bb : Foo<{ b?: 1; x: 1; }> + +AA = bb; // Should Error +>AA = bb : Foo<{ b?: 1; x: 1; }> +>AA : Foo<{ a?: 1; x: 1; }> +>bb : Foo<{ b?: 1; x: 1; }> + +BB = aa; // Should Error +>BB = aa : Foo<{ a?: 1; x: 1; }> +>BB : Foo<{ b?: 1; x: 1; }> +>aa : Foo<{ a?: 1; x: 1; }> + +aa.a.b; // Property 'b' does not exist on type 'Required<{ a?: 1; x: 1; }>'. +>aa.a.b : any +>aa.a : Required<{ a?: 1; x: 1; }> +>aa : Foo<{ a?: 1; x: 1; }> +>a : Required<{ a?: 1; x: 1; }> +>b : any + +bb.a.a; // Property 'a' does not exist on type 'Required<{ b?: 1; x: 1; }>'. +>bb.a.a : any +>bb.a : Required<{ b?: 1; x: 1; }> +>bb : Foo<{ b?: 1; x: 1; }> +>a : Required<{ b?: 1; x: 1; }> +>a : any + diff --git a/tests/baselines/reference/strictFunctionTypesErrors.errors.txt b/tests/baselines/reference/strictFunctionTypesErrors.errors.txt index d24b88a7a94..3ff04c44fb7 100644 --- a/tests/baselines/reference/strictFunctionTypesErrors.errors.txt +++ b/tests/baselines/reference/strictFunctionTypesErrors.errors.txt @@ -62,9 +62,13 @@ tests/cases/compiler/strictFunctionTypesErrors.ts(84,1): error TS2322: Type 'Fun tests/cases/compiler/strictFunctionTypesErrors.ts(111,1): error TS2322: Type 'Comparer2' is not assignable to type 'Comparer2'. Property 'dog' is missing in type 'Animal' but required in type 'Dog'. tests/cases/compiler/strictFunctionTypesErrors.ts(126,1): error TS2322: Type 'Crate' is not assignable to type 'Crate'. - Type 'Animal' is not assignable to type 'Dog'. + Types of property 'onSetItem' are incompatible. + Type '(item: Dog) => void' is not assignable to type '(item: Animal) => void'. + Types of parameters 'item' and 'item' are incompatible. + Type 'Animal' is not assignable to type 'Dog'. tests/cases/compiler/strictFunctionTypesErrors.ts(127,1): error TS2322: Type 'Crate' is not assignable to type 'Crate'. - Type 'Animal' is not assignable to type 'Dog'. + Types of property 'item' are incompatible. + Type 'Animal' is not assignable to type 'Dog'. tests/cases/compiler/strictFunctionTypesErrors.ts(133,1): error TS2322: Type '(f: (x: Dog) => Dog) => void' is not assignable to type '(f: (x: Animal) => Animal) => void'. Types of parameters 'f' and 'f' are incompatible. Type 'Animal' is not assignable to type 'Dog'. @@ -304,11 +308,15 @@ tests/cases/compiler/strictFunctionTypesErrors.ts(155,5): error TS2322: Type '(c animalCrate = dogCrate; // Error ~~~~~~~~~~~ !!! error TS2322: Type 'Crate' is not assignable to type 'Crate'. -!!! error TS2322: Type 'Animal' is not assignable to type 'Dog'. +!!! error TS2322: Types of property 'onSetItem' are incompatible. +!!! error TS2322: Type '(item: Dog) => void' is not assignable to type '(item: Animal) => void'. +!!! error TS2322: Types of parameters 'item' and 'item' are incompatible. +!!! error TS2322: Type 'Animal' is not assignable to type 'Dog'. dogCrate = animalCrate; // Error ~~~~~~~~ !!! error TS2322: Type 'Crate' is not assignable to type 'Crate'. -!!! error TS2322: Type 'Animal' is not assignable to type 'Dog'. +!!! error TS2322: Types of property 'item' are incompatible. +!!! error TS2322: Type 'Animal' is not assignable to type 'Dog'. // Verify that callback parameters are strictly checked diff --git a/tests/baselines/reference/thisConditionalOnMethodReturnOfGenericInstance.js b/tests/baselines/reference/thisConditionalOnMethodReturnOfGenericInstance.js new file mode 100644 index 00000000000..c903864eb67 --- /dev/null +++ b/tests/baselines/reference/thisConditionalOnMethodReturnOfGenericInstance.js @@ -0,0 +1,59 @@ +//// [thisConditionalOnMethodReturnOfGenericInstance.ts] +class A { + unmeasurableUsage!: {[K in keyof T]-?: T[K]}; +} + +class B extends A { + method(): string | (this extends C ? undefined : null) { + return ""; + } +} + +class C extends B { + marker!: string; +} + +const x = new C<{}>(); + +const y = x.method(); // usage flags `method` in `B` as circular and marks `y` as the error-any type + + +//// [thisConditionalOnMethodReturnOfGenericInstance.js] +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var A = /** @class */ (function () { + function A() { + } + return A; +}()); +var B = /** @class */ (function (_super) { + __extends(B, _super); + function B() { + return _super !== null && _super.apply(this, arguments) || this; + } + B.prototype.method = function () { + return ""; + }; + return B; +}(A)); +var C = /** @class */ (function (_super) { + __extends(C, _super); + function C() { + return _super !== null && _super.apply(this, arguments) || this; + } + return C; +}(B)); +var x = new C(); +var y = x.method(); // usage flags `method` in `B` as circular and marks `y` as the error-any type diff --git a/tests/baselines/reference/thisConditionalOnMethodReturnOfGenericInstance.symbols b/tests/baselines/reference/thisConditionalOnMethodReturnOfGenericInstance.symbols new file mode 100644 index 00000000000..ca81357af14 --- /dev/null +++ b/tests/baselines/reference/thisConditionalOnMethodReturnOfGenericInstance.symbols @@ -0,0 +1,47 @@ +=== tests/cases/compiler/thisConditionalOnMethodReturnOfGenericInstance.ts === +class A { +>A : Symbol(A, Decl(thisConditionalOnMethodReturnOfGenericInstance.ts, 0, 0)) +>T : Symbol(T, Decl(thisConditionalOnMethodReturnOfGenericInstance.ts, 0, 8)) + + unmeasurableUsage!: {[K in keyof T]-?: T[K]}; +>unmeasurableUsage : Symbol(A.unmeasurableUsage, Decl(thisConditionalOnMethodReturnOfGenericInstance.ts, 0, 12)) +>K : Symbol(K, Decl(thisConditionalOnMethodReturnOfGenericInstance.ts, 1, 26)) +>T : Symbol(T, Decl(thisConditionalOnMethodReturnOfGenericInstance.ts, 0, 8)) +>T : Symbol(T, Decl(thisConditionalOnMethodReturnOfGenericInstance.ts, 0, 8)) +>K : Symbol(K, Decl(thisConditionalOnMethodReturnOfGenericInstance.ts, 1, 26)) +} + +class B extends A { +>B : Symbol(B, Decl(thisConditionalOnMethodReturnOfGenericInstance.ts, 2, 1)) +>T : Symbol(T, Decl(thisConditionalOnMethodReturnOfGenericInstance.ts, 4, 8)) +>A : Symbol(A, Decl(thisConditionalOnMethodReturnOfGenericInstance.ts, 0, 0)) +>T : Symbol(T, Decl(thisConditionalOnMethodReturnOfGenericInstance.ts, 4, 8)) + + method(): string | (this extends C ? undefined : null) { +>method : Symbol(B.method, Decl(thisConditionalOnMethodReturnOfGenericInstance.ts, 4, 25)) +>C : Symbol(C, Decl(thisConditionalOnMethodReturnOfGenericInstance.ts, 8, 1)) + + return ""; + } +} + +class C extends B { +>C : Symbol(C, Decl(thisConditionalOnMethodReturnOfGenericInstance.ts, 8, 1)) +>T : Symbol(T, Decl(thisConditionalOnMethodReturnOfGenericInstance.ts, 10, 8)) +>B : Symbol(B, Decl(thisConditionalOnMethodReturnOfGenericInstance.ts, 2, 1)) +>T : Symbol(T, Decl(thisConditionalOnMethodReturnOfGenericInstance.ts, 10, 8)) + + marker!: string; +>marker : Symbol(C.marker, Decl(thisConditionalOnMethodReturnOfGenericInstance.ts, 10, 31)) +} + +const x = new C<{}>(); +>x : Symbol(x, Decl(thisConditionalOnMethodReturnOfGenericInstance.ts, 14, 5)) +>C : Symbol(C, Decl(thisConditionalOnMethodReturnOfGenericInstance.ts, 8, 1)) + +const y = x.method(); // usage flags `method` in `B` as circular and marks `y` as the error-any type +>y : Symbol(y, Decl(thisConditionalOnMethodReturnOfGenericInstance.ts, 16, 5)) +>x.method : Symbol(B.method, Decl(thisConditionalOnMethodReturnOfGenericInstance.ts, 4, 25)) +>x : Symbol(x, Decl(thisConditionalOnMethodReturnOfGenericInstance.ts, 14, 5)) +>method : Symbol(B.method, Decl(thisConditionalOnMethodReturnOfGenericInstance.ts, 4, 25)) + diff --git a/tests/baselines/reference/thisConditionalOnMethodReturnOfGenericInstance.types b/tests/baselines/reference/thisConditionalOnMethodReturnOfGenericInstance.types new file mode 100644 index 00000000000..8ec248f9d53 --- /dev/null +++ b/tests/baselines/reference/thisConditionalOnMethodReturnOfGenericInstance.types @@ -0,0 +1,41 @@ +=== tests/cases/compiler/thisConditionalOnMethodReturnOfGenericInstance.ts === +class A { +>A : A + + unmeasurableUsage!: {[K in keyof T]-?: T[K]}; +>unmeasurableUsage : { [K in keyof T]-?: T[K]; } +} + +class B extends A { +>B : B +>A : A + + method(): string | (this extends C ? undefined : null) { +>method : () => string | (this extends C ? undefined : null) +>null : null + + return ""; +>"" : "" + } +} + +class C extends B { +>C : C +>B : B + + marker!: string; +>marker : string +} + +const x = new C<{}>(); +>x : C<{}> +>new C<{}>() : C<{}> +>C : typeof C + +const y = x.method(); // usage flags `method` in `B` as circular and marks `y` as the error-any type +>y : string | undefined +>x.method() : string | undefined +>x.method : () => string | undefined +>x : C<{}> +>method : () => string | undefined + diff --git a/tests/cases/compiler/consistentAliasVsNonAliasRecordBehavior.ts b/tests/cases/compiler/consistentAliasVsNonAliasRecordBehavior.ts new file mode 100644 index 00000000000..e21bc2d72fd --- /dev/null +++ b/tests/cases/compiler/consistentAliasVsNonAliasRecordBehavior.ts @@ -0,0 +1,39 @@ +// TODO: FIXME: All the below cases labeled `no error` _should be an error_, and are only prevented from so being +// by incorrect variance-based relationships +// Ref: https://github.com/Microsoft/TypeScript/issues/29698 + +type Record2 = { + [P in K]: T; +}; + +function defaultRecord(x: Record<'a', string>, y: Record) { + x = y; // no error, but error expected. +} + +function customRecord(x: Record2<'a', string>, y: Record2) { + x = y; // no error, but error expected. +} + +function mixed1(x: Record2<'a', string>, y: Record) { + x = y; // error +} + +function mixed2(x: Record<'a', string>, y: Record2) { + x = y; // error +} + +function defaultRecord2(x: Record<'a', T>, y: Record) { + x = y; // no error, but error expected. +} + +function customRecord2(x: Record2<'a', T>, y: Record2) { + x = y; // no error, but error expected. +} + +function mixed3(x: Record2<'a', T>, y: Record) { + x = y; // error +} + +function mixed4(x: Record<'a', T>, y: Record2) { + x = y; // error +} diff --git a/tests/cases/compiler/requiredMappedTypeModifierTrumpsVariance.ts b/tests/cases/compiler/requiredMappedTypeModifierTrumpsVariance.ts new file mode 100644 index 00000000000..b2017a87581 --- /dev/null +++ b/tests/cases/compiler/requiredMappedTypeModifierTrumpsVariance.ts @@ -0,0 +1,22 @@ +const a: Required<{ a?: 1; x: 1 }> = { a: 1, x: 1 }; +const b: Required<{ b?: 1; x: 1 }> = { b: 1, x: 1 }; +export let A = a; +export let B = b; +A = b; // Should Error +B = a; // Should Error + +a.b; // Property 'b' does not exist on type 'Required<{ a?: 1; x: 1; }>'. +b.a; // Property 'a' does not exist on type 'Required<{ b?: 1; x: 1; }>'. + +interface Foo { + a: Required; +} +const aa: Foo<{ a?: 1; x: 1 }> = { a: { a: 1, x: 1 } }; +const bb: Foo<{ b?: 1; x: 1 }> = { a: { b: 1, x: 1 } }; +export let AA = aa; +export let BB = bb; +AA = bb; // Should Error +BB = aa; // Should Error + +aa.a.b; // Property 'b' does not exist on type 'Required<{ a?: 1; x: 1; }>'. +bb.a.a; // Property 'a' does not exist on type 'Required<{ b?: 1; x: 1; }>'. \ No newline at end of file diff --git a/tests/cases/compiler/thisConditionalOnMethodReturnOfGenericInstance.ts b/tests/cases/compiler/thisConditionalOnMethodReturnOfGenericInstance.ts new file mode 100644 index 00000000000..a0264e90f49 --- /dev/null +++ b/tests/cases/compiler/thisConditionalOnMethodReturnOfGenericInstance.ts @@ -0,0 +1,18 @@ +// @strict: true +class A { + unmeasurableUsage!: {[K in keyof T]-?: T[K]}; +} + +class B extends A { + method(): string | (this extends C ? undefined : null) { + return ""; + } +} + +class C extends B { + marker!: string; +} + +const x = new C<{}>(); + +const y = x.method(); // usage flags `method` in `B` as circular and marks `y` as the error-any type From 4ee0084fa1072b8217f303d17d301f9b9467fd69 Mon Sep 17 00:00:00 2001 From: Klaus Meinhardt Date: Fri, 3 May 2019 23:51:55 +0200 Subject: [PATCH 35/45] avoid more useless type assertions (#31239) --- src/compiler/factory.ts | 6 +++--- src/compiler/parser.ts | 4 +++- src/compiler/transformers/es2015.ts | 2 +- tests/baselines/reference/api/tsserverlibrary.d.ts | 2 +- tests/baselines/reference/api/typescript.d.ts | 2 +- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/compiler/factory.ts b/src/compiler/factory.ts index f562a6b5d12..002e0e8f07f 100644 --- a/src/compiler/factory.ts +++ b/src/compiler/factory.ts @@ -1004,10 +1004,10 @@ namespace ts { : node; } - export function createPropertyAccess(expression: Expression, name: string | Identifier | undefined) { + export function createPropertyAccess(expression: Expression, name: string | Identifier) { const node = createSynthesizedNode(SyntaxKind.PropertyAccessExpression); node.expression = parenthesizeForAccess(expression); - node.name = asName(name)!; // TODO: GH#18217 + node.name = asName(name); setEmitFlags(node, EmitFlags.NoIndentation); return node; } @@ -2468,7 +2468,7 @@ namespace ts { export function createSpreadAssignment(expression: Expression) { const node = createSynthesizedNode(SyntaxKind.SpreadAssignment); - node.expression = expression !== undefined ? parenthesizeExpressionForList(expression) : undefined!; // TODO: GH#18217 + node.expression = parenthesizeExpressionForList(expression); return node; } diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index a86dba52c87..a79ed0c5428 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -1328,6 +1328,8 @@ namespace ts { return node; } + function createMissingNode(kind: T["kind"], reportAtCurrentPosition: false, diagnosticMessage?: DiagnosticMessage, arg0?: any): T; + function createMissingNode(kind: T["kind"], reportAtCurrentPosition: boolean, diagnosticMessage: DiagnosticMessage, arg0?: any): T; function createMissingNode(kind: T["kind"], reportAtCurrentPosition: boolean, diagnosticMessage: DiagnosticMessage, arg0?: any): T { if (reportAtCurrentPosition) { parseErrorAtPosition(scanner.getStartPos(), 0, diagnosticMessage, arg0); @@ -4290,7 +4292,7 @@ namespace ts { badNode.end = invalidElement.end; badNode.left = result; badNode.right = invalidElement; - badNode.operatorToken = createMissingNode(SyntaxKind.CommaToken, /*reportAtCurrentPosition*/ false, /*diagnosticMessage*/ undefined!); // TODO: GH#18217 + badNode.operatorToken = createMissingNode(SyntaxKind.CommaToken, /*reportAtCurrentPosition*/ false); badNode.operatorToken.pos = badNode.operatorToken.end = badNode.right.pos; return badNode; } diff --git a/src/compiler/transformers/es2015.ts b/src/compiler/transformers/es2015.ts index 31916cbb684..cdeae5dbf54 100644 --- a/src/compiler/transformers/es2015.ts +++ b/src/compiler/transformers/es2015.ts @@ -1639,7 +1639,7 @@ namespace ts { // arguments are both mapped contiguously to the accessor name. const target = getMutableClone(receiver); setEmitFlags(target, EmitFlags.NoComments | EmitFlags.NoTrailingSourceMap); - setSourceMapRange(target, firstAccessor.name); // TODO: GH#18217 + setSourceMapRange(target, firstAccessor.name); const propertyName = createExpressionForPropertyName(visitNode(firstAccessor.name, visitor, isPropertyName)); setEmitFlags(propertyName, EmitFlags.NoComments | EmitFlags.NoLeadingSourceMap); diff --git a/tests/baselines/reference/api/tsserverlibrary.d.ts b/tests/baselines/reference/api/tsserverlibrary.d.ts index a0bbf92fcaf..08e25fed188 100644 --- a/tests/baselines/reference/api/tsserverlibrary.d.ts +++ b/tests/baselines/reference/api/tsserverlibrary.d.ts @@ -3856,7 +3856,7 @@ declare namespace ts { function updateArrayLiteral(node: ArrayLiteralExpression, elements: ReadonlyArray): ArrayLiteralExpression; function createObjectLiteral(properties?: ReadonlyArray, multiLine?: boolean): ObjectLiteralExpression; function updateObjectLiteral(node: ObjectLiteralExpression, properties: ReadonlyArray): ObjectLiteralExpression; - function createPropertyAccess(expression: Expression, name: string | Identifier | undefined): PropertyAccessExpression; + function createPropertyAccess(expression: Expression, name: string | Identifier): PropertyAccessExpression; function updatePropertyAccess(node: PropertyAccessExpression, expression: Expression, name: Identifier): PropertyAccessExpression; function createElementAccess(expression: Expression, index: number | Expression): ElementAccessExpression; function updateElementAccess(node: ElementAccessExpression, expression: Expression, argumentExpression: Expression): ElementAccessExpression; diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index add726bd092..a7c3fc07971 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -3856,7 +3856,7 @@ declare namespace ts { function updateArrayLiteral(node: ArrayLiteralExpression, elements: ReadonlyArray): ArrayLiteralExpression; function createObjectLiteral(properties?: ReadonlyArray, multiLine?: boolean): ObjectLiteralExpression; function updateObjectLiteral(node: ObjectLiteralExpression, properties: ReadonlyArray): ObjectLiteralExpression; - function createPropertyAccess(expression: Expression, name: string | Identifier | undefined): PropertyAccessExpression; + function createPropertyAccess(expression: Expression, name: string | Identifier): PropertyAccessExpression; function updatePropertyAccess(node: PropertyAccessExpression, expression: Expression, name: Identifier): PropertyAccessExpression; function createElementAccess(expression: Expression, index: number | Expression): ElementAccessExpression; function updateElementAccess(node: ElementAccessExpression, expression: Expression, argumentExpression: Expression): ElementAccessExpression; From 676ed3ead7ad905e9e75940172d5357df55bc99c Mon Sep 17 00:00:00 2001 From: Klaus Meinhardt Date: Mon, 6 May 2019 17:17:24 +0200 Subject: [PATCH 36/45] parseProjectReferenceConfigFile: always set SourceFile.path --- src/compiler/program.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 6f7ffc2c3a9..b493a90d3f9 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -2699,11 +2699,12 @@ namespace ts { projectReferenceRedirects.set(sourceFilePath, false); return undefined; } - sourceFile.path = sourceFilePath; - sourceFile.resolvedPath = sourceFilePath; - sourceFile.originalFileName = refPath; commandLine = parseJsonSourceFileConfigFileContent(sourceFile, configParsingHost, basePath, /*existingOptions*/ undefined, refPath); } + sourceFile.path = sourceFilePath; + sourceFile.resolvedPath = sourceFilePath; + sourceFile.originalFileName = refPath; + const resolvedRef: ResolvedProjectReference = { commandLine, sourceFile }; projectReferenceRedirects.set(sourceFilePath, resolvedRef); if (commandLine.projectReferences) { From cc0e5a0d6a37fc0a3a10f868a53aeaa2c26101e3 Mon Sep 17 00:00:00 2001 From: TypeScript Bot Date: Mon, 6 May 2019 10:56:06 -0700 Subject: [PATCH 37/45] Update user baselines (#31269) --- .../reference/user/TypeScript-React-Native-Starter.log | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/baselines/reference/user/TypeScript-React-Native-Starter.log b/tests/baselines/reference/user/TypeScript-React-Native-Starter.log index a678ef73eb7..2f5a0d1f7f5 100644 --- a/tests/baselines/reference/user/TypeScript-React-Native-Starter.log +++ b/tests/baselines/reference/user/TypeScript-React-Native-Starter.log @@ -3,7 +3,7 @@ Standard output: node_modules/@types/react-native/index.d.ts(3425,42): error TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later. node_modules/@types/react-native/index.d.ts(3438,42): error TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later. node_modules/@types/react-native/index.d.ts(8745,18): error TS2717: Subsequent property declarations must have the same type. Property 'geolocation' must be of type 'Geolocation', but here has type 'GeolocationStatic'. -node_modules/@types/react/index.d.ts(379,23): error TS2583: Cannot find name 'Set'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later. +node_modules/@types/react/index.d.ts(378,23): error TS2583: Cannot find name 'Set'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later. From 3c2f36890821cbd49149ba6b21580d898ab7760b Mon Sep 17 00:00:00 2001 From: Klaus Meinhardt Date: Mon, 6 May 2019 21:31:20 +0200 Subject: [PATCH 38/45] add assert --- src/compiler/program.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compiler/program.ts b/src/compiler/program.ts index b493a90d3f9..6f331bb49ca 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -2688,6 +2688,7 @@ namespace ts { return undefined; } sourceFile = Debug.assertDefined(commandLine.options.configFile); + Debug.assert(!sourceFile.path || sourceFile.path === sourceFilePath); addFileToFilesByName(sourceFile, sourceFilePath, /*redirectedPath*/ undefined); } else { From 714821fc97976e6b138f6ba53b2f14e8505bc52c Mon Sep 17 00:00:00 2001 From: Wenlu Wang Date: Tue, 7 May 2019 10:26:54 -0500 Subject: [PATCH 39/45] add refactor of extract type (#30562) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add basically implement * add rename location and add testcase * collection type arguments * disallow infer type * add support for typedef convert * refactor info to make type safe * disallow type pred * avoid unnecessary branch * disallow type query * haha😂 Co-Authored-By: Kingwl * Update src/services/refactors/extractType.ts Co-Authored-By: Kingwl * Update src/services/refactors/extractType.ts Co-Authored-By: Kingwl * add more tests * add template tag support in jsdoc * add support of type parameters constraint * add more tests * merge branch * add more tests * refactor and update function name --- src/compiler/diagnosticMessages.json | 13 ++ src/services/refactors/extractType.ts | 147 ++++++++++++++++++ src/services/tsconfig.json | 1 + tests/cases/fourslash/refactorExtractType1.ts | 16 ++ .../cases/fourslash/refactorExtractType10.ts | 17 ++ .../cases/fourslash/refactorExtractType11.ts | 17 ++ .../cases/fourslash/refactorExtractType12.ts | 21 +++ .../cases/fourslash/refactorExtractType13.ts | 21 +++ .../cases/fourslash/refactorExtractType14.ts | 13 ++ .../cases/fourslash/refactorExtractType15.ts | 13 ++ .../cases/fourslash/refactorExtractType16.ts | 13 ++ .../cases/fourslash/refactorExtractType17.ts | 13 ++ .../cases/fourslash/refactorExtractType18.ts | 14 ++ .../cases/fourslash/refactorExtractType19.ts | 14 ++ tests/cases/fourslash/refactorExtractType2.ts | 13 ++ .../cases/fourslash/refactorExtractType20.ts | 13 ++ .../cases/fourslash/refactorExtractType21.ts | 13 ++ .../cases/fourslash/refactorExtractType22.ts | 13 ++ .../cases/fourslash/refactorExtractType23.ts | 13 ++ .../cases/fourslash/refactorExtractType24.ts | 13 ++ .../cases/fourslash/refactorExtractType25.ts | 13 ++ .../cases/fourslash/refactorExtractType26.ts | 13 ++ .../cases/fourslash/refactorExtractType27.ts | 13 ++ .../cases/fourslash/refactorExtractType28.ts | 13 ++ .../cases/fourslash/refactorExtractType29.ts | 13 ++ tests/cases/fourslash/refactorExtractType3.ts | 13 ++ .../cases/fourslash/refactorExtractType30.ts | 13 ++ .../cases/fourslash/refactorExtractType31.ts | 6 + .../cases/fourslash/refactorExtractType32.ts | 6 + .../cases/fourslash/refactorExtractType33.ts | 6 + .../cases/fourslash/refactorExtractType34.ts | 13 ++ .../cases/fourslash/refactorExtractType35.ts | 13 ++ .../cases/fourslash/refactorExtractType36.ts | 14 ++ .../cases/fourslash/refactorExtractType37.ts | 13 ++ .../cases/fourslash/refactorExtractType38.ts | 6 + .../cases/fourslash/refactorExtractType39.ts | 13 ++ tests/cases/fourslash/refactorExtractType4.ts | 13 ++ .../cases/fourslash/refactorExtractType40.ts | 6 + .../cases/fourslash/refactorExtractType41.ts | 14 ++ .../cases/fourslash/refactorExtractType42.ts | 15 ++ .../cases/fourslash/refactorExtractType43.ts | 6 + .../cases/fourslash/refactorExtractType44.ts | 13 ++ .../cases/fourslash/refactorExtractType45.ts | 13 ++ .../cases/fourslash/refactorExtractType46.ts | 15 ++ .../cases/fourslash/refactorExtractType47.ts | 6 + .../cases/fourslash/refactorExtractType48.ts | 13 ++ .../cases/fourslash/refactorExtractType49.ts | 15 ++ tests/cases/fourslash/refactorExtractType5.ts | 13 ++ .../cases/fourslash/refactorExtractType50.ts | 6 + .../cases/fourslash/refactorExtractType51.ts | 6 + .../cases/fourslash/refactorExtractType52.ts | 6 + .../cases/fourslash/refactorExtractType53.ts | 13 ++ .../cases/fourslash/refactorExtractType54.ts | 13 ++ .../cases/fourslash/refactorExtractType55.ts | 13 ++ .../cases/fourslash/refactorExtractType56.ts | 7 + .../cases/fourslash/refactorExtractType57.ts | 27 ++++ .../cases/fourslash/refactorExtractType58.ts | 6 + .../cases/fourslash/refactorExtractType59.ts | 10 ++ tests/cases/fourslash/refactorExtractType6.ts | 13 ++ tests/cases/fourslash/refactorExtractType7.ts | 17 ++ tests/cases/fourslash/refactorExtractType8.ts | 17 ++ tests/cases/fourslash/refactorExtractType9.ts | 17 ++ .../fourslash/refactorExtractType_js1.ts | 20 +++ .../fourslash/refactorExtractType_js2.ts | 20 +++ .../fourslash/refactorExtractType_js3.ts | 20 +++ .../fourslash/refactorExtractType_js4.ts | 34 ++++ .../fourslash/refactorExtractType_js5.ts | 34 ++++ .../fourslash/refactorExtractType_js6.ts | 32 ++++ 68 files changed, 1065 insertions(+) create mode 100644 src/services/refactors/extractType.ts create mode 100644 tests/cases/fourslash/refactorExtractType1.ts create mode 100644 tests/cases/fourslash/refactorExtractType10.ts create mode 100644 tests/cases/fourslash/refactorExtractType11.ts create mode 100644 tests/cases/fourslash/refactorExtractType12.ts create mode 100644 tests/cases/fourslash/refactorExtractType13.ts create mode 100644 tests/cases/fourslash/refactorExtractType14.ts create mode 100644 tests/cases/fourslash/refactorExtractType15.ts create mode 100644 tests/cases/fourslash/refactorExtractType16.ts create mode 100644 tests/cases/fourslash/refactorExtractType17.ts create mode 100644 tests/cases/fourslash/refactorExtractType18.ts create mode 100644 tests/cases/fourslash/refactorExtractType19.ts create mode 100644 tests/cases/fourslash/refactorExtractType2.ts create mode 100644 tests/cases/fourslash/refactorExtractType20.ts create mode 100644 tests/cases/fourslash/refactorExtractType21.ts create mode 100644 tests/cases/fourslash/refactorExtractType22.ts create mode 100644 tests/cases/fourslash/refactorExtractType23.ts create mode 100644 tests/cases/fourslash/refactorExtractType24.ts create mode 100644 tests/cases/fourslash/refactorExtractType25.ts create mode 100644 tests/cases/fourslash/refactorExtractType26.ts create mode 100644 tests/cases/fourslash/refactorExtractType27.ts create mode 100644 tests/cases/fourslash/refactorExtractType28.ts create mode 100644 tests/cases/fourslash/refactorExtractType29.ts create mode 100644 tests/cases/fourslash/refactorExtractType3.ts create mode 100644 tests/cases/fourslash/refactorExtractType30.ts create mode 100644 tests/cases/fourslash/refactorExtractType31.ts create mode 100644 tests/cases/fourslash/refactorExtractType32.ts create mode 100644 tests/cases/fourslash/refactorExtractType33.ts create mode 100644 tests/cases/fourslash/refactorExtractType34.ts create mode 100644 tests/cases/fourslash/refactorExtractType35.ts create mode 100644 tests/cases/fourslash/refactorExtractType36.ts create mode 100644 tests/cases/fourslash/refactorExtractType37.ts create mode 100644 tests/cases/fourslash/refactorExtractType38.ts create mode 100644 tests/cases/fourslash/refactorExtractType39.ts create mode 100644 tests/cases/fourslash/refactorExtractType4.ts create mode 100644 tests/cases/fourslash/refactorExtractType40.ts create mode 100644 tests/cases/fourslash/refactorExtractType41.ts create mode 100644 tests/cases/fourslash/refactorExtractType42.ts create mode 100644 tests/cases/fourslash/refactorExtractType43.ts create mode 100644 tests/cases/fourslash/refactorExtractType44.ts create mode 100644 tests/cases/fourslash/refactorExtractType45.ts create mode 100644 tests/cases/fourslash/refactorExtractType46.ts create mode 100644 tests/cases/fourslash/refactorExtractType47.ts create mode 100644 tests/cases/fourslash/refactorExtractType48.ts create mode 100644 tests/cases/fourslash/refactorExtractType49.ts create mode 100644 tests/cases/fourslash/refactorExtractType5.ts create mode 100644 tests/cases/fourslash/refactorExtractType50.ts create mode 100644 tests/cases/fourslash/refactorExtractType51.ts create mode 100644 tests/cases/fourslash/refactorExtractType52.ts create mode 100644 tests/cases/fourslash/refactorExtractType53.ts create mode 100644 tests/cases/fourslash/refactorExtractType54.ts create mode 100644 tests/cases/fourslash/refactorExtractType55.ts create mode 100644 tests/cases/fourslash/refactorExtractType56.ts create mode 100644 tests/cases/fourslash/refactorExtractType57.ts create mode 100644 tests/cases/fourslash/refactorExtractType58.ts create mode 100644 tests/cases/fourslash/refactorExtractType59.ts create mode 100644 tests/cases/fourslash/refactorExtractType6.ts create mode 100644 tests/cases/fourslash/refactorExtractType7.ts create mode 100644 tests/cases/fourslash/refactorExtractType8.ts create mode 100644 tests/cases/fourslash/refactorExtractType9.ts create mode 100644 tests/cases/fourslash/refactorExtractType_js1.ts create mode 100644 tests/cases/fourslash/refactorExtractType_js2.ts create mode 100644 tests/cases/fourslash/refactorExtractType_js3.ts create mode 100644 tests/cases/fourslash/refactorExtractType_js4.ts create mode 100644 tests/cases/fourslash/refactorExtractType_js5.ts create mode 100644 tests/cases/fourslash/refactorExtractType_js6.ts diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index af3ecad79a6..87101781ead 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -4962,6 +4962,19 @@ "category": "Message", "code": 95076 }, + "Extract type": { + "category": "Message", + "code": 95077 + }, + "Extract to type alias": { + "category": "Message", + "code": 95078 + }, + "Extract to typedef": { + "category": "Message", + "code": 95079 + }, + "No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer." :{ "category": "Error", "code": 18004 diff --git a/src/services/refactors/extractType.ts b/src/services/refactors/extractType.ts new file mode 100644 index 00000000000..02f6cd39a18 --- /dev/null +++ b/src/services/refactors/extractType.ts @@ -0,0 +1,147 @@ +/* @internal */ +namespace ts.refactor { + const refactorName = "Extract type"; + const extractToTypeAlias = "Extract to type alias"; + const extractToTypeDef = "Extract to typedef"; + registerRefactor(refactorName, { + getAvailableActions(context): ReadonlyArray { + const info = getRangeToExtract(context); + if (!info) return emptyArray; + + return [{ + name: refactorName, + description: getLocaleSpecificMessage(Diagnostics.Extract_type), + actions: [info.isJS ? { + name: extractToTypeDef, description: getLocaleSpecificMessage(Diagnostics.Extract_to_typedef) + } : { + name: extractToTypeAlias, description: getLocaleSpecificMessage(Diagnostics.Extract_to_type_alias) + }] + }]; + }, + getEditsForAction(context, actionName): RefactorEditInfo { + Debug.assert(actionName === extractToTypeAlias || actionName === extractToTypeDef); + const { file } = context; + const info = Debug.assertDefined(getRangeToExtract(context)); + Debug.assert(actionName === extractToTypeAlias && !info.isJS || actionName === extractToTypeDef && info.isJS); + + const name = getUniqueName("NewType", file); + const edits = textChanges.ChangeTracker.with(context, changes => info.isJS ? + doTypedefChange(changes, file, name, info.firstStatement, info.selection, info.typeParameters) : + doTypeAliasChange(changes, file, name, info.firstStatement, info.selection, info.typeParameters)); + + const renameFilename = file.fileName; + const renameLocation = getRenameLocation(edits, renameFilename, name, /*preferLastLocation*/ false); + return { edits, renameFilename, renameLocation }; + } + }); + + interface Info { isJS: boolean; selection: TypeNode; firstStatement: Statement; typeParameters: ReadonlyArray; } + + function getRangeToExtract(context: RefactorContext): Info | undefined { + const { file, startPosition } = context; + const isJS = isSourceFileJS(file); + const current = getTokenAtPosition(file, startPosition); + const range = createTextRangeFromSpan(getRefactorContextSpan(context)); + + const selection = findAncestor(current, (node => node.parent && rangeContainsSkipTrivia(range, node, file) && !rangeContainsSkipTrivia(range, node.parent, file))); + if (!selection || !isTypeNode(selection)) return undefined; + + const checker = context.program.getTypeChecker(); + const firstStatement = Debug.assertDefined(isJS ? findAncestor(selection, isStatementAndHasJSDoc) : findAncestor(selection, isStatement)); + const typeParameters = collectTypeParameters(checker, selection, firstStatement, file); + if (!typeParameters) return undefined; + + return { isJS, selection, firstStatement, typeParameters }; + } + + function isStatementAndHasJSDoc(n: Node): n is (Statement & HasJSDoc) { + return isStatement(n) && hasJSDocNodes(n); + } + + function rangeContainsSkipTrivia(r1: TextRange, node: Node, file: SourceFile): boolean { + return rangeContainsStartEnd(r1, skipTrivia(file.text, node.pos), node.end); + } + + function collectTypeParameters(checker: TypeChecker, selection: TypeNode, statement: Statement, file: SourceFile): TypeParameterDeclaration[] | undefined { + const result: TypeParameterDeclaration[] = []; + return visitor(selection) ? undefined : result; + + function visitor(node: Node): true | undefined { + if (isTypeReferenceNode(node)) { + if (isIdentifier(node.typeName)) { + const symbol = checker.resolveName(node.typeName.text, node.typeName, SymbolFlags.TypeParameter, /* excludeGlobals */ true); + if (symbol) { + const declaration = cast(first(symbol.declarations), isTypeParameterDeclaration); + if (rangeContainsSkipTrivia(statement, declaration, file) && !rangeContainsSkipTrivia(selection, declaration, file)) { + result.push(declaration); + } + } + } + } + else if (isInferTypeNode(node)) { + const conditionalTypeNode = findAncestor(node, n => isConditionalTypeNode(n) && rangeContainsSkipTrivia(n.extendsType, node, file)); + if (!conditionalTypeNode || !rangeContainsSkipTrivia(selection, conditionalTypeNode, file)) { + return true; + } + } + else if ((isTypePredicateNode(node) || isThisTypeNode(node))) { + const functionLikeNode = findAncestor(node.parent, isFunctionLike); + if (functionLikeNode && functionLikeNode.type && rangeContainsSkipTrivia(functionLikeNode.type, node, file) && !rangeContainsSkipTrivia(selection, functionLikeNode, file)) { + return true; + } + } + else if (isTypeQueryNode(node)) { + if (isIdentifier(node.exprName)) { + const symbol = checker.resolveName(node.exprName.text, node.exprName, SymbolFlags.Value, /* excludeGlobals */ false); + if (symbol && rangeContainsSkipTrivia(statement, symbol.valueDeclaration, file) && !rangeContainsSkipTrivia(selection, symbol.valueDeclaration, file)) { + return true; + } + } + else { + if (isThisIdentifier(node.exprName.left) && !rangeContainsSkipTrivia(selection, node.parent, file)) { + return true; + } + } + } + return forEachChild(node, visitor); + } + } + + function doTypeAliasChange(changes: textChanges.ChangeTracker, file: SourceFile, name: string, firstStatement: Statement, selection: TypeNode, typeParameters: ReadonlyArray) { + const newTypeNode = createTypeAliasDeclaration( + /* decorators */ undefined, + /* modifiers */ undefined, + name, + typeParameters.map(id => updateTypeParameterDeclaration(id, id.name, id.constraint, /* defaultType */ undefined)), + selection + ); + changes.insertNodeBefore(file, firstStatement, newTypeNode, /* blankLineBetween */ true); + changes.replaceNode(file, selection, createTypeReferenceNode(name, typeParameters.map(id => createTypeReferenceNode(id.name, /* typeArguments */ undefined)))); + } + + function doTypedefChange(changes: textChanges.ChangeTracker, file: SourceFile, name: string, firstStatement: Statement, selection: TypeNode, typeParameters: ReadonlyArray) { + const node = createNode(SyntaxKind.JSDocTypedefTag); + node.tagName = createIdentifier("typedef"); // TODO: jsdoc factory https://github.com/Microsoft/TypeScript/pull/29539 + node.fullName = createIdentifier(name); + node.name = node.fullName; + node.typeExpression = createJSDocTypeExpression(selection); + + const templates: JSDocTemplateTag[] = []; + forEach(typeParameters, typeParameter => { + const constraint = getEffectiveConstraintOfTypeParameter(typeParameter); + + const template = createNode(SyntaxKind.JSDocTemplateTag); + template.tagName = createIdentifier("template"); + template.constraint = constraint && cast(constraint, isJSDocTypeExpression); + + const parameter = createNode(SyntaxKind.TypeParameter); + parameter.name = typeParameter.name; + template.typeParameters = createNodeArray([parameter]); + + templates.push(template); + }); + + changes.insertNodeBefore(file, firstStatement, createJSDocComment(/* comment */ undefined, createNodeArray(concatenate(templates, [node]))), /* blankLineBetween */ true); + changes.replaceNode(file, selection, createTypeReferenceNode(name, typeParameters.map(id => createTypeReferenceNode(id.name, /* typeArguments */ undefined)))); + } +} diff --git a/src/services/tsconfig.json b/src/services/tsconfig.json index 93880ea0d9b..6b78d5c7604 100644 --- a/src/services/tsconfig.json +++ b/src/services/tsconfig.json @@ -80,6 +80,7 @@ "refactors/convertExport.ts", "refactors/convertImport.ts", "refactors/extractSymbol.ts", + "refactors/extractType.ts", "refactors/generateGetAccessorAndSetAccessor.ts", "refactors/moveToNewFile.ts", "refactors/addOrRemoveBracesToArrowFunction.ts", diff --git a/tests/cases/fourslash/refactorExtractType1.ts b/tests/cases/fourslash/refactorExtractType1.ts new file mode 100644 index 00000000000..72a76280ca0 --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType1.ts @@ -0,0 +1,16 @@ +/// + +//// var x: /*a*/{ a?: number, b?: string }/*b*/ = { }; + +goTo.select("a", "b"); +edit.applyRefactor({ + refactorName: "Extract type", + actionName: "Extract to type alias", + actionDescription: "Extract to type alias", + newContent: `type /*RENAME*/NewType = { + a?: number; + b?: string; +}; + +var x: NewType = { };`, +}); diff --git a/tests/cases/fourslash/refactorExtractType10.ts b/tests/cases/fourslash/refactorExtractType10.ts new file mode 100644 index 00000000000..870ba7e6207 --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType10.ts @@ -0,0 +1,17 @@ +/// + +//// function foo(a: number, b?: number, ...c: number[]): /*a*/boolean/*b*/ { +//// return false as boolean +//// } + +goTo.select("a", "b"); +edit.applyRefactor({ + refactorName: "Extract type", + actionName: "Extract to type alias", + actionDescription: "Extract to type alias", + newContent: `type /*RENAME*/NewType = boolean; + +function foo(a: number, b?: number, ...c: number[]): NewType { + return false as boolean +}`, +}); diff --git a/tests/cases/fourslash/refactorExtractType11.ts b/tests/cases/fourslash/refactorExtractType11.ts new file mode 100644 index 00000000000..feb5e68c440 --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType11.ts @@ -0,0 +1,17 @@ +/// + +//// function foo(a: number, b?: number, ...c: number[]): boolean { +//// return false as /*a*/boolean/*b*/ +//// } + +goTo.select("a", "b"); +edit.applyRefactor({ + refactorName: "Extract type", + actionName: "Extract to type alias", + actionDescription: "Extract to type alias", + newContent: `function foo(a: number, b?: number, ...c: number[]): boolean { + type /*RENAME*/NewType = boolean; + + return false as NewType +}`, +}); diff --git a/tests/cases/fourslash/refactorExtractType12.ts b/tests/cases/fourslash/refactorExtractType12.ts new file mode 100644 index 00000000000..8c4a9e316e4 --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType12.ts @@ -0,0 +1,21 @@ +/// + +//// interface A { +//// a: boolean +//// b: number +//// c: T +//// } + +goTo.select("a", "b"); +edit.applyRefactor({ + refactorName: "Extract type", + actionName: "Extract to type alias", + actionDescription: "Extract to type alias", + newContent: `type /*RENAME*/NewType = string; + +interface A { + a: boolean + b: number + c: T +}`, +}); diff --git a/tests/cases/fourslash/refactorExtractType13.ts b/tests/cases/fourslash/refactorExtractType13.ts new file mode 100644 index 00000000000..e72eadb2dd1 --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType13.ts @@ -0,0 +1,21 @@ +/// + +//// interface A { +//// a: /*a*/boolean/*b*/ +//// b: number +//// c: T +//// } + +goTo.select("a", "b"); +edit.applyRefactor({ + refactorName: "Extract type", + actionName: "Extract to type alias", + actionDescription: "Extract to type alias", + newContent: `type /*RENAME*/NewType = boolean; + +interface A { + a: NewType + b: number + c: T +}`, +}); diff --git a/tests/cases/fourslash/refactorExtractType14.ts b/tests/cases/fourslash/refactorExtractType14.ts new file mode 100644 index 00000000000..4d5667bb540 --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType14.ts @@ -0,0 +1,13 @@ +/// + +//// type A = string | number | T + +goTo.select("a", "b"); +edit.applyRefactor({ + refactorName: "Extract type", + actionName: "Extract to type alias", + actionDescription: "Extract to type alias", + newContent: `type /*RENAME*/NewType = boolean; + +type A = string | number | T`, +}); diff --git a/tests/cases/fourslash/refactorExtractType15.ts b/tests/cases/fourslash/refactorExtractType15.ts new file mode 100644 index 00000000000..a716f42509a --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType15.ts @@ -0,0 +1,13 @@ +/// + +//// type A = /*a*/string/*b*/ | number | T + +goTo.select("a", "b"); +edit.applyRefactor({ + refactorName: "Extract type", + actionName: "Extract to type alias", + actionDescription: "Extract to type alias", + newContent: `type /*RENAME*/NewType = string; + +type A = NewType | number | T`, +}); diff --git a/tests/cases/fourslash/refactorExtractType16.ts b/tests/cases/fourslash/refactorExtractType16.ts new file mode 100644 index 00000000000..0ccc3000b56 --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType16.ts @@ -0,0 +1,13 @@ +/// + +//// var x: { a?: /*a*/number/*b*/, b?: string } = { }; + +goTo.select("a", "b"); +edit.applyRefactor({ + refactorName: "Extract type", + actionName: "Extract to type alias", + actionDescription: "Extract to type alias", + newContent: `type /*RENAME*/NewType = number; + +var x: { a?: NewType, b?: string } = { };`, +}); diff --git a/tests/cases/fourslash/refactorExtractType17.ts b/tests/cases/fourslash/refactorExtractType17.ts new file mode 100644 index 00000000000..ae62b402fe3 --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType17.ts @@ -0,0 +1,13 @@ +/// + +//// type A = string | number | /*a*/T/*b*/ + +goTo.select("a", "b"); +edit.applyRefactor({ + refactorName: "Extract type", + actionName: "Extract to type alias", + actionDescription: "Extract to type alias", + newContent: `type /*RENAME*/NewType = T; + +type A = string | number | NewType`, +}); diff --git a/tests/cases/fourslash/refactorExtractType18.ts b/tests/cases/fourslash/refactorExtractType18.ts new file mode 100644 index 00000000000..1ebe8a2b354 --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType18.ts @@ -0,0 +1,14 @@ +/// + +//// type A = /*a*/Partial/*b*/ & D | C + +goTo.select("a", "b"); +edit.applyRefactor({ + refactorName: "Extract type", + actionName: "Extract to type alias", + actionDescription: "Extract to type alias", + newContent: `type /*RENAME*/NewType = Partial; + +type A = NewType & D | C`, +}); + diff --git a/tests/cases/fourslash/refactorExtractType19.ts b/tests/cases/fourslash/refactorExtractType19.ts new file mode 100644 index 00000000000..4a982f6899d --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType19.ts @@ -0,0 +1,14 @@ +/// + +//// type A = /*a*/Partial/*b*/ & D | C + +goTo.select("a", "b"); +edit.applyRefactor({ + refactorName: "Extract type", + actionName: "Extract to type alias", + actionDescription: "Extract to type alias", + newContent: `type /*RENAME*/NewType = Partial; + +type A = NewType & D | C`, +}); + diff --git a/tests/cases/fourslash/refactorExtractType2.ts b/tests/cases/fourslash/refactorExtractType2.ts new file mode 100644 index 00000000000..202de0f115a --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType2.ts @@ -0,0 +1,13 @@ +/// + +//// var x: /*a*/string/*b*/ = ''; + +goTo.select("a", "b"); +edit.applyRefactor({ + refactorName: "Extract type", + actionName: "Extract to type alias", + actionDescription: "Extract to type alias", + newContent: `type /*RENAME*/NewType = string; + +var x: NewType = '';`, +}); diff --git a/tests/cases/fourslash/refactorExtractType20.ts b/tests/cases/fourslash/refactorExtractType20.ts new file mode 100644 index 00000000000..b31f208704f --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType20.ts @@ -0,0 +1,13 @@ +/// + +//// type A = () => (v: /*a*/T/*b*/) => (v: T) => (v: T) => U + +goTo.select("a", "b"); +edit.applyRefactor({ + refactorName: "Extract type", + actionName: "Extract to type alias", + actionDescription: "Extract to type alias", + newContent: `type /*RENAME*/NewType = T; + +type A = () => (v: NewType) => (v: T) => (v: T) => U`, +}); diff --git a/tests/cases/fourslash/refactorExtractType21.ts b/tests/cases/fourslash/refactorExtractType21.ts new file mode 100644 index 00000000000..e97485c8269 --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType21.ts @@ -0,0 +1,13 @@ +/// + +//// type A = () => (v: T) => (v: /*a*/T/*b*/) => (v: T) => U + +goTo.select("a", "b"); +edit.applyRefactor({ + refactorName: "Extract type", + actionName: "Extract to type alias", + actionDescription: "Extract to type alias", + newContent: `type /*RENAME*/NewType = T; + +type A = () => (v: T) => (v: NewType) => (v: T) => U`, +}); diff --git a/tests/cases/fourslash/refactorExtractType22.ts b/tests/cases/fourslash/refactorExtractType22.ts new file mode 100644 index 00000000000..f7282df4ef7 --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType22.ts @@ -0,0 +1,13 @@ +/// + +//// type A = () => (v: T) => (v: T) => (v: /*a*/T/*b*/) => U + +goTo.select("a", "b"); +edit.applyRefactor({ + refactorName: "Extract type", + actionName: "Extract to type alias", + actionDescription: "Extract to type alias", + newContent: `type /*RENAME*/NewType = T; + +type A = () => (v: T) => (v: T) => (v: NewType) => U`, +}); diff --git a/tests/cases/fourslash/refactorExtractType23.ts b/tests/cases/fourslash/refactorExtractType23.ts new file mode 100644 index 00000000000..9e219dd3383 --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType23.ts @@ -0,0 +1,13 @@ +/// + +//// type A = () => (v: T) => (v: T) => (v: T) => /*a*/U/*b*/ + +goTo.select("a", "b"); +edit.applyRefactor({ + refactorName: "Extract type", + actionName: "Extract to type alias", + actionDescription: "Extract to type alias", + newContent: `type /*RENAME*/NewType = U; + +type A = () => (v: T) => (v: T) => (v: T) => NewType`, +}); diff --git a/tests/cases/fourslash/refactorExtractType24.ts b/tests/cases/fourslash/refactorExtractType24.ts new file mode 100644 index 00000000000..54b36acb252 --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType24.ts @@ -0,0 +1,13 @@ +/// + +//// type A = () => (v: T) => (v: T) => /*a*/(v: T) => U/*b*/ + +goTo.select("a", "b"); +edit.applyRefactor({ + refactorName: "Extract type", + actionName: "Extract to type alias", + actionDescription: "Extract to type alias", + newContent: `type /*RENAME*/NewType = (v: T) => U; + +type A = () => (v: T) => (v: T) => NewType`, +}); diff --git a/tests/cases/fourslash/refactorExtractType25.ts b/tests/cases/fourslash/refactorExtractType25.ts new file mode 100644 index 00000000000..b09d04912c1 --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType25.ts @@ -0,0 +1,13 @@ +/// + +//// type A = () => (v: T) => /*a*/(v: T) => (v: T) => U/*b*/ + +goTo.select("a", "b"); +edit.applyRefactor({ + refactorName: "Extract type", + actionName: "Extract to type alias", + actionDescription: "Extract to type alias", + newContent: `type /*RENAME*/NewType = (v: T) => (v: T) => U; + +type A = () => (v: T) => NewType`, +}); diff --git a/tests/cases/fourslash/refactorExtractType26.ts b/tests/cases/fourslash/refactorExtractType26.ts new file mode 100644 index 00000000000..662ce7eb8dc --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType26.ts @@ -0,0 +1,13 @@ +/// + +//// type A = () => /*a*/(v: T) => (v: T) => (v: T) => U/*b*/ + +goTo.select("a", "b"); +edit.applyRefactor({ + refactorName: "Extract type", + actionName: "Extract to type alias", + actionDescription: "Extract to type alias", + newContent: `type /*RENAME*/NewType = (v: T) => (v: T) => (v: T) => U; + +type A = () => NewType`, +}); diff --git a/tests/cases/fourslash/refactorExtractType27.ts b/tests/cases/fourslash/refactorExtractType27.ts new file mode 100644 index 00000000000..5163fd2d480 --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType27.ts @@ -0,0 +1,13 @@ +/// + +//// type A = /*a*/() => (v: T) => (v: T) => (v: T) => U/*b*/ + +goTo.select("a", "b"); +edit.applyRefactor({ + refactorName: "Extract type", + actionName: "Extract to type alias", + actionDescription: "Extract to type alias", + newContent: `type /*RENAME*/NewType = () => (v: T) => (v: T) => (v: T) => U; + +type A = NewType`, +}); diff --git a/tests/cases/fourslash/refactorExtractType28.ts b/tests/cases/fourslash/refactorExtractType28.ts new file mode 100644 index 00000000000..81d1356ca21 --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType28.ts @@ -0,0 +1,13 @@ +/// + +//// type Item = /*a*/T/*b*/ extends (infer P)[] ? P : never + +goTo.select("a", "b"); +edit.applyRefactor({ + refactorName: "Extract type", + actionName: "Extract to type alias", + actionDescription: "Extract to type alias", + newContent: `type /*RENAME*/NewType = T; + +type Item = NewType extends (infer P)[] ? P : never`, +}); diff --git a/tests/cases/fourslash/refactorExtractType29.ts b/tests/cases/fourslash/refactorExtractType29.ts new file mode 100644 index 00000000000..a1fb2ac405c --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType29.ts @@ -0,0 +1,13 @@ +/// + +//// type Item = T extends (infer P)[] ? /*a*/P/*b*/ : never + +goTo.select("a", "b"); +edit.applyRefactor({ + refactorName: "Extract type", + actionName: "Extract to type alias", + actionDescription: "Extract to type alias", + newContent: `type /*RENAME*/NewType

= P; + +type Item = T extends (infer P)[] ? NewType

: never`, +}); diff --git a/tests/cases/fourslash/refactorExtractType3.ts b/tests/cases/fourslash/refactorExtractType3.ts new file mode 100644 index 00000000000..51185a43e00 --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType3.ts @@ -0,0 +1,13 @@ +/// + +//// var x: /*a*/string | number | boolean/*b*/ = ''; + +goTo.select("a", "b"); +edit.applyRefactor({ + refactorName: "Extract type", + actionName: "Extract to type alias", + actionDescription: "Extract to type alias", + newContent: `type /*RENAME*/NewType = string | number | boolean; + +var x: NewType = '';`, +}); diff --git a/tests/cases/fourslash/refactorExtractType30.ts b/tests/cases/fourslash/refactorExtractType30.ts new file mode 100644 index 00000000000..a0684cabb53 --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType30.ts @@ -0,0 +1,13 @@ +/// + +//// type Item = T extends (infer P)[] ? P : /*a*/never/*b*/ + +goTo.select("a", "b"); +edit.applyRefactor({ + refactorName: "Extract type", + actionName: "Extract to type alias", + actionDescription: "Extract to type alias", + newContent: `type /*RENAME*/NewType = never; + +type Item = T extends (infer P)[] ? P : NewType`, +}); diff --git a/tests/cases/fourslash/refactorExtractType31.ts b/tests/cases/fourslash/refactorExtractType31.ts new file mode 100644 index 00000000000..84ef679de5d --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType31.ts @@ -0,0 +1,6 @@ +/// + +//// type Item = T extends /*a*/(infer P)[]/*b*/ ? P : never + +goTo.select("a", "b"); +verify.not.refactorAvailable('Extract type') diff --git a/tests/cases/fourslash/refactorExtractType32.ts b/tests/cases/fourslash/refactorExtractType32.ts new file mode 100644 index 00000000000..6bfe0fd2634 --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType32.ts @@ -0,0 +1,6 @@ +/// + +//// type Item = T extends (/*a*/infer P/*b*/)[] ? P : never + +goTo.select("a", "b"); +verify.not.refactorAvailable('Extract type') diff --git a/tests/cases/fourslash/refactorExtractType33.ts b/tests/cases/fourslash/refactorExtractType33.ts new file mode 100644 index 00000000000..0124698325f --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType33.ts @@ -0,0 +1,6 @@ +/// + +//// type Item = T extends (infer /*a*/P/*b*/)[] ? P : never + +goTo.select("a", "b"); +verify.not.refactorAvailable('Extract type') diff --git a/tests/cases/fourslash/refactorExtractType34.ts b/tests/cases/fourslash/refactorExtractType34.ts new file mode 100644 index 00000000000..114d08a09a6 --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType34.ts @@ -0,0 +1,13 @@ +/// + +//// type Item = /*a*/T extends (infer P)[] ? P : never/*b*/ + +goTo.select("a", "b"); +edit.applyRefactor({ + refactorName: "Extract type", + actionName: "Extract to type alias", + actionDescription: "Extract to type alias", + newContent: `type /*RENAME*/NewType = T extends (infer P)[] ? P : never; + +type Item = NewType`, +}); diff --git a/tests/cases/fourslash/refactorExtractType35.ts b/tests/cases/fourslash/refactorExtractType35.ts new file mode 100644 index 00000000000..8ace9f929b8 --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType35.ts @@ -0,0 +1,13 @@ +/// + +//// type Union = /*a*/U | T/*b*/ + +goTo.select("a", "b"); +edit.applyRefactor({ + refactorName: "Extract type", + actionName: "Extract to type alias", + actionDescription: "Extract to type alias", + newContent: `type /*RENAME*/NewType = U | T; + +type Union = NewType`, +}); diff --git a/tests/cases/fourslash/refactorExtractType36.ts b/tests/cases/fourslash/refactorExtractType36.ts new file mode 100644 index 00000000000..5086bf130ce --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType36.ts @@ -0,0 +1,14 @@ +/// + +//// type A = (v: /*a*/string | number/*b*/) => v is string + +goTo.select("a", "b"); +edit.applyRefactor({ + refactorName: "Extract type", + actionName: "Extract to type alias", + actionDescription: "Extract to type alias", + newContent: `type /*RENAME*/NewType = string | number; + +type A = (v: NewType) => v is string`, +}); + diff --git a/tests/cases/fourslash/refactorExtractType37.ts b/tests/cases/fourslash/refactorExtractType37.ts new file mode 100644 index 00000000000..b24e219b3e4 --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType37.ts @@ -0,0 +1,13 @@ +/// + +//// type A = (v: string | number) => v is /*a*/string/*b*/ + +goTo.select("a", "b"); +edit.applyRefactor({ + refactorName: "Extract type", + actionName: "Extract to type alias", + actionDescription: "Extract to type alias", + newContent: `type /*RENAME*/NewType = string; + +type A = (v: string | number) => v is NewType`, +}); diff --git a/tests/cases/fourslash/refactorExtractType38.ts b/tests/cases/fourslash/refactorExtractType38.ts new file mode 100644 index 00000000000..b74091f1aec --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType38.ts @@ -0,0 +1,6 @@ +/// + +//// type A = (v: string | number) => /*a*/v is string/*b*/ + +goTo.select("a", "b"); +verify.not.refactorAvailable("Extract type") diff --git a/tests/cases/fourslash/refactorExtractType39.ts b/tests/cases/fourslash/refactorExtractType39.ts new file mode 100644 index 00000000000..1f55dcee39a --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType39.ts @@ -0,0 +1,13 @@ +/// + +//// type A = /*a*/(v: string | number) => v is string/*b*/ + +goTo.select("a", "b"); +edit.applyRefactor({ + refactorName: "Extract type", + actionName: "Extract to type alias", + actionDescription: "Extract to type alias", + newContent: `type /*RENAME*/NewType = (v: string | number) => v is string; + +type A = NewType`, +}); diff --git a/tests/cases/fourslash/refactorExtractType4.ts b/tests/cases/fourslash/refactorExtractType4.ts new file mode 100644 index 00000000000..def60d0b643 --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType4.ts @@ -0,0 +1,13 @@ +/// + +//// var x: /*a*/1/*b*/ = 1; + +goTo.select("a", "b"); +edit.applyRefactor({ + refactorName: "Extract type", + actionName: "Extract to type alias", + actionDescription: "Extract to type alias", + newContent: `type /*RENAME*/NewType = 1; + +var x: NewType = 1;`, +}); diff --git a/tests/cases/fourslash/refactorExtractType40.ts b/tests/cases/fourslash/refactorExtractType40.ts new file mode 100644 index 00000000000..cae32cec786 --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType40.ts @@ -0,0 +1,6 @@ +/// + +//// type A = (v: string | number) => /*a*/typeof v/*b*/ + +goTo.select("a", "b"); +verify.not.refactorAvailable("Extract type") diff --git a/tests/cases/fourslash/refactorExtractType41.ts b/tests/cases/fourslash/refactorExtractType41.ts new file mode 100644 index 00000000000..b0d3222a456 --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType41.ts @@ -0,0 +1,14 @@ +/// + +//// type A = /*a*/(v: string | number) => typeof v/*b*/ + +goTo.select("a", "b"); +edit.applyRefactor({ + refactorName: "Extract type", + actionName: "Extract to type alias", + actionDescription: "Extract to type alias", + newContent: `type /*RENAME*/NewType = (v: string | number) => typeof v; + +type A = NewType`, +}); + diff --git a/tests/cases/fourslash/refactorExtractType42.ts b/tests/cases/fourslash/refactorExtractType42.ts new file mode 100644 index 00000000000..29692ab06e6 --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType42.ts @@ -0,0 +1,15 @@ +/// + +//// const a = 1 +//// type A = (v: string | number) => /*a*/typeof a/*b*/ + +goTo.select("a", "b"); +edit.applyRefactor({ + refactorName: "Extract type", + actionName: "Extract to type alias", + actionDescription: "Extract to type alias", + newContent: `const a = 1 +type /*RENAME*/NewType = typeof a; + +type A = (v: string | number) => NewType`, +}); diff --git a/tests/cases/fourslash/refactorExtractType43.ts b/tests/cases/fourslash/refactorExtractType43.ts new file mode 100644 index 00000000000..c3c09009295 --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType43.ts @@ -0,0 +1,6 @@ +/// + +//// type A = (v: string | number) => /*a*/number | typeof v/*b*/ + +goTo.select("a", "b"); +verify.not.refactorAvailable("Extract type") diff --git a/tests/cases/fourslash/refactorExtractType44.ts b/tests/cases/fourslash/refactorExtractType44.ts new file mode 100644 index 00000000000..22e1a9172dc --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType44.ts @@ -0,0 +1,13 @@ +/// + +//// type A = /*a*/B.C.D/*b*/ + +goTo.select("a", "b"); +edit.applyRefactor({ + refactorName: "Extract type", + actionName: "Extract to type alias", + actionDescription: "Extract to type alias", + newContent: `type /*RENAME*/NewType = B.C.D; + +type A = NewType`, +}); diff --git a/tests/cases/fourslash/refactorExtractType45.ts b/tests/cases/fourslash/refactorExtractType45.ts new file mode 100644 index 00000000000..60d9d77bc29 --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType45.ts @@ -0,0 +1,13 @@ +/// + +//// type A = /*a*/B.C.D/*b*/ + +goTo.select("a", "b"); +edit.applyRefactor({ + refactorName: "Extract type", + actionName: "Extract to type alias", + actionDescription: "Extract to type alias", + newContent: `type /*RENAME*/NewType = B.C.D; + +type A = NewType`, +}); diff --git a/tests/cases/fourslash/refactorExtractType46.ts b/tests/cases/fourslash/refactorExtractType46.ts new file mode 100644 index 00000000000..ddcfa4878c9 --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType46.ts @@ -0,0 +1,15 @@ +/// + +//// namespace A { export const b = 1 } +//// function a(b: string): /*a*/typeof A.b/*b*/ { return 1 } + +goTo.select("a", "b"); +edit.applyRefactor({ + refactorName: "Extract type", + actionName: "Extract to type alias", + actionDescription: "Extract to type alias", + newContent: `namespace A { export const b = 1 } +type /*RENAME*/NewType = typeof A.b; + +function a(b: string): NewType { return 1 }`, +}); diff --git a/tests/cases/fourslash/refactorExtractType47.ts b/tests/cases/fourslash/refactorExtractType47.ts new file mode 100644 index 00000000000..e2062029fa3 --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType47.ts @@ -0,0 +1,6 @@ +/// + +//// type Crazy = T extends [infer P, (/*a*/infer R extends string ? string : never/*b*/)] ? P & R : string; + +goTo.select("a", "b"); +verify.not.refactorAvailable("Extract type") \ No newline at end of file diff --git a/tests/cases/fourslash/refactorExtractType48.ts b/tests/cases/fourslash/refactorExtractType48.ts new file mode 100644 index 00000000000..d10af6bb637 --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType48.ts @@ -0,0 +1,13 @@ +/// + +//// type Crazy = /*a*/T extends [infer P, (infer R extends string ? string : never)] ? P & R : string/*b*/; + +goTo.select("a", "b"); +edit.applyRefactor({ + refactorName: "Extract type", + actionName: "Extract to type alias", + actionDescription: "Extract to type alias", + newContent: `type /*RENAME*/NewType = T extends [infer P, (infer R extends string ? string : never)] ? P & R : string; + +type Crazy = NewType;`, +}); diff --git a/tests/cases/fourslash/refactorExtractType49.ts b/tests/cases/fourslash/refactorExtractType49.ts new file mode 100644 index 00000000000..7d965ee3d09 --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType49.ts @@ -0,0 +1,15 @@ +/// + +//// type A = T +//// type B = /*a*/A/*b*/ + +goTo.select("a", "b"); +edit.applyRefactor({ + refactorName: "Extract type", + actionName: "Extract to type alias", + actionDescription: "Extract to type alias", + newContent: `type A = T +type /*RENAME*/NewType = A; + +type B = NewType`, +}); diff --git a/tests/cases/fourslash/refactorExtractType5.ts b/tests/cases/fourslash/refactorExtractType5.ts new file mode 100644 index 00000000000..72f6cd448e4 --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType5.ts @@ -0,0 +1,13 @@ +/// + +//// var x: /*a*/1 | 2/*b*/ = 1; + +goTo.select("a", "b"); +edit.applyRefactor({ + refactorName: "Extract type", + actionName: "Extract to type alias", + actionDescription: "Extract to type alias", + newContent: `type /*RENAME*/NewType = 1 | 2; + +var x: NewType = 1;`, +}); diff --git a/tests/cases/fourslash/refactorExtractType50.ts b/tests/cases/fourslash/refactorExtractType50.ts new file mode 100644 index 00000000000..8405c15c912 --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType50.ts @@ -0,0 +1,6 @@ +/// + +//// interface I { f: (this: O, b: number) => /*a*/typeof this.a/*b*/ }; + +goTo.select("a", "b"); +verify.not.refactorAvailable("Extract type") diff --git a/tests/cases/fourslash/refactorExtractType51.ts b/tests/cases/fourslash/refactorExtractType51.ts new file mode 100644 index 00000000000..929898ad58e --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType51.ts @@ -0,0 +1,6 @@ +/// + +//// interface I { f: (this: O, b: number) => /*a*/this/*b*/ }; + +goTo.select("a", "b"); +verify.not.refactorAvailable("Extract type") diff --git a/tests/cases/fourslash/refactorExtractType52.ts b/tests/cases/fourslash/refactorExtractType52.ts new file mode 100644 index 00000000000..1ded541f88b --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType52.ts @@ -0,0 +1,6 @@ +/// + +//// interface I { f: (this: O, b: number) => /*a*/typeof this["a"]/*b*/ }; + +goTo.select("a", "b"); +verify.not.refactorAvailable("Extract type") diff --git a/tests/cases/fourslash/refactorExtractType53.ts b/tests/cases/fourslash/refactorExtractType53.ts new file mode 100644 index 00000000000..070d4b8c104 --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType53.ts @@ -0,0 +1,13 @@ +/// + +//// interface I { f: /*a*/(this: O, b: number) => typeof this.a/*b*/ }; + +goTo.select("a", "b"); +edit.applyRefactor({ + refactorName: "Extract type", + actionName: "Extract to type alias", + actionDescription: "Extract to type alias", + newContent: `type /*RENAME*/NewType = (this: O, b: number) => typeof this.a; + +interface I { f: NewType };`, +}); diff --git a/tests/cases/fourslash/refactorExtractType54.ts b/tests/cases/fourslash/refactorExtractType54.ts new file mode 100644 index 00000000000..4b356341198 --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType54.ts @@ -0,0 +1,13 @@ +/// + +//// interface I { f: /*a*/(this: O, b: number) => this/*b*/ }; + +goTo.select("a", "b"); +edit.applyRefactor({ + refactorName: "Extract type", + actionName: "Extract to type alias", + actionDescription: "Extract to type alias", + newContent: `type /*RENAME*/NewType = (this: O, b: number) => this; + +interface I { f: NewType };`, +}); diff --git a/tests/cases/fourslash/refactorExtractType55.ts b/tests/cases/fourslash/refactorExtractType55.ts new file mode 100644 index 00000000000..61ddef7f443 --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType55.ts @@ -0,0 +1,13 @@ +/// + +//// interface I { f: /*a*/(this: O, b: number) => typeof this["a"]/*b*/ }; + +goTo.select("a", "b"); +edit.applyRefactor({ + refactorName: "Extract type", + actionName: "Extract to type alias", + actionDescription: "Extract to type alias", + newContent: `type /*RENAME*/NewType = (this: O, b: number) => typeof this["a"]; + +interface I { f: NewType };`, +}); diff --git a/tests/cases/fourslash/refactorExtractType56.ts b/tests/cases/fourslash/refactorExtractType56.ts new file mode 100644 index 00000000000..6362a1a995a --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType56.ts @@ -0,0 +1,7 @@ +/// + +// typeof other parameters within function signature? +//// function f(a: string, b: /*a*/typeof a/*b*/): typeof b { return ''; } + +goTo.select("a", "b"); +verify.not.refactorAvailable("Extract type") diff --git a/tests/cases/fourslash/refactorExtractType57.ts b/tests/cases/fourslash/refactorExtractType57.ts new file mode 100644 index 00000000000..7033e5e2086 --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType57.ts @@ -0,0 +1,27 @@ +/// + +// Where do lines get inserted? +// The exact structure here doesn't matter, +// just want to see something within a block body +// to have the behavior defined in tests. +//// function id(x: T): T { +//// return (() => { +//// const s: /*a*/typeof x/*b*/ = x; +//// return s; +//// })(); +//// } + +goTo.select("a", "b"); +edit.applyRefactor({ + refactorName: "Extract type", + actionName: "Extract to type alias", + actionDescription: "Extract to type alias", + newContent: `function id(x: T): T { + return (() => { + type /*RENAME*/NewType = typeof x; + + const s: NewType = x; + return s; + })(); +}`, +}); diff --git a/tests/cases/fourslash/refactorExtractType58.ts b/tests/cases/fourslash/refactorExtractType58.ts new file mode 100644 index 00000000000..54e58153f2b --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType58.ts @@ -0,0 +1,6 @@ +/// + +//// interface I { f: (this: O, b: number) => /*a*/ true | this | false /*b*/ }; + +goTo.select("a", "b"); +verify.not.refactorAvailable("Extract type") \ No newline at end of file diff --git a/tests/cases/fourslash/refactorExtractType59.ts b/tests/cases/fourslash/refactorExtractType59.ts new file mode 100644 index 00000000000..d5fced9611b --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType59.ts @@ -0,0 +1,10 @@ +/// + +//// class C { +//// m(): /*a*/T | this | number/*b*/ { +//// return {} as any +//// } +//// } + +goTo.select("a", "b"); +verify.not.refactorAvailable("Extract type") diff --git a/tests/cases/fourslash/refactorExtractType6.ts b/tests/cases/fourslash/refactorExtractType6.ts new file mode 100644 index 00000000000..437bc182af3 --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType6.ts @@ -0,0 +1,13 @@ +/// + +//// var x: 1 | /*a*/2/*b*/ = 1; + +goTo.select("a", "b"); +edit.applyRefactor({ + refactorName: "Extract type", + actionName: "Extract to type alias", + actionDescription: "Extract to type alias", + newContent: `type /*RENAME*/NewType = 2; + +var x: 1 | NewType = 1;`, +}); diff --git a/tests/cases/fourslash/refactorExtractType7.ts b/tests/cases/fourslash/refactorExtractType7.ts new file mode 100644 index 00000000000..a5b1f4c7dd0 --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType7.ts @@ -0,0 +1,17 @@ +/// + +//// function foo(a: /*a*/number/*b*/, b?: number, ...c: number[]): boolean { +//// return false as boolean +//// } + +goTo.select("a", "b"); +edit.applyRefactor({ + refactorName: "Extract type", + actionName: "Extract to type alias", + actionDescription: "Extract to type alias", + newContent: `type /*RENAME*/NewType = number; + +function foo(a: NewType, b?: number, ...c: number[]): boolean { + return false as boolean +}`, +}); diff --git a/tests/cases/fourslash/refactorExtractType8.ts b/tests/cases/fourslash/refactorExtractType8.ts new file mode 100644 index 00000000000..61121c67374 --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType8.ts @@ -0,0 +1,17 @@ +/// + +//// function foo(a: number, b?: /*a*/number/*b*/, ...c: number[]): boolean { +//// return false as boolean +//// } + +goTo.select("a", "b"); +edit.applyRefactor({ + refactorName: "Extract type", + actionName: "Extract to type alias", + actionDescription: "Extract to type alias", + newContent: `type /*RENAME*/NewType = number; + +function foo(a: number, b?: NewType, ...c: number[]): boolean { + return false as boolean +}`, +}); diff --git a/tests/cases/fourslash/refactorExtractType9.ts b/tests/cases/fourslash/refactorExtractType9.ts new file mode 100644 index 00000000000..921f2a005a5 --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType9.ts @@ -0,0 +1,17 @@ +/// + +//// function foo(a: number, b?: number, ...c: /*a*/number[]/*b*/): boolean { +//// return false as boolean +//// } + +goTo.select("a", "b"); +edit.applyRefactor({ + refactorName: "Extract type", + actionName: "Extract to type alias", + actionDescription: "Extract to type alias", + newContent: `type /*RENAME*/NewType = number[]; + +function foo(a: number, b?: number, ...c: NewType): boolean { + return false as boolean +}`, +}); diff --git a/tests/cases/fourslash/refactorExtractType_js1.ts b/tests/cases/fourslash/refactorExtractType_js1.ts new file mode 100644 index 00000000000..e90c74d0116 --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType_js1.ts @@ -0,0 +1,20 @@ +/// + +// @allowJs: true +// @Filename: a.js +//// /** @type { /*a*/string/*b*/ } */ +//// var x; + +goTo.file('a.js') +goTo.select("a", "b"); +edit.applyRefactor({ + refactorName: "Extract type", + actionName: "Extract to typedef", + actionDescription: "Extract to typedef", + newContent: `/** + * @typedef {string} /*RENAME*/NewType + */ + +/** @type { NewType } */ +var x;`, +}); diff --git a/tests/cases/fourslash/refactorExtractType_js2.ts b/tests/cases/fourslash/refactorExtractType_js2.ts new file mode 100644 index 00000000000..592f0f6f163 --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType_js2.ts @@ -0,0 +1,20 @@ +/// + +// @allowJs: true +// @Filename: a.js +//// /** @type { /*a*/string/*b*/ | number } */ +//// var x; + +goTo.file('a.js') +goTo.select("a", "b"); +edit.applyRefactor({ + refactorName: "Extract type", + actionName: "Extract to typedef", + actionDescription: "Extract to typedef", + newContent: `/** + * @typedef {string} /*RENAME*/NewType + */ + +/** @type { NewType | number } */ +var x;`, +}); diff --git a/tests/cases/fourslash/refactorExtractType_js3.ts b/tests/cases/fourslash/refactorExtractType_js3.ts new file mode 100644 index 00000000000..9d431b2fd08 --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType_js3.ts @@ -0,0 +1,20 @@ +/// + +// @allowJs: true +// @Filename: a.js +//// /** @type { /*a*/string | number/*b*/ } */ +//// var x; + +goTo.file('a.js') +goTo.select("a", "b"); +edit.applyRefactor({ + refactorName: "Extract type", + actionName: "Extract to typedef", + actionDescription: "Extract to typedef", + newContent: `/** + * @typedef {string | number} /*RENAME*/NewType + */ + +/** @type { NewType } */ +var x;`, +}); diff --git a/tests/cases/fourslash/refactorExtractType_js4.ts b/tests/cases/fourslash/refactorExtractType_js4.ts new file mode 100644 index 00000000000..1d4d4c3cdf7 --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType_js4.ts @@ -0,0 +1,34 @@ +/// + +// @allowJs: true +// @Filename: a.js +//// /** +//// * @template T +//// * @template U +//// * @param {T} b +//// * @param {U} c +//// * @returns {/*a*/T | U/*b*/} +//// */ +//// function a(b, c) {} + +goTo.file('a.js') +goTo.select("a", "b"); +edit.applyRefactor({ + refactorName: "Extract type", + actionName: "Extract to typedef", + actionDescription: "Extract to typedef", + newContent: `/** + * @template T + * @template U + * @typedef {T | U} /*RENAME*/NewType + */ + +/** + * @template T + * @template U + * @param {T} b + * @param {U} c + * @returns {NewType} + */ +function a(b, c) {}`, +}); diff --git a/tests/cases/fourslash/refactorExtractType_js5.ts b/tests/cases/fourslash/refactorExtractType_js5.ts new file mode 100644 index 00000000000..20df67d9c76 --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType_js5.ts @@ -0,0 +1,34 @@ +/// + +// @allowJs: true +// @Filename: a.js +//// /** +//// * @template {number} T +//// * @template {string} U +//// * @param {T} b +//// * @param {U} c +//// * @returns {/*a*/T | U/*b*/} +//// */ +//// function a(b, c) {} + +goTo.file('a.js') +goTo.select("a", "b"); +edit.applyRefactor({ + refactorName: "Extract type", + actionName: "Extract to typedef", + actionDescription: "Extract to typedef", + newContent: `/** + * @template {number} T + * @template {string} U + * @typedef {T | U} /*RENAME*/NewType + */ + +/** + * @template {number} T + * @template {string} U + * @param {T} b + * @param {U} c + * @returns {NewType} + */ +function a(b, c) {}`, +}); diff --git a/tests/cases/fourslash/refactorExtractType_js6.ts b/tests/cases/fourslash/refactorExtractType_js6.ts new file mode 100644 index 00000000000..581e2cca1db --- /dev/null +++ b/tests/cases/fourslash/refactorExtractType_js6.ts @@ -0,0 +1,32 @@ +/// + +// @allowJs: true +// @Filename: a.js +//// /** +//// * @template {number} T, U +//// * @param {T} b +//// * @param {U} c +//// * @returns {/*a*/T | U/*b*/} +//// */ +//// function a(b, c) {} + +goTo.file('a.js') +goTo.select("a", "b"); +edit.applyRefactor({ + refactorName: "Extract type", + actionName: "Extract to typedef", + actionDescription: "Extract to typedef", + newContent: `/** + * @template {number} T + * @template U + * @typedef {T | U} /*RENAME*/NewType + */ + +/** + * @template {number} T, U + * @param {T} b + * @param {U} c + * @returns {NewType} + */ +function a(b, c) {}`, +}); From 9ee8e0626fa58ad33f5dcaa1467d31660d2a970c Mon Sep 17 00:00:00 2001 From: TypeScript Bot Date: Tue, 7 May 2019 08:28:07 -0700 Subject: [PATCH 40/45] Update user baselines (#31289) --- tests/baselines/reference/user/uglify-js.log | 21 ++++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/tests/baselines/reference/user/uglify-js.log b/tests/baselines/reference/user/uglify-js.log index a01fffa63cf..4a98daf3f2a 100644 --- a/tests/baselines/reference/user/uglify-js.log +++ b/tests/baselines/reference/user/uglify-js.log @@ -1,13 +1,12 @@ Exit Code: 1 Standard output: node_modules/uglify-js/lib/ast.js(223,38): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/ast.js(344,33): error TS2339: Property 'transform' does not exist on type 'string'. -node_modules/uglify-js/lib/ast.js(885,5): error TS2322: Type '{ _visit: (node: any, descend: any) => any; parent: (n: any) => any; push: typeof push; pop: typeof pop; self: () => any; find_parent: (type: any) => any; has_directive: (type: any) => any; loopcontrol_target: (node: any) => any; in_boolean_context: () => boolean | undefined; }' is not assignable to type 'TreeWalker'. +node_modules/uglify-js/lib/ast.js(894,5): error TS2322: Type '{ _visit: (node: any, descend: any) => any; parent: (n: any) => any; push: typeof push; pop: typeof pop; self: () => any; find_parent: (type: any) => any; has_directive: (type: any) => any; loopcontrol_target: (node: any) => any; in_boolean_context: () => boolean | undefined; }' is not assignable to type 'TreeWalker'. Object literal may only specify known properties, but '_visit' does not exist in type 'TreeWalker'. Did you mean to write 'visit'? -node_modules/uglify-js/lib/ast.js(886,14): error TS2339: Property 'push' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/ast.js(893,14): error TS2339: Property 'pop' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/ast.js(948,25): error TS2339: Property 'self' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/ast.js(949,37): error TS2339: Property 'parent' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/ast.js(895,14): error TS2339: Property 'push' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/ast.js(902,14): error TS2339: Property 'pop' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/ast.js(957,25): error TS2339: Property 'self' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/ast.js(958,37): error TS2339: Property 'parent' does not exist on type 'TreeWalker'. node_modules/uglify-js/lib/compress.js(173,42): error TS2554: Expected 0 arguments, but got 1. node_modules/uglify-js/lib/compress.js(512,41): error TS2554: Expected 0 arguments, but got 1. node_modules/uglify-js/lib/compress.js(838,33): error TS2554: Expected 0 arguments, but got 1. @@ -62,13 +61,13 @@ node_modules/uglify-js/lib/compress.js(6685,25): error TS2403: Subsequent variab node_modules/uglify-js/lib/compress.js(6688,46): error TS2339: Property 'has_side_effects' does not exist on type 'number'. node_modules/uglify-js/lib/compress.js(6694,25): error TS2403: Subsequent variable declarations must have the same type. Variable 'value' must be of type 'number', but here has type 'any'. node_modules/uglify-js/lib/compress.js(6722,34): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/minify.js(166,75): error TS2339: Property 'compress' does not exist on type 'Compressor'. +node_modules/uglify-js/lib/minify.js(167,75): error TS2339: Property 'compress' does not exist on type 'Compressor'. node_modules/uglify-js/lib/mozilla-ast.js(566,33): error TS2554: Expected 0 arguments, but got 1. node_modules/uglify-js/lib/output.js(235,25): error TS2554: Expected 0 arguments, but got 2. -node_modules/uglify-js/lib/output.js(464,37): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/output.js(756,38): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/output.js(1152,44): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/output.js(1434,58): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +node_modules/uglify-js/lib/output.js(459,37): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/output.js(764,38): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/output.js(1160,44): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/output.js(1442,58): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. node_modules/uglify-js/lib/parse.js(361,20): error TS2345: Argument of type 'number | undefined' is not assignable to parameter of type 'number'. Type 'undefined' is not assignable to type 'number'. node_modules/uglify-js/lib/parse.js(443,32): error TS2345: Argument of type 'any' is not assignable to parameter of type 'never'. From 4b77f34243fa6e431df55573a57b144bee68b337 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Tue, 7 May 2019 21:00:56 +0300 Subject: [PATCH 41/45] Fixed several typos, mostly in comments and parameter names. (#31287) --- src/compiler/checker.ts | 16 ++++++++-------- src/compiler/core.ts | 4 ++-- src/compiler/types.ts | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index dbb0180dfdb..a1d5f287e44 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -230,10 +230,10 @@ namespace ts { }, isContextSensitive, getFullyQualifiedName, - getResolvedSignature: (node, candidatesOutArray, agumentCount) => - getResolvedSignatureWorker(node, candidatesOutArray, agumentCount, CheckMode.Normal), - getResolvedSignatureForSignatureHelp: (node, candidatesOutArray, agumentCount) => - getResolvedSignatureWorker(node, candidatesOutArray, agumentCount, CheckMode.IsForSignatureHelp), + getResolvedSignature: (node, candidatesOutArray, argumentCount) => + getResolvedSignatureWorker(node, candidatesOutArray, argumentCount, CheckMode.Normal), + getResolvedSignatureForSignatureHelp: (node, candidatesOutArray, argumentCount) => + getResolvedSignatureWorker(node, candidatesOutArray, argumentCount, CheckMode.IsForSignatureHelp), getExpandedParameters, hasEffectiveRestParameter, getConstantValue: nodeIn => { @@ -3183,7 +3183,7 @@ namespace ts { let containers = getContainersOfSymbol(symbol, enclosingDeclaration); // If we're trying to reference some object literal in, eg `var a = { x: 1 }`, the symbol for the literal, `__object`, is distinct // from the symbol of the declaration it is being assigned to. Since we can use the declaration to refer to the literal, however, - // we'd like to make that connection here - potentially causing us to paint the declararation's visibiility, and therefore the literal. + // we'd like to make that connection here - potentially causing us to paint the declaration's visibility, and therefore the literal. const firstDecl: Node = first(symbol.declarations); if (!length(containers) && meaning & SymbolFlags.Value && firstDecl && isObjectLiteralExpression(firstDecl)) { if (firstDecl.parent && isVariableDeclaration(firstDecl.parent) && firstDecl === firstDecl.parent.initializer) { @@ -7732,10 +7732,10 @@ namespace ts { } } // If the target is a union type or if we are intersecting with types belonging to one of the - // disjoint domans, we may end up producing a constraint that hasn't been examined before. + // disjoint domains, we may end up producing a constraint that hasn't been examined before. if (constraints && (targetIsUnion || hasDisjointDomainType)) { if (hasDisjointDomainType) { - // We add any types belong to one of the disjoint domans because they might cause the final + // We add any types belong to one of the disjoint domains because they might cause the final // intersection operation to reduce the union constraints. for (const t of type.types) { if (t.flags & TypeFlags.DisjointDomains) { @@ -7785,7 +7785,7 @@ namespace ts { } if (constraintDepth >= 50) { // We have reached 50 recursive invocations of getImmediateBaseConstraint and there is a - // very high likelyhood we're dealing with an infinite generic type that perpetually generates + // very high likelihood we're dealing with an infinite generic type that perpetually generates // new type identities as we descend into it. We stop the recursion here and mark this type // and the outer types as having circular constraints. error(currentNode, Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite); diff --git a/src/compiler/core.ts b/src/compiler/core.ts index 550e2c90e12..2dfc7acf188 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -239,7 +239,7 @@ namespace ts { } // When the deleted entry was the last one, we need to - // adust the lastEntry reference. + // adjust the lastEntry reference. if (this.lastEntry === entry) { this.lastEntry = previousEntry; } @@ -1255,7 +1255,7 @@ namespace ts { } /** - * Returns the only element of an array if it contains only one element; otheriwse, returns the + * Returns the only element of an array if it contains only one element; otherwise, returns the * array. */ export function singleOrMany(array: T[]): T | T[]; diff --git a/src/compiler/types.ts b/src/compiler/types.ts index af4194a9c69..205ad19b95e 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -2614,7 +2614,7 @@ namespace ts { // Incomplete types occur during control flow analysis of loops. An IncompleteType // is distinguished from a regular type by a flags value of zero. Incomplete type - // objects are internal to the getFlowTypeOfRefecence function and never escape it. + // objects are internal to the getFlowTypeOfReference function and never escape it. export interface IncompleteType { flags: TypeFlags; // No flags set type: Type; // The type marked incomplete @@ -5137,7 +5137,7 @@ namespace ts { createHash?(data: string): string; getParsedCommandLine?(fileName: string): ParsedCommandLine | undefined; - // TODO: later handle this in better way in builder host instead once the api for tsbuild finalizes and doesnt use compilerHost as base + // TODO: later handle this in better way in builder host instead once the api for tsbuild finalizes and doesn't use compilerHost as base /*@internal*/createDirectory?(directory: string): void; } From 5fb6bbe91e72c9b68ab186832eac50c772586ecb Mon Sep 17 00:00:00 2001 From: Jeff Wilcox Date: Tue, 7 May 2019 11:33:18 -0700 Subject: [PATCH 42/45] Updating README: Travis CI icon (#31279) As part of a conference launch event, the URL for the broader Microsoft GitHub organization changed its casing. This updates the Travis CI badge URL to represent this change. Unfortunately the underlying serivce is not case insensitive. --- README.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index db157f74b2c..52e35c16f79 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -[![Build Status](https://travis-ci.org/Microsoft/TypeScript.svg?branch=master)](https://travis-ci.org/Microsoft/TypeScript) -[![VSTS Build Status](https://dev.azure.com/typescript/TypeScript/_apis/build/status/Typescript/node10)](https://dev.azure.com/typescript/TypeScript/_build/latest?definitionId=4&view=logs) +[![Build Status](https://travis-ci.org/microsoft/TypeScript.svg?branch=master)](https://travis-ci.org/Microsoft/TypeScript) +[![VSTS Build Status](https://dev.azure.com/typescript/TypeScript/_apis/build/status/Typescript/node10)](https://dev.azure.com/typescript/TypeScript/_build/latest?definitionId=4&view=logs) [![npm version](https://badge.fury.io/js/typescript.svg)](https://www.npmjs.com/package/typescript) [![Downloads](https://img.shields.io/npm/dm/typescript.svg)](https://www.npmjs.com/package/typescript) @@ -28,14 +28,14 @@ npm install -g typescript@next There are many ways to [contribute](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md) to TypeScript. * [Submit bugs](https://github.com/Microsoft/TypeScript/issues) and help us verify fixes as they are checked in. * Review the [source code changes](https://github.com/Microsoft/TypeScript/pulls). -* Engage with other TypeScript users and developers on [StackOverflow](https://stackoverflow.com/questions/tagged/typescript). +* Engage with other TypeScript users and developers on [StackOverflow](https://stackoverflow.com/questions/tagged/typescript). * Join the [#typescript](https://twitter.com/search?q=%23TypeScript) discussion on Twitter. * [Contribute bug fixes](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md). * Read the language specification ([docx](https://github.com/Microsoft/TypeScript/blob/master/doc/TypeScript%20Language%20Specification.docx?raw=true), [pdf](https://github.com/Microsoft/TypeScript/blob/master/doc/TypeScript%20Language%20Specification.pdf?raw=true), [md](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md)). -This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see -the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see +the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. ## Documentation @@ -71,17 +71,17 @@ npm install Use one of the following to build and test: ``` -gulp local # Build the compiler into built/local -gulp clean # Delete the built compiler +gulp local # Build the compiler into built/local +gulp clean # Delete the built compiler gulp LKG # Replace the last known good with the built one. # Bootstrapping step to be executed when the built compiler reaches a stable state. -gulp tests # Build the test infrastructure using the built compiler. -gulp runtests # Run tests using the built compiler and test infrastructure. - # You can override the host or specify a test for this command. - # Use --host= or --tests=. +gulp tests # Build the test infrastructure using the built compiler. +gulp runtests # Run tests using the built compiler and test infrastructure. + # You can override the host or specify a test for this command. + # Use --host= or --tests=. gulp baseline-accept # This replaces the baseline test results with the results obtained from gulp runtests. gulp lint # Runs tslint on the TypeScript source. -gulp help # List the above commands. +gulp help # List the above commands. ``` From 0c1a283bf9f933beef4bdf31ffd0facbccbd38dc Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Tue, 7 May 2019 15:41:39 -0700 Subject: [PATCH 43/45] Add opt-in behavior for custom transforms to support bundles --- src/compiler/emitter.ts | 8 +-- src/compiler/factory.ts | 2 +- src/compiler/program.ts | 7 +-- src/compiler/transformer.ts | 52 +++++++++++++++++-- src/compiler/types.ts | 19 +++++-- src/testRunner/unittests/customTransforms.ts | 34 +++++++----- .../reference/api/tsserverlibrary.d.ts | 13 +++-- tests/baselines/reference/api/typescript.d.ts | 13 +++-- 8 files changed, 109 insertions(+), 39 deletions(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 8f91e3d25c1..d335ceb1b60 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -222,7 +222,7 @@ namespace ts { /*@internal*/ // targetSourceFile is when users only want one file in entire project to be emitted. This is used in compileOnSave feature - export function emitFiles(resolver: EmitResolver, host: EmitHost, targetSourceFile: SourceFile | undefined, emitOnlyDtsFiles?: boolean, transformers?: TransformerFactory[], declarationTransformers?: TransformerFactory[], onlyBuildInfo?: boolean): EmitResult { + export function emitFiles(resolver: EmitResolver, host: EmitHost, targetSourceFile: SourceFile | undefined, { scriptTransformers, declarationTransformers }: EmitTransformers, emitOnlyDtsFiles?: boolean, onlyBuildInfo?: boolean): EmitResult { const compilerOptions = host.getCompilerOptions(); const sourceMapDataList: SourceMapEmitResult[] | undefined = (compilerOptions.sourceMap || compilerOptions.inlineSourceMap || getAreDeclarationMapsEnabled(compilerOptions)) ? [] : undefined; const emittedFilesList: string[] | undefined = compilerOptions.listEmittedFiles ? [] : undefined; @@ -303,7 +303,7 @@ namespace ts { return; } // Transform the source files - const transform = transformNodes(resolver, host, compilerOptions, [sourceFileOrBundle], transformers!, /*allowDtsFiles*/ false); + const transform = transformNodes(resolver, host, compilerOptions, [sourceFileOrBundle], scriptTransformers, /*allowDtsFiles*/ false); const printerOptions: PrinterOptions = { removeComments: compilerOptions.removeComments, @@ -349,7 +349,7 @@ namespace ts { // Do that here when emitting only dts files nonJsFiles.forEach(collectLinkedAliases); } - const declarationTransform = transformNodes(resolver, host, compilerOptions, inputListOrBundle, concatenate([transformDeclarations], declarationTransformers), /*allowDtsFiles*/ false); + const declarationTransform = transformNodes(resolver, host, compilerOptions, inputListOrBundle, declarationTransformers, /*allowDtsFiles*/ false); if (length(declarationTransform.diagnostics)) { for (const diagnostic of declarationTransform.diagnostics!) { emitterDiagnostics.add(diagnostic); @@ -723,7 +723,7 @@ namespace ts { useCaseSensitiveFileNames: () => host.useCaseSensitiveFileNames(), getProgramBuildInfo: returnUndefined }; - emitFiles(notImplementedResolver, emitHost, /*targetSourceFile*/ undefined, /*emitOnlyDtsFiles*/ false, getTransformers(config.options)); + emitFiles(notImplementedResolver, emitHost, /*targetSourceFile*/ undefined, getTransformers(config.options), /*emitOnlyDtsFiles*/ false); return outputFiles; } diff --git a/src/compiler/factory.ts b/src/compiler/factory.ts index 002e0e8f07f..517ebacb89d 100644 --- a/src/compiler/factory.ts +++ b/src/compiler/factory.ts @@ -2949,7 +2949,7 @@ namespace ts { return node; } - export function updateBundle(node: Bundle, sourceFiles: ReadonlyArray, prepends: ReadonlyArray = emptyArray) { + export function updateBundle(node: Bundle, sourceFiles: ReadonlyArray, prepends: ReadonlyArray = emptyArray) { if (node.sourceFiles !== sourceFiles || node.prepends !== prepends) { return createBundle(sourceFiles, prepends); } diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 6f331bb49ca..2fda6ea49a5 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -1453,9 +1453,8 @@ namespace ts { notImplementedResolver, getEmitHost(writeFileCallback), /*targetSourceFile*/ undefined, + /*transformers*/ noTransformers, /*emitOnlyDtsFiles*/ false, - /*transformers*/ undefined, - /*declaraitonTransformers*/ undefined, /*onlyBuildInfo*/ true ); @@ -1574,14 +1573,12 @@ namespace ts { performance.mark("beforeEmit"); - const transformers = emitOnlyDtsFiles ? [] : getTransformers(options, customTransformers); const emitResult = emitFiles( emitResolver, getEmitHost(writeFileCallback), sourceFile, + getTransformers(options, customTransformers, emitOnlyDtsFiles), emitOnlyDtsFiles, - transformers, - customTransformers && customTransformers.afterDeclarations ); performance.mark("afterEmit"); diff --git a/src/compiler/transformer.ts b/src/compiler/transformer.ts index ba47d5b8106..1c1df9bb0c2 100644 --- a/src/compiler/transformer.ts +++ b/src/compiler/transformer.ts @@ -24,13 +24,24 @@ namespace ts { EmitNotifications = 1 << 1, } - export function getTransformers(compilerOptions: CompilerOptions, customTransformers?: CustomTransformers) { + export const noTransformers: EmitTransformers = { scriptTransformers: emptyArray, declarationTransformers: emptyArray }; + + export function getTransformers(compilerOptions: CompilerOptions, customTransformers?: CustomTransformers, emitOnlyDtsFiles?: boolean): EmitTransformers { + return { + scriptTransformers: getScriptTransformers(compilerOptions, customTransformers, emitOnlyDtsFiles), + declarationTransformers: getDeclarationTransformers(customTransformers), + }; + } + + function getScriptTransformers(compilerOptions: CompilerOptions, customTransformers?: CustomTransformers, emitOnlyDtsFiles?: boolean) { + if (emitOnlyDtsFiles) return emptyArray; + const jsx = compilerOptions.jsx; const languageVersion = getEmitScriptTarget(compilerOptions); const moduleKind = getEmitModuleKind(compilerOptions); const transformers: TransformerFactory[] = []; - addRange(transformers, customTransformers && customTransformers.before); + addRange(transformers, customTransformers && map(customTransformers.before, wrapScriptTransformerFactory)); transformers.push(transformTypeScript); @@ -71,11 +82,44 @@ namespace ts { transformers.push(transformES5); } - addRange(transformers, customTransformers && customTransformers.after); - + addRange(transformers, customTransformers && map(customTransformers.after, wrapScriptTransformerFactory)); return transformers; } + function getDeclarationTransformers(customTransformers?: CustomTransformers) { + const transformers: TransformerFactory[] = []; + transformers.push(transformDeclarations); + addRange(transformers, customTransformers && map(customTransformers.afterDeclarations, wrapDeclarationTransformerFactory)); + return transformers; + } + + /** + * Wrap a custom script or declaration transformer object in a `Transformer` callback with fallback support for transforming bundles. + */ + function wrapCustomTransformer(transformer: CustomTransformer): Transformer { + return node => isBundle(node) ? transformer.transformBundle(node) : transformer.transformSourceFile(node); + } + + /** + * Wrap a transformer factory that may return a custom script or declaration transformer object. + */ + function wrapCustomTransformerFactory(transformer: TransformerFactory | CustomTransformerFactory, handleDefault: (node: Transformer) => Transformer): TransformerFactory { + return context => { + const customTransformer = transformer(context); + return typeof customTransformer === "function" + ? handleDefault(customTransformer) + : wrapCustomTransformer(customTransformer); + }; + } + + function wrapScriptTransformerFactory(transformer: TransformerFactory | CustomTransformerFactory): TransformerFactory { + return wrapCustomTransformerFactory(transformer, chainBundle); + } + + function wrapDeclarationTransformerFactory(transformer: TransformerFactory | CustomTransformerFactory): TransformerFactory { + return wrapCustomTransformerFactory(transformer, identity); + } + export function noEmitSubstitution(_hint: EmitHint, node: Node) { return node; } diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 205ad19b95e..0e3ab5bec24 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -3011,13 +3011,26 @@ namespace ts { Completely = 1 << 1, } + export type CustomTransformerFactory = (context: TransformationContext) => CustomTransformer; + + export interface CustomTransformer { + transformSourceFile(node: SourceFile): SourceFile; + transformBundle(node: Bundle): Bundle; + } + export interface CustomTransformers { /** Custom transformers to evaluate before built-in .js transformations. */ - before?: TransformerFactory[]; + before?: (TransformerFactory | CustomTransformerFactory)[]; /** Custom transformers to evaluate after built-in .js transformations. */ - after?: TransformerFactory[]; + after?: (TransformerFactory | CustomTransformerFactory)[]; /** Custom transformers to evaluate after built-in .d.ts transformations. */ - afterDeclarations?: TransformerFactory[]; + afterDeclarations?: (TransformerFactory | CustomTransformerFactory)[]; + } + + /*@internal*/ + export interface EmitTransformers { + scriptTransformers: readonly TransformerFactory[]; + declarationTransformers: readonly TransformerFactory[]; } export interface SourceMapSpan { diff --git a/src/testRunner/unittests/customTransforms.ts b/src/testRunner/unittests/customTransforms.ts index 0ac14341342..2a2309d4b87 100644 --- a/src/testRunner/unittests/customTransforms.ts +++ b/src/testRunner/unittests/customTransforms.ts @@ -140,22 +140,28 @@ namespace ts { ], { before: [ - context => node => visitNode(node, function visitor(node: Node): Node { - if (isIdentifier(node) && node.text === "original") { - const newNode = createIdentifier("changed"); - setSourceMapRange(newNode, { - pos: 0, - end: 7, - // Do not provide a custom skipTrivia function for `source`. - source: createSourceMapSource("another.html", "changed;") - }); - return newNode; - } - return visitEachChild(node, visitor, context); - }) + context => { + const transformSourceFile: Transformer = node => visitNode(node, function visitor(node: Node): Node { + if (isIdentifier(node) && node.text === "original") { + const newNode = createIdentifier("changed"); + setSourceMapRange(newNode, { + pos: 0, + end: 7, + // Do not provide a custom skipTrivia function for `source`. + source: createSourceMapSource("another.html", "changed;") + }); + return newNode; + } + return visitEachChild(node, visitor, context); + }); + return { + transformSourceFile, + transformBundle: node => createBundle(map(node.sourceFiles, transformSourceFile), node.prepends), + }; + } ] }, - { sourceMap: true } + { sourceMap: true, outFile: "source.js" } ); }); diff --git a/tests/baselines/reference/api/tsserverlibrary.d.ts b/tests/baselines/reference/api/tsserverlibrary.d.ts index 08e25fed188..ae473420de5 100644 --- a/tests/baselines/reference/api/tsserverlibrary.d.ts +++ b/tests/baselines/reference/api/tsserverlibrary.d.ts @@ -1879,13 +1879,18 @@ declare namespace ts { sourceFile: SourceFile; references?: ReadonlyArray; } + type CustomTransformerFactory = (context: TransformationContext) => CustomTransformer; + interface CustomTransformer { + transformSourceFile(node: SourceFile): SourceFile; + transformBundle(node: Bundle): Bundle; + } interface CustomTransformers { /** Custom transformers to evaluate before built-in .js transformations. */ - before?: TransformerFactory[]; + before?: (TransformerFactory | CustomTransformerFactory)[]; /** Custom transformers to evaluate after built-in .js transformations. */ - after?: TransformerFactory[]; + after?: (TransformerFactory | CustomTransformerFactory)[]; /** Custom transformers to evaluate after built-in .d.ts transformations. */ - afterDeclarations?: TransformerFactory[]; + afterDeclarations?: (TransformerFactory | CustomTransformerFactory)[]; } interface SourceMapSpan { /** Line number in the .js file. */ @@ -4071,7 +4076,7 @@ declare namespace ts { function createInputFiles(javascriptText: string, declarationText: string): InputFiles; function createInputFiles(readFileText: (path: string) => string | undefined, javascriptPath: string, javascriptMapPath: string | undefined, declarationPath: string, declarationMapPath: string | undefined, buildInfoPath: string | undefined): InputFiles; function createInputFiles(javascriptText: string, declarationText: string, javascriptMapPath: string | undefined, javascriptMapText: string | undefined, declarationMapPath: string | undefined, declarationMapText: string | undefined): InputFiles; - function updateBundle(node: Bundle, sourceFiles: ReadonlyArray, prepends?: ReadonlyArray): Bundle; + function updateBundle(node: Bundle, sourceFiles: ReadonlyArray, prepends?: ReadonlyArray): Bundle; function createImmediatelyInvokedFunctionExpression(statements: ReadonlyArray): CallExpression; function createImmediatelyInvokedFunctionExpression(statements: ReadonlyArray, param: ParameterDeclaration, paramValue: Expression): CallExpression; function createImmediatelyInvokedArrowFunction(statements: ReadonlyArray): CallExpression; diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index a7c3fc07971..038a953d081 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -1879,13 +1879,18 @@ declare namespace ts { sourceFile: SourceFile; references?: ReadonlyArray; } + type CustomTransformerFactory = (context: TransformationContext) => CustomTransformer; + interface CustomTransformer { + transformSourceFile(node: SourceFile): SourceFile; + transformBundle(node: Bundle): Bundle; + } interface CustomTransformers { /** Custom transformers to evaluate before built-in .js transformations. */ - before?: TransformerFactory[]; + before?: (TransformerFactory | CustomTransformerFactory)[]; /** Custom transformers to evaluate after built-in .js transformations. */ - after?: TransformerFactory[]; + after?: (TransformerFactory | CustomTransformerFactory)[]; /** Custom transformers to evaluate after built-in .d.ts transformations. */ - afterDeclarations?: TransformerFactory[]; + afterDeclarations?: (TransformerFactory | CustomTransformerFactory)[]; } interface SourceMapSpan { /** Line number in the .js file. */ @@ -4071,7 +4076,7 @@ declare namespace ts { function createInputFiles(javascriptText: string, declarationText: string): InputFiles; function createInputFiles(readFileText: (path: string) => string | undefined, javascriptPath: string, javascriptMapPath: string | undefined, declarationPath: string, declarationMapPath: string | undefined, buildInfoPath: string | undefined): InputFiles; function createInputFiles(javascriptText: string, declarationText: string, javascriptMapPath: string | undefined, javascriptMapText: string | undefined, declarationMapPath: string | undefined, declarationMapText: string | undefined): InputFiles; - function updateBundle(node: Bundle, sourceFiles: ReadonlyArray, prepends?: ReadonlyArray): Bundle; + function updateBundle(node: Bundle, sourceFiles: ReadonlyArray, prepends?: ReadonlyArray): Bundle; function createImmediatelyInvokedFunctionExpression(statements: ReadonlyArray): CallExpression; function createImmediatelyInvokedFunctionExpression(statements: ReadonlyArray, param: ParameterDeclaration, paramValue: Expression): CallExpression; function createImmediatelyInvokedArrowFunction(statements: ReadonlyArray): CallExpression; From a2c1fea20bfcd43f56cbac9f3946b8d6f473572c Mon Sep 17 00:00:00 2001 From: TypeScript Bot Date: Wed, 8 May 2019 07:56:07 -0700 Subject: [PATCH 44/45] Update user baselines (#31310) --- tests/baselines/reference/user/assert.log | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/tests/baselines/reference/user/assert.log b/tests/baselines/reference/user/assert.log index 60e693ae6f3..3870753f663 100644 --- a/tests/baselines/reference/user/assert.log +++ b/tests/baselines/reference/user/assert.log @@ -1,14 +1,5 @@ Exit Code: 1 Standard output: -node_modules/assert/assert.js(124,8): error TS2540: Cannot assign to 'name' because it is a read-only property. -node_modules/assert/assert.js(125,8): error TS2339: Property 'actual' does not exist on type 'typeof ok'. -node_modules/assert/assert.js(126,8): error TS2339: Property 'expected' does not exist on type 'typeof ok'. -node_modules/assert/assert.js(127,8): error TS2339: Property 'operator' does not exist on type 'typeof ok'. -node_modules/assert/assert.js(129,10): error TS2339: Property 'message' does not exist on type 'typeof ok'. -node_modules/assert/assert.js(130,10): error TS2339: Property 'generatedMessage' does not exist on type 'typeof ok'. -node_modules/assert/assert.js(132,10): error TS2339: Property 'message' does not exist on type 'typeof ok'. -node_modules/assert/assert.js(133,10): error TS2339: Property 'generatedMessage' does not exist on type 'typeof ok'. -node_modules/assert/assert.js(154,12): error TS2339: Property 'stack' does not exist on type 'typeof ok'. node_modules/assert/test.js(25,5): error TS2367: This condition will always return 'false' since the types 'string | undefined' and 'true' have no overlap. node_modules/assert/test.js(39,5): error TS2552: Cannot find name 'test'. Did you mean 'tests'? node_modules/assert/test.js(55,5): error TS2552: Cannot find name 'test'. Did you mean 'tests'? @@ -36,6 +27,7 @@ node_modules/assert/test.js(262,5): error TS2593: Cannot find name 'test'. Do yo node_modules/assert/test.js(279,5): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig. node_modules/assert/test.js(285,5): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig. node_modules/assert/test.js(320,5): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig. +node_modules/assert/test.js(346,5): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig. From 0c9db717add6b9e396accf92f5d2249d5ffb180e Mon Sep 17 00:00:00 2001 From: Klaus Meinhardt Date: Wed, 8 May 2019 23:09:11 +0200 Subject: [PATCH 45/45] fix parsing of leading union/intersection operator (#31265) * fix parsing of leading union/intersection operator Fixes: #30995 * test declaration emit --- src/compiler/parser.ts | 9 +++-- src/testRunner/unittests/jsDocParsing.ts | 2 + ...orrectly.unionTypeWithLeadingOperator.json | 37 +++++++++++++++++++ ...nTypeWithOneElementAndLeadingOperator.json | 29 +++++++++++++++ .../reference/unionTypeWithLeadingOperator.js | 12 +++++- .../unionTypeWithLeadingOperator.symbols | 6 +++ .../unionTypeWithLeadingOperator.types | 6 +++ .../compiler/unionTypeWithLeadingOperator.ts | 6 +++ 8 files changed, 102 insertions(+), 5 deletions(-) create mode 100644 tests/baselines/reference/JSDocParsing/TypeExpressions.parsesCorrectly.unionTypeWithLeadingOperator.json create mode 100644 tests/baselines/reference/JSDocParsing/TypeExpressions.parsesCorrectly.unionTypeWithOneElementAndLeadingOperator.json diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index a79ed0c5428..c38e4f67fe2 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -3124,15 +3124,16 @@ namespace ts { } function parseUnionOrIntersectionType(kind: SyntaxKind.UnionType | SyntaxKind.IntersectionType, parseConstituentType: () => TypeNode, operator: SyntaxKind.BarToken | SyntaxKind.AmpersandToken): TypeNode { - parseOptional(operator); + const start = scanner.getStartPos(); + const hasLeadingOperator = parseOptional(operator); let type = parseConstituentType(); - if (token() === operator) { + if (token() === operator || hasLeadingOperator) { const types = [type]; while (parseOptional(operator)) { types.push(parseConstituentType()); } - const node = createNode(kind, type.pos); - node.types = createNodeArray(types, type.pos); + const node = createNode(kind, start); + node.types = createNodeArray(types, start); type = finishNode(node); } return type; diff --git a/src/testRunner/unittests/jsDocParsing.ts b/src/testRunner/unittests/jsDocParsing.ts index 4171a330f32..941b1557450 100644 --- a/src/testRunner/unittests/jsDocParsing.ts +++ b/src/testRunner/unittests/jsDocParsing.ts @@ -37,6 +37,8 @@ namespace ts { parsesCorrectly("callSignatureInRecordType", "{{(): number}}"); parsesCorrectly("methodInRecordType", "{{foo(): number}}"); parsesCorrectly("unionType", "{(number|string)}"); + parsesCorrectly("unionTypeWithLeadingOperator", "{( | number | string )}"); + parsesCorrectly("unionTypeWithOneElementAndLeadingOperator", "{( | number )}"); parsesCorrectly("topLevelNoParenUnionType", "{number|string}"); parsesCorrectly("functionType1", "{function()}"); parsesCorrectly("functionType2", "{function(string, boolean)}"); diff --git a/tests/baselines/reference/JSDocParsing/TypeExpressions.parsesCorrectly.unionTypeWithLeadingOperator.json b/tests/baselines/reference/JSDocParsing/TypeExpressions.parsesCorrectly.unionTypeWithLeadingOperator.json new file mode 100644 index 00000000000..fd53183d616 --- /dev/null +++ b/tests/baselines/reference/JSDocParsing/TypeExpressions.parsesCorrectly.unionTypeWithLeadingOperator.json @@ -0,0 +1,37 @@ +{ + "kind": "ParenthesizedType", + "pos": 1, + "end": 22, + "flags": "JSDoc", + "modifierFlagsCache": 0, + "transformFlags": 0, + "type": { + "kind": "UnionType", + "pos": 2, + "end": 20, + "flags": "JSDoc", + "modifierFlagsCache": 0, + "transformFlags": 0, + "types": { + "0": { + "kind": "NumberKeyword", + "pos": 4, + "end": 11, + "flags": "JSDoc", + "modifierFlagsCache": 0, + "transformFlags": 0 + }, + "1": { + "kind": "StringKeyword", + "pos": 13, + "end": 20, + "flags": "JSDoc", + "modifierFlagsCache": 0, + "transformFlags": 0 + }, + "length": 2, + "pos": 2, + "end": 20 + } + } +} \ No newline at end of file diff --git a/tests/baselines/reference/JSDocParsing/TypeExpressions.parsesCorrectly.unionTypeWithOneElementAndLeadingOperator.json b/tests/baselines/reference/JSDocParsing/TypeExpressions.parsesCorrectly.unionTypeWithOneElementAndLeadingOperator.json new file mode 100644 index 00000000000..7fd1b1b98f2 --- /dev/null +++ b/tests/baselines/reference/JSDocParsing/TypeExpressions.parsesCorrectly.unionTypeWithOneElementAndLeadingOperator.json @@ -0,0 +1,29 @@ +{ + "kind": "ParenthesizedType", + "pos": 1, + "end": 13, + "flags": "JSDoc", + "modifierFlagsCache": 0, + "transformFlags": 0, + "type": { + "kind": "UnionType", + "pos": 2, + "end": 11, + "flags": "JSDoc", + "modifierFlagsCache": 0, + "transformFlags": 0, + "types": { + "0": { + "kind": "NumberKeyword", + "pos": 4, + "end": 11, + "flags": "JSDoc", + "modifierFlagsCache": 0, + "transformFlags": 0 + }, + "length": 1, + "pos": 2, + "end": 11 + } + } +} \ No newline at end of file diff --git a/tests/baselines/reference/unionTypeWithLeadingOperator.js b/tests/baselines/reference/unionTypeWithLeadingOperator.js index 0fb366d538e..84572d9430e 100644 --- a/tests/baselines/reference/unionTypeWithLeadingOperator.js +++ b/tests/baselines/reference/unionTypeWithLeadingOperator.js @@ -5,6 +5,16 @@ type B = | { type: "DECREMENT" }; type C = [| 0 | 1, | "foo" | "bar"]; - + +export type D = + /*leading0*/ + | /*leading1*/ 1 /*trailing1*/ + | /*leading2*/ 2 /*trailing2*/; //// [unionTypeWithLeadingOperator.js] +"use strict"; +exports.__esModule = true; + + +//// [unionTypeWithLeadingOperator.d.ts] +export declare type D = /*leading1*/ 1 | /*leading2*/ 2; diff --git a/tests/baselines/reference/unionTypeWithLeadingOperator.symbols b/tests/baselines/reference/unionTypeWithLeadingOperator.symbols index 8c15d299c48..4ded4561a62 100644 --- a/tests/baselines/reference/unionTypeWithLeadingOperator.symbols +++ b/tests/baselines/reference/unionTypeWithLeadingOperator.symbols @@ -14,3 +14,9 @@ type B = type C = [| 0 | 1, | "foo" | "bar"]; >C : Symbol(C, Decl(unionTypeWithLeadingOperator.ts, 3, 26)) +export type D = +>D : Symbol(D, Decl(unionTypeWithLeadingOperator.ts, 5, 36)) + + /*leading0*/ + | /*leading1*/ 1 /*trailing1*/ + | /*leading2*/ 2 /*trailing2*/; diff --git a/tests/baselines/reference/unionTypeWithLeadingOperator.types b/tests/baselines/reference/unionTypeWithLeadingOperator.types index 2ca15fb54a2..930ff71f3f7 100644 --- a/tests/baselines/reference/unionTypeWithLeadingOperator.types +++ b/tests/baselines/reference/unionTypeWithLeadingOperator.types @@ -14,3 +14,9 @@ type B = type C = [| 0 | 1, | "foo" | "bar"]; >C : [0 | 1, "foo" | "bar"] +export type D = +>D : D + + /*leading0*/ + | /*leading1*/ 1 /*trailing1*/ + | /*leading2*/ 2 /*trailing2*/; diff --git a/tests/cases/compiler/unionTypeWithLeadingOperator.ts b/tests/cases/compiler/unionTypeWithLeadingOperator.ts index 9f6d272ce7c..17d9b051ef7 100644 --- a/tests/cases/compiler/unionTypeWithLeadingOperator.ts +++ b/tests/cases/compiler/unionTypeWithLeadingOperator.ts @@ -1,6 +1,12 @@ +// @declaration: true type A = | string; type B = | { type: "INCREMENT" } | { type: "DECREMENT" }; type C = [| 0 | 1, | "foo" | "bar"]; + +export type D = + /*leading0*/ + | /*leading1*/ 1 /*trailing1*/ + | /*leading2*/ 2 /*trailing2*/; \ No newline at end of file