From 42a5f815704e7bd0ccec6e512c369054024b7639 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Burzy=C5=84ski?= Date: Sat, 19 May 2018 10:47:16 +0200 Subject: [PATCH 1/2] Use redefining helper pattern for better tree-shakeability --- src/compiler/transformers/es2015.ts | 10 +++++++--- src/compiler/transformers/esnext.ts | 17 ++++++++++------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/src/compiler/transformers/es2015.ts b/src/compiler/transformers/es2015.ts index b05cabcd85ab5..7cfd4fdc66423 100644 --- a/src/compiler/transformers/es2015.ts +++ b/src/compiler/transformers/es2015.ts @@ -4072,9 +4072,13 @@ namespace ts { priority: 0, text: ` var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + function extendStatics(d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } + return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/src/compiler/transformers/esnext.ts b/src/compiler/transformers/esnext.ts index 494531399471f..cf1c6c447bee9 100644 --- a/src/compiler/transformers/esnext.ts +++ b/src/compiler/transformers/esnext.ts @@ -890,13 +890,16 @@ namespace ts { scoped: false, priority: 1, text: ` - var __assign = (this && this.__assign) || Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; + var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); };` }; From 3af425b87d60d5f7ba2865d4b5feb3cbf1554cda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Burzy=C5=84ski?= Date: Fri, 1 Jun 2018 00:08:54 +0200 Subject: [PATCH 2/2] Update baseline tests --- src/compiler/transformers/es2015.ts | 2 +- ...sClassHeritageListMemberTypeAnnotations.js | 9 +- ...accessibleTypeInTypeParameterConstraint.js | 9 +- .../reference/abstractClassInLocalScope.js | 9 +- .../abstractClassInLocalScopeIsAbstract.js | 9 +- tests/baselines/reference/abstractProperty.js | 9 +- .../reference/abstractPropertyNegative.js | 9 +- .../accessOverriddenBaseClassMember1.js | 9 +- .../accessors_spec_section-4.5_inference.js | 9 +- .../reference/aliasUsageInAccessorsOfClass.js | 9 +- .../baselines/reference/aliasUsageInArray.js | 9 +- .../aliasUsageInFunctionExpression.js | 9 +- .../reference/aliasUsageInGenericFunction.js | 9 +- .../reference/aliasUsageInIndexerOfClass.js | 9 +- .../reference/aliasUsageInObjectLiteral.js | 9 +- .../reference/aliasUsageInOrExpression.js | 9 +- ...aliasUsageInTypeArgumentOfExtendsClause.js | 18 +- .../reference/aliasUsageInVarAssignment.js | 9 +- .../reference/ambiguousOverloadResolution.js | 9 +- .../amdDeclarationEmitNoExtraDeclare.js | 9 +- ...ClassDeclarationDoesntPrintWithReadonly.js | 9 +- .../reference/apparentTypeSubtyping.js | 9 +- .../reference/apparentTypeSupertype.js | 9 +- .../reference/arrayAssignmentTest1.js | 9 +- .../reference/arrayAssignmentTest2.js | 9 +- .../reference/arrayBestCommonTypes.js | 9 +- .../reference/arrayLiteralTypeInference.js | 9 +- tests/baselines/reference/arrayLiterals.js | 9 +- .../arrayLiteralsWithRecursiveGenerics.js | 9 +- ...rayOfSubtypeIsAssignableToReadonlyArray.js | 9 +- .../reference/arrowFunctionContexts.js | 9 +- .../assignmentCompatWithCallSignatures3.js | 9 +- .../assignmentCompatWithCallSignatures4.js | 9 +- .../assignmentCompatWithCallSignatures5.js | 9 +- .../assignmentCompatWithCallSignatures6.js | 9 +- ...ssignmentCompatWithConstructSignatures3.js | 9 +- ...ssignmentCompatWithConstructSignatures4.js | 9 +- ...ssignmentCompatWithConstructSignatures5.js | 9 +- ...ssignmentCompatWithConstructSignatures6.js | 9 +- .../assignmentCompatWithNumericIndexer.js | 9 +- .../assignmentCompatWithNumericIndexer3.js | 9 +- .../assignmentCompatWithObjectMembers4.js | 9 +- ...nmentCompatWithObjectMembersOptionality.js | 9 +- ...mentCompatWithObjectMembersOptionality2.js | 9 +- .../assignmentCompatWithStringIndexer.js | 9 +- .../reference/assignmentLHSIsValue.js | 9 +- .../reference/asyncImportedPromise_es5.js | 9 +- tests/baselines/reference/autolift4.js | 9 +- tests/baselines/reference/baseCheck.js | 9 +- .../baseClassImprovedMismatchErrors.js | 9 +- .../reference/baseConstraintOfDecorator.js | 9 +- .../reference/baseExpressionTypeParameters.js | 9 +- .../reference/baseIndexSignatureResolution.js | 9 +- .../reference/baseTypeOrderChecking.js | 9 +- .../baseTypeWrappingInstantiationChain.js | 9 +- tests/baselines/reference/bases.js | 9 +- .../bestCommonTypeOfConditionalExpressions.js | 9 +- ...bestCommonTypeOfConditionalExpressions2.js | 9 +- .../reference/bestCommonTypeOfTuple2.js | 9 +- ...allSignatureAssignabilityInInheritance2.js | 9 +- ...allSignatureAssignabilityInInheritance3.js | 9 +- ...allSignatureAssignabilityInInheritance4.js | 9 +- ...allSignatureAssignabilityInInheritance5.js | 9 +- ...allSignatureAssignabilityInInheritance6.js | 9 +- tests/baselines/reference/callWithSpread.js | 9 +- ...captureSuperPropertyAccessInSuperCall01.js | 9 +- .../reference/captureThisInSuperCall.js | 9 +- tests/baselines/reference/castingTuple.js | 9 +- .../baselines/reference/chainedAssignment3.js | 9 +- ...arameterConstrainedToOtherTypeParameter.js | 9 +- .../reference/checkForObjectTooStrict.js | 9 +- .../reference/checkJsxChildrenProperty12.js | 9 +- .../reference/checkJsxChildrenProperty13.js | 9 +- .../reference/checkJsxChildrenProperty14.js | 9 +- .../reference/checkJsxChildrenProperty3.js | 9 +- .../reference/checkJsxChildrenProperty4.js | 9 +- .../reference/checkJsxChildrenProperty5.js | 9 +- .../reference/checkJsxChildrenProperty6.js | 9 +- .../reference/checkJsxChildrenProperty7.js | 9 +- .../reference/checkJsxChildrenProperty8.js | 9 +- .../checkSuperCallBeforeThisAccessing1.js | 9 +- .../checkSuperCallBeforeThisAccessing2.js | 9 +- .../checkSuperCallBeforeThisAccessing3.js | 9 +- .../checkSuperCallBeforeThisAccessing4.js | 9 +- .../checkSuperCallBeforeThisAccessing5.js | 9 +- .../checkSuperCallBeforeThisAccessing6.js | 9 +- .../checkSuperCallBeforeThisAccessing7.js | 9 +- .../checkSuperCallBeforeThisAccessing8.js | 9 +- ...ircularConstraintYieldsAppropriateError.js | 9 +- .../reference/circularImportAlias.js | 9 +- .../circularTypeofWithFunctionModule.js | 9 +- .../classAbstractConstructorAssignability.js | 9 +- .../reference/classAbstractCrashedOnce.js | 9 +- .../reference/classAbstractExtends.js | 9 +- .../reference/classAbstractFactoryFunction.js | 9 +- .../reference/classAbstractGeneric.js | 9 +- .../reference/classAbstractInAModule.js | 9 +- .../reference/classAbstractInheritance.js | 9 +- .../reference/classAbstractInstantiations1.js | 9 +- .../reference/classAbstractInstantiations2.js | 9 +- .../classAbstractOverrideWithAbstract.js | 9 +- .../reference/classAbstractSuperCalls.js | 9 +- .../classAbstractUsingAbstractMethod1.js | 9 +- .../classAbstractUsingAbstractMethods2.js | 9 +- .../classConstructorAccessibility2.js | 9 +- .../classConstructorAccessibility4.js | 9 +- .../classConstructorAccessibility5.js | 9 +- ...classConstructorParametersAccessibility.js | 9 +- ...lassConstructorParametersAccessibility2.js | 9 +- ...lassConstructorParametersAccessibility3.js | 9 +- ...clarationMergedInModuleWithContinuation.js | 9 +- .../classDeclaredBeforeClassFactory.js | 9 +- .../classDoesNotDependOnBaseTypes.js | 9 +- tests/baselines/reference/classExpression2.js | 9 +- tests/baselines/reference/classExpression3.js | 9 +- .../classExpressionExtendingAbstractClass.js | 9 +- ...lassExpressionInClassStaticDeclarations.js | 9 +- .../reference/classExtendingBuiltinType.js | 9 +- .../reference/classExtendingClass.js | 9 +- .../reference/classExtendingClassLikeType.js | 9 +- .../reference/classExtendingNonConstructor.js | 9 +- .../baselines/reference/classExtendingNull.js | 9 +- .../reference/classExtendingPrimitive.js | 9 +- .../reference/classExtendingPrimitive2.js | 9 +- .../reference/classExtendingQualifiedName.js | 9 +- .../reference/classExtendingQualifiedName2.js | 9 +- .../reference/classExtendsAcrossFiles.js | 18 +- ...sMergedWithModuleNotReferingConstructor.js | 9 +- ...tendsClauseClassNotReferringConstructor.js | 9 +- .../reference/classExtendsEveryObjectType.js | 9 +- .../reference/classExtendsEveryObjectType2.js | 9 +- .../reference/classExtendsInterface.js | 9 +- .../classExtendsInterfaceInExpression.js | 9 +- .../classExtendsInterfaceInModule.js | 9 +- .../reference/classExtendsInterface_not.js | 9 +- .../baselines/reference/classExtendsItself.js | 9 +- .../reference/classExtendsItselfIndirectly.js | 9 +- .../classExtendsItselfIndirectly2.js | 9 +- .../classExtendsItselfIndirectly3.js | 54 +- .../classExtendsMultipleBaseClasses.js | 9 +- tests/baselines/reference/classExtendsNull.js | 9 +- ...classExtendsShadowedConstructorFunction.js | 9 +- .../classExtendsValidConstructorFunction.js | 9 +- .../reference/classExtensionNameOutput.js | 9 +- .../classHeritageWithTrailingSeparator.js | 9 +- .../reference/classImplementsClass2.js | 9 +- .../reference/classImplementsClass3.js | 9 +- .../reference/classImplementsClass4.js | 9 +- .../reference/classImplementsClass5.js | 9 +- .../reference/classImplementsClass6.js | 9 +- tests/baselines/reference/classIndexer3.js | 9 +- tests/baselines/reference/classInheritence.js | 9 +- .../reference/classIsSubtypeOfBaseType.js | 9 +- ...MergedWithInterfaceMultipleBasesNoError.js | 9 +- tests/baselines/reference/classOrder2.js | 9 +- tests/baselines/reference/classOrderBug.js | 9 +- .../reference/classSideInheritance1.js | 9 +- .../reference/classSideInheritance2.js | 9 +- .../reference/classSideInheritance3.js | 9 +- tests/baselines/reference/classUpdateTests.js | 9 +- .../classWithBaseClassButNoConstructor.js | 9 +- .../reference/classWithConstructors.js | 9 +- .../reference/classWithProtectedProperty.js | 9 +- .../reference/classWithStaticMembers.js | 9 +- tests/baselines/reference/classdecl.js | 9 +- .../reference/cloduleGenericOnSelfMember.js | 9 +- .../reference/clodulesDerivedClasses.js | 9 +- ...llisionSuperAndLocalFunctionInAccessors.js | 9 +- ...isionSuperAndLocalFunctionInConstructor.js | 9 +- .../collisionSuperAndLocalFunctionInMethod.js | 9 +- ...ollisionSuperAndLocalFunctionInProperty.js | 9 +- .../collisionSuperAndLocalVarInAccessors.js | 9 +- .../collisionSuperAndLocalVarInConstructor.js | 9 +- .../collisionSuperAndLocalVarInMethod.js | 9 +- .../collisionSuperAndLocalVarInProperty.js | 9 +- .../collisionSuperAndNameResolution.js | 9 +- .../reference/collisionSuperAndParameter.js | 9 +- .../reference/collisionSuperAndParameter1.js | 9 +- ...perAndPropertyNameAsConstuctorParameter.js | 9 +- ...xpressionAndLocalVarWithSuperExperssion.js | 9 +- .../reference/commentsInheritance.js | 9 +- .../comparisonOperatorWithIdenticalObjects.js | 9 +- ...ithNoRelationshipObjectsOnCallSignature.js | 9 +- ...lationshipObjectsOnConstructorSignature.js | 9 +- ...thNoRelationshipObjectsOnIndexSignature.js | 9 +- ...nshipObjectsOnInstantiatedCallSignature.js | 9 +- ...jectsOnInstantiatedConstructorSignature.js | 9 +- ...peratorWithSubtypeObjectOnCallSignature.js | 9 +- ...WithSubtypeObjectOnConstructorSignature.js | 9 +- ...eratorWithSubtypeObjectOnIndexSignature.js | 9 +- ...ubtypeObjectOnInstantiatedCallSignature.js | 9 +- ...bjectOnInstantiatedConstructorSignature.js | 9 +- ...isonOperatorWithSubtypeObjectOnProperty.js | 9 +- .../reference/complexClassRelationships.js | 9 +- ...catedGenericRecursiveBaseClassReference.js | 9 +- .../reference/compoundAssignmentLHSIsValue.js | 9 +- ...poundExponentiationAssignmentLHSIsValue.js | 9 +- .../reference/computedPropertyNames24_ES5.js | 9 +- .../reference/computedPropertyNames25_ES5.js | 9 +- .../reference/computedPropertyNames26_ES5.js | 9 +- .../reference/computedPropertyNames27_ES5.js | 9 +- .../reference/computedPropertyNames28_ES5.js | 9 +- .../reference/computedPropertyNames30_ES5.js | 9 +- .../reference/computedPropertyNames31_ES5.js | 9 +- .../reference/computedPropertyNames43_ES5.js | 9 +- .../reference/computedPropertyNames44_ES5.js | 9 +- .../reference/computedPropertyNames45_ES5.js | 9 +- .../conditionalOperatorWithIdenticalBCT.js | 9 +- .../conditionalOperatorWithoutIdenticalBCT.js | 9 +- .../reference/constantOverloadFunction.js | 9 +- .../constantOverloadFunctionNoSubtypeError.js | 9 +- ...nstraintCheckInGenericBaseTypeReference.js | 9 +- ...uctSignatureAssignabilityInInheritance2.js | 9 +- ...uctSignatureAssignabilityInInheritance3.js | 9 +- ...uctSignatureAssignabilityInInheritance4.js | 9 +- ...uctSignatureAssignabilityInInheritance5.js | 9 +- ...uctSignatureAssignabilityInInheritance6.js | 9 +- tests/baselines/reference/constructorArgs.js | 9 +- ...uctorFunctionTypeIsAssignableToBaseType.js | 9 +- ...ctorFunctionTypeIsAssignableToBaseType2.js | 9 +- .../constructorHasPrototypeProperty.js | 9 +- .../reference/constructorOverloads2.js | 9 +- .../reference/constructorOverloads3.js | 9 +- .../reference/constructorWithCapturedSuper.js | 9 +- ...constructorWithIncompleteTypeAnnotation.js | 9 +- .../contextualTypeObjectSpreadExpression.js | 17 +- .../contextualTypingArrayOfLambdas.js | 9 +- ...contextualTypingOfConditionalExpression.js | 9 +- ...ontextualTypingOfConditionalExpression2.js | 9 +- .../controlFlowSuperPropertyAccess.js | 9 +- ...urcePropertyIsRelatableToTargetProperty.js | 9 +- .../reference/declFileClassExtendsNull.js | 9 +- .../declFileForFunctionTypeAsTypeParameter.js | 9 +- ...ileGenericClassWithGenericExtendedClass.js | 9 +- .../reference/declFileGenericType.js | 9 +- .../reference/declFileGenericType2.js | 9 +- ...lictingWithClassReferredByExtendsClause.js | 9 +- ...dsClauseThatHasItsContainerNameConflict.js | 9 +- .../declarationEmitExpressionInExtends.js | 9 +- .../declarationEmitExpressionInExtends2.js | 9 +- .../declarationEmitExpressionInExtends3.js | 9 +- .../declarationEmitExpressionInExtends4.js | 9 +- .../declarationEmitExpressionInExtends5.js | 9 +- ...clarationEmitLocalClassDeclarationMixin.js | 9 +- .../declarationEmitNameConflicts3.js | 9 +- .../declarationEmitPrivateNameCausesError.js | 9 +- ...tPrivateSymbolCausesVarDeclarationEmit2.js | 9 +- .../declarationEmitProtectedMembers.js | 9 +- .../declarationEmitThisPredicates01.js | 9 +- ...tionEmitThisPredicatesWithPrivateName01.js | 9 +- .../declarationNoDanglingGenerics.js | 9 +- .../reference/declareDottedExtend.js | 9 +- .../baselines/reference/decoratorOnClass9.js | 9 +- .../reference/decoratorOnClassConstructor2.js | 9 +- .../reference/decoratorOnClassConstructor3.js | 9 +- .../reference/decoratorOnClassConstructor4.js | 9 +- .../reference/decoratorOnClassMethod12.js | 9 +- .../defaultPropsEmptyCurlyBecomesAnyForJs.js | 18 +- ...edClassConstructorWithExplicitReturns01.js | 9 +- ...assConstructorWithExplicitReturns01.js.map | 2 +- ...tructorWithExplicitReturns01.sourcemap.txt | 245 +++--- ...derivedClassConstructorWithoutSuperCall.js | 9 +- ...ClassFunctionOverridesBaseClassAccessor.js | 9 +- .../derivedClassIncludesInheritedMembers.js | 9 +- ...idesIndexersWithAssignmentCompatibility.js | 9 +- .../derivedClassOverridesPrivateFunction1.js | 9 +- .../derivedClassOverridesPrivates.js | 9 +- .../derivedClassOverridesProtectedMembers.js | 9 +- .../derivedClassOverridesProtectedMembers2.js | 9 +- .../derivedClassOverridesProtectedMembers3.js | 9 +- .../derivedClassOverridesProtectedMembers4.js | 9 +- .../derivedClassOverridesPublicMembers.js | 9 +- .../derivedClassOverridesWithoutSubtype.js | 9 +- .../derivedClassParameterProperties.js | 9 +- ...dClassSuperCallsInNonConstructorMembers.js | 9 +- .../derivedClassSuperCallsWithThisArg.js | 9 +- .../reference/derivedClassTransitivity.js | 9 +- .../reference/derivedClassTransitivity2.js | 9 +- .../reference/derivedClassTransitivity3.js | 9 +- .../reference/derivedClassTransitivity4.js | 9 +- .../reference/derivedClassWithAny.js | 9 +- ...ivateInstanceShadowingProtectedInstance.js | 9 +- ...hPrivateInstanceShadowingPublicInstance.js | 9 +- ...thPrivateStaticShadowingProtectedStatic.js | 9 +- ...sWithPrivateStaticShadowingPublicStatic.js | 9 +- .../derivedClassWithoutExplicitConstructor.js | 9 +- ...derivedClassWithoutExplicitConstructor2.js | 9 +- ...derivedClassWithoutExplicitConstructor3.js | 9 +- tests/baselines/reference/derivedClasses.js | 9 +- .../reference/derivedGenericClassWithAny.js | 9 +- ...sesHiddenBaseCallViaSuperPropertyAccess.js | 9 +- .../derivedTypeDoesNotRequireExtendsClause.js | 9 +- .../destructuringParameterDeclaration5.js | 9 +- ...oubleMixinConditionalTypeBaseClassWorks.js | 9 +- .../emitBundleWithPrologueDirectives1.js | 9 +- .../reference/emitBundleWithShebang1.js | 9 +- .../reference/emitBundleWithShebang2.js | 9 +- ...BundleWithShebangAndPrologueDirectives1.js | 9 +- ...BundleWithShebangAndPrologueDirectives2.js | 9 +- ...tionWithPropertyAccessInHeritageClause1.js | 9 +- .../emitClassExpressionInDeclarationFile.js | 9 +- .../emitClassExpressionInDeclarationFile2.js | 9 +- ...BeforeEmitParameterPropertyDeclaration1.js | 9 +- ...SuperCallBeforeEmitPropertyDeclaration1.js | 9 +- ...arationAndParameterPropertyDeclaration1.js | 9 +- .../reference/emitThisInSuperMethodCall.js | 9 +- ...mitter.asyncGenerators.classMethods.es5.js | 9 +- tests/baselines/reference/emptyModuleName.js | 9 +- ...rorForwardReferenceForwadingConstructor.js | 9 +- tests/baselines/reference/errorSuperCalls.js | 9 +- .../reference/errorSuperPropertyAccess.js | 9 +- .../reference/errorsInGenericTypeReference.js | 9 +- .../reference/es6ClassSuperCodegenBug.js | 9 +- tests/baselines/reference/es6ClassTest.js | 9 +- tests/baselines/reference/es6ClassTest2.js | 9 +- tests/baselines/reference/es6ClassTest7.js | 9 +- .../excessPropertyCheckWithSpread.js | 17 +- .../excessPropertyCheckWithUnions.js | 17 +- ...xplicitAnyAfterSpreadNoImplicitAnyError.js | 17 +- .../exportAssignmentOfGenericType1.js | 9 +- .../exportClassExtendingIntersection.js | 18 +- .../exportDeclarationInInternalModule.js | 9 +- .../reference/exportDefaultAbstractClass.js | 18 +- tests/baselines/reference/extBaseClass1.js | 9 +- tests/baselines/reference/extBaseClass2.js | 9 +- .../extendAndImplementTheSameBaseType.js | 9 +- .../extendAndImplementTheSameBaseType2.js | 9 +- .../extendBaseClassBeforeItsDeclared.js | 9 +- .../extendClassExpressionFromModule.js | 9 +- .../extendConstructSignatureInInterface.js | 9 +- tests/baselines/reference/extendFromAny.js | 9 +- .../reference/extendNonClassSymbol1.js | 9 +- .../reference/extendNonClassSymbol2.js | 9 +- .../extendPrivateConstructorClass.js | 9 +- ...xtendingClassFromAliasAndUsageInIndexer.js | 18 +- .../reference/extendsClauseAlreadySeen.js | 9 +- .../reference/extendsClauseAlreadySeen2.js | 9 +- .../reference/extendsUntypedModule.js | 9 +- tests/baselines/reference/fluentClasses.js | 9 +- tests/baselines/reference/for-inStatements.js | 9 +- .../reference/for-inStatementsInvalid.js | 9 +- .../forStatementsMultipleInvalidDecl.js | 9 +- .../reference/functionImplementationErrors.js | 9 +- .../reference/functionImplementations.js | 9 +- .../reference/functionSubtypingOfVarArgs.js | 9 +- .../reference/functionSubtypingOfVarArgs2.js | 9 +- .../reference/generatedContextualTyping.js | 9 +- .../genericBaseClassLiteralProperty.js | 9 +- .../genericBaseClassLiteralProperty2.js | 9 +- ...allWithConstraintsTypeArgumentInference.js | 9 +- .../genericCallWithObjectTypeArgs2.js | 9 +- ...icCallWithObjectTypeArgsAndConstraints2.js | 9 +- ...icCallWithObjectTypeArgsAndConstraints3.js | 9 +- .../genericCallbacksAndClassHierarchy.js | 9 +- .../genericClassExpressionInFunction.js | 9 +- ...sInheritsConstructorFromNonGenericClass.js | 9 +- ...cClassPropertyInheritanceSpecialization.js | 9 +- .../reference/genericClassStaticMethod.js | 9 +- tests/baselines/reference/genericClasses3.js | 9 +- ...genericConstraintOnExtendedBuiltinTypes.js | 9 +- ...enericConstraintOnExtendedBuiltinTypes2.js | 9 +- .../genericDerivedTypeWithSpecializedBase.js | 9 +- .../genericDerivedTypeWithSpecializedBase2.js | 9 +- .../genericInheritedDefaultConstructors.js | 9 +- .../reference/genericPrototypeProperty2.js | 9 +- .../reference/genericPrototypeProperty3.js | 9 +- ...ericRecursiveImplicitConstructorErrors2.js | 9 +- ...ericRecursiveImplicitConstructorErrors3.js | 9 +- .../reference/genericTypeAssertions2.js | 9 +- .../reference/genericTypeAssertions4.js | 9 +- .../reference/genericTypeAssertions6.js | 9 +- .../reference/genericTypeConstraints.js | 9 +- ...genericTypeReferenceWithoutTypeArgument.js | 9 +- ...enericTypeReferenceWithoutTypeArgument2.js | 9 +- .../genericWithIndexerOfTypeParameterType2.js | 9 +- .../reference/heterogeneousArrayLiterals.js | 9 +- .../reference/ifDoWhileStatements.js | 9 +- .../illegalSuperCallsInConstructor.js | 9 +- .../implementClausePrecedingExtends.js | 9 +- ...gAnInterfaceExtendingClassWithPrivates2.js | 9 +- ...AnInterfaceExtendingClassWithProtecteds.js | 9 +- .../baselines/reference/importAsBaseClass.js | 9 +- tests/baselines/reference/importHelpers.js | 9 +- .../baselines/reference/importHelpersInTsx.js | 17 +- .../reference/importHelpersNoHelpers.js | 9 +- .../reference/importHelpersNoModule.js | 9 +- .../reference/importNotElidedWhenNotFound.js | 9 +- .../reference/importShadowsGlobalName.js | 9 +- .../reference/importUsedInExtendsList1.js | 9 +- .../reference/indexedAccessRelation.js | 9 +- .../reference/indexedAccessTypeConstraints.js | 9 +- .../reference/indexerConstraints2.js | 9 +- .../reference/indirectSelfReference.js | 9 +- .../reference/indirectSelfReferenceGeneric.js | 9 +- .../infinitelyExpandingTypesNonGenericBase.js | 9 +- .../inheritFromGenericTypeParameter.js | 9 +- ...SameNamePrivatePropertiesFromSameOrigin.js | 9 +- tests/baselines/reference/inheritance.js | 9 +- tests/baselines/reference/inheritance1.js | 9 +- ...itanceGrandParentPrivateMemberCollision.js | 9 +- ...tPrivateMemberCollisionWithPublicMember.js | 9 +- ...tPublicMemberCollisionWithPrivateMember.js | 9 +- ...ritanceMemberAccessorOverridingAccessor.js | 9 +- ...heritanceMemberAccessorOverridingMethod.js | 9 +- ...ritanceMemberAccessorOverridingProperty.js | 9 +- ...inheritanceMemberFuncOverridingAccessor.js | 9 +- .../inheritanceMemberFuncOverridingMethod.js | 9 +- ...inheritanceMemberFuncOverridingProperty.js | 9 +- ...ritanceMemberPropertyOverridingAccessor.js | 9 +- ...heritanceMemberPropertyOverridingMethod.js | 9 +- ...ritanceMemberPropertyOverridingProperty.js | 9 +- .../inheritanceOfGenericConstructorMethod1.js | 9 +- .../inheritanceOfGenericConstructorMethod2.js | 9 +- ...ritanceStaticAccessorOverridingAccessor.js | 9 +- ...heritanceStaticAccessorOverridingMethod.js | 9 +- ...ritanceStaticAccessorOverridingProperty.js | 9 +- ...inheritanceStaticFuncOverridingAccessor.js | 9 +- ...eStaticFuncOverridingAccessorOfFuncType.js | 9 +- .../inheritanceStaticFuncOverridingMethod.js | 9 +- ...inheritanceStaticFuncOverridingProperty.js | 9 +- ...eStaticFuncOverridingPropertyOfFuncType.js | 9 +- ...taticFunctionOverridingInstanceProperty.js | 9 +- .../inheritanceStaticMembersCompatible.js | 9 +- .../inheritanceStaticMembersIncompatible.js | 9 +- ...ritanceStaticPropertyOverridingAccessor.js | 9 +- ...heritanceStaticPropertyOverridingMethod.js | 9 +- ...ritanceStaticPropertyOverridingProperty.js | 9 +- .../inheritedConstructorWithRestParams.js | 9 +- .../inheritedConstructorWithRestParams2.js | 9 +- .../inheritedModuleMembersForClodule.js | 9 +- .../reference/instanceOfAssignability.js | 9 +- ...nstancePropertiesInheritedIntoClassType.js | 9 +- .../reference/instanceSubtypeCheck2.js | 9 +- ...nstanceofWithStructurallyIdenticalTypes.js | 9 +- .../instantiatedReturnTypeContravariance.js | 9 +- .../reference/interfaceClassMerging.js | 9 +- .../reference/interfaceClassMerging2.js | 9 +- .../reference/interfaceExtendsClass1.js | 9 +- .../interfaceExtendsClassWithPrivate1.js | 9 +- .../interfaceExtendsClassWithPrivate2.js | 9 +- .../interfaceExtendsObjectIntersection.js | 9 +- ...nterfaceExtendsObjectIntersectionErrors.js | 9 +- .../reference/interfaceImplementation8.js | 9 +- .../invalidModuleWithStatementsOfEveryKind.js | 9 +- .../invalidMultipleVariableDeclarations.js | 9 +- .../reference/invalidReturnStatements.js | 9 +- .../isolatedModulesImportExportElision.js | 9 +- ...NoImplicitAnyNoCascadingReferenceErrors.js | 9 +- tests/baselines/reference/jsdocTypeTagCast.js | 9 +- .../reference/jsxCallbackWithDestructuring.js | 9 +- .../baselines/reference/jsxHasLiteralType.js | 9 +- .../baselines/reference/jsxInExtendsClause.js | 9 +- .../reference/jsxSpreadFirstUnionNoErrors.js | 17 +- tests/baselines/reference/jsxViaImport.2.js | 9 +- tests/baselines/reference/jsxViaImport.js | 9 +- .../reference/keyofAndIndexedAccess.js | 9 +- tests/baselines/reference/lambdaArgCrash.js | 9 +- tests/baselines/reference/lift.js | 9 +- tests/baselines/reference/localTypes1.js | 9 +- tests/baselines/reference/m7Bugs.js | 9 +- .../reference/mappedTypePartialConstraints.js | 9 +- .../reference/mergedDeclarations5.js | 9 +- .../reference/mergedDeclarations6.js | 9 +- .../mergedInheritedClassInterface.js | 9 +- .../mergedInterfacesWithInheritedPrivates2.js | 9 +- .../mergedInterfacesWithInheritedPrivates3.js | 9 +- .../missingPropertiesOfClassExpression.js | 9 +- .../reference/mixinAccessModifiers.js | 9 +- .../reference/mixinClassesAnnotated.js | 9 +- .../reference/mixinClassesAnonymous.js | 9 +- .../reference/mixinClassesMembers.js | 9 +- .../reference/mixinPrivateAndProtected.js | 9 +- .../reference/mixingApparentTypeOverrides.js | 9 +- tests/baselines/reference/moduleAsBaseType.js | 9 +- .../moduleImportedForTypeArgumentPosition.js | 9 +- .../baselines/reference/moduleNoneOutFile.js | 9 +- .../moduleWithStatementsOfEveryKind.js | 9 +- .../reference/multipleInheritance.js | 9 +- .../mutuallyRecursiveGenericBaseTypes2.js | 9 +- .../reference/mutuallyRecursiveInference.js | 9 +- tests/baselines/reference/newTarget.es5.js | 9 +- .../noImplicitAnyMissingGetAccessor.js | 9 +- .../noImplicitAnyMissingSetAccessor.js | 9 +- ...enericClassExtendingGenericClassWithAny.js | 9 +- ...cIndexerConstrainsPropertyDeclarations2.js | 9 +- .../reference/numericIndexerConstraint3.js | 9 +- .../reference/numericIndexerConstraint4.js | 9 +- .../reference/numericIndexerTyping2.js | 9 +- ...objectCreationOfElementAccessExpression.js | 9 +- .../objectLiteralFreshnessWithSpread.js | 17 +- .../reference/objectLiteralNormalization.js | 17 +- tests/baselines/reference/objectSpread.js | 17 +- .../reference/objectSpreadComputedProperty.js | 17 +- .../reference/objectSpreadIndexSignature.js | 17 +- .../reference/objectSpreadNegative.js | 17 +- .../reference/objectSpreadNegativeParse.js | 17 +- .../reference/objectSpreadStrictNull.js | 17 +- ...preadWithinMethodWithinObjectWithSpread.js | 17 +- ...objectTypeHidingMembersOfExtendedObject.js | 9 +- ...objectTypesIdentityWithNumericIndexers1.js | 9 +- ...objectTypesIdentityWithNumericIndexers2.js | 9 +- ...objectTypesIdentityWithNumericIndexers3.js | 9 +- .../objectTypesIdentityWithPrivates.js | 9 +- .../objectTypesIdentityWithPrivates2.js | 9 +- .../objectTypesIdentityWithPrivates3.js | 9 +- .../objectTypesIdentityWithStringIndexers.js | 9 +- .../objectTypesIdentityWithStringIndexers2.js | 9 +- .../optionalConstructorArgInSuper.js | 9 +- tests/baselines/reference/optionalMethods.js | 9 +- .../reference/optionalParamArgsTest.js | 9 +- .../reference/optionalParamInOverride.js | 9 +- .../reference/optionalParameterProperty.js | 9 +- .../baselines/reference/outModuleConcatAmd.js | 9 +- .../reference/outModuleConcatAmd.js.map | 2 +- .../outModuleConcatAmd.sourcemap.txt | 65 +- .../reference/outModuleConcatSystem.js | 9 +- .../reference/outModuleConcatSystem.js.map | 2 +- .../outModuleConcatSystem.sourcemap.txt | 65 +- .../reference/outModuleTripleSlashRefs.js | 9 +- .../reference/outModuleTripleSlashRefs.js.map | 2 +- .../outModuleTripleSlashRefs.sourcemap.txt | 93 +-- tests/baselines/reference/overload1.js | 9 +- .../overloadOnConstConstraintChecks1.js | 9 +- .../overloadOnConstConstraintChecks2.js | 9 +- .../overloadOnConstConstraintChecks3.js | 9 +- .../overloadOnConstConstraintChecks4.js | 9 +- .../overloadOnConstantsInvalidOverload1.js | 9 +- .../baselines/reference/overloadResolution.js | 9 +- .../overloadResolutionClassConstructors.js | 9 +- .../overloadResolutionConstructors.js | 9 +- .../reference/overloadingOnConstants1.js | 9 +- .../reference/overloadingOnConstants2.js | 9 +- .../overrideBaseIntersectionMethod.js | 9 +- .../overridingPrivateStaticMembers.js | 9 +- .../reference/parseErrorInHeritageClause1.js | 9 +- tests/baselines/reference/parser509630.js | 9 +- tests/baselines/reference/parserAstSpans1.js | 9 +- .../reference/parserClassDeclaration1.js | 9 +- .../reference/parserClassDeclaration3.js | 9 +- .../reference/parserClassDeclaration4.js | 9 +- .../reference/parserClassDeclaration5.js | 9 +- .../reference/parserClassDeclaration6.js | 9 +- ...rrorRecovery_ExtendsOrImplementsClause2.js | 9 +- ...rrorRecovery_ExtendsOrImplementsClause4.js | 9 +- ...rrorRecovery_ExtendsOrImplementsClause5.js | 9 +- .../parserGenericsInTypeContexts1.js | 9 +- .../parserGenericsInTypeContexts2.js | 9 +- .../baselines/reference/parserRealSource10.js | 9 +- .../baselines/reference/parserRealSource11.js | 9 +- tests/baselines/reference/parserharness.js | 9 +- ...artiallyAnnotatedFunctionInferenceError.js | 9 +- ...tatedFunctionInferenceWithTypeParameter.js | 9 +- tests/baselines/reference/primitiveMembers.js | 9 +- tests/baselines/reference/privacyClass.js | 9 +- .../privacyClassExtendsClauseDeclFile.js | 18 +- tests/baselines/reference/privacyGloClass.js | 9 +- .../reference/privateAccessInSubclass1.js | 9 +- .../privateInstanceMemberAccessibility.js | 9 +- ...tedMembersAreNotAccessibleDestructuring.js | 9 +- .../privateStaticMemberAccessibility.js | 9 +- .../privateStaticNotAccessibleInClodule2.js | 9 +- .../amd/testGlo.js | 9 +- .../node/testGlo.js | 9 +- .../reference/project/prologueEmit/amd/out.js | 9 +- .../project/prologueEmit/node/out.js | 9 +- .../amd/m'ain.js | 9 +- .../node/m'ain.js | 9 +- .../reference/propertiesAndIndexers.js | 9 +- tests/baselines/reference/propertyAccess.js | 9 +- ...tyAccessOnTypeParameterWithConstraints2.js | 9 +- ...tyAccessOnTypeParameterWithConstraints3.js | 9 +- ...tyAccessOnTypeParameterWithConstraints5.js | 9 +- .../reference/propertyOverridingPrototype.js | 9 +- ...sPropertyAccessibleWithinNestedSubclass.js | 9 +- ...PropertyAccessibleWithinNestedSubclass1.js | 9 +- ...edClassPropertyAccessibleWithinSubclass.js | 9 +- ...dClassPropertyAccessibleWithinSubclass2.js | 9 +- ...dClassPropertyAccessibleWithinSubclass3.js | 9 +- .../protectedInstanceMemberAccessibility.js | 9 +- tests/baselines/reference/protectedMembers.js | 9 +- ...icClassPropertyAccessibleWithinSubclass.js | 9 +- ...cClassPropertyAccessibleWithinSubclass2.js | 9 +- ...solution-does-not-affect-class-heritage.js | 9 +- .../reference/reactNamespaceJSXEmit.js | 17 +- .../readonlyConstructorAssignment.js | 9 +- .../reference/recursiveBaseCheck3.js | 9 +- .../reference/recursiveBaseCheck4.js | 9 +- .../reference/recursiveBaseCheck6.js | 9 +- .../recursiveBaseConstructorCreation1.js | 9 +- ...ssInstantiationsWithDefaultConstructors.js | 9 +- .../reference/recursiveClassReferenceTest.js | 9 +- .../recursiveClassReferenceTest.js.map | 2 +- .../recursiveClassReferenceTest.sourcemap.txt | 751 +++++++++--------- .../reference/recursiveComplicatedClasses.js | 9 +- ...sivelySpecializedConstructorDeclaration.js | 9 +- .../reference/reexportClassDefinition.js | 9 +- .../reference/reexportDefaultIsCallable.js | 9 +- .../reference/reexportedMissingAlias.js | 9 +- ...lassDeclarationWhenInBaseTypeResolution.js | 9 +- .../reference/returnInConstructor1.js | 9 +- tests/baselines/reference/returnStatements.js | 9 +- ...peCheckExtendedClassInsidePublicMethod2.js | 9 +- ...peCheckExtendedClassInsideStaticMethod1.js | 9 +- tests/baselines/reference/scopeTests.js | 9 +- .../reference/shadowPrivateMembers.js | 9 +- ...sWithDefaultConstructorAndExtendsClause.js | 9 +- ...hDefaultConstructorAndExtendsClause.js.map | 2 +- ...tConstructorAndExtendsClause.sourcemap.txt | 81 +- .../specializedInheritedConstructors1.js | 9 +- .../specializedOverloadWithRestParameters.js | 9 +- .../spreadContextualTypedBindingPattern.js | 17 +- .../baselines/reference/spreadIntersection.js | 17 +- .../reference/spreadIntersectionJsx.js | 17 +- .../reference/spreadInvalidArgumentType.js | 17 +- tests/baselines/reference/spreadMethods.js | 17 +- .../baselines/reference/spreadNonPrimitive.js | 17 +- .../reference/spreadTypeRemovesReadonly.js | 17 +- tests/baselines/reference/spreadUnion.js | 17 +- tests/baselines/reference/spreadUnion2.js | 17 +- tests/baselines/reference/spreadUnion3.js | 17 +- tests/baselines/reference/staticFactory1.js | 9 +- .../baselines/reference/staticInheritance.js | 9 +- .../staticMemberAccessOffDerivedType1.js | 9 +- tests/baselines/reference/staticPropSuper.js | 9 +- .../reference/strictModeInConstructor.js | 9 +- .../reference/strictModeReservedWord.js | 9 +- ...trictModeReservedWordInClassDeclaration.js | 9 +- ...gIndexerConstrainsPropertyDeclarations2.js | 9 +- ...ubSubClassCanAccessProtectedConstructor.js | 9 +- .../reference/subtypesOfTypeParameter.js | 9 +- .../subtypesOfTypeParameterWithConstraints.js | 9 +- ...subtypesOfTypeParameterWithConstraints4.js | 9 +- ...OfTypeParameterWithRecursiveConstraints.js | 9 +- .../reference/subtypingTransitivity.js | 9 +- .../reference/subtypingWithCallSignatures2.js | 9 +- .../reference/subtypingWithCallSignatures3.js | 9 +- .../reference/subtypingWithCallSignatures4.js | 9 +- .../subtypingWithConstructSignatures2.js | 9 +- .../subtypingWithConstructSignatures3.js | 9 +- .../subtypingWithConstructSignatures4.js | 9 +- .../subtypingWithConstructSignatures5.js | 9 +- .../subtypingWithConstructSignatures6.js | 9 +- .../reference/subtypingWithNumericIndexer.js | 9 +- .../reference/subtypingWithNumericIndexer3.js | 9 +- .../reference/subtypingWithNumericIndexer4.js | 9 +- .../reference/subtypingWithObjectMembers.js | 9 +- .../reference/subtypingWithObjectMembers4.js | 9 +- ...subtypingWithObjectMembersAccessibility.js | 9 +- ...ubtypingWithObjectMembersAccessibility2.js | 9 +- .../reference/subtypingWithStringIndexer.js | 9 +- .../reference/subtypingWithStringIndexer3.js | 9 +- .../reference/subtypingWithStringIndexer4.js | 9 +- tests/baselines/reference/super.js | 9 +- tests/baselines/reference/super1.js | 9 +- tests/baselines/reference/super2.js | 9 +- tests/baselines/reference/superAccess.js | 9 +- tests/baselines/reference/superAccess2.js | 9 +- .../reference/superAccessCastedCall.js | 9 +- .../reference/superAccessInFatArrow1.js | 9 +- .../reference/superCallArgsMustMatch.js | 9 +- .../reference/superCallAssignResult.js | 9 +- .../superCallBeforeThisAccessing1.js | 9 +- .../superCallBeforeThisAccessing2.js | 9 +- .../superCallBeforeThisAccessing3.js | 9 +- .../superCallBeforeThisAccessing4.js | 9 +- .../superCallBeforeThisAccessing5.js | 9 +- .../superCallBeforeThisAccessing6.js | 9 +- .../superCallBeforeThisAccessing7.js | 9 +- .../superCallBeforeThisAccessing8.js | 9 +- ...allFromClassThatDerivesFromGenericType1.js | 9 +- ...allFromClassThatDerivesFromGenericType2.js | 9 +- ...eButWithIncorrectNumberOfTypeArguments1.js | 9 +- ...sFromGenericTypeButWithNoTypeArguments1.js | 9 +- ...ivesNonGenericTypeButWithTypeArguments1.js | 9 +- .../reference/superCallInNonStaticMethod.js | 9 +- .../reference/superCallInStaticMethod.js | 9 +- .../superCallInsideClassDeclaration.js | 9 +- .../superCallInsideClassExpression.js | 9 +- .../superCallInsideObjectLiteralExpression.js | 9 +- .../reference/superCallOutsideConstructor.js | 9 +- .../superCallParameterContextualTyping1.js | 9 +- .../superCallParameterContextualTyping2.js | 9 +- .../superCallParameterContextualTyping3.js | 9 +- .../reference/superCallWithCommentEmit01.js | 9 +- .../superCallWithMissingBaseClass.js | 9 +- tests/baselines/reference/superCalls.js | 9 +- .../reference/superCallsInConstructor.js | 9 +- .../baselines/reference/superElementAccess.js | 9 +- tests/baselines/reference/superErrors.js | 9 +- .../superHasMethodsFromMergedInterface.js | 9 +- .../baselines/reference/superInCatchBlock1.js | 9 +- .../reference/superInConstructorParam1.js | 9 +- tests/baselines/reference/superInLambdas.js | 9 +- .../reference/superInObjectLiterals_ES5.js | 9 +- tests/baselines/reference/superNewCall1.js | 9 +- .../reference/superNoModifiersCrash.js | 9 +- .../reference/superPropertyAccess.js | 9 +- .../reference/superPropertyAccess1.js | 9 +- .../reference/superPropertyAccess2.js | 9 +- ...essInComputedPropertiesOfNestedType_ES5.js | 9 +- .../superPropertyAccessInSuperCall01.js | 9 +- .../reference/superPropertyAccessNoError.js | 9 +- .../reference/superPropertyAccess_ES5.js | 9 +- ...opertyElementNoUnusedLexicalThisCapture.js | 9 +- ...perPropertyInConstructorBeforeSuperCall.js | 9 +- .../reference/superSymbolIndexedAccess5.js | 9 +- .../reference/superSymbolIndexedAccess6.js | 9 +- .../superWithGenericSpecialization.js | 9 +- .../baselines/reference/superWithGenerics.js | 9 +- .../reference/superWithTypeArgument.js | 9 +- .../reference/superWithTypeArgument2.js | 9 +- .../reference/superWithTypeArgument3.js | 9 +- ...side-object-literal-getters-and-setters.js | 9 +- tests/baselines/reference/switchStatements.js | 9 +- .../reference/systemModuleWithSuperClass.js | 9 +- .../reference/targetTypeBaseCalls.js | 9 +- .../reference/thisInInvalidContexts.js | 9 +- .../thisInInvalidContextsExternalModule.js | 9 +- tests/baselines/reference/thisInSuperCall.js | 9 +- tests/baselines/reference/thisInSuperCall1.js | 9 +- tests/baselines/reference/thisInSuperCall2.js | 9 +- tests/baselines/reference/thisInSuperCall3.js | 9 +- .../reference/thisTypeInFunctions.js | 9 +- .../reference/thisTypeInFunctions3.js | 9 +- .../reference/thisTypeInFunctionsNegative.js | 9 +- .../reference/tsxAttributeResolution15.js | 9 +- .../reference/tsxAttributeResolution16.js | 9 +- .../tsxCorrectlyParseLessThanComparison1.js | 9 +- .../tsxDefaultAttributesResolution1.js | 9 +- .../tsxDefaultAttributesResolution2.js | 9 +- .../tsxDefaultAttributesResolution3.js | 9 +- .../baselines/reference/tsxDynamicTagName5.js | 9 +- .../baselines/reference/tsxDynamicTagName7.js | 9 +- .../baselines/reference/tsxDynamicTagName8.js | 9 +- .../baselines/reference/tsxDynamicTagName9.js | 9 +- .../reference/tsxExternalModuleEmit1.js | 18 +- .../reference/tsxExternalModuleEmit2.js | 17 +- .../reference/tsxFragmentChildrenCheck.js | 9 +- .../reference/tsxGenericAttributesType3.js | 9 +- .../reference/tsxGenericAttributesType4.js | 9 +- .../reference/tsxGenericAttributesType5.js | 9 +- .../reference/tsxGenericAttributesType6.js | 9 +- .../reference/tsxGenericAttributesType9.js | 9 +- tests/baselines/reference/tsxReactEmit2.js | 17 +- tests/baselines/reference/tsxReactEmit4.js | 17 +- tests/baselines/reference/tsxReactEmit5.js | 17 +- tests/baselines/reference/tsxReactEmit6.js | 17 +- .../tsxSpreadAttributesResolution1.js | 9 +- .../tsxSpreadAttributesResolution10.js | 9 +- .../tsxSpreadAttributesResolution11.js | 9 +- .../tsxSpreadAttributesResolution12.js | 9 +- .../tsxSpreadAttributesResolution17.js | 9 +- .../tsxSpreadAttributesResolution2.js | 9 +- .../tsxSpreadAttributesResolution3.js | 9 +- .../tsxSpreadAttributesResolution4.js | 9 +- .../tsxSpreadAttributesResolution5.js | 9 +- .../tsxSpreadAttributesResolution6.js | 9 +- .../tsxSpreadAttributesResolution7.js | 9 +- .../tsxSpreadAttributesResolution8.js | 9 +- .../tsxSpreadAttributesResolution9.js | 9 +- .../reference/tsxSpreadChildrenInvalidType.js | 17 +- .../tsxStatelessFunctionComponents2.js | 9 +- .../reference/tsxUnionElementType3.js | 9 +- .../reference/tsxUnionElementType4.js | 9 +- .../reference/tsxUnionTypeComponent1.js | 9 +- .../typeAliasFunctionTypeSharedSymbol.js | 9 +- tests/baselines/reference/typeAssertions.js | 9 +- .../baselines/reference/typeGuardFunction.js | 9 +- .../reference/typeGuardFunctionErrors.js | 9 +- .../reference/typeGuardFunctionGenerics.js | 9 +- .../reference/typeGuardFunctionOfFormThis.js | 9 +- .../typeGuardFunctionOfFormThisErrors.js | 9 +- .../reference/typeGuardOfFormInstanceOf.js | 9 +- .../reference/typeGuardOfFormIsType.js | 9 +- .../reference/typeGuardOfFormThisMember.js | 9 +- .../typeGuardOfFormThisMemberErrors.js | 9 +- tests/baselines/reference/typeMatch2.js | 9 +- tests/baselines/reference/typeOfSuperCall.js | 9 +- .../reference/typeParameterAsBaseClass.js | 9 +- .../reference/typeParameterAsBaseType.js | 9 +- .../reference/typeParameterExtendingUnion1.js | 9 +- .../reference/typeParameterExtendingUnion2.js | 9 +- .../baselines/reference/typeRelationships.js | 9 +- .../baselines/reference/typeValueConflict1.js | 9 +- .../baselines/reference/typeValueConflict2.js | 9 +- .../reference/typeVariableTypeGuards.js | 9 +- tests/baselines/reference/typeofClass2.js | 9 +- .../typesWithSpecializedCallSignatures.js | 9 +- ...typesWithSpecializedConstructSignatures.js | 9 +- tests/baselines/reference/undeclaredBase.js | 9 +- .../undefinedIsSubtypeOfEverything.js | 9 +- .../baselines/reference/underscoreMapFirst.js | 9 +- .../underscoreThisInDerivedClass01.js | 9 +- .../underscoreThisInDerivedClass02.js | 9 +- .../reference/unionTypeEquivalence.js | 9 +- .../reference/unionTypeFromArrayLiteral.js | 9 +- .../reference/unionTypesAssignability.js | 9 +- tests/baselines/reference/unknownSymbols1.js | 9 +- tests/baselines/reference/unknownType1.js | 17 +- .../reference/unspecializedConstraints.js | 9 +- ...untypedFunctionCallsWithTypeParameters1.js | 9 +- .../reference/unusedClassesinNamespace4.js | 9 +- .../unusedIdentifiersConsolidated1.js | 9 +- .../reference/unusedInvalidTypeArguments.js | 18 +- .../useBeforeDeclaration_superClass.js | 9 +- .../reference/validUseOfThisInSuper.js | 9 +- .../reference/varArgsOnConstructorTypes.js | 9 +- 807 files changed, 5646 insertions(+), 3204 deletions(-) diff --git a/src/compiler/transformers/es2015.ts b/src/compiler/transformers/es2015.ts index 7cfd4fdc66423..9bcc8e89f5a87 100644 --- a/src/compiler/transformers/es2015.ts +++ b/src/compiler/transformers/es2015.ts @@ -4072,7 +4072,7 @@ namespace ts { priority: 0, text: ` var __extends = (this && this.__extends) || (function () { - function extendStatics(d, b) { + var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; diff --git a/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js b/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js index 93708cd8b5e87..e609e3d1e6c81 100644 --- a/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js +++ b/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js @@ -22,9 +22,12 @@ module A { //// [ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js] var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js b/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js index ecadd1fb60124..29416ab80b305 100644 --- a/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js +++ b/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js @@ -26,9 +26,12 @@ module A { //// [ExportClassWithInaccessibleTypeInTypeParameterConstraint.js] var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/abstractClassInLocalScope.js b/tests/baselines/reference/abstractClassInLocalScope.js index f221245ece7ea..afcefadb70575 100644 --- a/tests/baselines/reference/abstractClassInLocalScope.js +++ b/tests/baselines/reference/abstractClassInLocalScope.js @@ -9,9 +9,12 @@ //// [abstractClassInLocalScope.js] var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js b/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js index 88aceb2dd7842..ec27e0d91fd97 100644 --- a/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js +++ b/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js @@ -9,9 +9,12 @@ //// [abstractClassInLocalScopeIsAbstract.js] var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/abstractProperty.js b/tests/baselines/reference/abstractProperty.js index 396af46ae6dd5..ca9bf0c3742f3 100644 --- a/tests/baselines/reference/abstractProperty.js +++ b/tests/baselines/reference/abstractProperty.js @@ -23,9 +23,12 @@ class C extends B { //// [abstractProperty.js] var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/abstractPropertyNegative.js b/tests/baselines/reference/abstractPropertyNegative.js index a95d4edbfb4ca..4db1f89ff0db9 100644 --- a/tests/baselines/reference/abstractPropertyNegative.js +++ b/tests/baselines/reference/abstractPropertyNegative.js @@ -45,9 +45,12 @@ abstract class AbstractAccessorMismatch { //// [abstractPropertyNegative.js] var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/accessOverriddenBaseClassMember1.js b/tests/baselines/reference/accessOverriddenBaseClassMember1.js index 30aedee17f10f..3f290cc536911 100644 --- a/tests/baselines/reference/accessOverriddenBaseClassMember1.js +++ b/tests/baselines/reference/accessOverriddenBaseClassMember1.js @@ -17,9 +17,12 @@ class ColoredPoint extends Point { //// [accessOverriddenBaseClassMember1.js] var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/accessors_spec_section-4.5_inference.js b/tests/baselines/reference/accessors_spec_section-4.5_inference.js index bda4035bb912a..5ba098f7c2d89 100644 --- a/tests/baselines/reference/accessors_spec_section-4.5_inference.js +++ b/tests/baselines/reference/accessors_spec_section-4.5_inference.js @@ -26,9 +26,12 @@ class LanguageSpec_section_4_5_inference { //// [accessors_spec_section-4.5_inference.js] var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/aliasUsageInAccessorsOfClass.js b/tests/baselines/reference/aliasUsageInAccessorsOfClass.js index 605bafa4b4f34..34d2bf2ff490d 100644 --- a/tests/baselines/reference/aliasUsageInAccessorsOfClass.js +++ b/tests/baselines/reference/aliasUsageInAccessorsOfClass.js @@ -39,9 +39,12 @@ exports.Model = Model; //// [aliasUsage1_moduleA.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/aliasUsageInArray.js b/tests/baselines/reference/aliasUsageInArray.js index aab66957f3ec1..38535edd441b9 100644 --- a/tests/baselines/reference/aliasUsageInArray.js +++ b/tests/baselines/reference/aliasUsageInArray.js @@ -33,9 +33,12 @@ exports.Model = Model; //// [aliasUsageInArray_moduleA.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/aliasUsageInFunctionExpression.js b/tests/baselines/reference/aliasUsageInFunctionExpression.js index 6855a8eea50a6..e573e5301233c 100644 --- a/tests/baselines/reference/aliasUsageInFunctionExpression.js +++ b/tests/baselines/reference/aliasUsageInFunctionExpression.js @@ -32,9 +32,12 @@ exports.Model = Model; //// [aliasUsageInFunctionExpression_moduleA.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/aliasUsageInGenericFunction.js b/tests/baselines/reference/aliasUsageInGenericFunction.js index 46398d251e8cb..db3a85835c5ad 100644 --- a/tests/baselines/reference/aliasUsageInGenericFunction.js +++ b/tests/baselines/reference/aliasUsageInGenericFunction.js @@ -36,9 +36,12 @@ exports.Model = Model; //// [aliasUsageInGenericFunction_moduleA.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/aliasUsageInIndexerOfClass.js b/tests/baselines/reference/aliasUsageInIndexerOfClass.js index 9591be38642de..282db1922215e 100644 --- a/tests/baselines/reference/aliasUsageInIndexerOfClass.js +++ b/tests/baselines/reference/aliasUsageInIndexerOfClass.js @@ -38,9 +38,12 @@ exports.Model = Model; //// [aliasUsageInIndexerOfClass_moduleA.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/aliasUsageInObjectLiteral.js b/tests/baselines/reference/aliasUsageInObjectLiteral.js index 20096e09f3e57..1c794441f5c0d 100644 --- a/tests/baselines/reference/aliasUsageInObjectLiteral.js +++ b/tests/baselines/reference/aliasUsageInObjectLiteral.js @@ -33,9 +33,12 @@ exports.Model = Model; //// [aliasUsageInObjectLiteral_moduleA.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/aliasUsageInOrExpression.js b/tests/baselines/reference/aliasUsageInOrExpression.js index c05abd8fb7285..75bc90302c520 100644 --- a/tests/baselines/reference/aliasUsageInOrExpression.js +++ b/tests/baselines/reference/aliasUsageInOrExpression.js @@ -36,9 +36,12 @@ exports.Model = Model; //// [aliasUsageInOrExpression_moduleA.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js b/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js index ee78e98f75de0..1faf2b813f381 100644 --- a/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js +++ b/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js @@ -36,9 +36,12 @@ exports.Model = Model; //// [aliasUsageInTypeArgumentOfExtendsClause_moduleA.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } @@ -58,9 +61,12 @@ exports.VisualizationModel = VisualizationModel; //// [aliasUsageInTypeArgumentOfExtendsClause_main.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/aliasUsageInVarAssignment.js b/tests/baselines/reference/aliasUsageInVarAssignment.js index ef1953d2e6b6c..bf7871a27ac61 100644 --- a/tests/baselines/reference/aliasUsageInVarAssignment.js +++ b/tests/baselines/reference/aliasUsageInVarAssignment.js @@ -32,9 +32,12 @@ exports.Model = Model; //// [aliasUsageInVarAssignment_moduleA.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/ambiguousOverloadResolution.js b/tests/baselines/reference/ambiguousOverloadResolution.js index 059fb86e66c70..6e00d7b237422 100644 --- a/tests/baselines/reference/ambiguousOverloadResolution.js +++ b/tests/baselines/reference/ambiguousOverloadResolution.js @@ -10,9 +10,12 @@ var t: number = f(x, x); // Not an error //// [ambiguousOverloadResolution.js] var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/amdDeclarationEmitNoExtraDeclare.js b/tests/baselines/reference/amdDeclarationEmitNoExtraDeclare.js index 3f6ecf1ca36de..9d95712af409f 100644 --- a/tests/baselines/reference/amdDeclarationEmitNoExtraDeclare.js +++ b/tests/baselines/reference/amdDeclarationEmitNoExtraDeclare.js @@ -23,9 +23,12 @@ export function Configurable>(base: T): T { //// [dist.js] var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/anonymousClassDeclarationDoesntPrintWithReadonly.js b/tests/baselines/reference/anonymousClassDeclarationDoesntPrintWithReadonly.js index 1ecab30597a13..2b535bf45fdad 100644 --- a/tests/baselines/reference/anonymousClassDeclarationDoesntPrintWithReadonly.js +++ b/tests/baselines/reference/anonymousClassDeclarationDoesntPrintWithReadonly.js @@ -10,9 +10,12 @@ export function y() { //// [anonymousClassDeclarationDoesntPrintWithReadonly.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/apparentTypeSubtyping.js b/tests/baselines/reference/apparentTypeSubtyping.js index ed5b58a12fb56..6b15300281364 100644 --- a/tests/baselines/reference/apparentTypeSubtyping.js +++ b/tests/baselines/reference/apparentTypeSubtyping.js @@ -25,9 +25,12 @@ class Derived2 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 () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/apparentTypeSupertype.js b/tests/baselines/reference/apparentTypeSupertype.js index a34f3dbe9583b..63e6345e5ba3d 100644 --- a/tests/baselines/reference/apparentTypeSupertype.js +++ b/tests/baselines/reference/apparentTypeSupertype.js @@ -15,9 +15,12 @@ class Derived 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 () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/arrayAssignmentTest1.js b/tests/baselines/reference/arrayAssignmentTest1.js index f04bf8e850948..cf848855e5d77 100644 --- a/tests/baselines/reference/arrayAssignmentTest1.js +++ b/tests/baselines/reference/arrayAssignmentTest1.js @@ -87,9 +87,12 @@ arr_any = i1; // should be an error - is //// [arrayAssignmentTest1.js] var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/arrayAssignmentTest2.js b/tests/baselines/reference/arrayAssignmentTest2.js index 001a2eb3126a3..81176c8284f74 100644 --- a/tests/baselines/reference/arrayAssignmentTest2.js +++ b/tests/baselines/reference/arrayAssignmentTest2.js @@ -61,9 +61,12 @@ arr_any = i1; // should be an error - is //// [arrayAssignmentTest2.js] var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/arrayBestCommonTypes.js b/tests/baselines/reference/arrayBestCommonTypes.js index cb425609754ae..c1251a50f3899 100644 --- a/tests/baselines/reference/arrayBestCommonTypes.js +++ b/tests/baselines/reference/arrayBestCommonTypes.js @@ -109,9 +109,12 @@ module NonEmptyTypes { //// [arrayBestCommonTypes.js] var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/arrayLiteralTypeInference.js b/tests/baselines/reference/arrayLiteralTypeInference.js index eabffbb8a2ea1..41cb85f8008b8 100644 --- a/tests/baselines/reference/arrayLiteralTypeInference.js +++ b/tests/baselines/reference/arrayLiteralTypeInference.js @@ -53,9 +53,12 @@ var z3: { id: number }[] = //// [arrayLiteralTypeInference.js] var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/arrayLiterals.js b/tests/baselines/reference/arrayLiterals.js index 77daabbe22960..bdc11c99e6964 100644 --- a/tests/baselines/reference/arrayLiterals.js +++ b/tests/baselines/reference/arrayLiterals.js @@ -39,9 +39,12 @@ 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 () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js b/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js index e1a19867f7c8b..49d1d33c2e8cd 100644 --- a/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js +++ b/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js @@ -27,9 +27,12 @@ var as = [list, myDerivedList]; // List[] //// [arrayLiteralsWithRecursiveGenerics.js] var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js b/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js index f056e96eaed29..47abb0d625588 100644 --- a/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js +++ b/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js @@ -21,9 +21,12 @@ rrb = cra; // error: 'A' is not assignable to 'B' //// [arrayOfSubtypeIsAssignableToReadonlyArray.js] var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/arrowFunctionContexts.js b/tests/baselines/reference/arrowFunctionContexts.js index 452348e7301c6..d32683f8ed8b9 100644 --- a/tests/baselines/reference/arrowFunctionContexts.js +++ b/tests/baselines/reference/arrowFunctionContexts.js @@ -97,9 +97,12 @@ var asserted2: any; //// [arrowFunctionContexts.js] var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures3.js b/tests/baselines/reference/assignmentCompatWithCallSignatures3.js index 7d4a52f0a9522..2490b1ef9c812 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures3.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures3.js @@ -102,9 +102,12 @@ 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 () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures4.js b/tests/baselines/reference/assignmentCompatWithCallSignatures4.js index 90f3e8307fd47..d1e898d3c6d39 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures4.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures4.js @@ -101,9 +101,12 @@ module Errors { //// [assignmentCompatWithCallSignatures4.js] // These are mostly permitted with the current loose rules. All ok unless otherwise noted. var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures5.js b/tests/baselines/reference/assignmentCompatWithCallSignatures5.js index 4e8c11a7fbb07..6eaacacf897be 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures5.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures5.js @@ -68,9 +68,12 @@ b18 = a18; // ok //// [assignmentCompatWithCallSignatures5.js] // checking assignment compat for function types. No errors in this file var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures6.js b/tests/baselines/reference/assignmentCompatWithCallSignatures6.js index 34cbf0748f7be..775d788631012 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures6.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures6.js @@ -45,9 +45,12 @@ b16 = x.a16; //// [assignmentCompatWithCallSignatures6.js] // checking assignment compatibility relations for function types. All valid var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js index ed5cc0543ce1a..15ebdef5dada5 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js @@ -102,9 +102,12 @@ b18 = a18; // ok //// [assignmentCompatWithConstructSignatures3.js] // checking assignment compatibility relations for function types. All of these are valid. var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js index dc8d6915d1059..aa0ce793dce04 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js @@ -101,9 +101,12 @@ module Errors { //// [assignmentCompatWithConstructSignatures4.js] // checking assignment compatibility relations for function types. var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js index 7b96bd54b5c46..fbe0f53fa56dc 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js @@ -68,9 +68,12 @@ b18 = a18; // ok //// [assignmentCompatWithConstructSignatures5.js] // checking assignment compat for function types. All valid var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js index a1951dfcbbdc4..b476dd6642000 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js @@ -45,9 +45,12 @@ b16 = x.a16; //// [assignmentCompatWithConstructSignatures6.js] // checking assignment compatibility relations for function types. All valid. var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer.js b/tests/baselines/reference/assignmentCompatWithNumericIndexer.js index 23719df9126ff..cbe47f21a95f1 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer.js +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer.js @@ -46,9 +46,12 @@ module Generics { //// [assignmentCompatWithNumericIndexer.js] // Derived type indexer must be subtype of base type indexer var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js b/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js index 1270283351ba7..cc8dc2fb1b858 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js @@ -43,9 +43,12 @@ module Generics { //// [assignmentCompatWithNumericIndexer3.js] // Derived type indexer must be subtype of base type indexer var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers4.js b/tests/baselines/reference/assignmentCompatWithObjectMembers4.js index 375b9ab3e057c..46dfee1ed80d1 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers4.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers4.js @@ -94,9 +94,12 @@ 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 () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js index 299d1fea0dfa6..c53936f696e39 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js @@ -91,9 +91,12 @@ module SourceHasOptional { //// [assignmentCompatWithObjectMembersOptionality.js] // Derived member is not optional but base member is, should be ok var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js index 2b4d9fd462b3f..60793f2843f1b 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js @@ -94,9 +94,12 @@ 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 () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/assignmentCompatWithStringIndexer.js b/tests/baselines/reference/assignmentCompatWithStringIndexer.js index e57d1e7bf2cfc..62b22fc0091e7 100644 --- a/tests/baselines/reference/assignmentCompatWithStringIndexer.js +++ b/tests/baselines/reference/assignmentCompatWithStringIndexer.js @@ -56,9 +56,12 @@ module Generics { //// [assignmentCompatWithStringIndexer.js] // index signatures must be compatible in assignments var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/assignmentLHSIsValue.js b/tests/baselines/reference/assignmentLHSIsValue.js index bc129cb2ca2b5..1eacd789df1af 100644 --- a/tests/baselines/reference/assignmentLHSIsValue.js +++ b/tests/baselines/reference/assignmentLHSIsValue.js @@ -72,9 +72,12 @@ foo() = value; //// [assignmentLHSIsValue.js] var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/asyncImportedPromise_es5.js b/tests/baselines/reference/asyncImportedPromise_es5.js index 8b56ebbd1fafc..5aabc56c56a37 100644 --- a/tests/baselines/reference/asyncImportedPromise_es5.js +++ b/tests/baselines/reference/asyncImportedPromise_es5.js @@ -12,9 +12,12 @@ class Test { //// [task.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/autolift4.js b/tests/baselines/reference/autolift4.js index 2e5b3b258c69a..19d6cd4393282 100644 --- a/tests/baselines/reference/autolift4.js +++ b/tests/baselines/reference/autolift4.js @@ -25,9 +25,12 @@ class Point3D extends Point { //// [autolift4.js] var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/baseCheck.js b/tests/baselines/reference/baseCheck.js index 463a29e1fbee2..e48c235a08793 100644 --- a/tests/baselines/reference/baseCheck.js +++ b/tests/baselines/reference/baseCheck.js @@ -31,9 +31,12 @@ function f() { //// [baseCheck.js] var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/baseClassImprovedMismatchErrors.js b/tests/baselines/reference/baseClassImprovedMismatchErrors.js index 296f9e6eb1c41..def62c018bd73 100644 --- a/tests/baselines/reference/baseClassImprovedMismatchErrors.js +++ b/tests/baselines/reference/baseClassImprovedMismatchErrors.js @@ -20,9 +20,12 @@ class DerivedInterface implements Base { //// [baseClassImprovedMismatchErrors.js] var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/baseConstraintOfDecorator.js b/tests/baselines/reference/baseConstraintOfDecorator.js index dc6ebd7397e07..198dcb3d7b96f 100644 --- a/tests/baselines/reference/baseConstraintOfDecorator.js +++ b/tests/baselines/reference/baseConstraintOfDecorator.js @@ -12,9 +12,12 @@ export function classExtender(superClass: TFunction, _instanceModifie //// [baseConstraintOfDecorator.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/baseExpressionTypeParameters.js b/tests/baselines/reference/baseExpressionTypeParameters.js index a3a77cbc6e347..fd907be7e5293 100644 --- a/tests/baselines/reference/baseExpressionTypeParameters.js +++ b/tests/baselines/reference/baseExpressionTypeParameters.js @@ -16,9 +16,12 @@ class Spec extends Gen {} //// [baseExpressionTypeParameters.js] // Repro from #17829 var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/baseIndexSignatureResolution.js b/tests/baselines/reference/baseIndexSignatureResolution.js index 4053e588e446e..d5732b7f3d5f6 100644 --- a/tests/baselines/reference/baseIndexSignatureResolution.js +++ b/tests/baselines/reference/baseIndexSignatureResolution.js @@ -26,9 +26,12 @@ var z: Derived = b.foo(); //// [baseIndexSignatureResolution.js] var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/baseTypeOrderChecking.js b/tests/baselines/reference/baseTypeOrderChecking.js index 1dd92d473c1c4..9e6800d376a95 100644 --- a/tests/baselines/reference/baseTypeOrderChecking.js +++ b/tests/baselines/reference/baseTypeOrderChecking.js @@ -38,9 +38,12 @@ class Class4 extends Class3 //// [baseTypeOrderChecking.js] var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/baseTypeWrappingInstantiationChain.js b/tests/baselines/reference/baseTypeWrappingInstantiationChain.js index 86be6bcf5c17b..3f8e475504d88 100644 --- a/tests/baselines/reference/baseTypeWrappingInstantiationChain.js +++ b/tests/baselines/reference/baseTypeWrappingInstantiationChain.js @@ -29,9 +29,12 @@ class C extends CBase { //// [baseTypeWrappingInstantiationChain.js] var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/bases.js b/tests/baselines/reference/bases.js index cd1f7ba94a807..9ff19e7ae6189 100644 --- a/tests/baselines/reference/bases.js +++ b/tests/baselines/reference/bases.js @@ -22,9 +22,12 @@ new C().y; //// [bases.js] var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js index 128c9f6d43015..1eaa060ce1f84 100644 --- a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js +++ b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js @@ -30,9 +30,12 @@ function foo5(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 () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js index 1a8d0d501141b..77543b29fe8cc 100644 --- a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js +++ b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js @@ -28,9 +28,12 @@ function foo3(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 () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/bestCommonTypeOfTuple2.js b/tests/baselines/reference/bestCommonTypeOfTuple2.js index a9eeb1eaaa1bc..0dbea701fa3ac 100644 --- a/tests/baselines/reference/bestCommonTypeOfTuple2.js +++ b/tests/baselines/reference/bestCommonTypeOfTuple2.js @@ -24,9 +24,12 @@ var e51 = t5[2]; // {} //// [bestCommonTypeOfTuple2.js] var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js index 70d76baf5ba65..6913975d7572b 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js @@ -72,9 +72,12 @@ 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 () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js index c86b0bd7e1201..27112f8d3c334 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js @@ -117,9 +117,12 @@ module Errors { // checking subtype relations for function types as it relates to contextual signature instantiation // error cases var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js index 1fc4c80345a8f..0928f8ebc29d9 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js @@ -52,9 +52,12 @@ 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 () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js index 5a021653cd830..c04d5bcb2ab16 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js @@ -52,9 +52,12 @@ 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 () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js index f814b36a59e94..aa189c78f8f2f 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js @@ -55,9 +55,12 @@ interface I9 extends A { // same as subtypingWithCallSignatures4 but using class type parameters instead of generic signatures // all are errors var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/callWithSpread.js b/tests/baselines/reference/callWithSpread.js index 1b78ebeb8ec11..423721645ad7a 100644 --- a/tests/baselines/reference/callWithSpread.js +++ b/tests/baselines/reference/callWithSpread.js @@ -60,9 +60,12 @@ class D extends C { //// [callWithSpread.js] var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/captureSuperPropertyAccessInSuperCall01.js b/tests/baselines/reference/captureSuperPropertyAccessInSuperCall01.js index 9ded081269f4a..2b8eb4e62aad5 100644 --- a/tests/baselines/reference/captureSuperPropertyAccessInSuperCall01.js +++ b/tests/baselines/reference/captureSuperPropertyAccessInSuperCall01.js @@ -13,9 +13,12 @@ class B extends A { //// [captureSuperPropertyAccessInSuperCall01.js] var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/captureThisInSuperCall.js b/tests/baselines/reference/captureThisInSuperCall.js index 0b277e348a4ae..9406feca94524 100644 --- a/tests/baselines/reference/captureThisInSuperCall.js +++ b/tests/baselines/reference/captureThisInSuperCall.js @@ -10,9 +10,12 @@ class B extends A { //// [captureThisInSuperCall.js] var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/castingTuple.js b/tests/baselines/reference/castingTuple.js index a94246a19b8d2..4bb4f5f788bbe 100644 --- a/tests/baselines/reference/castingTuple.js +++ b/tests/baselines/reference/castingTuple.js @@ -36,9 +36,12 @@ t4[2] = 10; //// [castingTuple.js] var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/chainedAssignment3.js b/tests/baselines/reference/chainedAssignment3.js index c0c0fd8c49aae..acb96e5b9cfd2 100644 --- a/tests/baselines/reference/chainedAssignment3.js +++ b/tests/baselines/reference/chainedAssignment3.js @@ -24,9 +24,12 @@ a = b = new A(); //// [chainedAssignment3.js] var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js index b58ad2ed28fe8..8b272b582a4e9 100644 --- a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js +++ b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js @@ -21,9 +21,12 @@ class C extends B { //// [chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js] var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/checkForObjectTooStrict.js b/tests/baselines/reference/checkForObjectTooStrict.js index ebe87e3e1085a..d8a30eac7627b 100644 --- a/tests/baselines/reference/checkForObjectTooStrict.js +++ b/tests/baselines/reference/checkForObjectTooStrict.js @@ -33,9 +33,12 @@ class Baz extends Object { //// [checkForObjectTooStrict.js] var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/checkJsxChildrenProperty12.js b/tests/baselines/reference/checkJsxChildrenProperty12.js index ca685d558bf23..5b1d1d1b79466 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty12.js +++ b/tests/baselines/reference/checkJsxChildrenProperty12.js @@ -35,9 +35,12 @@ class InnerButton extends React.Component { //// [file.jsx] "use strict"; var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/checkJsxChildrenProperty13.js b/tests/baselines/reference/checkJsxChildrenProperty13.js index 9848847c0882f..45ef75b88b1ec 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty13.js +++ b/tests/baselines/reference/checkJsxChildrenProperty13.js @@ -30,9 +30,12 @@ class InnerButton extends React.Component { //// [file.jsx] "use strict"; var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } diff --git a/tests/baselines/reference/checkJsxChildrenProperty14.js b/tests/baselines/reference/checkJsxChildrenProperty14.js index 182b0f0a87954..833bd43155e55 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty14.js +++ b/tests/baselines/reference/checkJsxChildrenProperty14.js @@ -45,9 +45,12 @@ let k5 = <>