Fixes helpers in strict mode

This commit is contained in:
Ron Buckton 2015-05-01 10:49:54 -07:00
parent 3bd4dd4095
commit 60ae9bd14d
558 changed files with 576 additions and 574 deletions

1
.gitignore vendored
View file

@ -46,3 +46,4 @@ scripts/*.js.map
coverage/
internal/
**/.DS_Store
.settings/

View file

@ -4,4 +4,5 @@ scripts
src
tests
Jakefile
.travis.yml
.travis.yml
.settings/

View file

@ -18,7 +18,7 @@ module ts {
export function emitFiles(resolver: EmitResolver, host: EmitHost, targetSourceFile: SourceFile): EmitResult {
// emit output for the __extends helper function
const extendsHelper = `
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;
@ -27,7 +27,7 @@ var __extends = this.__extends || function (d, b) {
// emit output for the __decorate helper function
const decorateHelper = `
if (typeof __decorate !== "function") __decorate = function (decorators, target, key, desc) {
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") return Reflect.decorate(decorators, target, key, desc);
switch (arguments.length) {
case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);
@ -38,13 +38,13 @@ if (typeof __decorate !== "function") __decorate = function (decorators, target,
// emit output for the __metadata helper function
const metadataHelper = `
if (typeof __metadata !== "function") __metadata = function (k, v) {
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};`;
// emit output for the __param helper function
const paramHelper = `
if (typeof __param !== "function") __param = function (paramIndex, decorator) {
var __param = (this && this.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};`;

View file

@ -21,7 +21,7 @@ module A {
//// [ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -25,7 +25,7 @@ module A {
//// [ExportClassWithInaccessibleTypeInTypeParameterConstraint.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -16,7 +16,7 @@ class ColoredPoint extends Point {
//// [accessOverriddenBaseClassMember1.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -25,7 +25,7 @@ class LanguageSpec_section_4_5_inference {
}
//// [accessors_spec_section-4.5_inference.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -35,7 +35,7 @@ var Model = (function () {
})();
exports.Model = Model;
//// [aliasUsage1_moduleA.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -29,7 +29,7 @@ var Model = (function () {
})();
exports.Model = Model;
//// [aliasUsageInArray_moduleA.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -28,7 +28,7 @@ var Model = (function () {
})();
exports.Model = Model;
//// [aliasUsageInFunctionExpression_moduleA.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -32,7 +32,7 @@ var Model = (function () {
})();
exports.Model = Model;
//// [aliasUsageInGenericFunction_moduleA.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -34,7 +34,7 @@ var Model = (function () {
})();
exports.Model = Model;
//// [aliasUsageInIndexerOfClass_moduleA.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -29,7 +29,7 @@ var Model = (function () {
})();
exports.Model = Model;
//// [aliasUsageInObjectLiteral_moduleA.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -32,7 +32,7 @@ var Model = (function () {
})();
exports.Model = Model;
//// [aliasUsageInOrExpression_moduleA.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -32,7 +32,7 @@ var Model = (function () {
})();
exports.Model = Model;
//// [aliasUsageInTypeArgumentOfExtendsClause_moduleA.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;
@ -48,7 +48,7 @@ var VisualizationModel = (function (_super) {
})(Backbone.Model);
exports.VisualizationModel = VisualizationModel;
//// [aliasUsageInTypeArgumentOfExtendsClause_main.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -28,7 +28,7 @@ var Model = (function () {
})();
exports.Model = Model;
//// [aliasUsageInVarAssignment_moduleA.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -9,7 +9,7 @@ var x: B;
var t: number = f(x, x); // Not an error
//// [ambiguousOverloadResolution.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -24,7 +24,7 @@ class Derived2<U extends String> extends Base2 { // error because of the prototy
//// [apparentTypeSubtyping.js]
// 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.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -14,7 +14,7 @@ class Derived<U extends String> extends Base { // error
//// [apparentTypeSupertype.js]
// 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.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -86,7 +86,7 @@ arr_any = c3; // should be an error - is
arr_any = i1; // should be an error - is
//// [arrayAssignmentTest1.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -60,7 +60,7 @@ arr_any = i1; // should be an error - is
//// [arrayAssignmentTest2.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -108,7 +108,7 @@ module NonEmptyTypes {
//// [arrayBestCommonTypes.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -52,7 +52,7 @@ var z3: { id: number }[] =
//// [arrayLiteralTypeInference.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -38,7 +38,7 @@ var context4: Base[] = [new Derived1(), new Derived1()];
//// [arrayLiterals.js]
// Empty array literal with no contextual type has type Undefined[]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -26,7 +26,7 @@ var myDerivedList: DerivedList<number>;
var as = [list, myDerivedList]; // List<number>[]
//// [arrayLiteralsWithRecursiveGenerics.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -97,7 +97,7 @@ var asserted2: any;
//// [arrowFunctionContexts.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -101,7 +101,7 @@ b18 = a18; // ok
//// [assignmentCompatWithCallSignatures3.js]
// these are all permitted with the current rules, since we do not do contextual signature instantiation
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -100,7 +100,7 @@ module Errors {
//// [assignmentCompatWithCallSignatures4.js]
// These are mostly permitted with the current loose rules. All ok unless otherwise noted.
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -67,7 +67,7 @@ b18 = a18; // ok
//// [assignmentCompatWithCallSignatures5.js]
// checking assignment compat for function types. No errors in this file
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -44,7 +44,7 @@ b16 = x.a16;
//// [assignmentCompatWithCallSignatures6.js]
// checking assignment compatibility relations for function types. All valid
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -101,7 +101,7 @@ b18 = a18; // ok
//// [assignmentCompatWithConstructSignatures3.js]
// checking assignment compatibility relations for function types. All of these are valid.
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -100,7 +100,7 @@ module Errors {
//// [assignmentCompatWithConstructSignatures4.js]
// checking assignment compatibility relations for function types.
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -67,7 +67,7 @@ b18 = a18; // ok
//// [assignmentCompatWithConstructSignatures5.js]
// checking assignment compat for function types. All valid
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -44,7 +44,7 @@ b16 = x.a16;
//// [assignmentCompatWithConstructSignatures6.js]
// checking assignment compatibility relations for function types. All valid.
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -45,7 +45,7 @@ module Generics {
//// [assignmentCompatWithNumericIndexer.js]
// Derived type indexer must be subtype of base type indexer
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -42,7 +42,7 @@ module Generics {
//// [assignmentCompatWithNumericIndexer3.js]
// Derived type indexer must be subtype of base type indexer
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -93,7 +93,7 @@ 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.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -90,7 +90,7 @@ module SourceHasOptional {
//// [assignmentCompatWithObjectMembersOptionality.js]
// Derived member is not optional but base member is, should be ok
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -92,7 +92,7 @@ module SourceHasOptional {
//// [assignmentCompatWithObjectMembersOptionality2.js]
// 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.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -55,7 +55,7 @@ module Generics {
//// [assignmentCompatWithStringIndexer.js]
// index signatures must be compatible in assignments
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -71,7 +71,7 @@ foo() = value;
(foo()) = value;
//// [assignmentLHSIsValue.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -24,7 +24,7 @@ class Point3D extends Point {
//// [autolift4.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -30,7 +30,7 @@ function f() {
//// [baseCheck.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -25,7 +25,7 @@ var z: Derived = b.foo();
*/
//// [baseIndexSignatureResolution.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -37,7 +37,7 @@ class Class4<T> extends Class3<T>
//// [baseTypeOrderChecking.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -27,7 +27,7 @@ class Wrapper<T5> {
}
//// [baseTypeWrappingInstantiationChain.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -21,7 +21,7 @@ new C().y;
//// [bases.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -29,7 +29,7 @@ function foo5<T, U>(t: T, u: U): Object {
//// [bestCommonTypeOfConditionalExpressions.js]
// 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.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -27,7 +27,7 @@ function foo3<T extends U, U extends V, V>(t: T, u: U) {
//// [bestCommonTypeOfConditionalExpressions2.js]
// 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.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -23,7 +23,7 @@ var e51 = t5[2]; // {}
//// [bestCommonTypeOfTuple2.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -71,7 +71,7 @@ interface I extends A {
//// [callSignatureAssignabilityInInheritance2.js]
// checking subtype relations for function types as it relates to contextual signature instantiation
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -116,7 +116,7 @@ module Errors {
//// [callSignatureAssignabilityInInheritance3.js]
// checking subtype relations for function types as it relates to contextual signature instantiation
// error cases
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -51,7 +51,7 @@ interface I extends A {
//// [callSignatureAssignabilityInInheritance4.js]
// checking subtype relations for function types as it relates to contextual signature instantiation
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -51,7 +51,7 @@ interface I extends B {
//// [callSignatureAssignabilityInInheritance5.js]
// 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.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -54,7 +54,7 @@ interface I9<T> extends A {
// checking subtype relations for function types as it relates to contextual signature instantiation
// same as subtypingWithCallSignatures4 but using class type parameters instead of generic signatures
// all are errors
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -54,7 +54,7 @@ var c = new C(1, 2, ...a);
//// [callWithSpread.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -9,7 +9,7 @@ class B extends A {
}
//// [captureThisInSuperCall.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -33,7 +33,7 @@ t4[2] = 10;
//// [castingTuple.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -23,7 +23,7 @@ a = b = new A();
//// [chainedAssignment3.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -20,7 +20,7 @@ class C extends B {
(new Chain(new A)).then(a => new B).then(b => new C).then(c => new B).then(b => new A);
//// [chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -32,7 +32,7 @@ class Baz extends Object {
//// [checkForObjectTooStrict.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -21,7 +21,7 @@ var c = new B.a.C();
//// [circularImportAlias.js]
// expected no error
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -27,7 +27,7 @@ class Derived extends C3 {
//// [classConstructorParametersAccessibility.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -27,7 +27,7 @@ class Derived extends C3 {
//// [classConstructorParametersAccessibility2.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -14,7 +14,7 @@ var d: Derived;
d.p; // public, OK
//// [classConstructorParametersAccessibility3.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -12,7 +12,7 @@ module M {
}
//// [classDeclarationMergedInModuleWithContinuation.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -13,7 +13,7 @@ class StringTreeCollectionBase {
class StringTreeCollection extends StringTreeCollectionBase { }
//// [classDoesNotDependOnBaseTypes.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -2,7 +2,7 @@
var v = @decorate class C { static p = 1 };
//// [classExpressionWithDecorator1.js]
if (typeof __decorate !== "function") __decorate = function (decorators, target, key, desc) {
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") return Reflect.decorate(decorators, target, key, desc);
switch (arguments.length) {
case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);

View file

@ -32,7 +32,7 @@ var r7 = d2.thing('');
var r8 = D2.other(1);
//// [classExtendingClass.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -16,7 +16,7 @@ class C8 extends E { }
//// [classExtendingPrimitive.js]
// classes cannot extend primitives
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -6,7 +6,7 @@ class C5a extends null { }
//// [classExtendingPrimitive2.js]
// classes cannot extend primitives
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -8,7 +8,7 @@ module M {
}
//// [classExtendingQualifiedName.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -8,7 +8,7 @@ module M {
}
//// [classExtendingQualifiedName2.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -14,7 +14,7 @@ module Foo {
}
//// [classExtendsClauseClassMergedWithModuleNotReferingConstructor.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -7,7 +7,7 @@ module Foo {
//// [classExtendsClauseClassNotReferringConstructor.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -17,7 +17,7 @@ class C5 extends foo { } // error
class C6 extends []{ } // error
//// [classExtendsEveryObjectType.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -4,7 +4,7 @@ class C2 extends { foo: string; } { } // error
class C6 extends []{ } // error
//// [classExtendsEveryObjectType2.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -9,7 +9,7 @@ class B2<T> implements Comparable2<T> {}
//// [classExtendsInterface.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -6,7 +6,7 @@ class D<T> extends D<T> { } // error
class E<T> extends E<string> { } // error
//// [classExtendsItself.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -12,7 +12,7 @@ class D2<T> extends C2<T> { bar: T; }
class E2<T> extends D2<T> { baz: T; }
//// [classExtendsItselfIndirectly.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -23,7 +23,7 @@ module O {
}
//// [classExtendsItselfIndirectly2.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -19,7 +19,7 @@ class D2<T> extends C2<T> { bar: T; }
class E2<T> extends D2<T> { baz: T; }
//// [classExtendsItselfIndirectly_file1.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;
@ -33,7 +33,7 @@ var C = (function (_super) {
return C;
})(E); // error
//// [classExtendsItselfIndirectly_file2.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;
@ -47,7 +47,7 @@ var D = (function (_super) {
return D;
})(C);
//// [classExtendsItselfIndirectly_file3.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;
@ -61,7 +61,7 @@ var E = (function (_super) {
return E;
})(D);
//// [classExtendsItselfIndirectly_file4.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;
@ -75,7 +75,7 @@ var C2 = (function (_super) {
return C2;
})(E2); // error
//// [classExtendsItselfIndirectly_file5.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;
@ -89,7 +89,7 @@ var D2 = (function (_super) {
return D2;
})(C2);
//// [classExtendsItselfIndirectly_file6.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -4,7 +4,7 @@ class B { }
class C extends A,B { }
//// [classExtendsMultipleBaseClasses.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -9,7 +9,7 @@ module M {
}
//// [classExtendsShadowedConstructorFunction.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -6,7 +6,7 @@ var x = new foo(); // can be used as a constructor function
class C extends foo { } // error, cannot extend it though
//// [classExtendsValidConstructorFunction.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -4,7 +4,7 @@ class D extends C, {
}
//// [classHeritageWithTrailingSeparator.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -14,7 +14,7 @@ c = c2;
c2 = c;
//// [classImplementsClass2.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -15,7 +15,7 @@ c = c2;
c2 = c;
//// [classImplementsClass3.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -17,7 +17,7 @@ c = c2;
c2 = c;
//// [classImplementsClass4.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -18,7 +18,7 @@ c = c2;
c2 = c;
//// [classImplementsClass5.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -22,7 +22,7 @@ c.bar(); // error
c2.bar(); // should error
//// [classImplementsClass6.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -11,7 +11,7 @@ class D123 extends C123 {
}
//// [classIndexer3.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -3,7 +3,7 @@ class B extends A { }
class A extends A { }
//// [classInheritence.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -16,7 +16,7 @@ class Derived2 extends Base<{ bar: string; }> {
}
//// [classIsSubtypeOfBaseType.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -20,7 +20,7 @@ a.foo();
//// [classOrder2.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -16,7 +16,7 @@ class foo extends baz {}
//// [classOrderBug.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -16,7 +16,7 @@ A.bar(); // valid
C2.bar(); // valid
//// [classSideInheritance1.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -21,7 +21,7 @@ class TextBase implements IText {
}
//// [classSideInheritance2.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -19,7 +19,7 @@ var r2: new (x: string) => A = B; // error
var r3: typeof A = C; // ok
//// [classSideInheritance3.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

View file

@ -114,7 +114,7 @@ class R {
}
//// [classUpdateTests.js]
var __extends = this.__extends || function (d, b) {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;

Some files were not shown because too many files have changed in this diff Show more