mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
address feedback
This commit is contained in:
@@ -3338,7 +3338,11 @@ namespace ts {
|
||||
priority: 0,
|
||||
text: `
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};`
|
||||
|
||||
+5
-1
@@ -22,7 +22,11 @@ module A {
|
||||
|
||||
//// [ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
+5
-1
@@ -26,7 +26,11 @@ module A {
|
||||
|
||||
//// [ExportClassWithInaccessibleTypeInTypeParameterConstraint.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -9,7 +9,11 @@
|
||||
|
||||
//// [abstractClassInLocalScope.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -9,7 +9,11 @@
|
||||
|
||||
//// [abstractClassInLocalScopeIsAbstract.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -23,7 +23,11 @@ class C extends B {
|
||||
|
||||
//// [abstractProperty.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -45,7 +45,11 @@ abstract class AbstractAccessorMismatch {
|
||||
|
||||
//// [abstractPropertyNegative.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -17,7 +17,11 @@ class ColoredPoint extends Point {
|
||||
|
||||
//// [accessOverriddenBaseClassMember1.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -26,7 +26,11 @@ class LanguageSpec_section_4_5_inference {
|
||||
|
||||
//// [accessors_spec_section-4.5_inference.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -38,7 +38,11 @@ exports.Model = Model;
|
||||
//// [aliasUsage1_moduleA.js]
|
||||
"use strict";
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -32,7 +32,11 @@ exports.Model = Model;
|
||||
//// [aliasUsageInArray_moduleA.js]
|
||||
"use strict";
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -31,7 +31,11 @@ exports.Model = Model;
|
||||
//// [aliasUsageInFunctionExpression_moduleA.js]
|
||||
"use strict";
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -35,7 +35,11 @@ exports.Model = Model;
|
||||
//// [aliasUsageInGenericFunction_moduleA.js]
|
||||
"use strict";
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -37,7 +37,11 @@ exports.Model = Model;
|
||||
//// [aliasUsageInIndexerOfClass_moduleA.js]
|
||||
"use strict";
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -32,7 +32,11 @@ exports.Model = Model;
|
||||
//// [aliasUsageInObjectLiteral_moduleA.js]
|
||||
"use strict";
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -35,7 +35,11 @@ exports.Model = Model;
|
||||
//// [aliasUsageInOrExpression_moduleA.js]
|
||||
"use strict";
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -35,7 +35,11 @@ exports.Model = Model;
|
||||
//// [aliasUsageInTypeArgumentOfExtendsClause_moduleA.js]
|
||||
"use strict";
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
@@ -51,7 +55,11 @@ exports.VisualizationModel = VisualizationModel;
|
||||
//// [aliasUsageInTypeArgumentOfExtendsClause_main.js]
|
||||
"use strict";
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -31,7 +31,11 @@ exports.Model = Model;
|
||||
//// [aliasUsageInVarAssignment_moduleA.js]
|
||||
"use strict";
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -10,7 +10,11 @@ var t: number = f(x, x); // Not an error
|
||||
|
||||
//// [ambiguousOverloadResolution.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -25,7 +25,11 @@ class Derived2<U extends String> extends Base2 { // error because of the prototy
|
||||
// subtype checks use the apparent type of the target type
|
||||
// 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:
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -15,7 +15,11 @@ class Derived<U extends String> extends Base { // error
|
||||
// subtype checks use the apparent type of the target type
|
||||
// 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:
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -87,7 +87,11 @@ arr_any = i1; // should be an error - is
|
||||
|
||||
//// [arrayAssignmentTest1.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -61,7 +61,11 @@ arr_any = i1; // should be an error - is
|
||||
|
||||
//// [arrayAssignmentTest2.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -109,7 +109,11 @@ module NonEmptyTypes {
|
||||
|
||||
//// [arrayBestCommonTypes.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -53,7 +53,11 @@ var z3: { id: number }[] =
|
||||
|
||||
//// [arrayLiteralTypeInference.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -39,7 +39,11 @@ var context4: Base[] = [new Derived1(), new Derived1()];
|
||||
//// [arrayLiterals.js]
|
||||
// Empty array literal with no contextual type has type Undefined[]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -27,7 +27,11 @@ var as = [list, myDerivedList]; // List<number>[]
|
||||
|
||||
//// [arrayLiteralsWithRecursiveGenerics.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -21,7 +21,11 @@ rrb = cra; // error: 'A' is not assignable to 'B'
|
||||
|
||||
//// [arrayOfSubtypeIsAssignableToReadonlyArray.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -98,7 +98,11 @@ var asserted2: any;
|
||||
|
||||
//// [arrowFunctionContexts.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -102,7 +102,11 @@ b18 = a18; // ok
|
||||
//// [assignmentCompatWithCallSignatures3.js]
|
||||
// these are all permitted with the current rules, since we do not do contextual signature instantiation
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -101,7 +101,11 @@ module Errors {
|
||||
//// [assignmentCompatWithCallSignatures4.js]
|
||||
// These are mostly permitted with the current loose rules. All ok unless otherwise noted.
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -68,7 +68,11 @@ b18 = a18; // ok
|
||||
//// [assignmentCompatWithCallSignatures5.js]
|
||||
// checking assignment compat for function types. No errors in this file
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -45,7 +45,11 @@ b16 = x.a16;
|
||||
//// [assignmentCompatWithCallSignatures6.js]
|
||||
// checking assignment compatibility relations for function types. All valid
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -102,7 +102,11 @@ b18 = a18; // ok
|
||||
//// [assignmentCompatWithConstructSignatures3.js]
|
||||
// checking assignment compatibility relations for function types. All of these are valid.
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -101,7 +101,11 @@ module Errors {
|
||||
//// [assignmentCompatWithConstructSignatures4.js]
|
||||
// checking assignment compatibility relations for function types.
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -68,7 +68,11 @@ b18 = a18; // ok
|
||||
//// [assignmentCompatWithConstructSignatures5.js]
|
||||
// checking assignment compat for function types. All valid
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -45,7 +45,11 @@ b16 = x.a16;
|
||||
//// [assignmentCompatWithConstructSignatures6.js]
|
||||
// checking assignment compatibility relations for function types. All valid.
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -46,7 +46,11 @@ module Generics {
|
||||
//// [assignmentCompatWithNumericIndexer.js]
|
||||
// Derived type indexer must be subtype of base type indexer
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -43,7 +43,11 @@ module Generics {
|
||||
//// [assignmentCompatWithNumericIndexer3.js]
|
||||
// Derived type indexer must be subtype of base type indexer
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -94,7 +94,11 @@ module WithBase {
|
||||
//// [assignmentCompatWithObjectMembers4.js]
|
||||
// members N and M of types S and T have the same name, same accessibility, same optionality, and N is not assignable M
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -91,7 +91,11 @@ module SourceHasOptional {
|
||||
//// [assignmentCompatWithObjectMembersOptionality.js]
|
||||
// Derived member is not optional but base member is, should be ok
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -93,7 +93,11 @@ module SourceHasOptional {
|
||||
// M is optional and S contains no property with the same name as M
|
||||
// N is optional and T contains no property with the same name as N
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -56,7 +56,11 @@ module Generics {
|
||||
//// [assignmentCompatWithStringIndexer.js]
|
||||
// index signatures must be compatible in assignments
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -72,7 +72,11 @@ foo() = value;
|
||||
|
||||
//// [assignmentLHSIsValue.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -12,7 +12,11 @@ class Test {
|
||||
//// [task.js]
|
||||
"use strict";
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -25,7 +25,11 @@ class Point3D extends Point {
|
||||
|
||||
//// [autolift4.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -31,7 +31,11 @@ function f() {
|
||||
|
||||
//// [baseCheck.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -26,7 +26,11 @@ var z: Derived = b.foo();
|
||||
|
||||
//// [baseIndexSignatureResolution.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -38,7 +38,11 @@ class Class4<T> extends Class3<T>
|
||||
|
||||
//// [baseTypeOrderChecking.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -29,7 +29,11 @@ class C<T1> extends CBase<T1> {
|
||||
|
||||
//// [baseTypeWrappingInstantiationChain.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -22,7 +22,11 @@ new C().y;
|
||||
|
||||
//// [bases.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -30,7 +30,11 @@ function foo5<T, U>(t: T, u: U): Object {
|
||||
// conditional expressions return the best common type of the branches plus contextual type (using the first candidate if multiple BCTs exist)
|
||||
// no errors expected here
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -28,7 +28,11 @@ function foo3<T extends U, U extends V, V>(t: T, u: U) {
|
||||
// conditional expressions return the best common type of the branches plus contextual type (using the first candidate if multiple BCTs exist)
|
||||
// these are errors
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -24,7 +24,11 @@ var e51 = t5[2]; // {}
|
||||
|
||||
//// [bestCommonTypeOfTuple2.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -72,7 +72,11 @@ interface I extends A {
|
||||
//// [callSignatureAssignabilityInInheritance2.js]
|
||||
// checking subtype relations for function types as it relates to contextual signature instantiation
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -117,7 +117,11 @@ module Errors {
|
||||
// checking subtype relations for function types as it relates to contextual signature instantiation
|
||||
// error cases
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -52,7 +52,11 @@ interface I extends A {
|
||||
//// [callSignatureAssignabilityInInheritance4.js]
|
||||
// checking subtype relations for function types as it relates to contextual signature instantiation
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -52,7 +52,11 @@ interface I extends B {
|
||||
// checking subtype relations for function types as it relates to contextual signature instantiation
|
||||
// same as subtypingWithCallSignatures2 just with an extra level of indirection in the inheritance chain
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -55,7 +55,11 @@ interface I9<T> extends A {
|
||||
// same as subtypingWithCallSignatures4 but using class type parameters instead of generic signatures
|
||||
// all are errors
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -60,7 +60,11 @@ class D extends C {
|
||||
|
||||
//// [callWithSpread.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -10,7 +10,11 @@ class B extends A {
|
||||
|
||||
//// [captureThisInSuperCall.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -34,7 +34,11 @@ t4[2] = 10;
|
||||
|
||||
//// [castingTuple.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -24,7 +24,11 @@ a = b = new A();
|
||||
|
||||
//// [chainedAssignment3.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
+5
-1
@@ -21,7 +21,11 @@ class C extends B {
|
||||
|
||||
//// [chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -33,7 +33,11 @@ class Baz extends Object {
|
||||
|
||||
//// [checkForObjectTooStrict.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -12,7 +12,11 @@ class Derived extends Based {
|
||||
|
||||
//// [checkSuperCallBeforeThisAccessing1.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -12,7 +12,11 @@ class Derived extends Based {
|
||||
|
||||
//// [checkSuperCallBeforeThisAccessing2.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -17,7 +17,11 @@ class Derived extends Based {
|
||||
|
||||
//// [checkSuperCallBeforeThisAccessing3.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -21,7 +21,11 @@ class Derived extends Based {
|
||||
|
||||
//// [checkSuperCallBeforeThisAccessing4.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -9,7 +9,11 @@ class Derived extends Based {
|
||||
|
||||
//// [checkSuperCallBeforeThisAccessing5.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -12,7 +12,11 @@ class Super extends Base {
|
||||
|
||||
//// [checkSuperCallBeforeThisAccessing6.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -11,7 +11,11 @@ class Super extends Base {
|
||||
|
||||
//// [checkSuperCallBeforeThisAccessing7.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -12,7 +12,11 @@ class Super extends Base {
|
||||
|
||||
//// [checkSuperCallBeforeThisAccessing8.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -22,7 +22,11 @@ var c = new B.a.C();
|
||||
//// [circularImportAlias.js]
|
||||
// expected no error
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -15,7 +15,11 @@ namespace maker {
|
||||
//// [circularTypeofWithFunctionModule.js]
|
||||
// Repro from #6072
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -16,7 +16,11 @@ new CC;
|
||||
|
||||
//// [classAbstractConstructorAssignability.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -12,7 +12,11 @@ var x = new bar();
|
||||
|
||||
//// [classAbstractCrashedOnce.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -18,7 +18,11 @@ class E extends B {
|
||||
|
||||
//// [classAbstractExtends.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -19,7 +19,11 @@ NewB(B);
|
||||
|
||||
//// [classAbstractFactoryFunction.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -27,7 +27,11 @@ class G<T> extends A<T> {
|
||||
|
||||
//// [classAbstractGeneric.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -9,7 +9,11 @@ new M.B;
|
||||
|
||||
//// [classAbstractInAModule.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -23,7 +23,11 @@ abstract class GG extends CC {}
|
||||
|
||||
//// [classAbstractInheritance.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -29,7 +29,11 @@ c = new B;
|
||||
// Calling new with (non)abstract classes.
|
||||
//
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -53,7 +53,11 @@ class H { // error -- not declared abstract
|
||||
|
||||
//// [classAbstractInstantiations2.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -25,7 +25,11 @@ class DD extends BB {
|
||||
|
||||
//// [classAbstractOverrideWithAbstract.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -29,7 +29,11 @@ abstract class BB extends AA {
|
||||
|
||||
//// [classAbstractSuperCalls.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -19,7 +19,11 @@ a.foo();
|
||||
|
||||
//// [classAbstractUsingAbstractMethod1.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -29,7 +29,11 @@ class DD extends AA {
|
||||
|
||||
//// [classAbstractUsingAbstractMethods2.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -48,7 +48,11 @@ var dc = new DerivedC(1);
|
||||
|
||||
//// [classConstructorAccessibility2.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -32,7 +32,11 @@ class D {
|
||||
|
||||
//// [classConstructorAccessibility4.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -13,7 +13,11 @@ class Unrelated {
|
||||
|
||||
//// [classConstructorAccessibility5.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -28,7 +28,11 @@ class Derived extends C3 {
|
||||
|
||||
//// [classConstructorParametersAccessibility.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -28,7 +28,11 @@ class Derived extends C3 {
|
||||
|
||||
//// [classConstructorParametersAccessibility2.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -15,7 +15,11 @@ d.p; // public, OK
|
||||
|
||||
//// [classConstructorParametersAccessibility3.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -13,7 +13,11 @@ module M {
|
||||
|
||||
//// [classDeclarationMergedInModuleWithContinuation.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -9,7 +9,11 @@ function makeBaseClass() {
|
||||
|
||||
//// [classDeclaredBeforeClassFactory.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -14,7 +14,11 @@ class StringTreeCollection extends StringTreeCollectionBase { }
|
||||
|
||||
//// [classDoesNotDependOnBaseTypes.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -4,7 +4,11 @@ var v = class C extends D {};
|
||||
|
||||
//// [classExpression2.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -8,7 +8,11 @@ c.c;
|
||||
|
||||
//// [classExpression3.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
@@ -10,7 +10,11 @@ var C = class extends A { // no error reported!
|
||||
|
||||
//// [classExpressionExtendingAbstractClass.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
Object.setPrototypeOf(d, b);
|
||||
if (typeof Object.setPrototypeOf === "function") {
|
||||
Object.setPrototypeOf(d, b);
|
||||
} else {
|
||||
d.__proto__ = b;
|
||||
}
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user