Skip to content

Commit f968f1b

Browse files
committed
address feedback
1 parent 1ba7b3d commit f968f1b

File tree

666 files changed

+4006
-1326
lines changed

Some content is hidden

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

666 files changed

+4006
-1326
lines changed

src/compiler/transformers/es2015.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3338,7 +3338,11 @@ namespace ts {
33383338
priority: 0,
33393339
text: `
33403340
var __extends = (this && this.__extends) || function (d, b) {
3341-
Object.setPrototypeOf(d, b);
3341+
if (typeof Object.setPrototypeOf === "function") {
3342+
Object.setPrototypeOf(d, b);
3343+
} else {
3344+
d.__proto__ = b;
3345+
}
33423346
function __() { this.constructor = d; }
33433347
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
33443348
};`

tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@ module A {
2222

2323
//// [ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js]
2424
var __extends = (this && this.__extends) || function (d, b) {
25-
Object.setPrototypeOf(d, b);
25+
if (typeof Object.setPrototypeOf === "function") {
26+
Object.setPrototypeOf(d, b);
27+
} else {
28+
d.__proto__ = b;
29+
}
2630
function __() { this.constructor = d; }
2731
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
2832
};

tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ module A {
2626

2727
//// [ExportClassWithInaccessibleTypeInTypeParameterConstraint.js]
2828
var __extends = (this && this.__extends) || function (d, b) {
29-
Object.setPrototypeOf(d, b);
29+
if (typeof Object.setPrototypeOf === "function") {
30+
Object.setPrototypeOf(d, b);
31+
} else {
32+
d.__proto__ = b;
33+
}
3034
function __() { this.constructor = d; }
3135
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
3236
};

tests/baselines/reference/abstractClassInLocalScope.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@
99

1010
//// [abstractClassInLocalScope.js]
1111
var __extends = (this && this.__extends) || function (d, b) {
12-
Object.setPrototypeOf(d, b);
12+
if (typeof Object.setPrototypeOf === "function") {
13+
Object.setPrototypeOf(d, b);
14+
} else {
15+
d.__proto__ = b;
16+
}
1317
function __() { this.constructor = d; }
1418
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
1519
};

tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@
99

1010
//// [abstractClassInLocalScopeIsAbstract.js]
1111
var __extends = (this && this.__extends) || function (d, b) {
12-
Object.setPrototypeOf(d, b);
12+
if (typeof Object.setPrototypeOf === "function") {
13+
Object.setPrototypeOf(d, b);
14+
} else {
15+
d.__proto__ = b;
16+
}
1317
function __() { this.constructor = d; }
1418
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
1519
};

tests/baselines/reference/abstractProperty.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ class C extends B {
2323

2424
//// [abstractProperty.js]
2525
var __extends = (this && this.__extends) || function (d, b) {
26-
Object.setPrototypeOf(d, b);
26+
if (typeof Object.setPrototypeOf === "function") {
27+
Object.setPrototypeOf(d, b);
28+
} else {
29+
d.__proto__ = b;
30+
}
2731
function __() { this.constructor = d; }
2832
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
2933
};

tests/baselines/reference/abstractPropertyNegative.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,11 @@ abstract class AbstractAccessorMismatch {
4545

4646
//// [abstractPropertyNegative.js]
4747
var __extends = (this && this.__extends) || function (d, b) {
48-
Object.setPrototypeOf(d, b);
48+
if (typeof Object.setPrototypeOf === "function") {
49+
Object.setPrototypeOf(d, b);
50+
} else {
51+
d.__proto__ = b;
52+
}
4953
function __() { this.constructor = d; }
5054
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
5155
};

tests/baselines/reference/accessOverriddenBaseClassMember1.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ class ColoredPoint extends Point {
1717

1818
//// [accessOverriddenBaseClassMember1.js]
1919
var __extends = (this && this.__extends) || function (d, b) {
20-
Object.setPrototypeOf(d, b);
20+
if (typeof Object.setPrototypeOf === "function") {
21+
Object.setPrototypeOf(d, b);
22+
} else {
23+
d.__proto__ = b;
24+
}
2125
function __() { this.constructor = d; }
2226
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
2327
};

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ class LanguageSpec_section_4_5_inference {
2626

2727
//// [accessors_spec_section-4.5_inference.js]
2828
var __extends = (this && this.__extends) || function (d, b) {
29-
Object.setPrototypeOf(d, b);
29+
if (typeof Object.setPrototypeOf === "function") {
30+
Object.setPrototypeOf(d, b);
31+
} else {
32+
d.__proto__ = b;
33+
}
3034
function __() { this.constructor = d; }
3135
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
3236
};

tests/baselines/reference/aliasUsageInAccessorsOfClass.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,11 @@ exports.Model = Model;
3838
//// [aliasUsage1_moduleA.js]
3939
"use strict";
4040
var __extends = (this && this.__extends) || function (d, b) {
41-
Object.setPrototypeOf(d, b);
41+
if (typeof Object.setPrototypeOf === "function") {
42+
Object.setPrototypeOf(d, b);
43+
} else {
44+
d.__proto__ = b;
45+
}
4246
function __() { this.constructor = d; }
4347
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
4448
};

0 commit comments

Comments
 (0)