Skip to content

Commit 570575a

Browse files
committed
address #12622
1 parent 7ea3734 commit 570575a

File tree

660 files changed

+3350
-3350
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

660 files changed

+3350
-3350
lines changed

src/compiler/transformers/es2015.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -3337,12 +3337,12 @@ namespace ts {
33373337
scoped: false,
33383338
priority: 0,
33393339
text: `
3340+
var __extendStatics = (this && this.__extendStatics) ||
3341+
Object.setPrototypeOf ||
3342+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
3343+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
33403344
var __extends = (this && this.__extends) || function (d, b) {
3341-
if (typeof Object.setPrototypeOf === "function") {
3342-
Object.setPrototypeOf(d, b);
3343-
} else {
3344-
d.__proto__ = b;
3345-
}
3345+
__extendStatics(d, b);
33463346
function __() { this.constructor = d; }
33473347
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
33483348
};`

tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ module A {
2121

2222

2323
//// [ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js]
24+
var __extendStatics = (this && this.__extendStatics) ||
25+
Object.setPrototypeOf ||
26+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
27+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
2428
var __extends = (this && this.__extends) || function (d, b) {
25-
if (typeof Object.setPrototypeOf === "function") {
26-
Object.setPrototypeOf(d, b);
27-
} else {
28-
d.__proto__ = b;
29-
}
29+
__extendStatics(d, b);
3030
function __() { this.constructor = d; }
3131
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
3232
};

tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ module A {
2525

2626

2727
//// [ExportClassWithInaccessibleTypeInTypeParameterConstraint.js]
28+
var __extendStatics = (this && this.__extendStatics) ||
29+
Object.setPrototypeOf ||
30+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
31+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
2832
var __extends = (this && this.__extends) || function (d, b) {
29-
if (typeof Object.setPrototypeOf === "function") {
30-
Object.setPrototypeOf(d, b);
31-
} else {
32-
d.__proto__ = b;
33-
}
33+
__extendStatics(d, b);
3434
function __() { this.constructor = d; }
3535
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
3636
};

tests/baselines/reference/abstractClassInLocalScope.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88

99

1010
//// [abstractClassInLocalScope.js]
11+
var __extendStatics = (this && this.__extendStatics) ||
12+
Object.setPrototypeOf ||
13+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
14+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
1115
var __extends = (this && this.__extends) || function (d, b) {
12-
if (typeof Object.setPrototypeOf === "function") {
13-
Object.setPrototypeOf(d, b);
14-
} else {
15-
d.__proto__ = b;
16-
}
16+
__extendStatics(d, b);
1717
function __() { this.constructor = d; }
1818
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
1919
};

tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88

99

1010
//// [abstractClassInLocalScopeIsAbstract.js]
11+
var __extendStatics = (this && this.__extendStatics) ||
12+
Object.setPrototypeOf ||
13+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
14+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
1115
var __extends = (this && this.__extends) || function (d, b) {
12-
if (typeof Object.setPrototypeOf === "function") {
13-
Object.setPrototypeOf(d, b);
14-
} else {
15-
d.__proto__ = b;
16-
}
16+
__extendStatics(d, b);
1717
function __() { this.constructor = d; }
1818
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
1919
};

tests/baselines/reference/abstractProperty.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ class C extends B {
2222
}
2323

2424
//// [abstractProperty.js]
25+
var __extendStatics = (this && this.__extendStatics) ||
26+
Object.setPrototypeOf ||
27+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
28+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
2529
var __extends = (this && this.__extends) || function (d, b) {
26-
if (typeof Object.setPrototypeOf === "function") {
27-
Object.setPrototypeOf(d, b);
28-
} else {
29-
d.__proto__ = b;
30-
}
30+
__extendStatics(d, b);
3131
function __() { this.constructor = d; }
3232
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
3333
};

tests/baselines/reference/abstractPropertyNegative.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@ abstract class AbstractAccessorMismatch {
4444

4545

4646
//// [abstractPropertyNegative.js]
47+
var __extendStatics = (this && this.__extendStatics) ||
48+
Object.setPrototypeOf ||
49+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
50+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
4751
var __extends = (this && this.__extends) || function (d, b) {
48-
if (typeof Object.setPrototypeOf === "function") {
49-
Object.setPrototypeOf(d, b);
50-
} else {
51-
d.__proto__ = b;
52-
}
52+
__extendStatics(d, b);
5353
function __() { this.constructor = d; }
5454
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
5555
};

tests/baselines/reference/accessOverriddenBaseClassMember1.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ class ColoredPoint extends Point {
1616

1717

1818
//// [accessOverriddenBaseClassMember1.js]
19+
var __extendStatics = (this && this.__extendStatics) ||
20+
Object.setPrototypeOf ||
21+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
22+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
1923
var __extends = (this && this.__extends) || function (d, b) {
20-
if (typeof Object.setPrototypeOf === "function") {
21-
Object.setPrototypeOf(d, b);
22-
} else {
23-
d.__proto__ = b;
24-
}
24+
__extendStatics(d, b);
2525
function __() { this.constructor = d; }
2626
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
2727
};

tests/baselines/reference/accessors_spec_section-4.5_inference.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ class LanguageSpec_section_4_5_inference {
2525
}
2626

2727
//// [accessors_spec_section-4.5_inference.js]
28+
var __extendStatics = (this && this.__extendStatics) ||
29+
Object.setPrototypeOf ||
30+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
31+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
2832
var __extends = (this && this.__extends) || function (d, b) {
29-
if (typeof Object.setPrototypeOf === "function") {
30-
Object.setPrototypeOf(d, b);
31-
} else {
32-
d.__proto__ = b;
33-
}
33+
__extendStatics(d, b);
3434
function __() { this.constructor = d; }
3535
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
3636
};

tests/baselines/reference/aliasUsageInAccessorsOfClass.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ var Model = (function () {
3737
exports.Model = Model;
3838
//// [aliasUsage1_moduleA.js]
3939
"use strict";
40+
var __extendStatics = (this && this.__extendStatics) ||
41+
Object.setPrototypeOf ||
42+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
43+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
4044
var __extends = (this && this.__extends) || function (d, b) {
41-
if (typeof Object.setPrototypeOf === "function") {
42-
Object.setPrototypeOf(d, b);
43-
} else {
44-
d.__proto__ = b;
45-
}
45+
__extendStatics(d, b);
4646
function __() { this.constructor = d; }
4747
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
4848
};

tests/baselines/reference/aliasUsageInArray.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ var Model = (function () {
3131
exports.Model = Model;
3232
//// [aliasUsageInArray_moduleA.js]
3333
"use strict";
34+
var __extendStatics = (this && this.__extendStatics) ||
35+
Object.setPrototypeOf ||
36+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
37+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
3438
var __extends = (this && this.__extends) || function (d, b) {
35-
if (typeof Object.setPrototypeOf === "function") {
36-
Object.setPrototypeOf(d, b);
37-
} else {
38-
d.__proto__ = b;
39-
}
39+
__extendStatics(d, b);
4040
function __() { this.constructor = d; }
4141
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
4242
};

tests/baselines/reference/aliasUsageInFunctionExpression.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ var Model = (function () {
3030
exports.Model = Model;
3131
//// [aliasUsageInFunctionExpression_moduleA.js]
3232
"use strict";
33+
var __extendStatics = (this && this.__extendStatics) ||
34+
Object.setPrototypeOf ||
35+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
36+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
3337
var __extends = (this && this.__extends) || function (d, b) {
34-
if (typeof Object.setPrototypeOf === "function") {
35-
Object.setPrototypeOf(d, b);
36-
} else {
37-
d.__proto__ = b;
38-
}
38+
__extendStatics(d, b);
3939
function __() { this.constructor = d; }
4040
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
4141
};

tests/baselines/reference/aliasUsageInGenericFunction.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ var Model = (function () {
3434
exports.Model = Model;
3535
//// [aliasUsageInGenericFunction_moduleA.js]
3636
"use strict";
37+
var __extendStatics = (this && this.__extendStatics) ||
38+
Object.setPrototypeOf ||
39+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
40+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
3741
var __extends = (this && this.__extends) || function (d, b) {
38-
if (typeof Object.setPrototypeOf === "function") {
39-
Object.setPrototypeOf(d, b);
40-
} else {
41-
d.__proto__ = b;
42-
}
42+
__extendStatics(d, b);
4343
function __() { this.constructor = d; }
4444
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
4545
};

tests/baselines/reference/aliasUsageInIndexerOfClass.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ var Model = (function () {
3636
exports.Model = Model;
3737
//// [aliasUsageInIndexerOfClass_moduleA.js]
3838
"use strict";
39+
var __extendStatics = (this && this.__extendStatics) ||
40+
Object.setPrototypeOf ||
41+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
42+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
3943
var __extends = (this && this.__extends) || function (d, b) {
40-
if (typeof Object.setPrototypeOf === "function") {
41-
Object.setPrototypeOf(d, b);
42-
} else {
43-
d.__proto__ = b;
44-
}
44+
__extendStatics(d, b);
4545
function __() { this.constructor = d; }
4646
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
4747
};

tests/baselines/reference/aliasUsageInObjectLiteral.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ var Model = (function () {
3131
exports.Model = Model;
3232
//// [aliasUsageInObjectLiteral_moduleA.js]
3333
"use strict";
34+
var __extendStatics = (this && this.__extendStatics) ||
35+
Object.setPrototypeOf ||
36+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
37+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
3438
var __extends = (this && this.__extends) || function (d, b) {
35-
if (typeof Object.setPrototypeOf === "function") {
36-
Object.setPrototypeOf(d, b);
37-
} else {
38-
d.__proto__ = b;
39-
}
39+
__extendStatics(d, b);
4040
function __() { this.constructor = d; }
4141
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
4242
};

tests/baselines/reference/aliasUsageInOrExpression.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ var Model = (function () {
3434
exports.Model = Model;
3535
//// [aliasUsageInOrExpression_moduleA.js]
3636
"use strict";
37+
var __extendStatics = (this && this.__extendStatics) ||
38+
Object.setPrototypeOf ||
39+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
40+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
3741
var __extends = (this && this.__extends) || function (d, b) {
38-
if (typeof Object.setPrototypeOf === "function") {
39-
Object.setPrototypeOf(d, b);
40-
} else {
41-
d.__proto__ = b;
42-
}
42+
__extendStatics(d, b);
4343
function __() { this.constructor = d; }
4444
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
4545
};

tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js

+10-10
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ var Model = (function () {
3434
exports.Model = Model;
3535
//// [aliasUsageInTypeArgumentOfExtendsClause_moduleA.js]
3636
"use strict";
37+
var __extendStatics = (this && this.__extendStatics) ||
38+
Object.setPrototypeOf ||
39+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
40+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
3741
var __extends = (this && this.__extends) || function (d, b) {
38-
if (typeof Object.setPrototypeOf === "function") {
39-
Object.setPrototypeOf(d, b);
40-
} else {
41-
d.__proto__ = b;
42-
}
42+
__extendStatics(d, b);
4343
function __() { this.constructor = d; }
4444
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
4545
};
@@ -54,12 +54,12 @@ var VisualizationModel = (function (_super) {
5454
exports.VisualizationModel = VisualizationModel;
5555
//// [aliasUsageInTypeArgumentOfExtendsClause_main.js]
5656
"use strict";
57+
var __extendStatics = (this && this.__extendStatics) ||
58+
Object.setPrototypeOf ||
59+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
60+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
5761
var __extends = (this && this.__extends) || function (d, b) {
58-
if (typeof Object.setPrototypeOf === "function") {
59-
Object.setPrototypeOf(d, b);
60-
} else {
61-
d.__proto__ = b;
62-
}
62+
__extendStatics(d, b);
6363
function __() { this.constructor = d; }
6464
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
6565
};

tests/baselines/reference/aliasUsageInVarAssignment.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ var Model = (function () {
3030
exports.Model = Model;
3131
//// [aliasUsageInVarAssignment_moduleA.js]
3232
"use strict";
33+
var __extendStatics = (this && this.__extendStatics) ||
34+
Object.setPrototypeOf ||
35+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
36+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
3337
var __extends = (this && this.__extends) || function (d, b) {
34-
if (typeof Object.setPrototypeOf === "function") {
35-
Object.setPrototypeOf(d, b);
36-
} else {
37-
d.__proto__ = b;
38-
}
38+
__extendStatics(d, b);
3939
function __() { this.constructor = d; }
4040
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
4141
};

tests/baselines/reference/ambiguousOverloadResolution.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ var x: B;
99
var t: number = f(x, x); // Not an error
1010

1111
//// [ambiguousOverloadResolution.js]
12+
var __extendStatics = (this && this.__extendStatics) ||
13+
Object.setPrototypeOf ||
14+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
15+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
1216
var __extends = (this && this.__extends) || function (d, b) {
13-
if (typeof Object.setPrototypeOf === "function") {
14-
Object.setPrototypeOf(d, b);
15-
} else {
16-
d.__proto__ = b;
17-
}
17+
__extendStatics(d, b);
1818
function __() { this.constructor = d; }
1919
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
2020
};

tests/baselines/reference/apparentTypeSubtyping.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ class Derived2<U extends String> extends Base2 { // error because of the prototy
2424
//// [apparentTypeSubtyping.js]
2525
// subtype checks use the apparent type of the target type
2626
// S is a subtype of a type T, and T is a supertype of S, if one of the following is true, where S' denotes the apparent type (section 3.8.1) of S:
27+
var __extendStatics = (this && this.__extendStatics) ||
28+
Object.setPrototypeOf ||
29+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
30+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
2731
var __extends = (this && this.__extends) || function (d, b) {
28-
if (typeof Object.setPrototypeOf === "function") {
29-
Object.setPrototypeOf(d, b);
30-
} else {
31-
d.__proto__ = b;
32-
}
32+
__extendStatics(d, b);
3333
function __() { this.constructor = d; }
3434
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
3535
};

tests/baselines/reference/apparentTypeSupertype.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ class Derived<U extends String> extends Base { // error
1414
//// [apparentTypeSupertype.js]
1515
// subtype checks use the apparent type of the target type
1616
// S is a subtype of a type T, and T is a supertype of S, if one of the following is true, where S' denotes the apparent type (section 3.8.1) of S:
17+
var __extendStatics = (this && this.__extendStatics) ||
18+
Object.setPrototypeOf ||
19+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
20+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
1721
var __extends = (this && this.__extends) || function (d, b) {
18-
if (typeof Object.setPrototypeOf === "function") {
19-
Object.setPrototypeOf(d, b);
20-
} else {
21-
d.__proto__ = b;
22-
}
22+
__extendStatics(d, b);
2323
function __() { this.constructor = d; }
2424
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
2525
};

0 commit comments

Comments
 (0)