From 9e6a83db20478303aa00b2161081302bdd08ec05 Mon Sep 17 00:00:00 2001 From: vvakame Date: Fri, 25 Nov 2016 00:53:42 +0900 Subject: [PATCH 1/7] change class inheritance code --- src/compiler/transformers/es2015.ts | 2 +- ...straintsClassHeritageListMemberTypeAnnotations.js | 2 +- ...sWithInaccessibleTypeInTypeParameterConstraint.js | 2 +- .../baselines/reference/abstractClassInLocalScope.js | 2 +- .../reference/abstractClassInLocalScopeIsAbstract.js | 2 +- tests/baselines/reference/abstractProperty.js | 2 +- .../baselines/reference/abstractPropertyNegative.js | 2 +- .../reference/accessOverriddenBaseClassMember1.js | 2 +- .../accessors_spec_section-4.5_inference.js | 2 +- .../reference/aliasUsageInAccessorsOfClass.js | 2 +- tests/baselines/reference/aliasUsageInArray.js | 2 +- .../reference/aliasUsageInFunctionExpression.js | 2 +- .../reference/aliasUsageInGenericFunction.js | 2 +- .../reference/aliasUsageInIndexerOfClass.js | 2 +- .../baselines/reference/aliasUsageInObjectLiteral.js | 2 +- .../baselines/reference/aliasUsageInOrExpression.js | 2 +- .../aliasUsageInTypeArgumentOfExtendsClause.js | 4 ++-- .../baselines/reference/aliasUsageInVarAssignment.js | 2 +- .../reference/ambiguousOverloadResolution.js | 2 +- tests/baselines/reference/apparentTypeSubtyping.js | 2 +- tests/baselines/reference/apparentTypeSupertype.js | 2 +- tests/baselines/reference/arrayAssignmentTest1.js | 2 +- tests/baselines/reference/arrayAssignmentTest2.js | 2 +- tests/baselines/reference/arrayBestCommonTypes.js | 2 +- .../baselines/reference/arrayLiteralTypeInference.js | 2 +- tests/baselines/reference/arrayLiterals.js | 2 +- .../reference/arrayLiteralsWithRecursiveGenerics.js | 2 +- .../arrayOfSubtypeIsAssignableToReadonlyArray.js | 2 +- tests/baselines/reference/arrowFunctionContexts.js | 2 +- .../reference/assignmentCompatWithCallSignatures3.js | 2 +- .../reference/assignmentCompatWithCallSignatures4.js | 2 +- .../reference/assignmentCompatWithCallSignatures5.js | 2 +- .../reference/assignmentCompatWithCallSignatures6.js | 2 +- .../assignmentCompatWithConstructSignatures3.js | 2 +- .../assignmentCompatWithConstructSignatures4.js | 2 +- .../assignmentCompatWithConstructSignatures5.js | 2 +- .../assignmentCompatWithConstructSignatures6.js | 2 +- .../reference/assignmentCompatWithNumericIndexer.js | 2 +- .../reference/assignmentCompatWithNumericIndexer3.js | 2 +- .../reference/assignmentCompatWithObjectMembers4.js | 2 +- .../assignmentCompatWithObjectMembersOptionality.js | 2 +- .../assignmentCompatWithObjectMembersOptionality2.js | 2 +- .../reference/assignmentCompatWithStringIndexer.js | 2 +- tests/baselines/reference/assignmentLHSIsValue.js | 2 +- .../baselines/reference/asyncImportedPromise_es5.js | 2 +- tests/baselines/reference/autolift4.js | 2 +- tests/baselines/reference/baseCheck.js | 2 +- .../reference/baseIndexSignatureResolution.js | 2 +- tests/baselines/reference/baseTypeOrderChecking.js | 2 +- .../reference/baseTypeWrappingInstantiationChain.js | 2 +- tests/baselines/reference/bases.js | 2 +- .../bestCommonTypeOfConditionalExpressions.js | 2 +- .../bestCommonTypeOfConditionalExpressions2.js | 2 +- tests/baselines/reference/bestCommonTypeOfTuple2.js | 2 +- .../callSignatureAssignabilityInInheritance2.js | 2 +- .../callSignatureAssignabilityInInheritance3.js | 2 +- .../callSignatureAssignabilityInInheritance4.js | 2 +- .../callSignatureAssignabilityInInheritance5.js | 2 +- .../callSignatureAssignabilityInInheritance6.js | 2 +- tests/baselines/reference/callWithSpread.js | 2 +- tests/baselines/reference/captureThisInSuperCall.js | 2 +- tests/baselines/reference/castingTuple.js | 2 +- tests/baselines/reference/chainedAssignment3.js | 2 +- ...thTypeParameterConstrainedToOtherTypeParameter.js | 2 +- tests/baselines/reference/checkForObjectTooStrict.js | 2 +- .../reference/checkSuperCallBeforeThisAccessing1.js | 2 +- .../reference/checkSuperCallBeforeThisAccessing2.js | 2 +- .../reference/checkSuperCallBeforeThisAccessing3.js | 2 +- .../reference/checkSuperCallBeforeThisAccessing4.js | 2 +- .../reference/checkSuperCallBeforeThisAccessing5.js | 2 +- .../reference/checkSuperCallBeforeThisAccessing6.js | 2 +- .../reference/checkSuperCallBeforeThisAccessing7.js | 2 +- .../reference/checkSuperCallBeforeThisAccessing8.js | 2 +- tests/baselines/reference/circularImportAlias.js | 2 +- .../reference/circularTypeofWithFunctionModule.js | 2 +- .../classAbstractConstructorAssignability.js | 2 +- .../baselines/reference/classAbstractCrashedOnce.js | 2 +- tests/baselines/reference/classAbstractExtends.js | 2 +- .../reference/classAbstractFactoryFunction.js | 2 +- tests/baselines/reference/classAbstractGeneric.js | 2 +- tests/baselines/reference/classAbstractInAModule.js | 2 +- .../baselines/reference/classAbstractInheritance.js | 2 +- .../reference/classAbstractInstantiations1.js | 2 +- .../reference/classAbstractInstantiations2.js | 2 +- .../reference/classAbstractOverrideWithAbstract.js | 2 +- tests/baselines/reference/classAbstractSuperCalls.js | 2 +- .../reference/classAbstractUsingAbstractMethod1.js | 2 +- .../reference/classAbstractUsingAbstractMethods2.js | 2 +- .../reference/classConstructorAccessibility2.js | 2 +- .../reference/classConstructorAccessibility4.js | 2 +- .../reference/classConstructorAccessibility5.js | 2 +- .../classConstructorParametersAccessibility.js | 2 +- .../classConstructorParametersAccessibility2.js | 2 +- .../classConstructorParametersAccessibility3.js | 2 +- ...classDeclarationMergedInModuleWithContinuation.js | 2 +- .../reference/classDeclaredBeforeClassFactory.js | 2 +- .../reference/classDoesNotDependOnBaseTypes.js | 2 +- tests/baselines/reference/classExpression2.js | 2 +- tests/baselines/reference/classExpression3.js | 2 +- .../classExpressionExtendingAbstractClass.js | 2 +- .../baselines/reference/classExtendingBuiltinType.js | 2 +- tests/baselines/reference/classExtendingClass.js | 2 +- .../reference/classExtendingClassLikeType.js | 2 +- .../reference/classExtendingNonConstructor.js | 2 +- tests/baselines/reference/classExtendingNull.js | 2 +- tests/baselines/reference/classExtendingPrimitive.js | 2 +- .../baselines/reference/classExtendingPrimitive2.js | 2 +- .../reference/classExtendingQualifiedName.js | 2 +- .../reference/classExtendingQualifiedName2.js | 2 +- tests/baselines/reference/classExtendsAcrossFiles.js | 4 ++-- ...useClassMergedWithModuleNotReferingConstructor.js | 2 +- ...classExtendsClauseClassNotReferringConstructor.js | 2 +- .../reference/classExtendsEveryObjectType.js | 2 +- .../reference/classExtendsEveryObjectType2.js | 2 +- tests/baselines/reference/classExtendsInterface.js | 2 +- .../reference/classExtendsInterfaceInExpression.js | 2 +- .../reference/classExtendsInterfaceInModule.js | 2 +- tests/baselines/reference/classExtendsItself.js | 2 +- .../reference/classExtendsItselfIndirectly.js | 2 +- .../reference/classExtendsItselfIndirectly2.js | 2 +- .../reference/classExtendsItselfIndirectly3.js | 12 ++++++------ .../reference/classExtendsMultipleBaseClasses.js | 2 +- tests/baselines/reference/classExtendsNull.js | 2 +- .../classExtendsShadowedConstructorFunction.js | 2 +- .../classExtendsValidConstructorFunction.js | 2 +- .../reference/classHeritageWithTrailingSeparator.js | 2 +- tests/baselines/reference/classImplementsClass2.js | 2 +- tests/baselines/reference/classImplementsClass3.js | 2 +- tests/baselines/reference/classImplementsClass4.js | 2 +- tests/baselines/reference/classImplementsClass5.js | 2 +- tests/baselines/reference/classImplementsClass6.js | 2 +- tests/baselines/reference/classIndexer3.js | 2 +- tests/baselines/reference/classInheritence.js | 2 +- .../baselines/reference/classIsSubtypeOfBaseType.js | 2 +- tests/baselines/reference/classOrder2.js | 2 +- tests/baselines/reference/classOrderBug.js | 2 +- tests/baselines/reference/classSideInheritance1.js | 2 +- tests/baselines/reference/classSideInheritance2.js | 2 +- tests/baselines/reference/classSideInheritance3.js | 2 +- tests/baselines/reference/classUpdateTests.js | 2 +- .../reference/classWithBaseClassButNoConstructor.js | 2 +- tests/baselines/reference/classWithConstructors.js | 2 +- .../reference/classWithProtectedProperty.js | 2 +- tests/baselines/reference/classWithStaticMembers.js | 2 +- tests/baselines/reference/classdecl.js | 2 +- tests/baselines/reference/clodulesDerivedClasses.js | 2 +- .../collisionSuperAndLocalFunctionInAccessors.js | 2 +- .../collisionSuperAndLocalFunctionInConstructor.js | 2 +- .../collisionSuperAndLocalFunctionInMethod.js | 2 +- .../collisionSuperAndLocalFunctionInProperty.js | 2 +- .../collisionSuperAndLocalVarInAccessors.js | 2 +- .../collisionSuperAndLocalVarInConstructor.js | 2 +- .../reference/collisionSuperAndLocalVarInMethod.js | 2 +- .../reference/collisionSuperAndLocalVarInProperty.js | 2 +- .../reference/collisionSuperAndNameResolution.js | 2 +- .../reference/collisionSuperAndParameter.js | 2 +- .../reference/collisionSuperAndParameter1.js | 2 +- ...isionSuperAndPropertyNameAsConstuctorParameter.js | 2 +- ...onThisExpressionAndLocalVarWithSuperExperssion.js | 2 +- tests/baselines/reference/commentsInheritance.js | 2 +- .../comparisonOperatorWithIdenticalObjects.js | 2 +- ...eratorWithNoRelationshipObjectsOnCallSignature.js | 2 +- ...ithNoRelationshipObjectsOnConstructorSignature.js | 2 +- ...ratorWithNoRelationshipObjectsOnIndexSignature.js | 2 +- ...RelationshipObjectsOnInstantiatedCallSignature.js | 2 +- ...nshipObjectsOnInstantiatedConstructorSignature.js | 2 +- ...arisonOperatorWithSubtypeObjectOnCallSignature.js | 2 +- ...peratorWithSubtypeObjectOnConstructorSignature.js | 2 +- ...risonOperatorWithSubtypeObjectOnIndexSignature.js | 2 +- ...orWithSubtypeObjectOnInstantiatedCallSignature.js | 2 +- ...ubtypeObjectOnInstantiatedConstructorSignature.js | 2 +- .../comparisonOperatorWithSubtypeObjectOnProperty.js | 2 +- .../baselines/reference/complexClassRelationships.js | 2 +- .../complicatedGenericRecursiveBaseClassReference.js | 2 +- .../reference/compoundAssignmentLHSIsValue.js | 2 +- .../compoundExponentiationAssignmentLHSIsValue.js | 2 +- .../reference/computedPropertyNames24_ES5.js | 2 +- .../reference/computedPropertyNames25_ES5.js | 2 +- .../reference/computedPropertyNames26_ES5.js | 2 +- .../reference/computedPropertyNames27_ES5.js | 2 +- .../reference/computedPropertyNames28_ES5.js | 2 +- .../reference/computedPropertyNames30_ES5.js | 2 +- .../reference/computedPropertyNames31_ES5.js | 2 +- .../reference/computedPropertyNames43_ES5.js | 2 +- .../reference/computedPropertyNames44_ES5.js | 2 +- .../reference/computedPropertyNames45_ES5.js | 2 +- .../reference/conditionalOperatorWithIdenticalBCT.js | 2 +- .../conditionalOperatorWithoutIdenticalBCT.js | 2 +- .../baselines/reference/constantOverloadFunction.js | 2 +- .../constantOverloadFunctionNoSubtypeError.js | 2 +- .../constraintCheckInGenericBaseTypeReference.js | 2 +- .../constructSignatureAssignabilityInInheritance2.js | 2 +- .../constructSignatureAssignabilityInInheritance3.js | 2 +- .../constructSignatureAssignabilityInInheritance4.js | 2 +- .../constructSignatureAssignabilityInInheritance5.js | 2 +- .../constructSignatureAssignabilityInInheritance6.js | 2 +- tests/baselines/reference/constructorArgs.js | 2 +- .../constructorFunctionTypeIsAssignableToBaseType.js | 2 +- ...constructorFunctionTypeIsAssignableToBaseType2.js | 2 +- .../reference/constructorHasPrototypeProperty.js | 2 +- tests/baselines/reference/constructorOverloads2.js | 2 +- tests/baselines/reference/constructorOverloads3.js | 2 +- .../reference/constructorWithCapturedSuper.js | 2 +- .../constructorWithIncompleteTypeAnnotation.js | 2 +- .../reference/contextualTypingArrayOfLambdas.js | 2 +- .../contextualTypingOfConditionalExpression.js | 2 +- .../contextualTypingOfConditionalExpression2.js | 2 +- ...ashInsourcePropertyIsRelatableToTargetProperty.js | 2 +- .../baselines/reference/declFileClassExtendsNull.js | 2 +- .../declFileForFunctionTypeAsTypeParameter.js | 2 +- .../declFileGenericClassWithGenericExtendedClass.js | 2 +- tests/baselines/reference/declFileGenericType.js | 2 +- tests/baselines/reference/declFileGenericType2.js | 2 +- ...ameConflictingWithClassReferredByExtendsClause.js | 2 +- ...thExtendsClauseThatHasItsContainerNameConflict.js | 2 +- .../reference/declarationEmitExpressionInExtends.js | 2 +- .../reference/declarationEmitExpressionInExtends2.js | 2 +- .../reference/declarationEmitExpressionInExtends3.js | 2 +- .../reference/declarationEmitExpressionInExtends4.js | 2 +- .../reference/declarationEmitNameConflicts3.js | 2 +- .../reference/declarationEmitProtectedMembers.js | 2 +- .../reference/declarationEmitThisPredicates01.js | 2 +- ...declarationEmitThisPredicatesWithPrivateName01.js | 2 +- tests/baselines/reference/declareDottedExtend.js | 2 +- .../reference/decoratorOnClassConstructor2.js | 2 +- .../reference/decoratorOnClassConstructor3.js | 2 +- .../baselines/reference/decoratorOnClassMethod12.js | 2 +- .../derivedClassConstructorWithExplicitReturns01.js | 2 +- ...assConstructorWithExplicitReturns01.sourcemap.txt | 2 +- .../derivedClassConstructorWithoutSuperCall.js | 2 +- ...derivedClassFunctionOverridesBaseClassAccessor.js | 2 +- .../derivedClassIncludesInheritedMembers.js | 2 +- ...ssOverridesIndexersWithAssignmentCompatibility.js | 2 +- .../derivedClassOverridesPrivateFunction1.js | 2 +- .../reference/derivedClassOverridesPrivates.js | 2 +- .../derivedClassOverridesProtectedMembers.js | 2 +- .../derivedClassOverridesProtectedMembers2.js | 2 +- .../derivedClassOverridesProtectedMembers3.js | 2 +- .../derivedClassOverridesProtectedMembers4.js | 2 +- .../reference/derivedClassOverridesPublicMembers.js | 2 +- .../reference/derivedClassOverridesWithoutSubtype.js | 2 +- .../reference/derivedClassParameterProperties.js | 2 +- .../derivedClassSuperCallsInNonConstructorMembers.js | 2 +- .../reference/derivedClassSuperCallsWithThisArg.js | 2 +- .../baselines/reference/derivedClassTransitivity.js | 2 +- .../baselines/reference/derivedClassTransitivity2.js | 2 +- .../baselines/reference/derivedClassTransitivity3.js | 2 +- .../baselines/reference/derivedClassTransitivity4.js | 2 +- tests/baselines/reference/derivedClassWithAny.js | 2 +- ...sWithPrivateInstanceShadowingProtectedInstance.js | 2 +- ...lassWithPrivateInstanceShadowingPublicInstance.js | 2 +- ...ClassWithPrivateStaticShadowingProtectedStatic.js | 2 +- ...vedClassWithPrivateStaticShadowingPublicStatic.js | 2 +- .../derivedClassWithoutExplicitConstructor.js | 2 +- .../derivedClassWithoutExplicitConstructor2.js | 2 +- .../derivedClassWithoutExplicitConstructor3.js | 2 +- tests/baselines/reference/derivedClasses.js | 2 +- .../reference/derivedGenericClassWithAny.js | 2 +- ...peAccessesHiddenBaseCallViaSuperPropertyAccess.js | 2 +- .../derivedTypeDoesNotRequireExtendsClause.js | 2 +- .../reference/destructuringParameterDeclaration5.js | 2 +- ...perCallBeforeEmitParameterPropertyDeclaration1.js | 2 +- .../emitSuperCallBeforeEmitPropertyDeclaration1.js | 2 +- ...rtyDeclarationAndParameterPropertyDeclaration1.js | 2 +- .../baselines/reference/emitThisInSuperMethodCall.js | 2 +- tests/baselines/reference/emptyModuleName.js | 2 +- .../errorForwardReferenceForwadingConstructor.js | 2 +- tests/baselines/reference/errorSuperCalls.js | 2 +- .../baselines/reference/errorSuperPropertyAccess.js | 2 +- .../reference/errorsInGenericTypeReference.js | 2 +- tests/baselines/reference/es6ClassSuperCodegenBug.js | 2 +- tests/baselines/reference/es6ClassTest.js | 2 +- tests/baselines/reference/es6ClassTest2.js | 2 +- tests/baselines/reference/es6ClassTest7.js | 2 +- .../reference/exportAssignmentOfGenericType1.js | 2 +- .../reference/exportDeclarationInInternalModule.js | 2 +- tests/baselines/reference/extBaseClass1.js | 2 +- tests/baselines/reference/extBaseClass2.js | 2 +- .../reference/extendAndImplementTheSameBaseType.js | 2 +- .../reference/extendAndImplementTheSameBaseType2.js | 2 +- .../reference/extendBaseClassBeforeItsDeclared.js | 2 +- .../reference/extendClassExpressionFromModule.js | 2 +- .../reference/extendConstructSignatureInInterface.js | 2 +- tests/baselines/reference/extendNonClassSymbol1.js | 2 +- tests/baselines/reference/extendNonClassSymbol2.js | 2 +- .../reference/extendPrivateConstructorClass.js | 2 +- .../extendingClassFromAliasAndUsageInIndexer.js | 4 ++-- .../baselines/reference/extendsClauseAlreadySeen.js | 2 +- .../baselines/reference/extendsClauseAlreadySeen2.js | 2 +- tests/baselines/reference/fluentClasses.js | 2 +- tests/baselines/reference/for-inStatements.js | 2 +- tests/baselines/reference/for-inStatementsInvalid.js | 2 +- .../reference/forStatementsMultipleInvalidDecl.js | 2 +- .../reference/functionImplementationErrors.js | 2 +- tests/baselines/reference/functionImplementations.js | 2 +- .../reference/functionSubtypingOfVarArgs.js | 2 +- .../reference/functionSubtypingOfVarArgs2.js | 2 +- .../baselines/reference/generatedContextualTyping.js | 2 +- .../reference/genericBaseClassLiteralProperty.js | 2 +- .../reference/genericBaseClassLiteralProperty2.js | 2 +- ...enericCallWithConstraintsTypeArgumentInference.js | 2 +- .../reference/genericCallWithObjectTypeArgs2.js | 2 +- .../genericCallWithObjectTypeArgsAndConstraints2.js | 2 +- .../genericCallWithObjectTypeArgsAndConstraints3.js | 2 +- .../reference/genericCallbacksAndClassHierarchy.js | 2 +- .../reference/genericClassExpressionInFunction.js | 2 +- ...ricClassInheritsConstructorFromNonGenericClass.js | 2 +- .../genericClassPropertyInheritanceSpecialization.js | 2 +- .../baselines/reference/genericClassStaticMethod.js | 2 +- tests/baselines/reference/genericClasses3.js | 2 +- .../genericConstraintOnExtendedBuiltinTypes.js | 2 +- .../genericConstraintOnExtendedBuiltinTypes2.js | 2 +- .../genericDerivedTypeWithSpecializedBase.js | 2 +- .../genericDerivedTypeWithSpecializedBase2.js | 2 +- .../reference/genericInheritedDefaultConstructors.js | 2 +- .../baselines/reference/genericPrototypeProperty2.js | 2 +- .../baselines/reference/genericPrototypeProperty3.js | 2 +- .../genericRecursiveImplicitConstructorErrors2.js | 2 +- .../genericRecursiveImplicitConstructorErrors3.js | 2 +- tests/baselines/reference/genericTypeAssertions2.js | 2 +- tests/baselines/reference/genericTypeAssertions4.js | 2 +- tests/baselines/reference/genericTypeAssertions6.js | 2 +- tests/baselines/reference/genericTypeConstraints.js | 2 +- .../genericTypeReferenceWithoutTypeArgument.js | 2 +- .../genericTypeReferenceWithoutTypeArgument2.js | 2 +- .../genericWithIndexerOfTypeParameterType2.js | 2 +- .../reference/heterogeneousArrayLiterals.js | 2 +- tests/baselines/reference/ifDoWhileStatements.js | 2 +- .../reference/illegalSuperCallsInConstructor.js | 2 +- .../reference/implementClausePrecedingExtends.js | 2 +- ...ementingAnInterfaceExtendingClassWithPrivates2.js | 2 +- ...mentingAnInterfaceExtendingClassWithProtecteds.js | 2 +- tests/baselines/reference/importAsBaseClass.js | 2 +- tests/baselines/reference/importHelpers.js | 2 +- tests/baselines/reference/importHelpersNoHelpers.js | 2 +- tests/baselines/reference/importHelpersNoModule.js | 2 +- tests/baselines/reference/importShadowsGlobalName.js | 2 +- .../baselines/reference/importUsedInExtendsList1.js | 2 +- tests/baselines/reference/indexerConstraints2.js | 2 +- tests/baselines/reference/indirectSelfReference.js | 2 +- .../reference/indirectSelfReferenceGeneric.js | 2 +- .../infinitelyExpandingTypesNonGenericBase.js | 2 +- .../reference/inheritFromGenericTypeParameter.js | 2 +- ...inheritSameNamePrivatePropertiesFromSameOrigin.js | 2 +- tests/baselines/reference/inheritance.js | 2 +- tests/baselines/reference/inheritance1.js | 2 +- .../inheritanceGrandParentPrivateMemberCollision.js | 2 +- ...ndParentPrivateMemberCollisionWithPublicMember.js | 2 +- ...ndParentPublicMemberCollisionWithPrivateMember.js | 2 +- .../inheritanceMemberAccessorOverridingAccessor.js | 2 +- .../inheritanceMemberAccessorOverridingMethod.js | 2 +- .../inheritanceMemberAccessorOverridingProperty.js | 2 +- .../inheritanceMemberFuncOverridingAccessor.js | 2 +- .../inheritanceMemberFuncOverridingMethod.js | 2 +- .../inheritanceMemberFuncOverridingProperty.js | 2 +- .../inheritanceMemberPropertyOverridingAccessor.js | 2 +- .../inheritanceMemberPropertyOverridingMethod.js | 2 +- .../inheritanceMemberPropertyOverridingProperty.js | 2 +- .../inheritanceOfGenericConstructorMethod1.js | 2 +- .../inheritanceOfGenericConstructorMethod2.js | 2 +- .../inheritanceStaticAccessorOverridingAccessor.js | 2 +- .../inheritanceStaticAccessorOverridingMethod.js | 2 +- .../inheritanceStaticAccessorOverridingProperty.js | 2 +- .../inheritanceStaticFuncOverridingAccessor.js | 2 +- ...eritanceStaticFuncOverridingAccessorOfFuncType.js | 2 +- .../inheritanceStaticFuncOverridingMethod.js | 2 +- .../inheritanceStaticFuncOverridingProperty.js | 2 +- ...eritanceStaticFuncOverridingPropertyOfFuncType.js | 2 +- ...itanceStaticFunctionOverridingInstanceProperty.js | 2 +- .../reference/inheritanceStaticMembersCompatible.js | 2 +- .../inheritanceStaticMembersIncompatible.js | 2 +- .../inheritanceStaticPropertyOverridingAccessor.js | 2 +- .../inheritanceStaticPropertyOverridingMethod.js | 2 +- .../inheritanceStaticPropertyOverridingProperty.js | 2 +- .../reference/inheritedConstructorWithRestParams.js | 2 +- .../reference/inheritedConstructorWithRestParams2.js | 2 +- .../reference/inheritedModuleMembersForClodule.js | 2 +- tests/baselines/reference/instanceOfAssignability.js | 2 +- .../instancePropertiesInheritedIntoClassType.js | 2 +- tests/baselines/reference/instanceSubtypeCheck2.js | 2 +- .../instanceofWithStructurallyIdenticalTypes.js | 2 +- .../instantiatedReturnTypeContravariance.js | 2 +- tests/baselines/reference/interfaceClassMerging.js | 2 +- tests/baselines/reference/interfaceClassMerging2.js | 2 +- tests/baselines/reference/interfaceExtendsClass1.js | 2 +- .../reference/interfaceExtendsClassWithPrivate1.js | 2 +- .../reference/interfaceExtendsClassWithPrivate2.js | 2 +- .../baselines/reference/interfaceImplementation8.js | 2 +- .../invalidModuleWithStatementsOfEveryKind.js | 2 +- .../reference/invalidMultipleVariableDeclarations.js | 2 +- tests/baselines/reference/invalidReturnStatements.js | 2 +- .../reference/isolatedModulesImportExportElision.js | 2 +- tests/baselines/reference/jsxViaImport.js | 2 +- tests/baselines/reference/keyofAndIndexedAccess.js | 2 +- tests/baselines/reference/lambdaArgCrash.js | 2 +- tests/baselines/reference/lift.js | 2 +- tests/baselines/reference/localTypes1.js | 2 +- tests/baselines/reference/m7Bugs.js | 2 +- tests/baselines/reference/mergedDeclarations5.js | 2 +- tests/baselines/reference/mergedDeclarations6.js | 2 +- .../reference/mergedInheritedClassInterface.js | 2 +- .../mergedInterfacesWithInheritedPrivates2.js | 2 +- .../mergedInterfacesWithInheritedPrivates3.js | 2 +- .../reference/missingPropertiesOfClassExpression.js | 2 +- tests/baselines/reference/moduleAsBaseType.js | 2 +- .../moduleImportedForTypeArgumentPosition.js | 2 +- .../reference/moduleWithStatementsOfEveryKind.js | 2 +- tests/baselines/reference/multipleInheritance.js | 2 +- .../reference/mutuallyRecursiveGenericBaseTypes2.js | 2 +- .../reference/noImplicitAnyMissingGetAccessor.js | 2 +- .../reference/noImplicitAnyMissingSetAccessor.js | 2 +- .../nonGenericClassExtendingGenericClassWithAny.js | 2 +- .../numericIndexerConstrainsPropertyDeclarations2.js | 2 +- .../baselines/reference/numericIndexerConstraint3.js | 2 +- .../baselines/reference/numericIndexerConstraint4.js | 2 +- tests/baselines/reference/numericIndexerTyping2.js | 2 +- .../objectCreationOfElementAccessExpression.js | 2 +- .../objectTypeHidingMembersOfExtendedObject.js | 2 +- .../objectTypesIdentityWithNumericIndexers1.js | 2 +- .../objectTypesIdentityWithNumericIndexers2.js | 2 +- .../objectTypesIdentityWithNumericIndexers3.js | 2 +- .../reference/objectTypesIdentityWithPrivates.js | 2 +- .../reference/objectTypesIdentityWithPrivates2.js | 2 +- .../reference/objectTypesIdentityWithPrivates3.js | 2 +- .../objectTypesIdentityWithStringIndexers.js | 2 +- .../objectTypesIdentityWithStringIndexers2.js | 2 +- .../reference/optionalConstructorArgInSuper.js | 2 +- tests/baselines/reference/optionalMethods.js | 2 +- tests/baselines/reference/optionalParamArgsTest.js | 2 +- tests/baselines/reference/optionalParamInOverride.js | 2 +- .../baselines/reference/optionalParameterProperty.js | 2 +- tests/baselines/reference/outModuleConcatAmd.js | 2 +- .../reference/outModuleConcatAmd.sourcemap.txt | 2 +- tests/baselines/reference/outModuleConcatSystem.js | 2 +- .../reference/outModuleConcatSystem.sourcemap.txt | 2 +- .../baselines/reference/outModuleTripleSlashRefs.js | 2 +- .../reference/outModuleTripleSlashRefs.sourcemap.txt | 2 +- tests/baselines/reference/overload1.js | 2 +- .../reference/overloadOnConstConstraintChecks1.js | 2 +- .../reference/overloadOnConstConstraintChecks2.js | 2 +- .../reference/overloadOnConstConstraintChecks3.js | 2 +- .../reference/overloadOnConstConstraintChecks4.js | 2 +- .../reference/overloadOnConstantsInvalidOverload1.js | 2 +- tests/baselines/reference/overloadResolution.js | 2 +- .../reference/overloadResolutionClassConstructors.js | 2 +- .../reference/overloadResolutionConstructors.js | 2 +- tests/baselines/reference/overloadingOnConstants1.js | 2 +- tests/baselines/reference/overloadingOnConstants2.js | 2 +- .../reference/overridingPrivateStaticMembers.js | 2 +- .../reference/parseErrorInHeritageClause1.js | 2 +- tests/baselines/reference/parser509630.js | 2 +- tests/baselines/reference/parserAstSpans1.js | 2 +- tests/baselines/reference/parserClassDeclaration1.js | 2 +- tests/baselines/reference/parserClassDeclaration3.js | 2 +- tests/baselines/reference/parserClassDeclaration4.js | 2 +- tests/baselines/reference/parserClassDeclaration5.js | 2 +- tests/baselines/reference/parserClassDeclaration6.js | 2 +- ...parserErrorRecovery_ExtendsOrImplementsClause2.js | 2 +- ...parserErrorRecovery_ExtendsOrImplementsClause4.js | 2 +- ...parserErrorRecovery_ExtendsOrImplementsClause5.js | 2 +- .../reference/parserGenericsInTypeContexts1.js | 2 +- .../reference/parserGenericsInTypeContexts2.js | 2 +- tests/baselines/reference/parserRealSource10.js | 2 +- tests/baselines/reference/parserRealSource11.js | 2 +- tests/baselines/reference/parserharness.js | 2 +- .../partiallyAnnotatedFunctionInferenceError.js | 2 +- ...llyAnnotatedFunctionInferenceWithTypeParameter.js | 2 +- tests/baselines/reference/primitiveMembers.js | 2 +- tests/baselines/reference/privacyClass.js | 2 +- .../reference/privacyClassExtendsClauseDeclFile.js | 4 ++-- tests/baselines/reference/privacyGloClass.js | 2 +- .../baselines/reference/privateAccessInSubclass1.js | 2 +- .../reference/privateInstanceMemberAccessibility.js | 2 +- ...eProtectedMembersAreNotAccessibleDestructuring.js | 2 +- .../reference/privateStaticMemberAccessibility.js | 2 +- .../privateStaticNotAccessibleInClodule2.js | 2 +- .../amd/testGlo.js | 2 +- .../node/testGlo.js | 2 +- .../reference/project/prologueEmit/amd/out.js | 2 +- .../reference/project/prologueEmit/node/out.js | 2 +- .../quotesInFileAndDirectoryNames/amd/m'ain.js | 2 +- .../quotesInFileAndDirectoryNames/node/m'ain.js | 2 +- tests/baselines/reference/propertiesAndIndexers.js | 2 +- tests/baselines/reference/propertyAccess.js | 2 +- .../propertyAccessOnTypeParameterWithConstraints2.js | 2 +- .../propertyAccessOnTypeParameterWithConstraints3.js | 2 +- .../propertyAccessOnTypeParameterWithConstraints5.js | 2 +- ...tedClassPropertyAccessibleWithinNestedSubclass.js | 2 +- ...edClassPropertyAccessibleWithinNestedSubclass1.js | 2 +- ...protectedClassPropertyAccessibleWithinSubclass.js | 2 +- ...rotectedClassPropertyAccessibleWithinSubclass2.js | 2 +- ...rotectedClassPropertyAccessibleWithinSubclass3.js | 2 +- .../protectedInstanceMemberAccessibility.js | 2 +- tests/baselines/reference/protectedMembers.js | 2 +- ...tedStaticClassPropertyAccessibleWithinSubclass.js | 2 +- ...edStaticClassPropertyAccessibleWithinSubclass2.js | 2 +- ...name-resolution-does-not-affect-class-heritage.js | 2 +- .../reference/readonlyConstructorAssignment.js | 2 +- tests/baselines/reference/recursiveBaseCheck3.js | 2 +- tests/baselines/reference/recursiveBaseCheck4.js | 2 +- tests/baselines/reference/recursiveBaseCheck6.js | 2 +- .../reference/recursiveBaseConstructorCreation1.js | 2 +- ...siveClassInstantiationsWithDefaultConstructors.js | 2 +- .../reference/recursiveClassReferenceTest.js | 2 +- .../recursiveClassReferenceTest.sourcemap.txt | 2 +- .../reference/recursiveComplicatedClasses.js | 2 +- .../recursivelySpecializedConstructorDeclaration.js | 2 +- tests/baselines/reference/reexportClassDefinition.js | 2 +- ...olvingClassDeclarationWhenInBaseTypeResolution.js | 2 +- tests/baselines/reference/returnInConstructor1.js | 2 +- tests/baselines/reference/returnStatements.js | 2 +- .../scopeCheckExtendedClassInsidePublicMethod2.js | 2 +- .../scopeCheckExtendedClassInsideStaticMethod1.js | 2 +- tests/baselines/reference/scopeTests.js | 2 +- tests/baselines/reference/shadowPrivateMembers.js | 2 +- ...ionClassWithDefaultConstructorAndExtendsClause.js | 2 +- ...hDefaultConstructorAndExtendsClause.sourcemap.txt | 2 +- .../reference/specializedInheritedConstructors1.js | 2 +- .../specializedOverloadWithRestParameters.js | 2 +- tests/baselines/reference/staticFactory1.js | 2 +- tests/baselines/reference/staticInheritance.js | 2 +- .../reference/staticMemberAccessOffDerivedType1.js | 2 +- tests/baselines/reference/staticPropSuper.js | 2 +- tests/baselines/reference/strictModeInConstructor.js | 2 +- tests/baselines/reference/strictModeReservedWord.js | 2 +- .../strictModeReservedWordInClassDeclaration.js | 2 +- .../stringIndexerConstrainsPropertyDeclarations2.js | 2 +- tests/baselines/reference/subtypesOfTypeParameter.js | 2 +- .../subtypesOfTypeParameterWithConstraints.js | 2 +- .../subtypesOfTypeParameterWithConstraints4.js | 2 +- ...ubtypesOfTypeParameterWithRecursiveConstraints.js | 2 +- tests/baselines/reference/subtypingTransitivity.js | 2 +- .../reference/subtypingWithCallSignatures2.js | 2 +- .../reference/subtypingWithCallSignatures3.js | 2 +- .../reference/subtypingWithCallSignatures4.js | 2 +- .../reference/subtypingWithConstructSignatures2.js | 2 +- .../reference/subtypingWithConstructSignatures3.js | 2 +- .../reference/subtypingWithConstructSignatures4.js | 2 +- .../reference/subtypingWithConstructSignatures5.js | 2 +- .../reference/subtypingWithConstructSignatures6.js | 2 +- .../reference/subtypingWithNumericIndexer.js | 2 +- .../reference/subtypingWithNumericIndexer3.js | 2 +- .../reference/subtypingWithNumericIndexer4.js | 2 +- .../reference/subtypingWithObjectMembers.js | 2 +- .../reference/subtypingWithObjectMembers4.js | 2 +- .../subtypingWithObjectMembersAccessibility.js | 2 +- .../subtypingWithObjectMembersAccessibility2.js | 2 +- .../reference/subtypingWithStringIndexer.js | 2 +- .../reference/subtypingWithStringIndexer3.js | 2 +- .../reference/subtypingWithStringIndexer4.js | 2 +- tests/baselines/reference/super.js | 2 +- tests/baselines/reference/super1.js | 2 +- tests/baselines/reference/super2.js | 2 +- tests/baselines/reference/superAccess.js | 2 +- tests/baselines/reference/superAccess2.js | 2 +- tests/baselines/reference/superAccessInFatArrow1.js | 2 +- tests/baselines/reference/superCallArgsMustMatch.js | 2 +- tests/baselines/reference/superCallAssignResult.js | 2 +- .../reference/superCallBeforeThisAccessing1.js | 2 +- .../reference/superCallBeforeThisAccessing2.js | 2 +- .../reference/superCallBeforeThisAccessing3.js | 2 +- .../reference/superCallBeforeThisAccessing4.js | 2 +- .../reference/superCallBeforeThisAccessing5.js | 2 +- .../reference/superCallBeforeThisAccessing6.js | 2 +- .../reference/superCallBeforeThisAccessing7.js | 2 +- .../reference/superCallBeforeThisAccessing8.js | 2 +- .../superCallFromClassThatDerivesFromGenericType1.js | 2 +- .../superCallFromClassThatDerivesFromGenericType2.js | 2 +- ...ericTypeButWithIncorrectNumberOfTypeArguments1.js | 2 +- ...tDerivesFromGenericTypeButWithNoTypeArguments1.js | 2 +- ...ThatDerivesNonGenericTypeButWithTypeArguments1.js | 2 +- .../reference/superCallInNonStaticMethod.js | 2 +- tests/baselines/reference/superCallInStaticMethod.js | 2 +- .../reference/superCallInsideClassDeclaration.js | 2 +- .../reference/superCallInsideClassExpression.js | 2 +- .../superCallInsideObjectLiteralExpression.js | 2 +- .../reference/superCallOutsideConstructor.js | 2 +- .../reference/superCallParameterContextualTyping1.js | 2 +- .../reference/superCallParameterContextualTyping2.js | 2 +- .../reference/superCallParameterContextualTyping3.js | 2 +- .../reference/superCallWithCommentEmit01.js | 2 +- .../reference/superCallWithMissingBaseClass.js | 2 +- tests/baselines/reference/superCalls.js | 2 +- tests/baselines/reference/superCallsInConstructor.js | 2 +- tests/baselines/reference/superErrors.js | 2 +- tests/baselines/reference/superInCatchBlock1.js | 2 +- .../baselines/reference/superInConstructorParam1.js | 2 +- tests/baselines/reference/superInLambdas.js | 2 +- .../baselines/reference/superInObjectLiterals_ES5.js | 2 +- tests/baselines/reference/superNewCall1.js | 2 +- tests/baselines/reference/superPropertyAccess.js | 2 +- tests/baselines/reference/superPropertyAccess1.js | 2 +- tests/baselines/reference/superPropertyAccess2.js | 2 +- ...ertyAccessInComputedPropertiesOfNestedType_ES5.js | 2 +- .../reference/superPropertyAccessNoError.js | 2 +- tests/baselines/reference/superPropertyAccess_ES5.js | 2 +- .../baselines/reference/superSymbolIndexedAccess5.js | 2 +- .../baselines/reference/superSymbolIndexedAccess6.js | 2 +- .../reference/superWithGenericSpecialization.js | 2 +- tests/baselines/reference/superWithGenerics.js | 2 +- tests/baselines/reference/superWithTypeArgument.js | 2 +- tests/baselines/reference/superWithTypeArgument2.js | 2 +- tests/baselines/reference/superWithTypeArgument3.js | 2 +- ...uper_inside-object-literal-getters-and-setters.js | 2 +- tests/baselines/reference/switchStatements.js | 2 +- .../reference/systemModuleWithSuperClass.js | 2 +- tests/baselines/reference/targetTypeBaseCalls.js | 2 +- tests/baselines/reference/thisInInvalidContexts.js | 2 +- .../reference/thisInInvalidContextsExternalModule.js | 2 +- tests/baselines/reference/thisInSuperCall.js | 2 +- tests/baselines/reference/thisInSuperCall1.js | 2 +- tests/baselines/reference/thisInSuperCall2.js | 2 +- tests/baselines/reference/thisInSuperCall3.js | 2 +- tests/baselines/reference/thisTypeInFunctions.js | 2 +- .../reference/thisTypeInFunctionsNegative.js | 2 +- .../tsxCorrectlyParseLessThanComparison1.js | 2 +- tests/baselines/reference/tsxDynamicTagName5.js | 2 +- tests/baselines/reference/tsxDynamicTagName7.js | 2 +- tests/baselines/reference/tsxDynamicTagName8.js | 2 +- tests/baselines/reference/tsxDynamicTagName9.js | 2 +- tests/baselines/reference/tsxExternalModuleEmit1.js | 4 ++-- .../reference/tsxStatelessFunctionComponents2.js | 2 +- tests/baselines/reference/tsxUnionTypeComponent1.js | 2 +- tests/baselines/reference/typeAssertions.js | 2 +- tests/baselines/reference/typeGuardFunction.js | 2 +- tests/baselines/reference/typeGuardFunctionErrors.js | 2 +- .../baselines/reference/typeGuardFunctionGenerics.js | 2 +- .../reference/typeGuardFunctionOfFormThis.js | 2 +- .../reference/typeGuardFunctionOfFormThisErrors.js | 2 +- .../baselines/reference/typeGuardOfFormInstanceOf.js | 2 +- tests/baselines/reference/typeGuardOfFormIsType.js | 2 +- .../baselines/reference/typeGuardOfFormThisMember.js | 2 +- .../reference/typeGuardOfFormThisMemberErrors.js | 2 +- tests/baselines/reference/typeMatch2.js | 2 +- tests/baselines/reference/typeOfSuperCall.js | 2 +- .../baselines/reference/typeParameterAsBaseClass.js | 2 +- tests/baselines/reference/typeParameterAsBaseType.js | 2 +- .../reference/typeParameterExtendingUnion1.js | 2 +- .../reference/typeParameterExtendingUnion2.js | 2 +- tests/baselines/reference/typeRelationships.js | 2 +- tests/baselines/reference/typeValueConflict1.js | 2 +- tests/baselines/reference/typeValueConflict2.js | 2 +- tests/baselines/reference/typeofClass2.js | 2 +- .../reference/typesWithSpecializedCallSignatures.js | 2 +- .../typesWithSpecializedConstructSignatures.js | 2 +- tests/baselines/reference/undeclaredBase.js | 2 +- .../reference/undefinedIsSubtypeOfEverything.js | 2 +- tests/baselines/reference/underscoreMapFirst.js | 2 +- .../reference/underscoreThisInDerivedClass01.js | 2 +- .../reference/underscoreThisInDerivedClass02.js | 2 +- tests/baselines/reference/unionTypeEquivalence.js | 2 +- .../baselines/reference/unionTypeFromArrayLiteral.js | 2 +- tests/baselines/reference/unionTypesAssignability.js | 2 +- tests/baselines/reference/unknownSymbols1.js | 2 +- .../baselines/reference/unspecializedConstraints.js | 2 +- .../untypedFunctionCallsWithTypeParameters1.js | 2 +- .../baselines/reference/unusedClassesinNamespace4.js | 2 +- .../reference/unusedIdentifiersConsolidated1.js | 2 +- tests/baselines/reference/validUseOfThisInSuper.js | 2 +- .../baselines/reference/varArgsOnConstructorTypes.js | 2 +- 660 files changed, 670 insertions(+), 670 deletions(-) diff --git a/src/compiler/transformers/es2015.ts b/src/compiler/transformers/es2015.ts index bc9341a4b4f71..5dc7870131656 100644 --- a/src/compiler/transformers/es2015.ts +++ b/src/compiler/transformers/es2015.ts @@ -3338,7 +3338,7 @@ namespace ts { priority: 0, text: ` var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); };` diff --git a/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js b/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js index ec0ed5494a4f1..b15cd7f6eb73a 100644 --- a/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js +++ b/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js @@ -22,7 +22,7 @@ module A { //// [ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js b/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js index bae9593fb98b1..955adc728178e 100644 --- a/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js +++ b/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js @@ -26,7 +26,7 @@ module A { //// [ExportClassWithInaccessibleTypeInTypeParameterConstraint.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/abstractClassInLocalScope.js b/tests/baselines/reference/abstractClassInLocalScope.js index db5144be39981..b413326e26a0b 100644 --- a/tests/baselines/reference/abstractClassInLocalScope.js +++ b/tests/baselines/reference/abstractClassInLocalScope.js @@ -9,7 +9,7 @@ //// [abstractClassInLocalScope.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js b/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js index 1b3e11cfa32d9..f143171b54c15 100644 --- a/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js +++ b/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js @@ -9,7 +9,7 @@ //// [abstractClassInLocalScopeIsAbstract.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/abstractProperty.js b/tests/baselines/reference/abstractProperty.js index fb7deaa09ddbc..12735de42cb8f 100644 --- a/tests/baselines/reference/abstractProperty.js +++ b/tests/baselines/reference/abstractProperty.js @@ -23,7 +23,7 @@ class C extends B { //// [abstractProperty.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/abstractPropertyNegative.js b/tests/baselines/reference/abstractPropertyNegative.js index bebf9026a0e56..eaad20d1804d5 100644 --- a/tests/baselines/reference/abstractPropertyNegative.js +++ b/tests/baselines/reference/abstractPropertyNegative.js @@ -45,7 +45,7 @@ abstract class AbstractAccessorMismatch { //// [abstractPropertyNegative.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/accessOverriddenBaseClassMember1.js b/tests/baselines/reference/accessOverriddenBaseClassMember1.js index 02d092dfd393f..2d06be8df968c 100644 --- a/tests/baselines/reference/accessOverriddenBaseClassMember1.js +++ b/tests/baselines/reference/accessOverriddenBaseClassMember1.js @@ -17,7 +17,7 @@ class ColoredPoint extends Point { //// [accessOverriddenBaseClassMember1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; 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 dbaeec1f688ef..eddb75c2666e3 100644 --- a/tests/baselines/reference/accessors_spec_section-4.5_inference.js +++ b/tests/baselines/reference/accessors_spec_section-4.5_inference.js @@ -26,7 +26,7 @@ class LanguageSpec_section_4_5_inference { //// [accessors_spec_section-4.5_inference.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInAccessorsOfClass.js b/tests/baselines/reference/aliasUsageInAccessorsOfClass.js index 8b60ed8e76ddd..817e589d99529 100644 --- a/tests/baselines/reference/aliasUsageInAccessorsOfClass.js +++ b/tests/baselines/reference/aliasUsageInAccessorsOfClass.js @@ -38,7 +38,7 @@ exports.Model = Model; //// [aliasUsage1_moduleA.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInArray.js b/tests/baselines/reference/aliasUsageInArray.js index bf573aa9abb20..e0d30fb608b55 100644 --- a/tests/baselines/reference/aliasUsageInArray.js +++ b/tests/baselines/reference/aliasUsageInArray.js @@ -32,7 +32,7 @@ exports.Model = Model; //// [aliasUsageInArray_moduleA.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInFunctionExpression.js b/tests/baselines/reference/aliasUsageInFunctionExpression.js index 49bdd493aacee..35bf66fed0246 100644 --- a/tests/baselines/reference/aliasUsageInFunctionExpression.js +++ b/tests/baselines/reference/aliasUsageInFunctionExpression.js @@ -31,7 +31,7 @@ exports.Model = Model; //// [aliasUsageInFunctionExpression_moduleA.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInGenericFunction.js b/tests/baselines/reference/aliasUsageInGenericFunction.js index dc3a8a88bab8d..373aa0c3b4044 100644 --- a/tests/baselines/reference/aliasUsageInGenericFunction.js +++ b/tests/baselines/reference/aliasUsageInGenericFunction.js @@ -35,7 +35,7 @@ exports.Model = Model; //// [aliasUsageInGenericFunction_moduleA.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInIndexerOfClass.js b/tests/baselines/reference/aliasUsageInIndexerOfClass.js index cb7ad3027cad4..9769a4b005f81 100644 --- a/tests/baselines/reference/aliasUsageInIndexerOfClass.js +++ b/tests/baselines/reference/aliasUsageInIndexerOfClass.js @@ -37,7 +37,7 @@ exports.Model = Model; //// [aliasUsageInIndexerOfClass_moduleA.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInObjectLiteral.js b/tests/baselines/reference/aliasUsageInObjectLiteral.js index 81e3e621e850b..2f4abf75161b3 100644 --- a/tests/baselines/reference/aliasUsageInObjectLiteral.js +++ b/tests/baselines/reference/aliasUsageInObjectLiteral.js @@ -32,7 +32,7 @@ exports.Model = Model; //// [aliasUsageInObjectLiteral_moduleA.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInOrExpression.js b/tests/baselines/reference/aliasUsageInOrExpression.js index 4faa41dd034f8..c4902a1b8942d 100644 --- a/tests/baselines/reference/aliasUsageInOrExpression.js +++ b/tests/baselines/reference/aliasUsageInOrExpression.js @@ -35,7 +35,7 @@ exports.Model = Model; //// [aliasUsageInOrExpression_moduleA.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js b/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js index 2cf4aefab6c32..c79f820b106ce 100644 --- a/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js +++ b/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js @@ -35,7 +35,7 @@ exports.Model = Model; //// [aliasUsageInTypeArgumentOfExtendsClause_moduleA.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -51,7 +51,7 @@ exports.VisualizationModel = VisualizationModel; //// [aliasUsageInTypeArgumentOfExtendsClause_main.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInVarAssignment.js b/tests/baselines/reference/aliasUsageInVarAssignment.js index 80bb2dca20eea..87c41811d4a9c 100644 --- a/tests/baselines/reference/aliasUsageInVarAssignment.js +++ b/tests/baselines/reference/aliasUsageInVarAssignment.js @@ -31,7 +31,7 @@ exports.Model = Model; //// [aliasUsageInVarAssignment_moduleA.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/ambiguousOverloadResolution.js b/tests/baselines/reference/ambiguousOverloadResolution.js index 01002792921c2..9b141141862f0 100644 --- a/tests/baselines/reference/ambiguousOverloadResolution.js +++ b/tests/baselines/reference/ambiguousOverloadResolution.js @@ -10,7 +10,7 @@ var t: number = f(x, x); // Not an error //// [ambiguousOverloadResolution.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/apparentTypeSubtyping.js b/tests/baselines/reference/apparentTypeSubtyping.js index 6ca9d343a721f..dc30b51a4488c 100644 --- a/tests/baselines/reference/apparentTypeSubtyping.js +++ b/tests/baselines/reference/apparentTypeSubtyping.js @@ -25,7 +25,7 @@ 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 (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/apparentTypeSupertype.js b/tests/baselines/reference/apparentTypeSupertype.js index c6d3378872e60..bb002a9798d7a 100644 --- a/tests/baselines/reference/apparentTypeSupertype.js +++ b/tests/baselines/reference/apparentTypeSupertype.js @@ -15,7 +15,7 @@ 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 (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/arrayAssignmentTest1.js b/tests/baselines/reference/arrayAssignmentTest1.js index a887203cd5e05..410fb80b3233f 100644 --- a/tests/baselines/reference/arrayAssignmentTest1.js +++ b/tests/baselines/reference/arrayAssignmentTest1.js @@ -87,7 +87,7 @@ arr_any = i1; // should be an error - is //// [arrayAssignmentTest1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/arrayAssignmentTest2.js b/tests/baselines/reference/arrayAssignmentTest2.js index d82dedff29d60..e051b8187cf28 100644 --- a/tests/baselines/reference/arrayAssignmentTest2.js +++ b/tests/baselines/reference/arrayAssignmentTest2.js @@ -61,7 +61,7 @@ arr_any = i1; // should be an error - is //// [arrayAssignmentTest2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/arrayBestCommonTypes.js b/tests/baselines/reference/arrayBestCommonTypes.js index b7ddaa5d6dae4..acaa6c76ffc7d 100644 --- a/tests/baselines/reference/arrayBestCommonTypes.js +++ b/tests/baselines/reference/arrayBestCommonTypes.js @@ -109,7 +109,7 @@ module NonEmptyTypes { //// [arrayBestCommonTypes.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/arrayLiteralTypeInference.js b/tests/baselines/reference/arrayLiteralTypeInference.js index 919d3a5e9227c..d836e0afe1d71 100644 --- a/tests/baselines/reference/arrayLiteralTypeInference.js +++ b/tests/baselines/reference/arrayLiteralTypeInference.js @@ -53,7 +53,7 @@ var z3: { id: number }[] = //// [arrayLiteralTypeInference.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/arrayLiterals.js b/tests/baselines/reference/arrayLiterals.js index 530cdedec73f3..5e57d827c72be 100644 --- a/tests/baselines/reference/arrayLiterals.js +++ b/tests/baselines/reference/arrayLiterals.js @@ -39,7 +39,7 @@ var context4: Base[] = [new Derived1(), new Derived1()]; //// [arrayLiterals.js] // Empty array literal with no contextual type has type Undefined[] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js b/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js index c0f320ac1e53a..5b8237c25568d 100644 --- a/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js +++ b/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js @@ -27,7 +27,7 @@ var as = [list, myDerivedList]; // List[] //// [arrayLiteralsWithRecursiveGenerics.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js b/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js index d1d75e8041c2a..6fecfadd07bf4 100644 --- a/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js +++ b/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js @@ -21,7 +21,7 @@ rrb = cra; // error: 'A' is not assignable to 'B' //// [arrayOfSubtypeIsAssignableToReadonlyArray.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/arrowFunctionContexts.js b/tests/baselines/reference/arrowFunctionContexts.js index 64727398f7259..7075cdc0a58b1 100644 --- a/tests/baselines/reference/arrowFunctionContexts.js +++ b/tests/baselines/reference/arrowFunctionContexts.js @@ -98,7 +98,7 @@ var asserted2: any; //// [arrowFunctionContexts.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures3.js b/tests/baselines/reference/assignmentCompatWithCallSignatures3.js index c5a1f41543760..d4761781bd360 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures3.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures3.js @@ -102,7 +102,7 @@ b18 = a18; // ok //// [assignmentCompatWithCallSignatures3.js] // these are all permitted with the current rules, since we do not do contextual signature instantiation var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures4.js b/tests/baselines/reference/assignmentCompatWithCallSignatures4.js index 58faf663ea893..1a3d939ba234e 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures4.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures4.js @@ -101,7 +101,7 @@ module Errors { //// [assignmentCompatWithCallSignatures4.js] // These are mostly permitted with the current loose rules. All ok unless otherwise noted. var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures5.js b/tests/baselines/reference/assignmentCompatWithCallSignatures5.js index 87506cad08fd3..8d33f3565bf6b 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures5.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures5.js @@ -68,7 +68,7 @@ b18 = a18; // ok //// [assignmentCompatWithCallSignatures5.js] // checking assignment compat for function types. No errors in this file var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures6.js b/tests/baselines/reference/assignmentCompatWithCallSignatures6.js index 2c05d5960b291..5949ad582fab7 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures6.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures6.js @@ -45,7 +45,7 @@ b16 = x.a16; //// [assignmentCompatWithCallSignatures6.js] // checking assignment compatibility relations for function types. All valid var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js index 76ad53e4e05e0..97da2c5884895 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js @@ -102,7 +102,7 @@ b18 = a18; // ok //// [assignmentCompatWithConstructSignatures3.js] // checking assignment compatibility relations for function types. All of these are valid. var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js index f516df153c6b3..44e9c8e8a36b4 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js @@ -101,7 +101,7 @@ module Errors { //// [assignmentCompatWithConstructSignatures4.js] // checking assignment compatibility relations for function types. var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js index ef7de7f011bfb..a80ece9d4d51a 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js @@ -68,7 +68,7 @@ b18 = a18; // ok //// [assignmentCompatWithConstructSignatures5.js] // checking assignment compat for function types. All valid var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js index 3d58ae707a514..ea5c5c61e3bce 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js @@ -45,7 +45,7 @@ b16 = x.a16; //// [assignmentCompatWithConstructSignatures6.js] // checking assignment compatibility relations for function types. All valid. var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer.js b/tests/baselines/reference/assignmentCompatWithNumericIndexer.js index 3716050668362..f5ec41091e09e 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer.js +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer.js @@ -46,7 +46,7 @@ module Generics { //// [assignmentCompatWithNumericIndexer.js] // Derived type indexer must be subtype of base type indexer var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js b/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js index 2e6ecd72741db..c6e262c444617 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js @@ -43,7 +43,7 @@ module Generics { //// [assignmentCompatWithNumericIndexer3.js] // Derived type indexer must be subtype of base type indexer var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers4.js b/tests/baselines/reference/assignmentCompatWithObjectMembers4.js index 2cc2510c8da7b..b7ff16e11fc6a 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers4.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers4.js @@ -94,7 +94,7 @@ module WithBase { //// [assignmentCompatWithObjectMembers4.js] // members N and M of types S and T have the same name, same accessibility, same optionality, and N is not assignable M var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js index 3b12701b3d996..b5148d063a797 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js @@ -91,7 +91,7 @@ module SourceHasOptional { //// [assignmentCompatWithObjectMembersOptionality.js] // Derived member is not optional but base member is, should be ok var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js index f965d18e2cee2..4b22c46979174 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js @@ -93,7 +93,7 @@ module SourceHasOptional { // M is optional and S contains no property with the same name as M // N is optional and T contains no property with the same name as N var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithStringIndexer.js b/tests/baselines/reference/assignmentCompatWithStringIndexer.js index 8d081c907940e..b319af595cd37 100644 --- a/tests/baselines/reference/assignmentCompatWithStringIndexer.js +++ b/tests/baselines/reference/assignmentCompatWithStringIndexer.js @@ -56,7 +56,7 @@ module Generics { //// [assignmentCompatWithStringIndexer.js] // index signatures must be compatible in assignments var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentLHSIsValue.js b/tests/baselines/reference/assignmentLHSIsValue.js index 155fa26fa8159..add2c59e15f75 100644 --- a/tests/baselines/reference/assignmentLHSIsValue.js +++ b/tests/baselines/reference/assignmentLHSIsValue.js @@ -72,7 +72,7 @@ foo() = value; //// [assignmentLHSIsValue.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/asyncImportedPromise_es5.js b/tests/baselines/reference/asyncImportedPromise_es5.js index e5c28eb2dc13b..f13b4f962c73e 100644 --- a/tests/baselines/reference/asyncImportedPromise_es5.js +++ b/tests/baselines/reference/asyncImportedPromise_es5.js @@ -12,7 +12,7 @@ class Test { //// [task.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/autolift4.js b/tests/baselines/reference/autolift4.js index 1c29bfeeff7f3..5d27475ba42d7 100644 --- a/tests/baselines/reference/autolift4.js +++ b/tests/baselines/reference/autolift4.js @@ -25,7 +25,7 @@ class Point3D extends Point { //// [autolift4.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/baseCheck.js b/tests/baselines/reference/baseCheck.js index 870f811c09fa6..80271d13e83e8 100644 --- a/tests/baselines/reference/baseCheck.js +++ b/tests/baselines/reference/baseCheck.js @@ -31,7 +31,7 @@ function f() { //// [baseCheck.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/baseIndexSignatureResolution.js b/tests/baselines/reference/baseIndexSignatureResolution.js index 7e922cf83b239..bd6dd5a40e81e 100644 --- a/tests/baselines/reference/baseIndexSignatureResolution.js +++ b/tests/baselines/reference/baseIndexSignatureResolution.js @@ -26,7 +26,7 @@ var z: Derived = b.foo(); //// [baseIndexSignatureResolution.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/baseTypeOrderChecking.js b/tests/baselines/reference/baseTypeOrderChecking.js index ec96b80a9999f..1c87fb1dd5d44 100644 --- a/tests/baselines/reference/baseTypeOrderChecking.js +++ b/tests/baselines/reference/baseTypeOrderChecking.js @@ -38,7 +38,7 @@ class Class4 extends Class3 //// [baseTypeOrderChecking.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/baseTypeWrappingInstantiationChain.js b/tests/baselines/reference/baseTypeWrappingInstantiationChain.js index 5f8dcbd0e10fd..cc6c091b6c799 100644 --- a/tests/baselines/reference/baseTypeWrappingInstantiationChain.js +++ b/tests/baselines/reference/baseTypeWrappingInstantiationChain.js @@ -29,7 +29,7 @@ class C extends CBase { //// [baseTypeWrappingInstantiationChain.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/bases.js b/tests/baselines/reference/bases.js index 6b73eb9556b2c..f23750c439127 100644 --- a/tests/baselines/reference/bases.js +++ b/tests/baselines/reference/bases.js @@ -22,7 +22,7 @@ new C().y; //// [bases.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js index 6d0f19dd37def..755c3f4ab8448 100644 --- a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js +++ b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js @@ -30,7 +30,7 @@ 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 (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js index 2e2d0bcb1e2a4..796706dd248e4 100644 --- a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js +++ b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js @@ -28,7 +28,7 @@ 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 (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/bestCommonTypeOfTuple2.js b/tests/baselines/reference/bestCommonTypeOfTuple2.js index 928909f4c3852..1bd3ac45bccd1 100644 --- a/tests/baselines/reference/bestCommonTypeOfTuple2.js +++ b/tests/baselines/reference/bestCommonTypeOfTuple2.js @@ -24,7 +24,7 @@ var e51 = t5[2]; // {} //// [bestCommonTypeOfTuple2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js index 0ae7648c7f903..3c581096d6bbb 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js @@ -72,7 +72,7 @@ interface I extends A { //// [callSignatureAssignabilityInInheritance2.js] // checking subtype relations for function types as it relates to contextual signature instantiation var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js index 7a7791280ad87..909a9bbb8cbb2 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js @@ -117,7 +117,7 @@ module Errors { // checking subtype relations for function types as it relates to contextual signature instantiation // error cases var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js index 19d66ce8d461d..d42769a1e6717 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js @@ -52,7 +52,7 @@ interface I extends A { //// [callSignatureAssignabilityInInheritance4.js] // checking subtype relations for function types as it relates to contextual signature instantiation var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js index 1c53de5d26e7e..94f5fecd2f8e5 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js @@ -52,7 +52,7 @@ interface I extends B { // checking subtype relations for function types as it relates to contextual signature instantiation // same as subtypingWithCallSignatures2 just with an extra level of indirection in the inheritance chain var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js index c42e36389ca59..b73ed7070d8b3 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js @@ -55,7 +55,7 @@ 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 (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/callWithSpread.js b/tests/baselines/reference/callWithSpread.js index 69f7e4e30b0ac..2bce24e46374e 100644 --- a/tests/baselines/reference/callWithSpread.js +++ b/tests/baselines/reference/callWithSpread.js @@ -60,7 +60,7 @@ class D extends C { //// [callWithSpread.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/captureThisInSuperCall.js b/tests/baselines/reference/captureThisInSuperCall.js index 2c4df5db96151..1a1d5562531be 100644 --- a/tests/baselines/reference/captureThisInSuperCall.js +++ b/tests/baselines/reference/captureThisInSuperCall.js @@ -10,7 +10,7 @@ class B extends A { //// [captureThisInSuperCall.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/castingTuple.js b/tests/baselines/reference/castingTuple.js index f0178dcbbf0b2..331a61a6f78bb 100644 --- a/tests/baselines/reference/castingTuple.js +++ b/tests/baselines/reference/castingTuple.js @@ -34,7 +34,7 @@ t4[2] = 10; //// [castingTuple.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/chainedAssignment3.js b/tests/baselines/reference/chainedAssignment3.js index 3857867043c90..3bfe61f2664d0 100644 --- a/tests/baselines/reference/chainedAssignment3.js +++ b/tests/baselines/reference/chainedAssignment3.js @@ -24,7 +24,7 @@ a = b = new A(); //// [chainedAssignment3.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js index 26d341e1f6a7e..59a4b8b12ce7d 100644 --- a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js +++ b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js @@ -21,7 +21,7 @@ class C extends B { //// [chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkForObjectTooStrict.js b/tests/baselines/reference/checkForObjectTooStrict.js index ade99e9319b39..80f12196d0d03 100644 --- a/tests/baselines/reference/checkForObjectTooStrict.js +++ b/tests/baselines/reference/checkForObjectTooStrict.js @@ -33,7 +33,7 @@ class Baz extends Object { //// [checkForObjectTooStrict.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js index 8ced6fce50092..006bdbf356f74 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js @@ -12,7 +12,7 @@ class Derived extends Based { //// [checkSuperCallBeforeThisAccessing1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js index 95b34f27b68c7..5c35d42ca4f0f 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js @@ -12,7 +12,7 @@ class Derived extends Based { //// [checkSuperCallBeforeThisAccessing2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js index 0e882f71fdb1d..16b8181ac5d29 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js @@ -17,7 +17,7 @@ class Derived extends Based { //// [checkSuperCallBeforeThisAccessing3.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js index 00f2ed22fbf7b..9ac1fdaaa21e7 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js @@ -21,7 +21,7 @@ class Derived extends Based { //// [checkSuperCallBeforeThisAccessing4.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js index 4cce975d6d980..6f8d758916338 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js @@ -9,7 +9,7 @@ class Derived extends Based { //// [checkSuperCallBeforeThisAccessing5.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js index 782e32362717e..415bbb065016d 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js @@ -12,7 +12,7 @@ class Super extends Base { //// [checkSuperCallBeforeThisAccessing6.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js index ca12c16e047ad..39eea670c57ce 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js @@ -11,7 +11,7 @@ class Super extends Base { //// [checkSuperCallBeforeThisAccessing7.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js index 5dd3708a3bb3d..ff1801d1f9356 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js @@ -12,7 +12,7 @@ class Super extends Base { //// [checkSuperCallBeforeThisAccessing8.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/circularImportAlias.js b/tests/baselines/reference/circularImportAlias.js index 6fe5e604e57d3..49e1124b46710 100644 --- a/tests/baselines/reference/circularImportAlias.js +++ b/tests/baselines/reference/circularImportAlias.js @@ -22,7 +22,7 @@ var c = new B.a.C(); //// [circularImportAlias.js] // expected no error var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/circularTypeofWithFunctionModule.js b/tests/baselines/reference/circularTypeofWithFunctionModule.js index 1c38b9625e3e6..aa2987725bdfa 100644 --- a/tests/baselines/reference/circularTypeofWithFunctionModule.js +++ b/tests/baselines/reference/circularTypeofWithFunctionModule.js @@ -15,7 +15,7 @@ namespace maker { //// [circularTypeofWithFunctionModule.js] // Repro from #6072 var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractConstructorAssignability.js b/tests/baselines/reference/classAbstractConstructorAssignability.js index 35d9e75884fe0..20f3de041be60 100644 --- a/tests/baselines/reference/classAbstractConstructorAssignability.js +++ b/tests/baselines/reference/classAbstractConstructorAssignability.js @@ -16,7 +16,7 @@ new CC; //// [classAbstractConstructorAssignability.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractCrashedOnce.js b/tests/baselines/reference/classAbstractCrashedOnce.js index fe23e60c94faa..2037dbbc64fe9 100644 --- a/tests/baselines/reference/classAbstractCrashedOnce.js +++ b/tests/baselines/reference/classAbstractCrashedOnce.js @@ -12,7 +12,7 @@ var x = new bar(); //// [classAbstractCrashedOnce.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractExtends.js b/tests/baselines/reference/classAbstractExtends.js index e899cb82d6d73..d7e9a04d189a9 100644 --- a/tests/baselines/reference/classAbstractExtends.js +++ b/tests/baselines/reference/classAbstractExtends.js @@ -18,7 +18,7 @@ class E extends B { //// [classAbstractExtends.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractFactoryFunction.js b/tests/baselines/reference/classAbstractFactoryFunction.js index 50e232a9fcac7..71850654425b8 100644 --- a/tests/baselines/reference/classAbstractFactoryFunction.js +++ b/tests/baselines/reference/classAbstractFactoryFunction.js @@ -19,7 +19,7 @@ NewB(B); //// [classAbstractFactoryFunction.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractGeneric.js b/tests/baselines/reference/classAbstractGeneric.js index 96df8f5f19edd..e5f5598c14c97 100644 --- a/tests/baselines/reference/classAbstractGeneric.js +++ b/tests/baselines/reference/classAbstractGeneric.js @@ -27,7 +27,7 @@ class G extends A { //// [classAbstractGeneric.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractInAModule.js b/tests/baselines/reference/classAbstractInAModule.js index c6a9e206bcc72..5ff60d21ca9c3 100644 --- a/tests/baselines/reference/classAbstractInAModule.js +++ b/tests/baselines/reference/classAbstractInAModule.js @@ -9,7 +9,7 @@ new M.B; //// [classAbstractInAModule.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractInheritance.js b/tests/baselines/reference/classAbstractInheritance.js index 297a80dd99c3d..90d8216647a1e 100644 --- a/tests/baselines/reference/classAbstractInheritance.js +++ b/tests/baselines/reference/classAbstractInheritance.js @@ -23,7 +23,7 @@ abstract class GG extends CC {} //// [classAbstractInheritance.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractInstantiations1.js b/tests/baselines/reference/classAbstractInstantiations1.js index 5abbb9c1baa6f..4c6ed144e0bcd 100644 --- a/tests/baselines/reference/classAbstractInstantiations1.js +++ b/tests/baselines/reference/classAbstractInstantiations1.js @@ -29,7 +29,7 @@ c = new B; // Calling new with (non)abstract classes. // var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractInstantiations2.js b/tests/baselines/reference/classAbstractInstantiations2.js index dea4c744ae0a4..e5b678ee715e9 100644 --- a/tests/baselines/reference/classAbstractInstantiations2.js +++ b/tests/baselines/reference/classAbstractInstantiations2.js @@ -53,7 +53,7 @@ class H { // error -- not declared abstract //// [classAbstractInstantiations2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractOverrideWithAbstract.js b/tests/baselines/reference/classAbstractOverrideWithAbstract.js index 4ecebdf7b32f0..0cf9c039b3559 100644 --- a/tests/baselines/reference/classAbstractOverrideWithAbstract.js +++ b/tests/baselines/reference/classAbstractOverrideWithAbstract.js @@ -25,7 +25,7 @@ class DD extends BB { //// [classAbstractOverrideWithAbstract.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractSuperCalls.js b/tests/baselines/reference/classAbstractSuperCalls.js index 0197f48a429d2..30c33822be961 100644 --- a/tests/baselines/reference/classAbstractSuperCalls.js +++ b/tests/baselines/reference/classAbstractSuperCalls.js @@ -29,7 +29,7 @@ abstract class BB extends AA { //// [classAbstractSuperCalls.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractUsingAbstractMethod1.js b/tests/baselines/reference/classAbstractUsingAbstractMethod1.js index 74b5d62aaf532..5aa616dcb7c30 100644 --- a/tests/baselines/reference/classAbstractUsingAbstractMethod1.js +++ b/tests/baselines/reference/classAbstractUsingAbstractMethod1.js @@ -19,7 +19,7 @@ a.foo(); //// [classAbstractUsingAbstractMethod1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractUsingAbstractMethods2.js b/tests/baselines/reference/classAbstractUsingAbstractMethods2.js index 25cf1a307c7a3..56aa39377729e 100644 --- a/tests/baselines/reference/classAbstractUsingAbstractMethods2.js +++ b/tests/baselines/reference/classAbstractUsingAbstractMethods2.js @@ -29,7 +29,7 @@ class DD extends AA { //// [classAbstractUsingAbstractMethods2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classConstructorAccessibility2.js b/tests/baselines/reference/classConstructorAccessibility2.js index ef637611e8de8..eeff60323b7e6 100644 --- a/tests/baselines/reference/classConstructorAccessibility2.js +++ b/tests/baselines/reference/classConstructorAccessibility2.js @@ -48,7 +48,7 @@ var dc = new DerivedC(1); //// [classConstructorAccessibility2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classConstructorAccessibility4.js b/tests/baselines/reference/classConstructorAccessibility4.js index 4772ac68d119f..199383b6a71c4 100644 --- a/tests/baselines/reference/classConstructorAccessibility4.js +++ b/tests/baselines/reference/classConstructorAccessibility4.js @@ -32,7 +32,7 @@ class D { //// [classConstructorAccessibility4.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classConstructorAccessibility5.js b/tests/baselines/reference/classConstructorAccessibility5.js index d658349c2a59c..cb01b23378117 100644 --- a/tests/baselines/reference/classConstructorAccessibility5.js +++ b/tests/baselines/reference/classConstructorAccessibility5.js @@ -13,7 +13,7 @@ class Unrelated { //// [classConstructorAccessibility5.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classConstructorParametersAccessibility.js b/tests/baselines/reference/classConstructorParametersAccessibility.js index e0e75bcfeeb53..4b086a854a133 100644 --- a/tests/baselines/reference/classConstructorParametersAccessibility.js +++ b/tests/baselines/reference/classConstructorParametersAccessibility.js @@ -28,7 +28,7 @@ class Derived extends C3 { //// [classConstructorParametersAccessibility.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classConstructorParametersAccessibility2.js b/tests/baselines/reference/classConstructorParametersAccessibility2.js index 84da66c3e3c9c..244b56dddc092 100644 --- a/tests/baselines/reference/classConstructorParametersAccessibility2.js +++ b/tests/baselines/reference/classConstructorParametersAccessibility2.js @@ -28,7 +28,7 @@ class Derived extends C3 { //// [classConstructorParametersAccessibility2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classConstructorParametersAccessibility3.js b/tests/baselines/reference/classConstructorParametersAccessibility3.js index db9f94cf0fbf7..ef3e6d5b4bdde 100644 --- a/tests/baselines/reference/classConstructorParametersAccessibility3.js +++ b/tests/baselines/reference/classConstructorParametersAccessibility3.js @@ -15,7 +15,7 @@ d.p; // public, OK //// [classConstructorParametersAccessibility3.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js b/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js index 5a5440a92b591..1fa51632ba7c1 100644 --- a/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js +++ b/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js @@ -13,7 +13,7 @@ module M { //// [classDeclarationMergedInModuleWithContinuation.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classDeclaredBeforeClassFactory.js b/tests/baselines/reference/classDeclaredBeforeClassFactory.js index 3dd1e7a4aafb6..c30c913a0104f 100644 --- a/tests/baselines/reference/classDeclaredBeforeClassFactory.js +++ b/tests/baselines/reference/classDeclaredBeforeClassFactory.js @@ -9,7 +9,7 @@ function makeBaseClass() { //// [classDeclaredBeforeClassFactory.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classDoesNotDependOnBaseTypes.js b/tests/baselines/reference/classDoesNotDependOnBaseTypes.js index 076412e164dba..e195506c29420 100644 --- a/tests/baselines/reference/classDoesNotDependOnBaseTypes.js +++ b/tests/baselines/reference/classDoesNotDependOnBaseTypes.js @@ -14,7 +14,7 @@ class StringTreeCollection extends StringTreeCollectionBase { } //// [classDoesNotDependOnBaseTypes.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExpression2.js b/tests/baselines/reference/classExpression2.js index 59b62c60cfe29..7e78007badcf6 100644 --- a/tests/baselines/reference/classExpression2.js +++ b/tests/baselines/reference/classExpression2.js @@ -4,7 +4,7 @@ var v = class C extends D {}; //// [classExpression2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExpression3.js b/tests/baselines/reference/classExpression3.js index c0376c54c27af..9c29f35cd19ee 100644 --- a/tests/baselines/reference/classExpression3.js +++ b/tests/baselines/reference/classExpression3.js @@ -8,7 +8,7 @@ c.c; //// [classExpression3.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExpressionExtendingAbstractClass.js b/tests/baselines/reference/classExpressionExtendingAbstractClass.js index 7312ab6567dcb..3031f69117aeb 100644 --- a/tests/baselines/reference/classExpressionExtendingAbstractClass.js +++ b/tests/baselines/reference/classExpressionExtendingAbstractClass.js @@ -10,7 +10,7 @@ var C = class extends A { // no error reported! //// [classExpressionExtendingAbstractClass.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingBuiltinType.js b/tests/baselines/reference/classExtendingBuiltinType.js index 4c95e3008eaf9..c0988a01296d7 100644 --- a/tests/baselines/reference/classExtendingBuiltinType.js +++ b/tests/baselines/reference/classExtendingBuiltinType.js @@ -13,7 +13,7 @@ class C10 extends Array { } //// [classExtendingBuiltinType.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingClass.js b/tests/baselines/reference/classExtendingClass.js index 91e3752980cd9..5b5a1386322d0 100644 --- a/tests/baselines/reference/classExtendingClass.js +++ b/tests/baselines/reference/classExtendingClass.js @@ -33,7 +33,7 @@ var r8 = D2.other(1); //// [classExtendingClass.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingClassLikeType.js b/tests/baselines/reference/classExtendingClassLikeType.js index bfc10c2356394..1d16866904e78 100644 --- a/tests/baselines/reference/classExtendingClassLikeType.js +++ b/tests/baselines/reference/classExtendingClassLikeType.js @@ -60,7 +60,7 @@ class D5 extends getBadBase() { //// [classExtendingClassLikeType.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingNonConstructor.js b/tests/baselines/reference/classExtendingNonConstructor.js index 574d50044860e..74070c3bc0ccc 100644 --- a/tests/baselines/reference/classExtendingNonConstructor.js +++ b/tests/baselines/reference/classExtendingNonConstructor.js @@ -16,7 +16,7 @@ class C7 extends foo { } //// [classExtendingNonConstructor.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingNull.js b/tests/baselines/reference/classExtendingNull.js index 8d5d73329aa3e..3a227b564e901 100644 --- a/tests/baselines/reference/classExtendingNull.js +++ b/tests/baselines/reference/classExtendingNull.js @@ -5,7 +5,7 @@ class C2 extends (null) { } //// [classExtendingNull.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingPrimitive.js b/tests/baselines/reference/classExtendingPrimitive.js index 53cb45c208187..04fd2d57e5210 100644 --- a/tests/baselines/reference/classExtendingPrimitive.js +++ b/tests/baselines/reference/classExtendingPrimitive.js @@ -17,7 +17,7 @@ class C8 extends E { } //// [classExtendingPrimitive.js] // classes cannot extend primitives var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingPrimitive2.js b/tests/baselines/reference/classExtendingPrimitive2.js index b32dc31a5b400..a85bcb21f0951 100644 --- a/tests/baselines/reference/classExtendingPrimitive2.js +++ b/tests/baselines/reference/classExtendingPrimitive2.js @@ -7,7 +7,7 @@ class C5a extends null { } //// [classExtendingPrimitive2.js] // classes cannot extend primitives var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingQualifiedName.js b/tests/baselines/reference/classExtendingQualifiedName.js index fced8c2a37322..6c2d5b6c2e468 100644 --- a/tests/baselines/reference/classExtendingQualifiedName.js +++ b/tests/baselines/reference/classExtendingQualifiedName.js @@ -9,7 +9,7 @@ module M { //// [classExtendingQualifiedName.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingQualifiedName2.js b/tests/baselines/reference/classExtendingQualifiedName2.js index c133ceb87dc54..946a7604ca4a6 100644 --- a/tests/baselines/reference/classExtendingQualifiedName2.js +++ b/tests/baselines/reference/classExtendingQualifiedName2.js @@ -9,7 +9,7 @@ module M { //// [classExtendingQualifiedName2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsAcrossFiles.js b/tests/baselines/reference/classExtendsAcrossFiles.js index 5be0ab8f9c0a3..0fa873d378f9c 100644 --- a/tests/baselines/reference/classExtendsAcrossFiles.js +++ b/tests/baselines/reference/classExtendsAcrossFiles.js @@ -22,7 +22,7 @@ export const b = { //// [b.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -47,7 +47,7 @@ exports.b = { //// [a.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js b/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js index 91f96450d8724..b164b77d31954 100644 --- a/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js +++ b/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js @@ -15,7 +15,7 @@ module Foo { //// [classExtendsClauseClassMergedWithModuleNotReferingConstructor.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.js b/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.js index 6c3dc7894452d..619d1488ff813 100644 --- a/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.js +++ b/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.js @@ -8,7 +8,7 @@ module Foo { //// [classExtendsClauseClassNotReferringConstructor.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsEveryObjectType.js b/tests/baselines/reference/classExtendsEveryObjectType.js index a19f5d5cdd682..044ef0fca514f 100644 --- a/tests/baselines/reference/classExtendsEveryObjectType.js +++ b/tests/baselines/reference/classExtendsEveryObjectType.js @@ -18,7 +18,7 @@ class C6 extends []{ } // error //// [classExtendsEveryObjectType.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsEveryObjectType2.js b/tests/baselines/reference/classExtendsEveryObjectType2.js index fbc364ca5dad2..88929e72c57f1 100644 --- a/tests/baselines/reference/classExtendsEveryObjectType2.js +++ b/tests/baselines/reference/classExtendsEveryObjectType2.js @@ -5,7 +5,7 @@ class C6 extends []{ } // error //// [classExtendsEveryObjectType2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsInterface.js b/tests/baselines/reference/classExtendsInterface.js index b59462243172c..1005ccbdd3f73 100644 --- a/tests/baselines/reference/classExtendsInterface.js +++ b/tests/baselines/reference/classExtendsInterface.js @@ -10,7 +10,7 @@ class B2 implements Comparable2 {} //// [classExtendsInterface.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsInterfaceInExpression.js b/tests/baselines/reference/classExtendsInterfaceInExpression.js index 9dcd8dd727988..511d22e93f147 100644 --- a/tests/baselines/reference/classExtendsInterfaceInExpression.js +++ b/tests/baselines/reference/classExtendsInterfaceInExpression.js @@ -10,7 +10,7 @@ class C extends factory(A) {} //// [classExtendsInterfaceInExpression.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsInterfaceInModule.js b/tests/baselines/reference/classExtendsInterfaceInModule.js index 9da8831a1389f..a3034d59df726 100644 --- a/tests/baselines/reference/classExtendsInterfaceInModule.js +++ b/tests/baselines/reference/classExtendsInterfaceInModule.js @@ -17,7 +17,7 @@ class D extends Mod.Nested.I {} //// [classExtendsInterfaceInModule.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsItself.js b/tests/baselines/reference/classExtendsItself.js index 36f2263d671ee..ad4ce10cfc666 100644 --- a/tests/baselines/reference/classExtendsItself.js +++ b/tests/baselines/reference/classExtendsItself.js @@ -7,7 +7,7 @@ class E extends E { } // error //// [classExtendsItself.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsItselfIndirectly.js b/tests/baselines/reference/classExtendsItselfIndirectly.js index 0f3f48d2f2c18..dfbfb7720fa4e 100644 --- a/tests/baselines/reference/classExtendsItselfIndirectly.js +++ b/tests/baselines/reference/classExtendsItselfIndirectly.js @@ -13,7 +13,7 @@ class E2 extends D2 { baz: T; } //// [classExtendsItselfIndirectly.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsItselfIndirectly2.js b/tests/baselines/reference/classExtendsItselfIndirectly2.js index e215a07c3571e..6751b19335d75 100644 --- a/tests/baselines/reference/classExtendsItselfIndirectly2.js +++ b/tests/baselines/reference/classExtendsItselfIndirectly2.js @@ -24,7 +24,7 @@ module O { //// [classExtendsItselfIndirectly2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsItselfIndirectly3.js b/tests/baselines/reference/classExtendsItselfIndirectly3.js index f8366d77e1349..750e5ddfd1ce4 100644 --- a/tests/baselines/reference/classExtendsItselfIndirectly3.js +++ b/tests/baselines/reference/classExtendsItselfIndirectly3.js @@ -20,7 +20,7 @@ class E2 extends D2 { baz: T; } //// [classExtendsItselfIndirectly_file1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -33,7 +33,7 @@ var C = (function (_super) { }(E)); // error //// [classExtendsItselfIndirectly_file2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -46,7 +46,7 @@ var D = (function (_super) { }(C)); //// [classExtendsItselfIndirectly_file3.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -59,7 +59,7 @@ var E = (function (_super) { }(D)); //// [classExtendsItselfIndirectly_file4.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -72,7 +72,7 @@ var C2 = (function (_super) { }(E2)); // error //// [classExtendsItselfIndirectly_file5.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -85,7 +85,7 @@ var D2 = (function (_super) { }(C2)); //// [classExtendsItselfIndirectly_file6.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsMultipleBaseClasses.js b/tests/baselines/reference/classExtendsMultipleBaseClasses.js index cd9c28ad28319..6cb987186c4b1 100644 --- a/tests/baselines/reference/classExtendsMultipleBaseClasses.js +++ b/tests/baselines/reference/classExtendsMultipleBaseClasses.js @@ -5,7 +5,7 @@ class C extends A,B { } //// [classExtendsMultipleBaseClasses.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsNull.js b/tests/baselines/reference/classExtendsNull.js index 1eeb5172caddb..45cd0132bdae3 100644 --- a/tests/baselines/reference/classExtendsNull.js +++ b/tests/baselines/reference/classExtendsNull.js @@ -14,7 +14,7 @@ class D extends null { //// [classExtendsNull.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsShadowedConstructorFunction.js b/tests/baselines/reference/classExtendsShadowedConstructorFunction.js index ddaadc2dc628a..fde420bca3935 100644 --- a/tests/baselines/reference/classExtendsShadowedConstructorFunction.js +++ b/tests/baselines/reference/classExtendsShadowedConstructorFunction.js @@ -10,7 +10,7 @@ module M { //// [classExtendsShadowedConstructorFunction.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsValidConstructorFunction.js b/tests/baselines/reference/classExtendsValidConstructorFunction.js index 31bff6e430c4d..7346096d803e3 100644 --- a/tests/baselines/reference/classExtendsValidConstructorFunction.js +++ b/tests/baselines/reference/classExtendsValidConstructorFunction.js @@ -7,7 +7,7 @@ class C extends foo { } // error, cannot extend it though //// [classExtendsValidConstructorFunction.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classHeritageWithTrailingSeparator.js b/tests/baselines/reference/classHeritageWithTrailingSeparator.js index 12265f569bd56..ab37b45f3bedd 100644 --- a/tests/baselines/reference/classHeritageWithTrailingSeparator.js +++ b/tests/baselines/reference/classHeritageWithTrailingSeparator.js @@ -5,7 +5,7 @@ class D extends C, { //// [classHeritageWithTrailingSeparator.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classImplementsClass2.js b/tests/baselines/reference/classImplementsClass2.js index 5e3eae465438c..372f8ce84ef05 100644 --- a/tests/baselines/reference/classImplementsClass2.js +++ b/tests/baselines/reference/classImplementsClass2.js @@ -15,7 +15,7 @@ c2 = c; //// [classImplementsClass2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classImplementsClass3.js b/tests/baselines/reference/classImplementsClass3.js index 5fd003e93b908..09c2a9fbe6b4b 100644 --- a/tests/baselines/reference/classImplementsClass3.js +++ b/tests/baselines/reference/classImplementsClass3.js @@ -16,7 +16,7 @@ c2 = c; //// [classImplementsClass3.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classImplementsClass4.js b/tests/baselines/reference/classImplementsClass4.js index 477288972df22..c80e21525986a 100644 --- a/tests/baselines/reference/classImplementsClass4.js +++ b/tests/baselines/reference/classImplementsClass4.js @@ -18,7 +18,7 @@ c2 = c; //// [classImplementsClass4.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classImplementsClass5.js b/tests/baselines/reference/classImplementsClass5.js index 0ec258ab77bf3..de0bb4469e161 100644 --- a/tests/baselines/reference/classImplementsClass5.js +++ b/tests/baselines/reference/classImplementsClass5.js @@ -19,7 +19,7 @@ c2 = c; //// [classImplementsClass5.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classImplementsClass6.js b/tests/baselines/reference/classImplementsClass6.js index 0771c56415cc9..c87c1b59d2f7a 100644 --- a/tests/baselines/reference/classImplementsClass6.js +++ b/tests/baselines/reference/classImplementsClass6.js @@ -23,7 +23,7 @@ c2.bar(); // should error //// [classImplementsClass6.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classIndexer3.js b/tests/baselines/reference/classIndexer3.js index 2e55c89464526..759804baa41f8 100644 --- a/tests/baselines/reference/classIndexer3.js +++ b/tests/baselines/reference/classIndexer3.js @@ -12,7 +12,7 @@ class D123 extends C123 { //// [classIndexer3.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classInheritence.js b/tests/baselines/reference/classInheritence.js index f68d76fad47f1..614124c7a09e6 100644 --- a/tests/baselines/reference/classInheritence.js +++ b/tests/baselines/reference/classInheritence.js @@ -4,7 +4,7 @@ class A extends A { } //// [classInheritence.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classIsSubtypeOfBaseType.js b/tests/baselines/reference/classIsSubtypeOfBaseType.js index 52300987d8ebd..fe056e41813ac 100644 --- a/tests/baselines/reference/classIsSubtypeOfBaseType.js +++ b/tests/baselines/reference/classIsSubtypeOfBaseType.js @@ -17,7 +17,7 @@ class Derived2 extends Base<{ bar: string; }> { //// [classIsSubtypeOfBaseType.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classOrder2.js b/tests/baselines/reference/classOrder2.js index 63490fa29b174..34bbf93fd2fb2 100644 --- a/tests/baselines/reference/classOrder2.js +++ b/tests/baselines/reference/classOrder2.js @@ -21,7 +21,7 @@ a.foo(); //// [classOrder2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classOrderBug.js b/tests/baselines/reference/classOrderBug.js index e21a5ed64cff7..69ed7723a98d4 100644 --- a/tests/baselines/reference/classOrderBug.js +++ b/tests/baselines/reference/classOrderBug.js @@ -17,7 +17,7 @@ class foo extends baz {} //// [classOrderBug.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classSideInheritance1.js b/tests/baselines/reference/classSideInheritance1.js index 9443509032cb1..b3882d64b874c 100644 --- a/tests/baselines/reference/classSideInheritance1.js +++ b/tests/baselines/reference/classSideInheritance1.js @@ -17,7 +17,7 @@ C2.bar(); // valid //// [classSideInheritance1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classSideInheritance2.js b/tests/baselines/reference/classSideInheritance2.js index 67ee666749b75..8a6564f4f9f59 100644 --- a/tests/baselines/reference/classSideInheritance2.js +++ b/tests/baselines/reference/classSideInheritance2.js @@ -22,7 +22,7 @@ class TextBase implements IText { //// [classSideInheritance2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classSideInheritance3.js b/tests/baselines/reference/classSideInheritance3.js index 589dd81c5c693..44035af4f3016 100644 --- a/tests/baselines/reference/classSideInheritance3.js +++ b/tests/baselines/reference/classSideInheritance3.js @@ -20,7 +20,7 @@ var r3: typeof A = C; // ok //// [classSideInheritance3.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classUpdateTests.js b/tests/baselines/reference/classUpdateTests.js index 53ef71d0e4be7..d29277a84e43a 100644 --- a/tests/baselines/reference/classUpdateTests.js +++ b/tests/baselines/reference/classUpdateTests.js @@ -115,7 +115,7 @@ class R { //// [classUpdateTests.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classWithBaseClassButNoConstructor.js b/tests/baselines/reference/classWithBaseClassButNoConstructor.js index c25687d3c74cd..db10ddb072710 100644 --- a/tests/baselines/reference/classWithBaseClassButNoConstructor.js +++ b/tests/baselines/reference/classWithBaseClassButNoConstructor.js @@ -42,7 +42,7 @@ var d6 = new D(1); // ok //// [classWithBaseClassButNoConstructor.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classWithConstructors.js b/tests/baselines/reference/classWithConstructors.js index f445d22d18f88..3e038e3a424a8 100644 --- a/tests/baselines/reference/classWithConstructors.js +++ b/tests/baselines/reference/classWithConstructors.js @@ -51,7 +51,7 @@ module Generics { //// [classWithConstructors.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classWithProtectedProperty.js b/tests/baselines/reference/classWithProtectedProperty.js index 2cb8a4e0a50ad..35c26afef983d 100644 --- a/tests/baselines/reference/classWithProtectedProperty.js +++ b/tests/baselines/reference/classWithProtectedProperty.js @@ -30,7 +30,7 @@ class D extends C { //// [classWithProtectedProperty.js] // accessing any protected outside the class is an error var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classWithStaticMembers.js b/tests/baselines/reference/classWithStaticMembers.js index 9e79780d5cc6a..5deb8f996434e 100644 --- a/tests/baselines/reference/classWithStaticMembers.js +++ b/tests/baselines/reference/classWithStaticMembers.js @@ -21,7 +21,7 @@ var r3 = r.foo; //// [classWithStaticMembers.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classdecl.js b/tests/baselines/reference/classdecl.js index a3059757d2fba..99d7bba92b091 100644 --- a/tests/baselines/reference/classdecl.js +++ b/tests/baselines/reference/classdecl.js @@ -95,7 +95,7 @@ class e { //// [classdecl.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/clodulesDerivedClasses.js b/tests/baselines/reference/clodulesDerivedClasses.js index ea4bfcf301f75..209b135fb15dd 100644 --- a/tests/baselines/reference/clodulesDerivedClasses.js +++ b/tests/baselines/reference/clodulesDerivedClasses.js @@ -24,7 +24,7 @@ module Path.Utils { //// [clodulesDerivedClasses.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js index 85c0e398fbd0f..ec87855ba4640 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js @@ -41,7 +41,7 @@ class c extends Foo { //// [collisionSuperAndLocalFunctionInAccessors.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.js index d4a22b731f2cf..09f1db5dd4095 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.js +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.js @@ -26,7 +26,7 @@ class c extends Foo { //// [collisionSuperAndLocalFunctionInConstructor.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.js index 81c069da169d9..40084c7c2a5a6 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.js +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.js @@ -30,7 +30,7 @@ class c extends Foo { //// [collisionSuperAndLocalFunctionInMethod.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js index 67b7f0e399197..457779fe3954f 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js @@ -20,7 +20,7 @@ class b extends Foo { //// [collisionSuperAndLocalFunctionInProperty.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js b/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js index 26f782c0d17aa..92a538bea04cd 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js +++ b/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js @@ -34,7 +34,7 @@ class c extends Foo { //// [collisionSuperAndLocalVarInAccessors.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js b/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js index e3069352c0865..c498658a97421 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js +++ b/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js @@ -22,7 +22,7 @@ class c extends Foo { //// [collisionSuperAndLocalVarInConstructor.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js b/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js index 0524d993ba1b0..94e42d3569143 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js +++ b/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js @@ -20,7 +20,7 @@ class c extends Foo { //// [collisionSuperAndLocalVarInMethod.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js b/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js index d793e022c6b74..750de147841fa 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js +++ b/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js @@ -19,7 +19,7 @@ class b extends Foo { //// [collisionSuperAndLocalVarInProperty.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndNameResolution.js b/tests/baselines/reference/collisionSuperAndNameResolution.js index cb5636ec904b2..dcfd4529266b7 100644 --- a/tests/baselines/reference/collisionSuperAndNameResolution.js +++ b/tests/baselines/reference/collisionSuperAndNameResolution.js @@ -13,7 +13,7 @@ class Foo extends base { //// [collisionSuperAndNameResolution.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndParameter.js b/tests/baselines/reference/collisionSuperAndParameter.js index f5765043c5502..408158ba2a599 100644 --- a/tests/baselines/reference/collisionSuperAndParameter.js +++ b/tests/baselines/reference/collisionSuperAndParameter.js @@ -64,7 +64,7 @@ class Foo4 extends Foo { //// [collisionSuperAndParameter.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndParameter1.js b/tests/baselines/reference/collisionSuperAndParameter1.js index ed19500f9d4d8..58b1cbd4989cf 100644 --- a/tests/baselines/reference/collisionSuperAndParameter1.js +++ b/tests/baselines/reference/collisionSuperAndParameter1.js @@ -11,7 +11,7 @@ class Foo2 extends Foo { //// [collisionSuperAndParameter1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js b/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js index 5fa7fe290914e..f6f38b6f0991b 100644 --- a/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js +++ b/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js @@ -32,7 +32,7 @@ class b4 extends a { //// [collisionSuperAndPropertyNameAsConstuctorParameter.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js b/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js index 9e8132c68838f..68707fd675dad 100644 --- a/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js +++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js @@ -20,7 +20,7 @@ class b2 extends a { //// [collisionThisExpressionAndLocalVarWithSuperExperssion.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/commentsInheritance.js b/tests/baselines/reference/commentsInheritance.js index 3527f5d23bb6f..a1e8748284390 100644 --- a/tests/baselines/reference/commentsInheritance.js +++ b/tests/baselines/reference/commentsInheritance.js @@ -153,7 +153,7 @@ i2_i = i3_i; //// [commentsInheritance.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.js b/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.js index a263a30e38285..914820332552e 100644 --- a/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.js +++ b/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.js @@ -196,7 +196,7 @@ var r8b7 = b6 !== a6; //// [comparisonOperatorWithIdenticalObjects.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js index b8584522b7baf..95dfc215bfe65 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js @@ -170,7 +170,7 @@ var r8b7 = b7 !== a7; //// [comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js index 93e1e876a7fd4..fbcd4a72b99fa 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js @@ -170,7 +170,7 @@ var r8b7 = b7 !== a7; //// [comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js index a8973bf2c1098..ec2e2556cc99a 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js @@ -113,7 +113,7 @@ var r8b4 = b4 !== a4; //// [comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js index 4539538782d77..2e38deb0e5561 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js @@ -151,7 +151,7 @@ var r8b6 = b6 !== a6; //// [comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js index 5e8412bc3610a..675cce7d49ad8 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js @@ -151,7 +151,7 @@ var r8b6 = b6 !== a6; //// [comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnCallSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnCallSignature.js index d30c3586b12c3..634a64485816e 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnCallSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnCallSignature.js @@ -261,7 +261,7 @@ var r8b11 = b11 !== a11; //// [comparisonOperatorWithSubtypeObjectOnCallSignature.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnConstructorSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnConstructorSignature.js index 4235c1352d480..d7857dcfd2a63 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnConstructorSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnConstructorSignature.js @@ -223,7 +223,7 @@ var r8b9 = b9 !== a9; //// [comparisonOperatorWithSubtypeObjectOnConstructorSignature.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnIndexSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnIndexSignature.js index 9a6fecd668d21..08f08546aa92e 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnIndexSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnIndexSignature.js @@ -109,7 +109,7 @@ var r8b1 = b4 !== a4; //// [comparisonOperatorWithSubtypeObjectOnIndexSignature.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js index 5721a4524864c..ada0ee77486b3 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js @@ -166,7 +166,7 @@ var r8b6 = b6 !== a6; //// [comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js index b6bf8a16e614e..28d960fc3c9c5 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js @@ -166,7 +166,7 @@ var r8b6 = b6 !== a6; //// [comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.js index 690214fc00fa6..62fee91b7a3e7 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.js @@ -80,7 +80,7 @@ var rh4 = b2 !== a2; //// [comparisonOperatorWithSubtypeObjectOnProperty.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/complexClassRelationships.js b/tests/baselines/reference/complexClassRelationships.js index 4f48e5fc2c5d2..3094d43eed22c 100644 --- a/tests/baselines/reference/complexClassRelationships.js +++ b/tests/baselines/reference/complexClassRelationships.js @@ -49,7 +49,7 @@ class FooBase { //// [complexClassRelationships.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.js b/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.js index 326c0830c4fe8..d93177894557a 100644 --- a/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.js +++ b/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.js @@ -7,7 +7,7 @@ class S18 extends S18 //// [complicatedGenericRecursiveBaseClassReference.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/compoundAssignmentLHSIsValue.js b/tests/baselines/reference/compoundAssignmentLHSIsValue.js index df3015731c71f..a1f6274b38b31 100644 --- a/tests/baselines/reference/compoundAssignmentLHSIsValue.js +++ b/tests/baselines/reference/compoundAssignmentLHSIsValue.js @@ -125,7 +125,7 @@ foo() += value; //// [compoundAssignmentLHSIsValue.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js b/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js index d188a59258834..0c90b7b60f802 100644 --- a/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js +++ b/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js @@ -87,7 +87,7 @@ foo() **= value; //// [compoundExponentiationAssignmentLHSIsValue.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames24_ES5.js b/tests/baselines/reference/computedPropertyNames24_ES5.js index ff9112755bd53..03b7347165cd7 100644 --- a/tests/baselines/reference/computedPropertyNames24_ES5.js +++ b/tests/baselines/reference/computedPropertyNames24_ES5.js @@ -10,7 +10,7 @@ class C extends Base { //// [computedPropertyNames24_ES5.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames25_ES5.js b/tests/baselines/reference/computedPropertyNames25_ES5.js index dad9c5c291aeb..e98865176fb3d 100644 --- a/tests/baselines/reference/computedPropertyNames25_ES5.js +++ b/tests/baselines/reference/computedPropertyNames25_ES5.js @@ -15,7 +15,7 @@ class C extends Base { //// [computedPropertyNames25_ES5.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames26_ES5.js b/tests/baselines/reference/computedPropertyNames26_ES5.js index 5db7768270a6f..c10c3b112e425 100644 --- a/tests/baselines/reference/computedPropertyNames26_ES5.js +++ b/tests/baselines/reference/computedPropertyNames26_ES5.js @@ -12,7 +12,7 @@ class C extends Base { //// [computedPropertyNames26_ES5.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames27_ES5.js b/tests/baselines/reference/computedPropertyNames27_ES5.js index 381805659e271..0801b4b5e7133 100644 --- a/tests/baselines/reference/computedPropertyNames27_ES5.js +++ b/tests/baselines/reference/computedPropertyNames27_ES5.js @@ -7,7 +7,7 @@ class C extends Base { //// [computedPropertyNames27_ES5.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames28_ES5.js b/tests/baselines/reference/computedPropertyNames28_ES5.js index ab765c56dd75f..dc360dfd86aba 100644 --- a/tests/baselines/reference/computedPropertyNames28_ES5.js +++ b/tests/baselines/reference/computedPropertyNames28_ES5.js @@ -12,7 +12,7 @@ class C extends Base { //// [computedPropertyNames28_ES5.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames30_ES5.js b/tests/baselines/reference/computedPropertyNames30_ES5.js index c2c7cddd97170..30c6fa33bbe9f 100644 --- a/tests/baselines/reference/computedPropertyNames30_ES5.js +++ b/tests/baselines/reference/computedPropertyNames30_ES5.js @@ -17,7 +17,7 @@ class C extends Base { //// [computedPropertyNames30_ES5.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames31_ES5.js b/tests/baselines/reference/computedPropertyNames31_ES5.js index 00cc765f4cc61..856fbe88f68b1 100644 --- a/tests/baselines/reference/computedPropertyNames31_ES5.js +++ b/tests/baselines/reference/computedPropertyNames31_ES5.js @@ -17,7 +17,7 @@ class C extends Base { //// [computedPropertyNames31_ES5.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames43_ES5.js b/tests/baselines/reference/computedPropertyNames43_ES5.js index b1bb0fec72c22..ccc7aed37256c 100644 --- a/tests/baselines/reference/computedPropertyNames43_ES5.js +++ b/tests/baselines/reference/computedPropertyNames43_ES5.js @@ -14,7 +14,7 @@ class D extends C { //// [computedPropertyNames43_ES5.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames44_ES5.js b/tests/baselines/reference/computedPropertyNames44_ES5.js index bf940f15014a4..d16c7fc2f4655 100644 --- a/tests/baselines/reference/computedPropertyNames44_ES5.js +++ b/tests/baselines/reference/computedPropertyNames44_ES5.js @@ -13,7 +13,7 @@ class D extends C { //// [computedPropertyNames44_ES5.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames45_ES5.js b/tests/baselines/reference/computedPropertyNames45_ES5.js index 5b5d64f9bf024..8585f28e5d6ba 100644 --- a/tests/baselines/reference/computedPropertyNames45_ES5.js +++ b/tests/baselines/reference/computedPropertyNames45_ES5.js @@ -14,7 +14,7 @@ class D extends C { //// [computedPropertyNames45_ES5.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js b/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js index 408571af42aab..030fba2525b0e 100644 --- a/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js +++ b/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js @@ -49,7 +49,7 @@ var result11: any = true ? 1 : 'string'; //// [conditionalOperatorWithIdenticalBCT.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js b/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js index 0ac935a582ad0..85633af2a259a 100644 --- a/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js +++ b/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js @@ -25,7 +25,7 @@ var result61: (t: X) => number| string = true ? (m) => m.propertyX1 : (n) => n.p //// [conditionalOperatorWithoutIdenticalBCT.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constantOverloadFunction.js b/tests/baselines/reference/constantOverloadFunction.js index 160191c5ca03d..09e0c2788c413 100644 --- a/tests/baselines/reference/constantOverloadFunction.js +++ b/tests/baselines/reference/constantOverloadFunction.js @@ -15,7 +15,7 @@ function foo(tagName: any): Base { //// [constantOverloadFunction.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js b/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js index 509f9ba70e6c5..dd5bbf27d6114 100644 --- a/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js +++ b/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js @@ -16,7 +16,7 @@ function foo(tagName: any): Base { //// [constantOverloadFunctionNoSubtypeError.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js b/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js index 7908d36a56a44..a68f14118213d 100644 --- a/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js +++ b/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js @@ -21,7 +21,7 @@ class Container { //// [constraintCheckInGenericBaseTypeReference.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.js index 6b308d88896b5..f082035064b8e 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.js @@ -72,7 +72,7 @@ interface I extends A { //// [constructSignatureAssignabilityInInheritance2.js] // checking subtype relations for function types as it relates to contextual signature instantiation var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.js index 09abd6e0868e9..ad834dd6cb419 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.js @@ -115,7 +115,7 @@ module Errors { // checking subtype relations for function types as it relates to contextual signature instantiation // error cases var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance4.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance4.js index 4e9a8c59bf994..12fc6bc872f94 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance4.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance4.js @@ -62,7 +62,7 @@ interface I extends A { //// [constructSignatureAssignabilityInInheritance4.js] // checking subtype relations for function types as it relates to contextual signature instantiation var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.js index 91ec3b313bb0c..10172a751abdf 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.js @@ -52,7 +52,7 @@ interface I extends B { // checking subtype relations for function types as it relates to contextual signature instantiation // same as subtypingWithConstructSignatures2 just with an extra level of indirection in the inheritance chain var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.js index edafb00991681..8c0fc83b4063d 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.js @@ -55,7 +55,7 @@ interface I9 extends A { // same as subtypingWithConstructSignatures4 but using class type parameters instead of generic signatures // all are errors var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructorArgs.js b/tests/baselines/reference/constructorArgs.js index 6bbea0fddf714..333cc84316244 100644 --- a/tests/baselines/reference/constructorArgs.js +++ b/tests/baselines/reference/constructorArgs.js @@ -17,7 +17,7 @@ class Sub extends Super { //// [constructorArgs.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType.js b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType.js index 45ed976e191c4..806ff9581cab0 100644 --- a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType.js +++ b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType.js @@ -21,7 +21,7 @@ class Derived2 extends Base { //// [constructorFunctionTypeIsAssignableToBaseType.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js index c5e27748f5236..4308710ef8184 100644 --- a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js +++ b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js @@ -35,7 +35,7 @@ class Derived2 extends Base { //// [constructorFunctionTypeIsAssignableToBaseType2.js] // the constructor function itself does not need to be a subtype of the base type constructor function var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructorHasPrototypeProperty.js b/tests/baselines/reference/constructorHasPrototypeProperty.js index a16694cdbf54d..c36307ee7feb1 100644 --- a/tests/baselines/reference/constructorHasPrototypeProperty.js +++ b/tests/baselines/reference/constructorHasPrototypeProperty.js @@ -33,7 +33,7 @@ module Generic { //// [constructorHasPrototypeProperty.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructorOverloads2.js b/tests/baselines/reference/constructorOverloads2.js index 2d26194f2e764..43553c8f72cd5 100644 --- a/tests/baselines/reference/constructorOverloads2.js +++ b/tests/baselines/reference/constructorOverloads2.js @@ -27,7 +27,7 @@ f1.bar1(); //// [constructorOverloads2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructorOverloads3.js b/tests/baselines/reference/constructorOverloads3.js index c0ae9b452f98c..fc916a1b2837a 100644 --- a/tests/baselines/reference/constructorOverloads3.js +++ b/tests/baselines/reference/constructorOverloads3.js @@ -24,7 +24,7 @@ f1.bar1(); //// [constructorOverloads3.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructorWithCapturedSuper.js b/tests/baselines/reference/constructorWithCapturedSuper.js index 895f78eb04b8b..f128a5f25a0f7 100644 --- a/tests/baselines/reference/constructorWithCapturedSuper.js +++ b/tests/baselines/reference/constructorWithCapturedSuper.js @@ -54,7 +54,7 @@ class D extends A { //// [constructorWithCapturedSuper.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js index d4cd737ab46f5..bcf6ee23d9163 100644 --- a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js +++ b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js @@ -282,7 +282,7 @@ TypeScriptAllInOne.Program.Main(); //// [constructorWithIncompleteTypeAnnotation.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/contextualTypingArrayOfLambdas.js b/tests/baselines/reference/contextualTypingArrayOfLambdas.js index caf7ed445e566..6358453f4facb 100644 --- a/tests/baselines/reference/contextualTypingArrayOfLambdas.js +++ b/tests/baselines/reference/contextualTypingArrayOfLambdas.js @@ -16,7 +16,7 @@ var xs = [(x: A) => { }, (x: B) => { }, (x: C) => { }]; //// [contextualTypingArrayOfLambdas.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/contextualTypingOfConditionalExpression.js b/tests/baselines/reference/contextualTypingOfConditionalExpression.js index a6ce98f61e291..70234ea3fec81 100644 --- a/tests/baselines/reference/contextualTypingOfConditionalExpression.js +++ b/tests/baselines/reference/contextualTypingOfConditionalExpression.js @@ -16,7 +16,7 @@ var x2: (a: A) => void = true ? (a) => a.foo : (b) => b.foo; //// [contextualTypingOfConditionalExpression.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/contextualTypingOfConditionalExpression2.js b/tests/baselines/reference/contextualTypingOfConditionalExpression2.js index e3bd1643cfb8e..5c40163b2e034 100644 --- a/tests/baselines/reference/contextualTypingOfConditionalExpression2.js +++ b/tests/baselines/reference/contextualTypingOfConditionalExpression2.js @@ -14,7 +14,7 @@ var x2: (a: A) => void = true ? (a: C) => a.foo : (b: number) => { }; //// [contextualTypingOfConditionalExpression2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.js b/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.js index 89979da4812a4..2afea65e32af0 100644 --- a/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.js +++ b/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.js @@ -12,7 +12,7 @@ var a: D = foo("hi", []); //// [crashInsourcePropertyIsRelatableToTargetProperty.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declFileClassExtendsNull.js b/tests/baselines/reference/declFileClassExtendsNull.js index 30ddc3f08bf39..0638373ab222c 100644 --- a/tests/baselines/reference/declFileClassExtendsNull.js +++ b/tests/baselines/reference/declFileClassExtendsNull.js @@ -5,7 +5,7 @@ class ExtendsNull extends null { //// [declFileClassExtendsNull.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declFileForFunctionTypeAsTypeParameter.js b/tests/baselines/reference/declFileForFunctionTypeAsTypeParameter.js index 442007d9b9a50..889ab313c01e3 100644 --- a/tests/baselines/reference/declFileForFunctionTypeAsTypeParameter.js +++ b/tests/baselines/reference/declFileForFunctionTypeAsTypeParameter.js @@ -11,7 +11,7 @@ interface I extends X<() => number> { //// [declFileForFunctionTypeAsTypeParameter.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declFileGenericClassWithGenericExtendedClass.js b/tests/baselines/reference/declFileGenericClassWithGenericExtendedClass.js index 47593dc9d6868..005e33950bcd3 100644 --- a/tests/baselines/reference/declFileGenericClassWithGenericExtendedClass.js +++ b/tests/baselines/reference/declFileGenericClassWithGenericExtendedClass.js @@ -14,7 +14,7 @@ class Baz implements IBar { //// [declFileGenericClassWithGenericExtendedClass.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declFileGenericType.js b/tests/baselines/reference/declFileGenericType.js index b2e99a73ad762..47af8dc415af7 100644 --- a/tests/baselines/reference/declFileGenericType.js +++ b/tests/baselines/reference/declFileGenericType.js @@ -42,7 +42,7 @@ export var j = C.F6; //// [declFileGenericType.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declFileGenericType2.js b/tests/baselines/reference/declFileGenericType2.js index 720be79b28d3c..f6fb93cb28b96 100644 --- a/tests/baselines/reference/declFileGenericType2.js +++ b/tests/baselines/reference/declFileGenericType2.js @@ -44,7 +44,7 @@ module templa.dom.mvc.composite { //// [declFileGenericType2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js b/tests/baselines/reference/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js index 17d885788dd34..45cde43ee4f8b 100644 --- a/tests/baselines/reference/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js +++ b/tests/baselines/reference/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js @@ -22,7 +22,7 @@ module X.Y.base.Z { //// [declFileWithClassNameConflictingWithClassReferredByExtendsClause.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declFileWithExtendsClauseThatHasItsContainerNameConflict.js b/tests/baselines/reference/declFileWithExtendsClauseThatHasItsContainerNameConflict.js index 70d0cd5a3dd51..c7b4a7483e9ae 100644 --- a/tests/baselines/reference/declFileWithExtendsClauseThatHasItsContainerNameConflict.js +++ b/tests/baselines/reference/declFileWithExtendsClauseThatHasItsContainerNameConflict.js @@ -20,7 +20,7 @@ module A.B.C { //// [declFileWithExtendsClauseThatHasItsContainerNameConflict.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declarationEmitExpressionInExtends.js b/tests/baselines/reference/declarationEmitExpressionInExtends.js index 726c7b22446c5..34b8206e43ab0 100644 --- a/tests/baselines/reference/declarationEmitExpressionInExtends.js +++ b/tests/baselines/reference/declarationEmitExpressionInExtends.js @@ -16,7 +16,7 @@ q.s; //// [declarationEmitExpressionInExtends.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declarationEmitExpressionInExtends2.js b/tests/baselines/reference/declarationEmitExpressionInExtends2.js index 4081de6d3ed56..106fe00152bd7 100644 --- a/tests/baselines/reference/declarationEmitExpressionInExtends2.js +++ b/tests/baselines/reference/declarationEmitExpressionInExtends2.js @@ -14,7 +14,7 @@ class MyClass extends getClass(2) { //// [declarationEmitExpressionInExtends2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declarationEmitExpressionInExtends3.js b/tests/baselines/reference/declarationEmitExpressionInExtends3.js index f36a7e250a29e..c1fbd1fea902e 100644 --- a/tests/baselines/reference/declarationEmitExpressionInExtends3.js +++ b/tests/baselines/reference/declarationEmitExpressionInExtends3.js @@ -46,7 +46,7 @@ export class MyClass4 extends getExportedClass(undefined)>>var __extends = (this && this.__extends) || function (d, b) { ->>> for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; +>>> Object.setPrototypeOf(d, b); >>> function __() { this.constructor = d; } >>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); >>>}; diff --git a/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js b/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js index e76f3445c8eb2..55ceea201ed72 100644 --- a/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js +++ b/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js @@ -35,7 +35,7 @@ class Derived4 extends Base2 { //// [derivedClassConstructorWithoutSuperCall.js] // derived class constructors must contain a super call var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.js b/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.js index 7f6b83593ca75..fe6be20e2ac89 100644 --- a/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.js +++ b/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.js @@ -16,7 +16,7 @@ class Derived extends Base { //// [derivedClassFunctionOverridesBaseClassAccessor.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassIncludesInheritedMembers.js b/tests/baselines/reference/derivedClassIncludesInheritedMembers.js index 8224473cb548c..8b6f6fe34cb6d 100644 --- a/tests/baselines/reference/derivedClassIncludesInheritedMembers.js +++ b/tests/baselines/reference/derivedClassIncludesInheritedMembers.js @@ -42,7 +42,7 @@ var r8 = d2[1]; //// [derivedClassIncludesInheritedMembers.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesIndexersWithAssignmentCompatibility.js b/tests/baselines/reference/derivedClassOverridesIndexersWithAssignmentCompatibility.js index 4753e39539073..80fd6fd251c7e 100644 --- a/tests/baselines/reference/derivedClassOverridesIndexersWithAssignmentCompatibility.js +++ b/tests/baselines/reference/derivedClassOverridesIndexersWithAssignmentCompatibility.js @@ -19,7 +19,7 @@ class Derived2 extends Base2 { //// [derivedClassOverridesIndexersWithAssignmentCompatibility.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesPrivateFunction1.js b/tests/baselines/reference/derivedClassOverridesPrivateFunction1.js index 981c072d47c68..c5d48de031ed7 100644 --- a/tests/baselines/reference/derivedClassOverridesPrivateFunction1.js +++ b/tests/baselines/reference/derivedClassOverridesPrivateFunction1.js @@ -17,7 +17,7 @@ new DerivedClass(); //// [derivedClassOverridesPrivateFunction1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesPrivates.js b/tests/baselines/reference/derivedClassOverridesPrivates.js index 1a58c038feac6..fa4b88bdc56d2 100644 --- a/tests/baselines/reference/derivedClassOverridesPrivates.js +++ b/tests/baselines/reference/derivedClassOverridesPrivates.js @@ -17,7 +17,7 @@ class Derived2 extends Base2 { //// [derivedClassOverridesPrivates.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers.js index b8997769eb74c..b4fb59ffd2c16 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers.js @@ -38,7 +38,7 @@ class Derived extends Base { //// [derivedClassOverridesProtectedMembers.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js index 6797eef0e7726..13f2cfc469804 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js @@ -65,7 +65,7 @@ var r8 = d2[1]; //// [derivedClassOverridesProtectedMembers2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js index d0d9d8fa0f58a..24602737e6b46 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js @@ -73,7 +73,7 @@ class Derived10 extends Base { //// [derivedClassOverridesProtectedMembers3.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers4.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers4.js index 06f809976008b..add886d198563 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers4.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers4.js @@ -16,7 +16,7 @@ class Derived2 extends Derived1 { //// [derivedClassOverridesProtectedMembers4.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesPublicMembers.js b/tests/baselines/reference/derivedClassOverridesPublicMembers.js index 7943d904deafb..d8fa9e826834b 100644 --- a/tests/baselines/reference/derivedClassOverridesPublicMembers.js +++ b/tests/baselines/reference/derivedClassOverridesPublicMembers.js @@ -64,7 +64,7 @@ var r8 = d2[1]; //// [derivedClassOverridesPublicMembers.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesWithoutSubtype.js b/tests/baselines/reference/derivedClassOverridesWithoutSubtype.js index e42ff9c9e1d07..bcd4e505721b1 100644 --- a/tests/baselines/reference/derivedClassOverridesWithoutSubtype.js +++ b/tests/baselines/reference/derivedClassOverridesWithoutSubtype.js @@ -25,7 +25,7 @@ class Derived2 extends Base2 { //// [derivedClassOverridesWithoutSubtype.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassParameterProperties.js b/tests/baselines/reference/derivedClassParameterProperties.js index 27dcc4b7d5dba..cb08d4d854561 100644 --- a/tests/baselines/reference/derivedClassParameterProperties.js +++ b/tests/baselines/reference/derivedClassParameterProperties.js @@ -97,7 +97,7 @@ class Derived10 extends Base2 { //// [derivedClassParameterProperties.js] // ordering of super calls in derived constructors matters depending on other class contents var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js b/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js index b778d7bbca281..cf7845a4d9ad4 100644 --- a/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js +++ b/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js @@ -34,7 +34,7 @@ class Derived extends Base { //// [derivedClassSuperCallsInNonConstructorMembers.js] // error to use super calls outside a constructor var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js b/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js index 504d414a6088c..59a4ff7e1d17f 100644 --- a/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js +++ b/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js @@ -30,7 +30,7 @@ class Derived4 extends Base { //// [derivedClassSuperCallsWithThisArg.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassTransitivity.js b/tests/baselines/reference/derivedClassTransitivity.js index a76ac8101a098..6a6b713f25001 100644 --- a/tests/baselines/reference/derivedClassTransitivity.js +++ b/tests/baselines/reference/derivedClassTransitivity.js @@ -23,7 +23,7 @@ var r2 = e.foo(''); //// [derivedClassTransitivity.js] // subclassing is not transitive when you can remove required parameters and add optional parameters var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassTransitivity2.js b/tests/baselines/reference/derivedClassTransitivity2.js index a3894863696b4..2d05dd09cee43 100644 --- a/tests/baselines/reference/derivedClassTransitivity2.js +++ b/tests/baselines/reference/derivedClassTransitivity2.js @@ -23,7 +23,7 @@ var r2 = e.foo(1, ''); //// [derivedClassTransitivity2.js] // subclassing is not transitive when you can remove required parameters and add optional parameters var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassTransitivity3.js b/tests/baselines/reference/derivedClassTransitivity3.js index 71dfecb346f01..6c02e2055d919 100644 --- a/tests/baselines/reference/derivedClassTransitivity3.js +++ b/tests/baselines/reference/derivedClassTransitivity3.js @@ -23,7 +23,7 @@ var r2 = e.foo('', 1); //// [derivedClassTransitivity3.js] // subclassing is not transitive when you can remove required parameters and add optional parameters var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassTransitivity4.js b/tests/baselines/reference/derivedClassTransitivity4.js index 0030ce702d82a..7d375e8e94e1f 100644 --- a/tests/baselines/reference/derivedClassTransitivity4.js +++ b/tests/baselines/reference/derivedClassTransitivity4.js @@ -23,7 +23,7 @@ var r2 = e.foo(''); //// [derivedClassTransitivity4.js] // subclassing is not transitive when you can remove required parameters and add optional parameters on protected members var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassWithAny.js b/tests/baselines/reference/derivedClassWithAny.js index 2a199e5586152..51b4e5739f6c6 100644 --- a/tests/baselines/reference/derivedClassWithAny.js +++ b/tests/baselines/reference/derivedClassWithAny.js @@ -61,7 +61,7 @@ var r = c.foo(); // e.foo would return string //// [derivedClassWithAny.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js index 0542815c4e4b7..8a86f4ab4a996 100644 --- a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js +++ b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js @@ -24,7 +24,7 @@ class Derived extends Base { //// [derivedClassWithPrivateInstanceShadowingProtectedInstance.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js index 41869cad416fd..fab643265cb30 100644 --- a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js +++ b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js @@ -34,7 +34,7 @@ Derived.a = 2; // error //// [derivedClassWithPrivateInstanceShadowingPublicInstance.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js index 10ae3cb35c855..322514e1c8246 100644 --- a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js +++ b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js @@ -23,7 +23,7 @@ class Derived extends Base { //// [derivedClassWithPrivateStaticShadowingProtectedStatic.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js index 3f2c2a3b811a4..8c01a45e1ae0d 100644 --- a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js +++ b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js @@ -35,7 +35,7 @@ Derived.a = 2; // error //// [derivedClassWithPrivateStaticShadowingPublicStatic.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js b/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js index 7a6a7ecbb638b..462819c551da3 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js @@ -27,7 +27,7 @@ var d2 = new D(new Date()); // ok //// [derivedClassWithoutExplicitConstructor.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js b/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js index 62beb4bf28f65..6e7c75ef37d97 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js @@ -35,7 +35,7 @@ var d4 = new D(new Date(), new Date(), new Date()); //// [derivedClassWithoutExplicitConstructor2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js b/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js index c96d0c96723da..4d4527c172ee9 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js @@ -49,7 +49,7 @@ var d3 = new D2(new Date(), new Date()); // ok //// [derivedClassWithoutExplicitConstructor3.js] // automatic constructors with a class hieararchy of depth > 2 var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClasses.js b/tests/baselines/reference/derivedClasses.js index 3e097a9b139c3..00bdfcfde4e98 100644 --- a/tests/baselines/reference/derivedClasses.js +++ b/tests/baselines/reference/derivedClasses.js @@ -32,7 +32,7 @@ b.hue(); //// [derivedClasses.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedGenericClassWithAny.js b/tests/baselines/reference/derivedGenericClassWithAny.js index 1822f3fcc47dd..410027ce76d3c 100644 --- a/tests/baselines/reference/derivedGenericClassWithAny.js +++ b/tests/baselines/reference/derivedGenericClassWithAny.js @@ -44,7 +44,7 @@ var r = c.foo(); // e.foo would return string //// [derivedGenericClassWithAny.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js b/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js index c17922e05eee0..367b0d895cf81 100644 --- a/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js +++ b/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js @@ -19,7 +19,7 @@ class Derived extends Base { //// [derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js b/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js index 6fe690fd692db..c890a28b110b9 100644 --- a/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js +++ b/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js @@ -22,7 +22,7 @@ var r: Base[] = [d1, d2]; //// [derivedTypeDoesNotRequireExtendsClause.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/destructuringParameterDeclaration5.js b/tests/baselines/reference/destructuringParameterDeclaration5.js index 7ba178823df6f..d7b75ede23df5 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration5.js +++ b/tests/baselines/reference/destructuringParameterDeclaration5.js @@ -53,7 +53,7 @@ d3({ y: "world" }); //// [destructuringParameterDeclaration5.js] // Parameter Declaration with generic var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js b/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js index 05b061116d3b4..fbc08b66624cf 100644 --- a/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js +++ b/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js @@ -15,7 +15,7 @@ class B extends A { //// [emitSuperCallBeforeEmitParameterPropertyDeclaration1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js index 2cf2cb02073d6..1328ece2af0ca 100644 --- a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js +++ b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js @@ -17,7 +17,7 @@ class B extends A { //// [emitSuperCallBeforeEmitPropertyDeclaration1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js index eaa52e392853b..a9883b26e3037 100644 --- a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js +++ b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js @@ -15,7 +15,7 @@ class B extends A { //// [emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/emitThisInSuperMethodCall.js b/tests/baselines/reference/emitThisInSuperMethodCall.js index 1f7ed8bfa9443..1e23553a2d94d 100644 --- a/tests/baselines/reference/emitThisInSuperMethodCall.js +++ b/tests/baselines/reference/emitThisInSuperMethodCall.js @@ -29,7 +29,7 @@ class RegisteredUser extends User { //// [emitThisInSuperMethodCall.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/emptyModuleName.js b/tests/baselines/reference/emptyModuleName.js index 3ed21cf217a64..404abf6a42c02 100644 --- a/tests/baselines/reference/emptyModuleName.js +++ b/tests/baselines/reference/emptyModuleName.js @@ -6,7 +6,7 @@ class B extends A { //// [emptyModuleName.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/errorForwardReferenceForwadingConstructor.js b/tests/baselines/reference/errorForwardReferenceForwadingConstructor.js index ed2e1aa7f06e7..2bfac7ec0f03d 100644 --- a/tests/baselines/reference/errorForwardReferenceForwadingConstructor.js +++ b/tests/baselines/reference/errorForwardReferenceForwadingConstructor.js @@ -13,7 +13,7 @@ class derived extends base { } //// [errorForwardReferenceForwadingConstructor.js] // Error forward referencing derived class with forwarding constructor var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/errorSuperCalls.js b/tests/baselines/reference/errorSuperCalls.js index 720894e50c041..4e22877756783 100644 --- a/tests/baselines/reference/errorSuperCalls.js +++ b/tests/baselines/reference/errorSuperCalls.js @@ -76,7 +76,7 @@ class OtherDerived extends OtherBase { //// [errorSuperCalls.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/errorSuperPropertyAccess.js b/tests/baselines/reference/errorSuperPropertyAccess.js index e12a758b0537c..62bb99191711d 100644 --- a/tests/baselines/reference/errorSuperPropertyAccess.js +++ b/tests/baselines/reference/errorSuperPropertyAccess.js @@ -130,7 +130,7 @@ var obj = { n: super.wat, p: super.foo() }; //// [errorSuperPropertyAccess.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/errorsInGenericTypeReference.js b/tests/baselines/reference/errorsInGenericTypeReference.js index 6dd9f62edcbc0..bb80f73f21676 100644 --- a/tests/baselines/reference/errorsInGenericTypeReference.js +++ b/tests/baselines/reference/errorsInGenericTypeReference.js @@ -74,7 +74,7 @@ interface testInterface2 { //// [errorsInGenericTypeReference.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/es6ClassSuperCodegenBug.js b/tests/baselines/reference/es6ClassSuperCodegenBug.js index 2eec250211e98..fc6ad83738dba 100644 --- a/tests/baselines/reference/es6ClassSuperCodegenBug.js +++ b/tests/baselines/reference/es6ClassSuperCodegenBug.js @@ -16,7 +16,7 @@ class B extends A { //// [es6ClassSuperCodegenBug.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/es6ClassTest.js b/tests/baselines/reference/es6ClassTest.js index 067e57c258186..8fa5be0ba3e50 100644 --- a/tests/baselines/reference/es6ClassTest.js +++ b/tests/baselines/reference/es6ClassTest.js @@ -86,7 +86,7 @@ declare module AmbientMod { //// [es6ClassTest.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/es6ClassTest2.js b/tests/baselines/reference/es6ClassTest2.js index 533b332422d72..7004c7056f2a9 100644 --- a/tests/baselines/reference/es6ClassTest2.js +++ b/tests/baselines/reference/es6ClassTest2.js @@ -160,7 +160,7 @@ var ccwc = new ChildClassWithoutConstructor(1, "s"); //// [es6ClassTest2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/es6ClassTest7.js b/tests/baselines/reference/es6ClassTest7.js index f786fce446187..20d46e6b53ce0 100644 --- a/tests/baselines/reference/es6ClassTest7.js +++ b/tests/baselines/reference/es6ClassTest7.js @@ -10,7 +10,7 @@ class Bar extends M.Foo { //// [es6ClassTest7.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/exportAssignmentOfGenericType1.js b/tests/baselines/reference/exportAssignmentOfGenericType1.js index 7c1831ecac487..431da58c12e3c 100644 --- a/tests/baselines/reference/exportAssignmentOfGenericType1.js +++ b/tests/baselines/reference/exportAssignmentOfGenericType1.js @@ -25,7 +25,7 @@ define(["require", "exports"], function (require, exports) { }); //// [exportAssignmentOfGenericType1_1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/exportDeclarationInInternalModule.js b/tests/baselines/reference/exportDeclarationInInternalModule.js index b6d6d982a3269..ddc2e15a5b224 100644 --- a/tests/baselines/reference/exportDeclarationInInternalModule.js +++ b/tests/baselines/reference/exportDeclarationInInternalModule.js @@ -20,7 +20,7 @@ var a: Bbb.SomeType; //// [exportDeclarationInInternalModule.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extBaseClass1.js b/tests/baselines/reference/extBaseClass1.js index 91dfba7a9bf92..d8eb5e75f9f8f 100644 --- a/tests/baselines/reference/extBaseClass1.js +++ b/tests/baselines/reference/extBaseClass1.js @@ -21,7 +21,7 @@ module N { //// [extBaseClass1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extBaseClass2.js b/tests/baselines/reference/extBaseClass2.js index 3ab217eb01979..474a91d2a7278 100644 --- a/tests/baselines/reference/extBaseClass2.js +++ b/tests/baselines/reference/extBaseClass2.js @@ -12,7 +12,7 @@ module M { //// [extBaseClass2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendAndImplementTheSameBaseType.js b/tests/baselines/reference/extendAndImplementTheSameBaseType.js index 74bbf3a27ac93..1342df1b99293 100644 --- a/tests/baselines/reference/extendAndImplementTheSameBaseType.js +++ b/tests/baselines/reference/extendAndImplementTheSameBaseType.js @@ -15,7 +15,7 @@ d.foo; //// [extendAndImplementTheSameBaseType.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendAndImplementTheSameBaseType2.js b/tests/baselines/reference/extendAndImplementTheSameBaseType2.js index fa7963487d579..38b76b199428e 100644 --- a/tests/baselines/reference/extendAndImplementTheSameBaseType2.js +++ b/tests/baselines/reference/extendAndImplementTheSameBaseType2.js @@ -18,7 +18,7 @@ var r4: number = d.bar(); //// [extendAndImplementTheSameBaseType2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendBaseClassBeforeItsDeclared.js b/tests/baselines/reference/extendBaseClassBeforeItsDeclared.js index 596ab319b2ce8..8cf5164283179 100644 --- a/tests/baselines/reference/extendBaseClassBeforeItsDeclared.js +++ b/tests/baselines/reference/extendBaseClassBeforeItsDeclared.js @@ -5,7 +5,7 @@ class base { constructor (public n: number) { } } //// [extendBaseClassBeforeItsDeclared.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendClassExpressionFromModule.js b/tests/baselines/reference/extendClassExpressionFromModule.js index 895cdedfaff65..27420b55d1c8f 100644 --- a/tests/baselines/reference/extendClassExpressionFromModule.js +++ b/tests/baselines/reference/extendClassExpressionFromModule.js @@ -22,7 +22,7 @@ module.exports = x; //// [foo2.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendConstructSignatureInInterface.js b/tests/baselines/reference/extendConstructSignatureInInterface.js index 4bf92dd0315d9..db87c4c14fdef 100644 --- a/tests/baselines/reference/extendConstructSignatureInInterface.js +++ b/tests/baselines/reference/extendConstructSignatureInInterface.js @@ -12,7 +12,7 @@ var e: E = new E(1); //// [extendConstructSignatureInInterface.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendNonClassSymbol1.js b/tests/baselines/reference/extendNonClassSymbol1.js index b23b601bc2902..00326e241030d 100644 --- a/tests/baselines/reference/extendNonClassSymbol1.js +++ b/tests/baselines/reference/extendNonClassSymbol1.js @@ -5,7 +5,7 @@ class C extends x { } // error, could not find symbol xs //// [extendNonClassSymbol1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendNonClassSymbol2.js b/tests/baselines/reference/extendNonClassSymbol2.js index 78dfaa918277e..ce030629af5ce 100644 --- a/tests/baselines/reference/extendNonClassSymbol2.js +++ b/tests/baselines/reference/extendNonClassSymbol2.js @@ -7,7 +7,7 @@ class C extends Foo {} // error, could not find symbol Foo //// [extendNonClassSymbol2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendPrivateConstructorClass.js b/tests/baselines/reference/extendPrivateConstructorClass.js index 8893e9735ff1d..52b96e316113e 100644 --- a/tests/baselines/reference/extendPrivateConstructorClass.js +++ b/tests/baselines/reference/extendPrivateConstructorClass.js @@ -11,7 +11,7 @@ class C extends abc.XYZ { //// [extendPrivateConstructorClass.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js b/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js index da081154d8a2e..92c5dc696817d 100644 --- a/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js +++ b/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js @@ -43,7 +43,7 @@ exports.Model = Model; //// [extendingClassFromAliasAndUsageInIndexer_moduleA.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -59,7 +59,7 @@ exports.VisualizationModel = VisualizationModel; //// [extendingClassFromAliasAndUsageInIndexer_moduleB.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendsClauseAlreadySeen.js b/tests/baselines/reference/extendsClauseAlreadySeen.js index 267cd86eed09f..37cdd0eb9bcc0 100644 --- a/tests/baselines/reference/extendsClauseAlreadySeen.js +++ b/tests/baselines/reference/extendsClauseAlreadySeen.js @@ -8,7 +8,7 @@ class D extends C extends C { //// [extendsClauseAlreadySeen.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendsClauseAlreadySeen2.js b/tests/baselines/reference/extendsClauseAlreadySeen2.js index 76fbc3365af2f..bc4306884a3c6 100644 --- a/tests/baselines/reference/extendsClauseAlreadySeen2.js +++ b/tests/baselines/reference/extendsClauseAlreadySeen2.js @@ -8,7 +8,7 @@ class D extends C extends C { //// [extendsClauseAlreadySeen2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/fluentClasses.js b/tests/baselines/reference/fluentClasses.js index ac44416e13392..ade60a06331de 100644 --- a/tests/baselines/reference/fluentClasses.js +++ b/tests/baselines/reference/fluentClasses.js @@ -20,7 +20,7 @@ var z = c.foo().bar().baz(); // Fluent pattern //// [fluentClasses.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/for-inStatements.js b/tests/baselines/reference/for-inStatements.js index 15d771bf58767..b34fd91192bd3 100644 --- a/tests/baselines/reference/for-inStatements.js +++ b/tests/baselines/reference/for-inStatements.js @@ -82,7 +82,7 @@ for (var x in Color.Blue) { } //// [for-inStatements.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/for-inStatementsInvalid.js b/tests/baselines/reference/for-inStatementsInvalid.js index d1181760a367d..3d39fb2903bd1 100644 --- a/tests/baselines/reference/for-inStatementsInvalid.js +++ b/tests/baselines/reference/for-inStatementsInvalid.js @@ -65,7 +65,7 @@ for (var x in i[42]) { } //// [for-inStatementsInvalid.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/forStatementsMultipleInvalidDecl.js b/tests/baselines/reference/forStatementsMultipleInvalidDecl.js index 3666ad930a6cc..8ca8c794cf53d 100644 --- a/tests/baselines/reference/forStatementsMultipleInvalidDecl.js +++ b/tests/baselines/reference/forStatementsMultipleInvalidDecl.js @@ -56,7 +56,7 @@ for( var m = M.A;;){} //// [forStatementsMultipleInvalidDecl.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/functionImplementationErrors.js b/tests/baselines/reference/functionImplementationErrors.js index 433418af41d22..5c8defcf814a0 100644 --- a/tests/baselines/reference/functionImplementationErrors.js +++ b/tests/baselines/reference/functionImplementationErrors.js @@ -76,7 +76,7 @@ var f13 = () => { //// [functionImplementationErrors.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/functionImplementations.js b/tests/baselines/reference/functionImplementations.js index 86636b84a87b8..e73e509570141 100644 --- a/tests/baselines/reference/functionImplementations.js +++ b/tests/baselines/reference/functionImplementations.js @@ -159,7 +159,7 @@ var f12: (x: number) => any = x => { // should be (x: number) => Base | AnotherC //// [functionImplementations.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/functionSubtypingOfVarArgs.js b/tests/baselines/reference/functionSubtypingOfVarArgs.js index 55917962184ef..89e8b1e95ef82 100644 --- a/tests/baselines/reference/functionSubtypingOfVarArgs.js +++ b/tests/baselines/reference/functionSubtypingOfVarArgs.js @@ -16,7 +16,7 @@ class StringEvent extends EventBase { // should work //// [functionSubtypingOfVarArgs.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/functionSubtypingOfVarArgs2.js b/tests/baselines/reference/functionSubtypingOfVarArgs2.js index a676316459f93..be9c293ae7288 100644 --- a/tests/baselines/reference/functionSubtypingOfVarArgs2.js +++ b/tests/baselines/reference/functionSubtypingOfVarArgs2.js @@ -16,7 +16,7 @@ class StringEvent extends EventBase { //// [functionSubtypingOfVarArgs2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/generatedContextualTyping.js b/tests/baselines/reference/generatedContextualTyping.js index 2a6911d9cf539..06abd1b9a8bb2 100644 --- a/tests/baselines/reference/generatedContextualTyping.js +++ b/tests/baselines/reference/generatedContextualTyping.js @@ -357,7 +357,7 @@ var x356 = function(n: Genric) { }; x356({ func: n => { return [d1, d2]; } //// [generatedContextualTyping.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericBaseClassLiteralProperty.js b/tests/baselines/reference/genericBaseClassLiteralProperty.js index a075eff955014..b572cfae97d71 100644 --- a/tests/baselines/reference/genericBaseClassLiteralProperty.js +++ b/tests/baselines/reference/genericBaseClassLiteralProperty.js @@ -14,7 +14,7 @@ class SubClass extends BaseClass { //// [genericBaseClassLiteralProperty.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericBaseClassLiteralProperty2.js b/tests/baselines/reference/genericBaseClassLiteralProperty2.js index 2b562742bf71c..9e99dee2b4c1d 100644 --- a/tests/baselines/reference/genericBaseClassLiteralProperty2.js +++ b/tests/baselines/reference/genericBaseClassLiteralProperty2.js @@ -17,7 +17,7 @@ class DataView2 extends BaseCollection2 { //// [genericBaseClassLiteralProperty2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.js b/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.js index afef6224ba15b..68a3e77f9aedb 100644 --- a/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.js +++ b/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.js @@ -110,7 +110,7 @@ var r11 = i.foo8(); // Base //// [genericCallWithConstraintsTypeArgumentInference.js] // Basic type inference with generic calls and constraints, no errors expected var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgs2.js b/tests/baselines/reference/genericCallWithObjectTypeArgs2.js index 7b621b3ffd902..0b643db14cbaf 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgs2.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgs2.js @@ -34,7 +34,7 @@ var r4 = f2(i); // Base => Derived //// [genericCallWithObjectTypeArgs2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js index 892cda0ee2d64..98448645d1591 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js @@ -42,7 +42,7 @@ var r7 = f3(null, x => x); // any // Generic call with constraints infering type parameter from object member properties // No errors expected var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js index addfbc756a8ed..71bf682b0dc19 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js @@ -40,7 +40,7 @@ var r6 = f3(x => x, null); //// [genericCallWithObjectTypeArgsAndConstraints3.js] // Generic call with constraints infering type parameter from object member properties var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericCallbacksAndClassHierarchy.js b/tests/baselines/reference/genericCallbacksAndClassHierarchy.js index c2ad2ba29a395..67d0df1bc22be 100644 --- a/tests/baselines/reference/genericCallbacksAndClassHierarchy.js +++ b/tests/baselines/reference/genericCallbacksAndClassHierarchy.js @@ -25,7 +25,7 @@ module M { //// [genericCallbacksAndClassHierarchy.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericClassExpressionInFunction.js b/tests/baselines/reference/genericClassExpressionInFunction.js index dc574dedb0097..3db4d9693af85 100644 --- a/tests/baselines/reference/genericClassExpressionInFunction.js +++ b/tests/baselines/reference/genericClassExpressionInFunction.js @@ -33,7 +33,7 @@ s.genericVar = 12; //// [genericClassExpressionInFunction.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericClassInheritsConstructorFromNonGenericClass.js b/tests/baselines/reference/genericClassInheritsConstructorFromNonGenericClass.js index 1f3a6e17f1410..307c891f92882 100644 --- a/tests/baselines/reference/genericClassInheritsConstructorFromNonGenericClass.js +++ b/tests/baselines/reference/genericClassInheritsConstructorFromNonGenericClass.js @@ -7,7 +7,7 @@ class C { //// [genericClassInheritsConstructorFromNonGenericClass.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js b/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js index 28eaf46496807..147bbd8fb87d2 100644 --- a/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js +++ b/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js @@ -77,7 +77,7 @@ class ViewModel implements Contract { //// [genericClassPropertyInheritanceSpecialization.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericClassStaticMethod.js b/tests/baselines/reference/genericClassStaticMethod.js index 4609e3bc9db45..257e7dbce9752 100644 --- a/tests/baselines/reference/genericClassStaticMethod.js +++ b/tests/baselines/reference/genericClassStaticMethod.js @@ -12,7 +12,7 @@ class Bar extends Foo { //// [genericClassStaticMethod.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericClasses3.js b/tests/baselines/reference/genericClasses3.js index 5371e2479aad0..fbc62b23aabfe 100644 --- a/tests/baselines/reference/genericClasses3.js +++ b/tests/baselines/reference/genericClasses3.js @@ -19,7 +19,7 @@ var z = v2.b; //// [genericClasses3.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js index d990f76d2c3c3..4043924bf5416 100644 --- a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js +++ b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js @@ -28,7 +28,7 @@ module EndGate.Tweening { //// [genericConstraintOnExtendedBuiltinTypes.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js index 4291b315933b9..33394ee4fce7d 100644 --- a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js +++ b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js @@ -27,7 +27,7 @@ module EndGate.Tweening { //// [genericConstraintOnExtendedBuiltinTypes2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.js b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.js index 1b455073196dd..413eed2a4c899 100644 --- a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.js +++ b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.js @@ -14,7 +14,7 @@ x = y; // error //// [genericDerivedTypeWithSpecializedBase.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.js b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.js index 0abd655e1daaa..da81eaf564078 100644 --- a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.js +++ b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.js @@ -14,7 +14,7 @@ x = y; // error //// [genericDerivedTypeWithSpecializedBase2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericInheritedDefaultConstructors.js b/tests/baselines/reference/genericInheritedDefaultConstructors.js index 059a3213b7aa0..d7aaa6224eff9 100644 --- a/tests/baselines/reference/genericInheritedDefaultConstructors.js +++ b/tests/baselines/reference/genericInheritedDefaultConstructors.js @@ -12,7 +12,7 @@ var c:Constructor> = B; // shouldn't error here //// [genericInheritedDefaultConstructors.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericPrototypeProperty2.js b/tests/baselines/reference/genericPrototypeProperty2.js index eac025cce9ba9..6ce627694ca46 100644 --- a/tests/baselines/reference/genericPrototypeProperty2.js +++ b/tests/baselines/reference/genericPrototypeProperty2.js @@ -17,7 +17,7 @@ class MyEventWrapper extends BaseEventWrapper { //// [genericPrototypeProperty2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericPrototypeProperty3.js b/tests/baselines/reference/genericPrototypeProperty3.js index 9e3ede0019d03..a2817d82e9fcf 100644 --- a/tests/baselines/reference/genericPrototypeProperty3.js +++ b/tests/baselines/reference/genericPrototypeProperty3.js @@ -16,7 +16,7 @@ class MyEventWrapper extends BaseEventWrapper { //// [genericPrototypeProperty3.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js index 401a2e94b6819..2fbb5f7ef5025 100644 --- a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js +++ b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js @@ -28,7 +28,7 @@ module TypeScript2 { //// [genericRecursiveImplicitConstructorErrors2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js index c7643d4a9a265..c88dd78765a94 100644 --- a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js +++ b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js @@ -32,7 +32,7 @@ module TypeScript { //// [genericRecursiveImplicitConstructorErrors3.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericTypeAssertions2.js b/tests/baselines/reference/genericTypeAssertions2.js index 687d593f01e12..25e4d3f3baeea 100644 --- a/tests/baselines/reference/genericTypeAssertions2.js +++ b/tests/baselines/reference/genericTypeAssertions2.js @@ -15,7 +15,7 @@ var r5: A = >[]; // error //// [genericTypeAssertions2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericTypeAssertions4.js b/tests/baselines/reference/genericTypeAssertions4.js index 50dbe5debbd9a..d54f37408a318 100644 --- a/tests/baselines/reference/genericTypeAssertions4.js +++ b/tests/baselines/reference/genericTypeAssertions4.js @@ -27,7 +27,7 @@ function foo2(x: T) { //// [genericTypeAssertions4.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericTypeAssertions6.js b/tests/baselines/reference/genericTypeAssertions6.js index 7bbd7351f1dd4..6ace4b38a1321 100644 --- a/tests/baselines/reference/genericTypeAssertions6.js +++ b/tests/baselines/reference/genericTypeAssertions6.js @@ -26,7 +26,7 @@ var c: A = >b; //// [genericTypeAssertions6.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericTypeConstraints.js b/tests/baselines/reference/genericTypeConstraints.js index 67303166aa327..4aae830a0d131 100644 --- a/tests/baselines/reference/genericTypeConstraints.js +++ b/tests/baselines/reference/genericTypeConstraints.js @@ -15,7 +15,7 @@ class BarExtended extends Bar { //// [genericTypeConstraints.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js index cf19feede3436..ec7029135a9e7 100644 --- a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js +++ b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js @@ -41,7 +41,7 @@ var k = null; // it is an error to use a generic type without type arguments // all of these are errors var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js index 973ee23176282..d3797663e0e5a 100644 --- a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js +++ b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js @@ -41,7 +41,7 @@ var k = null; // it is an error to use a generic type without type arguments // all of these are errors var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js b/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js index d6fb98b67cae0..b5c3316ab12e5 100644 --- a/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js +++ b/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js @@ -16,7 +16,7 @@ export class ListItem extends CollectionItem { //// [genericWithIndexerOfTypeParameterType2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/heterogeneousArrayLiterals.js b/tests/baselines/reference/heterogeneousArrayLiterals.js index 9b15cf743f0c8..43ec9a0958789 100644 --- a/tests/baselines/reference/heterogeneousArrayLiterals.js +++ b/tests/baselines/reference/heterogeneousArrayLiterals.js @@ -134,7 +134,7 @@ function foo4(t: T, u: U) { //// [heterogeneousArrayLiterals.js] // type of an array is the best common type of its elements (plus its contextual type if it exists) var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/ifDoWhileStatements.js b/tests/baselines/reference/ifDoWhileStatements.js index 483370bee5c5c..8d1ad1a834f9d 100644 --- a/tests/baselines/reference/ifDoWhileStatements.js +++ b/tests/baselines/reference/ifDoWhileStatements.js @@ -165,7 +165,7 @@ do { }while(fn) //// [ifDoWhileStatements.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/illegalSuperCallsInConstructor.js b/tests/baselines/reference/illegalSuperCallsInConstructor.js index 868d53daad54b..5299bac5eb393 100644 --- a/tests/baselines/reference/illegalSuperCallsInConstructor.js +++ b/tests/baselines/reference/illegalSuperCallsInConstructor.js @@ -22,7 +22,7 @@ class Derived extends Base { //// [illegalSuperCallsInConstructor.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/implementClausePrecedingExtends.js b/tests/baselines/reference/implementClausePrecedingExtends.js index df725cde43a08..669a6794618d9 100644 --- a/tests/baselines/reference/implementClausePrecedingExtends.js +++ b/tests/baselines/reference/implementClausePrecedingExtends.js @@ -4,7 +4,7 @@ class D implements C extends C { } //// [implementClausePrecedingExtends.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.js b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.js index a5a5e02c15675..5d93d2b04a493 100644 --- a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.js +++ b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.js @@ -87,7 +87,7 @@ module M2 { //// [implementingAnInterfaceExtendingClassWithPrivates2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.js b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.js index d0f7484714164..082b9d801dc82 100644 --- a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.js +++ b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.js @@ -43,7 +43,7 @@ class Bar8 extends Foo implements I { //// [implementingAnInterfaceExtendingClassWithProtecteds.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/importAsBaseClass.js b/tests/baselines/reference/importAsBaseClass.js index b4f45cac8067a..f61703de5f09b 100644 --- a/tests/baselines/reference/importAsBaseClass.js +++ b/tests/baselines/reference/importAsBaseClass.js @@ -22,7 +22,7 @@ exports.Greeter = Greeter; //// [importAsBaseClass_1.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/importHelpers.js b/tests/baselines/reference/importHelpers.js index ae4d312701024..ec294a342deda 100644 --- a/tests/baselines/reference/importHelpers.js +++ b/tests/baselines/reference/importHelpers.js @@ -69,7 +69,7 @@ C = tslib_1.__decorate([ ], C); //// [script.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/importHelpersNoHelpers.js b/tests/baselines/reference/importHelpersNoHelpers.js index a9c2deb76b6b2..3a2e4823337cb 100644 --- a/tests/baselines/reference/importHelpersNoHelpers.js +++ b/tests/baselines/reference/importHelpersNoHelpers.js @@ -71,7 +71,7 @@ var y = tslib_1.__assign({}, o); var x = tslib_1.__rest(y, []); //// [script.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/importHelpersNoModule.js b/tests/baselines/reference/importHelpersNoModule.js index 41df9710f3325..991733f4b3752 100644 --- a/tests/baselines/reference/importHelpersNoModule.js +++ b/tests/baselines/reference/importHelpersNoModule.js @@ -61,7 +61,7 @@ C = tslib_1.__decorate([ ], C); //// [script.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/importShadowsGlobalName.js b/tests/baselines/reference/importShadowsGlobalName.js index 34cc0604e7ae9..abdf7e28cbb06 100644 --- a/tests/baselines/reference/importShadowsGlobalName.js +++ b/tests/baselines/reference/importShadowsGlobalName.js @@ -22,7 +22,7 @@ define(["require", "exports"], function (require, exports) { }); //// [Bar.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/importUsedInExtendsList1.js b/tests/baselines/reference/importUsedInExtendsList1.js index a40c3a51a782b..941436e7e7547 100644 --- a/tests/baselines/reference/importUsedInExtendsList1.js +++ b/tests/baselines/reference/importUsedInExtendsList1.js @@ -22,7 +22,7 @@ exports.Super = Super; //// [importUsedInExtendsList1_1.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/indexerConstraints2.js b/tests/baselines/reference/indexerConstraints2.js index d7357f021d0ed..81bb114e39415 100644 --- a/tests/baselines/reference/indexerConstraints2.js +++ b/tests/baselines/reference/indexerConstraints2.js @@ -30,7 +30,7 @@ class K extends J { //// [indexerConstraints2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/indirectSelfReference.js b/tests/baselines/reference/indirectSelfReference.js index 2f4f37b9b53a5..a61a14a2d6b16 100644 --- a/tests/baselines/reference/indirectSelfReference.js +++ b/tests/baselines/reference/indirectSelfReference.js @@ -4,7 +4,7 @@ class b extends a{ } //// [indirectSelfReference.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/indirectSelfReferenceGeneric.js b/tests/baselines/reference/indirectSelfReferenceGeneric.js index 9171bb0eeb6ee..989a02b194396 100644 --- a/tests/baselines/reference/indirectSelfReferenceGeneric.js +++ b/tests/baselines/reference/indirectSelfReferenceGeneric.js @@ -4,7 +4,7 @@ class b extends a { } //// [indirectSelfReferenceGeneric.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/infinitelyExpandingTypesNonGenericBase.js b/tests/baselines/reference/infinitelyExpandingTypesNonGenericBase.js index ad1a063bfb0fd..7336e2c0f69af 100644 --- a/tests/baselines/reference/infinitelyExpandingTypesNonGenericBase.js +++ b/tests/baselines/reference/infinitelyExpandingTypesNonGenericBase.js @@ -26,7 +26,7 @@ o(A); //// [infinitelyExpandingTypesNonGenericBase.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritFromGenericTypeParameter.js b/tests/baselines/reference/inheritFromGenericTypeParameter.js index 40e6abd3e5366..57ad5b71bd8cf 100644 --- a/tests/baselines/reference/inheritFromGenericTypeParameter.js +++ b/tests/baselines/reference/inheritFromGenericTypeParameter.js @@ -4,7 +4,7 @@ interface I extends T { } //// [inheritFromGenericTypeParameter.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritSameNamePrivatePropertiesFromSameOrigin.js b/tests/baselines/reference/inheritSameNamePrivatePropertiesFromSameOrigin.js index a0874eb1c723f..679e91dc38a27 100644 --- a/tests/baselines/reference/inheritSameNamePrivatePropertiesFromSameOrigin.js +++ b/tests/baselines/reference/inheritSameNamePrivatePropertiesFromSameOrigin.js @@ -12,7 +12,7 @@ interface A extends C, C2 { // ok //// [inheritSameNamePrivatePropertiesFromSameOrigin.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritance.js b/tests/baselines/reference/inheritance.js index cbfef2d3382a4..01fdd0a3d67a4 100644 --- a/tests/baselines/reference/inheritance.js +++ b/tests/baselines/reference/inheritance.js @@ -36,7 +36,7 @@ class Baad extends Good { //// [inheritance.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritance1.js b/tests/baselines/reference/inheritance1.js index 86de0b7635066..c33c73a6e60fd 100644 --- a/tests/baselines/reference/inheritance1.js +++ b/tests/baselines/reference/inheritance1.js @@ -63,7 +63,7 @@ l1 = c; //// [inheritance1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js index 57a9c89758357..180f48f613c7d 100644 --- a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js +++ b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js @@ -12,7 +12,7 @@ class C extends B { //// [inheritanceGrandParentPrivateMemberCollision.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js index 83c5aa3e4cdfc..73121951e7c98 100644 --- a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js +++ b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js @@ -12,7 +12,7 @@ class C extends B { //// [inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js b/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js index b11b6e318a7cb..60183c5749ef5 100644 --- a/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js +++ b/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js @@ -12,7 +12,7 @@ class C extends B { //// [inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js b/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js index 09ea08899d9dd..fc1ff97e8cf47 100644 --- a/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js @@ -19,7 +19,7 @@ class b extends a { //// [inheritanceMemberAccessorOverridingAccessor.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.js b/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.js index 59d2abdaab2b5..0ba2a70f257e5 100644 --- a/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.js +++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.js @@ -16,7 +16,7 @@ class b extends a { //// [inheritanceMemberAccessorOverridingMethod.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js b/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js index 98a95747a8e8b..26c911694a25b 100644 --- a/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js +++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js @@ -14,7 +14,7 @@ class b extends a { //// [inheritanceMemberAccessorOverridingProperty.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js b/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js index 0d54e5d42fab9..d0dfcc5923a1b 100644 --- a/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js @@ -16,7 +16,7 @@ class b extends a { //// [inheritanceMemberFuncOverridingAccessor.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.js b/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.js index 9af25c6fdb807..64e5e923178c6 100644 --- a/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.js +++ b/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.js @@ -13,7 +13,7 @@ class b extends a { //// [inheritanceMemberFuncOverridingMethod.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.js b/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.js index 5c77ce081010d..f3835a78f1485 100644 --- a/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.js +++ b/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.js @@ -11,7 +11,7 @@ class b extends a { //// [inheritanceMemberFuncOverridingProperty.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js b/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js index 82c7a94d17c77..82fc4906ca6bc 100644 --- a/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js @@ -15,7 +15,7 @@ class b extends a { //// [inheritanceMemberPropertyOverridingAccessor.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.js b/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.js index e6929218e6396..e13a111fef9ad 100644 --- a/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.js +++ b/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.js @@ -11,7 +11,7 @@ class b extends a { //// [inheritanceMemberPropertyOverridingMethod.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberPropertyOverridingProperty.js b/tests/baselines/reference/inheritanceMemberPropertyOverridingProperty.js index 85764cddc5230..b6496085a61fe 100644 --- a/tests/baselines/reference/inheritanceMemberPropertyOverridingProperty.js +++ b/tests/baselines/reference/inheritanceMemberPropertyOverridingProperty.js @@ -9,7 +9,7 @@ class b extends a { //// [inheritanceMemberPropertyOverridingProperty.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js b/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js index 28fe814450996..ac99c90e82923 100644 --- a/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js +++ b/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js @@ -9,7 +9,7 @@ var b3 = new B(); // error, could not select overload for 'new' expression //// [inheritanceOfGenericConstructorMethod1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js b/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js index 0cc71e168f4a8..406675d88d99b 100644 --- a/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js +++ b/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js @@ -16,7 +16,7 @@ var n3 = new N.D2(); // no error, D2 //// [inheritanceOfGenericConstructorMethod2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js b/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js index bb91ee5f9ead4..3faa8f8388dca 100644 --- a/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js @@ -19,7 +19,7 @@ class b extends a { //// [inheritanceStaticAccessorOverridingAccessor.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js b/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js index 363852a84bf49..543651ea6f0e2 100644 --- a/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js +++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js @@ -16,7 +16,7 @@ class b extends a { //// [inheritanceStaticAccessorOverridingMethod.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js b/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js index ba8df7a5f0bca..5053cd3946ab2 100644 --- a/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js +++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js @@ -14,7 +14,7 @@ class b extends a { //// [inheritanceStaticAccessorOverridingProperty.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js index e464029fba5d9..6090bd4f74f2e 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js @@ -16,7 +16,7 @@ class b extends a { //// [inheritanceStaticFuncOverridingAccessor.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js index cc825cfa9b5e8..5213eae20ddeb 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js @@ -13,7 +13,7 @@ class b extends a { //// [inheritanceStaticFuncOverridingAccessorOfFuncType.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.js b/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.js index 466c65fa7d5b1..4d85f383ef6aa 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.js @@ -13,7 +13,7 @@ class b extends a { //// [inheritanceStaticFuncOverridingMethod.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.js b/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.js index dfc0ce2c13fcd..a548d70861b70 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.js @@ -11,7 +11,7 @@ class b extends a { //// [inheritanceStaticFuncOverridingProperty.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.js b/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.js index da7850f2071fd..9f2a7acfd14b5 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.js @@ -11,7 +11,7 @@ class b extends a { //// [inheritanceStaticFuncOverridingPropertyOfFuncType.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticFunctionOverridingInstanceProperty.js b/tests/baselines/reference/inheritanceStaticFunctionOverridingInstanceProperty.js index d5916a9d452c1..c489493375e58 100644 --- a/tests/baselines/reference/inheritanceStaticFunctionOverridingInstanceProperty.js +++ b/tests/baselines/reference/inheritanceStaticFunctionOverridingInstanceProperty.js @@ -11,7 +11,7 @@ class b extends a { //// [inheritanceStaticFunctionOverridingInstanceProperty.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticMembersCompatible.js b/tests/baselines/reference/inheritanceStaticMembersCompatible.js index b4cae99b64be9..b57ada542129c 100644 --- a/tests/baselines/reference/inheritanceStaticMembersCompatible.js +++ b/tests/baselines/reference/inheritanceStaticMembersCompatible.js @@ -9,7 +9,7 @@ class b extends a { //// [inheritanceStaticMembersCompatible.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticMembersIncompatible.js b/tests/baselines/reference/inheritanceStaticMembersIncompatible.js index 38c637dd8d1b0..11e8e0117db67 100644 --- a/tests/baselines/reference/inheritanceStaticMembersIncompatible.js +++ b/tests/baselines/reference/inheritanceStaticMembersIncompatible.js @@ -9,7 +9,7 @@ class b extends a { //// [inheritanceStaticMembersIncompatible.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js b/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js index 49dc86fc50036..7283ee4dbb0d6 100644 --- a/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js @@ -14,7 +14,7 @@ class b extends a { //// [inheritanceStaticPropertyOverridingAccessor.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.js b/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.js index bcd63537540d8..e9308f977db3b 100644 --- a/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.js +++ b/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.js @@ -11,7 +11,7 @@ class b extends a { //// [inheritanceStaticPropertyOverridingMethod.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticPropertyOverridingProperty.js b/tests/baselines/reference/inheritanceStaticPropertyOverridingProperty.js index c1bdd9b66a234..4feb0e06b8c6c 100644 --- a/tests/baselines/reference/inheritanceStaticPropertyOverridingProperty.js +++ b/tests/baselines/reference/inheritanceStaticPropertyOverridingProperty.js @@ -9,7 +9,7 @@ class b extends a { //// [inheritanceStaticPropertyOverridingProperty.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritedConstructorWithRestParams.js b/tests/baselines/reference/inheritedConstructorWithRestParams.js index 6a30836d72896..4d3b055dcdb5e 100644 --- a/tests/baselines/reference/inheritedConstructorWithRestParams.js +++ b/tests/baselines/reference/inheritedConstructorWithRestParams.js @@ -16,7 +16,7 @@ new Derived(3); //// [inheritedConstructorWithRestParams.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritedConstructorWithRestParams2.js b/tests/baselines/reference/inheritedConstructorWithRestParams2.js index 9a1b13a84348c..146677ff09c6d 100644 --- a/tests/baselines/reference/inheritedConstructorWithRestParams2.js +++ b/tests/baselines/reference/inheritedConstructorWithRestParams2.js @@ -36,7 +36,7 @@ new Derived("", 3, "", ""); //// [inheritedConstructorWithRestParams2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritedModuleMembersForClodule.js b/tests/baselines/reference/inheritedModuleMembersForClodule.js index cd49009fed990..666f4d703be7a 100644 --- a/tests/baselines/reference/inheritedModuleMembersForClodule.js +++ b/tests/baselines/reference/inheritedModuleMembersForClodule.js @@ -23,7 +23,7 @@ class E extends D { //// [inheritedModuleMembersForClodule.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/instanceOfAssignability.js b/tests/baselines/reference/instanceOfAssignability.js index b8f39c5b0e21a..1492a9f919b1e 100644 --- a/tests/baselines/reference/instanceOfAssignability.js +++ b/tests/baselines/reference/instanceOfAssignability.js @@ -91,7 +91,7 @@ function fn8(x: Alpha|Beta|Gamma) { //// [instanceOfAssignability.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js b/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js index 8dc5227685f76..a421814ea2db5 100644 --- a/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js +++ b/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js @@ -44,7 +44,7 @@ module Generic { //// [instancePropertiesInheritedIntoClassType.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/instanceSubtypeCheck2.js b/tests/baselines/reference/instanceSubtypeCheck2.js index 914f37960012e..c6c657aa82e8f 100644 --- a/tests/baselines/reference/instanceSubtypeCheck2.js +++ b/tests/baselines/reference/instanceSubtypeCheck2.js @@ -9,7 +9,7 @@ class C2 extends C1 { //// [instanceSubtypeCheck2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/instanceofWithStructurallyIdenticalTypes.js b/tests/baselines/reference/instanceofWithStructurallyIdenticalTypes.js index 54a574238e562..46c842c86a75f 100644 --- a/tests/baselines/reference/instanceofWithStructurallyIdenticalTypes.js +++ b/tests/baselines/reference/instanceofWithStructurallyIdenticalTypes.js @@ -73,7 +73,7 @@ function goo(x: A) { //// [instanceofWithStructurallyIdenticalTypes.js] // Repro from #7271 var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/instantiatedReturnTypeContravariance.js b/tests/baselines/reference/instantiatedReturnTypeContravariance.js index bc496a63632d3..ac3470cb288e0 100644 --- a/tests/baselines/reference/instantiatedReturnTypeContravariance.js +++ b/tests/baselines/reference/instantiatedReturnTypeContravariance.js @@ -32,7 +32,7 @@ return null; //// [instantiatedReturnTypeContravariance.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/interfaceClassMerging.js b/tests/baselines/reference/interfaceClassMerging.js index 6542376a19bde..931d94f6eda09 100644 --- a/tests/baselines/reference/interfaceClassMerging.js +++ b/tests/baselines/reference/interfaceClassMerging.js @@ -42,7 +42,7 @@ obj = bar; //// [interfaceClassMerging.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/interfaceClassMerging2.js b/tests/baselines/reference/interfaceClassMerging2.js index 70a62da4131ed..c0c9b17b3e8ed 100644 --- a/tests/baselines/reference/interfaceClassMerging2.js +++ b/tests/baselines/reference/interfaceClassMerging2.js @@ -38,7 +38,7 @@ foo = bar; //// [interfaceClassMerging2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/interfaceExtendsClass1.js b/tests/baselines/reference/interfaceExtendsClass1.js index 8324a001f9146..85b4a42302df7 100644 --- a/tests/baselines/reference/interfaceExtendsClass1.js +++ b/tests/baselines/reference/interfaceExtendsClass1.js @@ -20,7 +20,7 @@ class Location { //// [interfaceExtendsClass1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js b/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js index 1179ff101df0b..05ae7d83678d5 100644 --- a/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js +++ b/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js @@ -29,7 +29,7 @@ d = c; // error //// [interfaceExtendsClassWithPrivate1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js b/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js index 49b5efbd01268..a1ff0fff763d6 100644 --- a/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js +++ b/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js @@ -25,7 +25,7 @@ class D2 extends C implements I { // error //// [interfaceExtendsClassWithPrivate2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/interfaceImplementation8.js b/tests/baselines/reference/interfaceImplementation8.js index afb5a795264cc..2193189eaf1a6 100644 --- a/tests/baselines/reference/interfaceImplementation8.js +++ b/tests/baselines/reference/interfaceImplementation8.js @@ -42,7 +42,7 @@ class C8 extends C7 implements i2{ //// [interfaceImplementation8.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.js b/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.js index 6e9b09c906f8e..dc4284495b178 100644 --- a/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.js +++ b/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.js @@ -81,7 +81,7 @@ module YYY4 { //// [invalidModuleWithStatementsOfEveryKind.js] // All of these should be an error var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/invalidMultipleVariableDeclarations.js b/tests/baselines/reference/invalidMultipleVariableDeclarations.js index 340429cc3982c..2117e176f08e3 100644 --- a/tests/baselines/reference/invalidMultipleVariableDeclarations.js +++ b/tests/baselines/reference/invalidMultipleVariableDeclarations.js @@ -55,7 +55,7 @@ var m = M.A; //// [invalidMultipleVariableDeclarations.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/invalidReturnStatements.js b/tests/baselines/reference/invalidReturnStatements.js index a6b07b7d7bd3a..8f1adc05fa69e 100644 --- a/tests/baselines/reference/invalidReturnStatements.js +++ b/tests/baselines/reference/invalidReturnStatements.js @@ -22,7 +22,7 @@ function fn11(): D { return new C(); } //// [invalidReturnStatements.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/isolatedModulesImportExportElision.js b/tests/baselines/reference/isolatedModulesImportExportElision.js index 6f1d38dcbb5bf..e98932901e3fc 100644 --- a/tests/baselines/reference/isolatedModulesImportExportElision.js +++ b/tests/baselines/reference/isolatedModulesImportExportElision.js @@ -16,7 +16,7 @@ export var z = x; //// [file1.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/jsxViaImport.js b/tests/baselines/reference/jsxViaImport.js index 604787af744e6..99b9229f2a5e1 100644 --- a/tests/baselines/reference/jsxViaImport.js +++ b/tests/baselines/reference/jsxViaImport.js @@ -26,7 +26,7 @@ class TestComponent extends React.Component { //// [consumer.jsx] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/keyofAndIndexedAccess.js b/tests/baselines/reference/keyofAndIndexedAccess.js index 0e630be9a4392..50bb51dbae71d 100644 --- a/tests/baselines/reference/keyofAndIndexedAccess.js +++ b/tests/baselines/reference/keyofAndIndexedAccess.js @@ -295,7 +295,7 @@ var hashOfEmpty2 = on({ test: (x: boolean) => {} }); // { test: boolean } //// [keyofAndIndexedAccess.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/lambdaArgCrash.js b/tests/baselines/reference/lambdaArgCrash.js index 47db7f3ce64c1..911232722bd3f 100644 --- a/tests/baselines/reference/lambdaArgCrash.js +++ b/tests/baselines/reference/lambdaArgCrash.js @@ -36,7 +36,7 @@ class ItemSetEvent extends Event { //// [lambdaArgCrash.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/lift.js b/tests/baselines/reference/lift.js index 364d52d938567..cd6f4fffd0038 100644 --- a/tests/baselines/reference/lift.js +++ b/tests/baselines/reference/lift.js @@ -19,7 +19,7 @@ class C extends B { //// [lift.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/localTypes1.js b/tests/baselines/reference/localTypes1.js index 100452b7a96c0..a887a3e07b07b 100644 --- a/tests/baselines/reference/localTypes1.js +++ b/tests/baselines/reference/localTypes1.js @@ -143,7 +143,7 @@ function f6() { //// [localTypes1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/m7Bugs.js b/tests/baselines/reference/m7Bugs.js index e5a4d11f00cd8..078c77c5e3ca3 100644 --- a/tests/baselines/reference/m7Bugs.js +++ b/tests/baselines/reference/m7Bugs.js @@ -28,7 +28,7 @@ var y3: C1 = {}; //// [m7Bugs.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/mergedDeclarations5.js b/tests/baselines/reference/mergedDeclarations5.js index b24e86eca5815..f731d4de428bc 100644 --- a/tests/baselines/reference/mergedDeclarations5.js +++ b/tests/baselines/reference/mergedDeclarations5.js @@ -20,7 +20,7 @@ var A = (function () { }()); //// [b.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/mergedDeclarations6.js b/tests/baselines/reference/mergedDeclarations6.js index d610e4ab46f3d..42ef570206185 100644 --- a/tests/baselines/reference/mergedDeclarations6.js +++ b/tests/baselines/reference/mergedDeclarations6.js @@ -38,7 +38,7 @@ define(["require", "exports"], function (require, exports) { }); //// [b.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/mergedInheritedClassInterface.js b/tests/baselines/reference/mergedInheritedClassInterface.js index 0f598f2cf7858..38d4f94adde5d 100644 --- a/tests/baselines/reference/mergedInheritedClassInterface.js +++ b/tests/baselines/reference/mergedInheritedClassInterface.js @@ -48,7 +48,7 @@ grandchild.method2(); //// [mergedInheritedClassInterface.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.js b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.js index 6dccf1dfdd9e9..fd3d2da41e3f8 100644 --- a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.js +++ b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.js @@ -33,7 +33,7 @@ var r2 = a.w; // error //// [mergedInterfacesWithInheritedPrivates2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.js b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.js index a3ca796575c66..1c8ba88d786a3 100644 --- a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.js +++ b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.js @@ -40,7 +40,7 @@ module M { //// [mergedInterfacesWithInheritedPrivates3.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/missingPropertiesOfClassExpression.js b/tests/baselines/reference/missingPropertiesOfClassExpression.js index c7b30882b145e..8df4153b72dbf 100644 --- a/tests/baselines/reference/missingPropertiesOfClassExpression.js +++ b/tests/baselines/reference/missingPropertiesOfClassExpression.js @@ -8,7 +8,7 @@ class George extends class { reset() { return this.y; } } { //// [missingPropertiesOfClassExpression.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/moduleAsBaseType.js b/tests/baselines/reference/moduleAsBaseType.js index fc0533a2470e3..a4caea585ac9a 100644 --- a/tests/baselines/reference/moduleAsBaseType.js +++ b/tests/baselines/reference/moduleAsBaseType.js @@ -6,7 +6,7 @@ class C2 implements M { } //// [moduleAsBaseType.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/moduleImportedForTypeArgumentPosition.js b/tests/baselines/reference/moduleImportedForTypeArgumentPosition.js index 51d9eb89b1d2c..bf074378d4bf1 100644 --- a/tests/baselines/reference/moduleImportedForTypeArgumentPosition.js +++ b/tests/baselines/reference/moduleImportedForTypeArgumentPosition.js @@ -17,7 +17,7 @@ define(["require", "exports"], function (require, exports) { }); //// [moduleImportedForTypeArgumentPosition_1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/moduleWithStatementsOfEveryKind.js b/tests/baselines/reference/moduleWithStatementsOfEveryKind.js index 4243c9849cf7f..6efcddf7201a7 100644 --- a/tests/baselines/reference/moduleWithStatementsOfEveryKind.js +++ b/tests/baselines/reference/moduleWithStatementsOfEveryKind.js @@ -60,7 +60,7 @@ module Y { //// [moduleWithStatementsOfEveryKind.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/multipleInheritance.js b/tests/baselines/reference/multipleInheritance.js index 9c0e865cdb774..d05f10568ade5 100644 --- a/tests/baselines/reference/multipleInheritance.js +++ b/tests/baselines/reference/multipleInheritance.js @@ -40,7 +40,7 @@ class Baad extends Good { //// [multipleInheritance.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/mutuallyRecursiveGenericBaseTypes2.js b/tests/baselines/reference/mutuallyRecursiveGenericBaseTypes2.js index 8b59564d46595..570a93e8534f1 100644 --- a/tests/baselines/reference/mutuallyRecursiveGenericBaseTypes2.js +++ b/tests/baselines/reference/mutuallyRecursiveGenericBaseTypes2.js @@ -12,7 +12,7 @@ var test = new foo(); //// [mutuallyRecursiveGenericBaseTypes2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/noImplicitAnyMissingGetAccessor.js b/tests/baselines/reference/noImplicitAnyMissingGetAccessor.js index cc4c942237329..78ea4e74a97eb 100644 --- a/tests/baselines/reference/noImplicitAnyMissingGetAccessor.js +++ b/tests/baselines/reference/noImplicitAnyMissingGetAccessor.js @@ -14,7 +14,7 @@ class Child extends Parent { //// [noImplicitAnyMissingGetAccessor.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/noImplicitAnyMissingSetAccessor.js b/tests/baselines/reference/noImplicitAnyMissingSetAccessor.js index 1323955c05e7f..64c480cc8e1d3 100644 --- a/tests/baselines/reference/noImplicitAnyMissingSetAccessor.js +++ b/tests/baselines/reference/noImplicitAnyMissingSetAccessor.js @@ -13,7 +13,7 @@ class Child extends Parent { //// [noImplicitAnyMissingSetAccessor.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/nonGenericClassExtendingGenericClassWithAny.js b/tests/baselines/reference/nonGenericClassExtendingGenericClassWithAny.js index b0a3365193d25..33f7e696126c6 100644 --- a/tests/baselines/reference/nonGenericClassExtendingGenericClassWithAny.js +++ b/tests/baselines/reference/nonGenericClassExtendingGenericClassWithAny.js @@ -7,7 +7,7 @@ class Bar extends Foo { } // Valid //// [nonGenericClassExtendingGenericClassWithAny.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js index 92c8b380e00af..c8ec0d9da7859 100644 --- a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js +++ b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js @@ -48,7 +48,7 @@ var b: { [x: number]: A } = { //// [numericIndexerConstrainsPropertyDeclarations2.js] // String indexer providing a constraint of a user defined type var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/numericIndexerConstraint3.js b/tests/baselines/reference/numericIndexerConstraint3.js index 29cb75b423469..02b54a2bbadc5 100644 --- a/tests/baselines/reference/numericIndexerConstraint3.js +++ b/tests/baselines/reference/numericIndexerConstraint3.js @@ -14,7 +14,7 @@ class C { //// [numericIndexerConstraint3.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/numericIndexerConstraint4.js b/tests/baselines/reference/numericIndexerConstraint4.js index 135e169c4a9f8..0f82789285d35 100644 --- a/tests/baselines/reference/numericIndexerConstraint4.js +++ b/tests/baselines/reference/numericIndexerConstraint4.js @@ -14,7 +14,7 @@ var x: { //// [numericIndexerConstraint4.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/numericIndexerTyping2.js b/tests/baselines/reference/numericIndexerTyping2.js index 5b9e797bdecde..1086d9745908f 100644 --- a/tests/baselines/reference/numericIndexerTyping2.js +++ b/tests/baselines/reference/numericIndexerTyping2.js @@ -14,7 +14,7 @@ var r2: string = i2[1]; // error: numeric indexer returns the type of the string //// [numericIndexerTyping2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectCreationOfElementAccessExpression.js b/tests/baselines/reference/objectCreationOfElementAccessExpression.js index a1739ce0d8e29..2b7ac176c7e07 100644 --- a/tests/baselines/reference/objectCreationOfElementAccessExpression.js +++ b/tests/baselines/reference/objectCreationOfElementAccessExpression.js @@ -57,7 +57,7 @@ var foods2: MonsterFood[] = new PetFood[new IceCream('Mint chocolate chip') , Co //// [objectCreationOfElementAccessExpression.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js b/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js index 17045d65af0a9..301761c284937 100644 --- a/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js +++ b/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js @@ -56,7 +56,7 @@ var r4: void = b.valueOf(); //// [objectTypeHidingMembersOfExtendedObject.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js index e82cef9bdd6f2..1b88926972440 100644 --- a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js +++ b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js @@ -125,7 +125,7 @@ function foo16(x: any) { } //// [objectTypesIdentityWithNumericIndexers1.js] // object types are identical structurally var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js index abcea11367078..767f10adc889c 100644 --- a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js +++ b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js @@ -128,7 +128,7 @@ function foo16(x: any) { } //// [objectTypesIdentityWithNumericIndexers2.js] // object types are identical structurally var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js index f5aeb177472f7..8ae7b92b4dd73 100644 --- a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js +++ b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js @@ -125,7 +125,7 @@ function foo16(x: any) { } //// [objectTypesIdentityWithNumericIndexers3.js] // object types are identical structurally var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypesIdentityWithPrivates.js b/tests/baselines/reference/objectTypesIdentityWithPrivates.js index 3946027063f4d..9f9319a3cf8bf 100644 --- a/tests/baselines/reference/objectTypesIdentityWithPrivates.js +++ b/tests/baselines/reference/objectTypesIdentityWithPrivates.js @@ -123,7 +123,7 @@ function foo16(x: any) { } //// [objectTypesIdentityWithPrivates.js] // object types are identical structurally var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypesIdentityWithPrivates2.js b/tests/baselines/reference/objectTypesIdentityWithPrivates2.js index 9cae6960a2ea0..e1426e4a3b5c0 100644 --- a/tests/baselines/reference/objectTypesIdentityWithPrivates2.js +++ b/tests/baselines/reference/objectTypesIdentityWithPrivates2.js @@ -41,7 +41,7 @@ function foo6(x: any): any { } //// [objectTypesIdentityWithPrivates2.js] // object types are identical structurally var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypesIdentityWithPrivates3.js b/tests/baselines/reference/objectTypesIdentityWithPrivates3.js index 68754a583aa15..1105c06c204ba 100644 --- a/tests/baselines/reference/objectTypesIdentityWithPrivates3.js +++ b/tests/baselines/reference/objectTypesIdentityWithPrivates3.js @@ -27,7 +27,7 @@ var c3: C3; //// [objectTypesIdentityWithPrivates3.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js b/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js index b0211bbbba741..9f076b52c6070 100644 --- a/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js +++ b/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js @@ -125,7 +125,7 @@ function foo16(x: any) { } //// [objectTypesIdentityWithStringIndexers.js] // object types are identical structurally var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js b/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js index 00d7d1e81d84d..75ad2243fe3ad 100644 --- a/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js +++ b/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js @@ -128,7 +128,7 @@ function foo16(x: any) { } //// [objectTypesIdentityWithStringIndexers2.js] // object types are identical structurally var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/optionalConstructorArgInSuper.js b/tests/baselines/reference/optionalConstructorArgInSuper.js index e460ab3fb15b3..4ebc12261463d 100644 --- a/tests/baselines/reference/optionalConstructorArgInSuper.js +++ b/tests/baselines/reference/optionalConstructorArgInSuper.js @@ -12,7 +12,7 @@ d2.foo(); //// [optionalConstructorArgInSuper.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/optionalMethods.js b/tests/baselines/reference/optionalMethods.js index 28ed0bcd76e38..5cbd798ec8996 100644 --- a/tests/baselines/reference/optionalMethods.js +++ b/tests/baselines/reference/optionalMethods.js @@ -59,7 +59,7 @@ class Derived extends Base { //// [optionalMethods.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/optionalParamArgsTest.js b/tests/baselines/reference/optionalParamArgsTest.js index 1b603898aa698..23ab515057999 100644 --- a/tests/baselines/reference/optionalParamArgsTest.js +++ b/tests/baselines/reference/optionalParamArgsTest.js @@ -126,7 +126,7 @@ fnOpt2(1, [2, 3], [1], true); //// [optionalParamArgsTest.js] // Optional parameter and default argument tests var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/optionalParamInOverride.js b/tests/baselines/reference/optionalParamInOverride.js index 1312a89502ad1..9d318cd9ae5f7 100644 --- a/tests/baselines/reference/optionalParamInOverride.js +++ b/tests/baselines/reference/optionalParamInOverride.js @@ -9,7 +9,7 @@ class Y extends Z { //// [optionalParamInOverride.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/optionalParameterProperty.js b/tests/baselines/reference/optionalParameterProperty.js index f9b9ecaf99091..3203c4e2e09e2 100644 --- a/tests/baselines/reference/optionalParameterProperty.js +++ b/tests/baselines/reference/optionalParameterProperty.js @@ -13,7 +13,7 @@ class D extends C { //// [optionalParameterProperty.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/outModuleConcatAmd.js b/tests/baselines/reference/outModuleConcatAmd.js index 5054c2a3c335e..cab6be31d072a 100644 --- a/tests/baselines/reference/outModuleConcatAmd.js +++ b/tests/baselines/reference/outModuleConcatAmd.js @@ -10,7 +10,7 @@ export class B extends A { } //// [all.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt b/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt index 34ab74816ade5..f07a95163f642 100644 --- a/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt +++ b/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt @@ -9,7 +9,7 @@ emittedFile:all.js sourceFile:tests/cases/compiler/ref/a.ts ------------------------------------------------------------------- >>>var __extends = (this && this.__extends) || function (d, b) { ->>> for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; +>>> Object.setPrototypeOf(d, b); >>> function __() { this.constructor = d; } >>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); >>>}; diff --git a/tests/baselines/reference/outModuleConcatSystem.js b/tests/baselines/reference/outModuleConcatSystem.js index a615090f33a50..6f6e1c3b3663b 100644 --- a/tests/baselines/reference/outModuleConcatSystem.js +++ b/tests/baselines/reference/outModuleConcatSystem.js @@ -10,7 +10,7 @@ export class B extends A { } //// [all.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt b/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt index 732214237fa32..47558a3812a1f 100644 --- a/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt +++ b/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt @@ -9,7 +9,7 @@ emittedFile:all.js sourceFile:tests/cases/compiler/ref/a.ts ------------------------------------------------------------------- >>>var __extends = (this && this.__extends) || function (d, b) { ->>> for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; +>>> Object.setPrototypeOf(d, b); >>> function __() { this.constructor = d; } >>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); >>>}; diff --git a/tests/baselines/reference/outModuleTripleSlashRefs.js b/tests/baselines/reference/outModuleTripleSlashRefs.js index b9ff7c15b61a2..5f6def67a480f 100644 --- a/tests/baselines/reference/outModuleTripleSlashRefs.js +++ b/tests/baselines/reference/outModuleTripleSlashRefs.js @@ -32,7 +32,7 @@ export class B extends A { } //// [all.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt b/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt index ce41bae6de338..9f15bc0eaee24 100644 --- a/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt +++ b/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt @@ -9,7 +9,7 @@ emittedFile:all.js sourceFile:tests/cases/compiler/ref/b.ts ------------------------------------------------------------------- >>>var __extends = (this && this.__extends) || function (d, b) { ->>> for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; +>>> Object.setPrototypeOf(d, b); >>> function __() { this.constructor = d; } >>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); >>>}; diff --git a/tests/baselines/reference/overload1.js b/tests/baselines/reference/overload1.js index 41aafdfb29c2d..6cbfb843812bf 100644 --- a/tests/baselines/reference/overload1.js +++ b/tests/baselines/reference/overload1.js @@ -41,7 +41,7 @@ var v=x.g; //// [overload1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks1.js b/tests/baselines/reference/overloadOnConstConstraintChecks1.js index f9d1c81b06b99..8bc8ccd161258 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks1.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks1.js @@ -24,7 +24,7 @@ class D implements MyDoc { //// [overloadOnConstConstraintChecks1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks2.js b/tests/baselines/reference/overloadOnConstConstraintChecks2.js index a680a62ddfef6..16cfb630a5dd8 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks2.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks2.js @@ -13,7 +13,7 @@ function foo(name: any): A { //// [overloadOnConstConstraintChecks2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks3.js b/tests/baselines/reference/overloadOnConstConstraintChecks3.js index 025e449fd6f69..1540bc4dc499b 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks3.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks3.js @@ -14,7 +14,7 @@ function foo(name: any): A { //// [overloadOnConstConstraintChecks3.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks4.js b/tests/baselines/reference/overloadOnConstConstraintChecks4.js index 0f436a5f0b2c9..a634547a36bc4 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks4.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks4.js @@ -15,7 +15,7 @@ function foo(name: any): Z { //// [overloadOnConstConstraintChecks4.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js b/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js index e3f58c0f7d0d2..0edadc3c692bb 100644 --- a/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js +++ b/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js @@ -13,7 +13,7 @@ foo("HI"); //// [overloadOnConstantsInvalidOverload1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadResolution.js b/tests/baselines/reference/overloadResolution.js index e5cc35c39c4cb..56ebebc454e3f 100644 --- a/tests/baselines/reference/overloadResolution.js +++ b/tests/baselines/reference/overloadResolution.js @@ -96,7 +96,7 @@ var s = fn5((n) => n.substr(0)); //// [overloadResolution.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadResolutionClassConstructors.js b/tests/baselines/reference/overloadResolutionClassConstructors.js index 7c8b2e2ccb6ed..5cf41a3b44a90 100644 --- a/tests/baselines/reference/overloadResolutionClassConstructors.js +++ b/tests/baselines/reference/overloadResolutionClassConstructors.js @@ -103,7 +103,7 @@ new fn5((n) => n.blah); // Error //// [overloadResolutionClassConstructors.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadResolutionConstructors.js b/tests/baselines/reference/overloadResolutionConstructors.js index 44bbfbcec2b51..85ec9fb06fb37 100644 --- a/tests/baselines/reference/overloadResolutionConstructors.js +++ b/tests/baselines/reference/overloadResolutionConstructors.js @@ -104,7 +104,7 @@ var s = new fn5((n) => n.substr(0)); //// [overloadResolutionConstructors.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadingOnConstants1.js b/tests/baselines/reference/overloadingOnConstants1.js index 96f4f7baf2442..c8f5a8fd9ae2a 100644 --- a/tests/baselines/reference/overloadingOnConstants1.js +++ b/tests/baselines/reference/overloadingOnConstants1.js @@ -27,7 +27,7 @@ var htmlSpanElement2: Derived1 = d2.createElement("span"); //// [overloadingOnConstants1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadingOnConstants2.js b/tests/baselines/reference/overloadingOnConstants2.js index 0c34d0f4b7694..9792485e1cfa9 100644 --- a/tests/baselines/reference/overloadingOnConstants2.js +++ b/tests/baselines/reference/overloadingOnConstants2.js @@ -29,7 +29,7 @@ var f: C = bar("um", []); // C //// [overloadingOnConstants2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overridingPrivateStaticMembers.js b/tests/baselines/reference/overridingPrivateStaticMembers.js index ca5616450baea..50f957c7fdd11 100644 --- a/tests/baselines/reference/overridingPrivateStaticMembers.js +++ b/tests/baselines/reference/overridingPrivateStaticMembers.js @@ -9,7 +9,7 @@ class Derived2 extends Base2 { //// [overridingPrivateStaticMembers.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parseErrorInHeritageClause1.js b/tests/baselines/reference/parseErrorInHeritageClause1.js index a9ca0a6db7342..3409c13e2f129 100644 --- a/tests/baselines/reference/parseErrorInHeritageClause1.js +++ b/tests/baselines/reference/parseErrorInHeritageClause1.js @@ -4,7 +4,7 @@ class C extends A # { //// [parseErrorInHeritageClause1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parser509630.js b/tests/baselines/reference/parser509630.js index d3648dc5b6457..cce7df3db54a4 100644 --- a/tests/baselines/reference/parser509630.js +++ b/tests/baselines/reference/parser509630.js @@ -8,7 +8,7 @@ class Any extends Type { //// [parser509630.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserAstSpans1.js b/tests/baselines/reference/parserAstSpans1.js index 6b86353b959d4..12de33e4738de 100644 --- a/tests/baselines/reference/parserAstSpans1.js +++ b/tests/baselines/reference/parserAstSpans1.js @@ -221,7 +221,7 @@ class c6 extends c5 { //// [parserAstSpans1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserClassDeclaration1.js b/tests/baselines/reference/parserClassDeclaration1.js index a61b492b7a935..555d625d52238 100644 --- a/tests/baselines/reference/parserClassDeclaration1.js +++ b/tests/baselines/reference/parserClassDeclaration1.js @@ -4,7 +4,7 @@ class C extends A extends B { //// [parserClassDeclaration1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserClassDeclaration3.js b/tests/baselines/reference/parserClassDeclaration3.js index f58f0ab00cb96..b63483411b2c5 100644 --- a/tests/baselines/reference/parserClassDeclaration3.js +++ b/tests/baselines/reference/parserClassDeclaration3.js @@ -4,7 +4,7 @@ class C implements A extends B { //// [parserClassDeclaration3.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserClassDeclaration4.js b/tests/baselines/reference/parserClassDeclaration4.js index 912aa8c658198..2f3cdf0e16609 100644 --- a/tests/baselines/reference/parserClassDeclaration4.js +++ b/tests/baselines/reference/parserClassDeclaration4.js @@ -4,7 +4,7 @@ class C extends A implements B extends C { //// [parserClassDeclaration4.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserClassDeclaration5.js b/tests/baselines/reference/parserClassDeclaration5.js index 054aaf0eb7a49..da843d0629253 100644 --- a/tests/baselines/reference/parserClassDeclaration5.js +++ b/tests/baselines/reference/parserClassDeclaration5.js @@ -4,7 +4,7 @@ class C extends A implements B implements C { //// [parserClassDeclaration5.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserClassDeclaration6.js b/tests/baselines/reference/parserClassDeclaration6.js index 1423edfe037ad..842b811de9b63 100644 --- a/tests/baselines/reference/parserClassDeclaration6.js +++ b/tests/baselines/reference/parserClassDeclaration6.js @@ -4,7 +4,7 @@ class C extends A, B { //// [parserClassDeclaration6.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause2.js b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause2.js index aa0679bb8f5af..22225819435a6 100644 --- a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause2.js +++ b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause2.js @@ -4,7 +4,7 @@ class C extends A, { //// [parserErrorRecovery_ExtendsOrImplementsClause2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause4.js b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause4.js index 1308c7c194bff..92af44f7cc43e 100644 --- a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause4.js +++ b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause4.js @@ -4,7 +4,7 @@ class C extends A implements { //// [parserErrorRecovery_ExtendsOrImplementsClause4.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause5.js b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause5.js index b1471628fbd9b..07adb1e2001de 100644 --- a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause5.js +++ b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause5.js @@ -4,7 +4,7 @@ class C extends A, implements B, { //// [parserErrorRecovery_ExtendsOrImplementsClause5.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserGenericsInTypeContexts1.js b/tests/baselines/reference/parserGenericsInTypeContexts1.js index 641d296dc4359..ef93433301b52 100644 --- a/tests/baselines/reference/parserGenericsInTypeContexts1.js +++ b/tests/baselines/reference/parserGenericsInTypeContexts1.js @@ -19,7 +19,7 @@ function f2(): F { //// [parserGenericsInTypeContexts1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserGenericsInTypeContexts2.js b/tests/baselines/reference/parserGenericsInTypeContexts2.js index b0f14a090ae5f..a3bfafc19b4df 100644 --- a/tests/baselines/reference/parserGenericsInTypeContexts2.js +++ b/tests/baselines/reference/parserGenericsInTypeContexts2.js @@ -19,7 +19,7 @@ function f2(): F, Y>> { //// [parserGenericsInTypeContexts2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserRealSource10.js b/tests/baselines/reference/parserRealSource10.js index 11cfbdfa1f21e..b89e47d3e7552 100644 --- a/tests/baselines/reference/parserRealSource10.js +++ b/tests/baselines/reference/parserRealSource10.js @@ -459,7 +459,7 @@ module TypeScript { // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. // See LICENSE.txt in the project root for complete license information. var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserRealSource11.js b/tests/baselines/reference/parserRealSource11.js index eb05d13f4ed43..daaa9f79cee03 100644 --- a/tests/baselines/reference/parserRealSource11.js +++ b/tests/baselines/reference/parserRealSource11.js @@ -2368,7 +2368,7 @@ module TypeScript { // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. // See LICENSE.txt in the project root for complete license information. var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserharness.js b/tests/baselines/reference/parserharness.js index 14ce433817695..fd432660b529c 100644 --- a/tests/baselines/reference/parserharness.js +++ b/tests/baselines/reference/parserharness.js @@ -2097,7 +2097,7 @@ module Harness { // limitations under the License. // var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/partiallyAnnotatedFunctionInferenceError.js b/tests/baselines/reference/partiallyAnnotatedFunctionInferenceError.js index 9702595fffbed..c81647e79b553 100644 --- a/tests/baselines/reference/partiallyAnnotatedFunctionInferenceError.js +++ b/tests/baselines/reference/partiallyAnnotatedFunctionInferenceError.js @@ -17,7 +17,7 @@ testError((t1, t2, t3: D) => {}) //// [partiallyAnnotatedFunctionInferenceError.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/partiallyAnnotatedFunctionInferenceWithTypeParameter.js b/tests/baselines/reference/partiallyAnnotatedFunctionInferenceWithTypeParameter.js index d20b35625e961..e54441df4d6d9 100644 --- a/tests/baselines/reference/partiallyAnnotatedFunctionInferenceWithTypeParameter.js +++ b/tests/baselines/reference/partiallyAnnotatedFunctionInferenceWithTypeParameter.js @@ -36,7 +36,7 @@ testRest((t2, ...t3: D[]) => {}) //// [partiallyAnnotatedFunctionInferenceWithTypeParameter.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/primitiveMembers.js b/tests/baselines/reference/primitiveMembers.js index 7b94b555eb16a..64b699496bfa5 100644 --- a/tests/baselines/reference/primitiveMembers.js +++ b/tests/baselines/reference/primitiveMembers.js @@ -33,7 +33,7 @@ class foo extends baz { public bar(){ return undefined}; } //// [primitiveMembers.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/privacyClass.js b/tests/baselines/reference/privacyClass.js index 7e56edf2cf1b4..64e1c63eca124 100644 --- a/tests/baselines/reference/privacyClass.js +++ b/tests/baselines/reference/privacyClass.js @@ -130,7 +130,7 @@ export class glo_C12_public extends glo_c_private implements glo_i_private, glo //// [privacyClass.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js b/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js index e0828809416bd..377b4082bea68 100644 --- a/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js +++ b/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js @@ -100,7 +100,7 @@ class publicClassExtendingPublicClassInGlobal extends publicClassInGlobal { //// [privacyClassExtendsClauseDeclFile_externalModule.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -286,7 +286,7 @@ var publicClassExtendingFromPrivateModuleClass = (function (_super) { exports.publicClassExtendingFromPrivateModuleClass = publicClassExtendingFromPrivateModuleClass; //// [privacyClassExtendsClauseDeclFile_GlobalFile.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/privacyGloClass.js b/tests/baselines/reference/privacyGloClass.js index fa769a606ae89..b93ed51025d42 100644 --- a/tests/baselines/reference/privacyGloClass.js +++ b/tests/baselines/reference/privacyGloClass.js @@ -62,7 +62,7 @@ class glo_C11_public extends glo_c_public implements glo_i_public { //// [privacyGloClass.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/privateAccessInSubclass1.js b/tests/baselines/reference/privateAccessInSubclass1.js index 21ff4793fb35e..2118eb072d76c 100644 --- a/tests/baselines/reference/privateAccessInSubclass1.js +++ b/tests/baselines/reference/privateAccessInSubclass1.js @@ -11,7 +11,7 @@ class D extends Base { //// [privateAccessInSubclass1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/privateInstanceMemberAccessibility.js b/tests/baselines/reference/privateInstanceMemberAccessibility.js index 6fa05178f9128..98b2671d23e4e 100644 --- a/tests/baselines/reference/privateInstanceMemberAccessibility.js +++ b/tests/baselines/reference/privateInstanceMemberAccessibility.js @@ -15,7 +15,7 @@ class Derived extends Base { //// [privateInstanceMemberAccessibility.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/privateProtectedMembersAreNotAccessibleDestructuring.js b/tests/baselines/reference/privateProtectedMembersAreNotAccessibleDestructuring.js index b732661edfc3e..bcef17bf63f74 100644 --- a/tests/baselines/reference/privateProtectedMembersAreNotAccessibleDestructuring.js +++ b/tests/baselines/reference/privateProtectedMembersAreNotAccessibleDestructuring.js @@ -23,7 +23,7 @@ let { priv: a, prot: b, privateMethod: f } = k; // error //// [privateProtectedMembersAreNotAccessibleDestructuring.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/privateStaticMemberAccessibility.js b/tests/baselines/reference/privateStaticMemberAccessibility.js index c1897e8503a92..438f485e03172 100644 --- a/tests/baselines/reference/privateStaticMemberAccessibility.js +++ b/tests/baselines/reference/privateStaticMemberAccessibility.js @@ -10,7 +10,7 @@ class Derived extends Base { //// [privateStaticMemberAccessibility.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/privateStaticNotAccessibleInClodule2.js b/tests/baselines/reference/privateStaticNotAccessibleInClodule2.js index a93823654d4ad..618d6d88e8a5a 100644 --- a/tests/baselines/reference/privateStaticNotAccessibleInClodule2.js +++ b/tests/baselines/reference/privateStaticNotAccessibleInClodule2.js @@ -17,7 +17,7 @@ module D { //// [privateStaticNotAccessibleInClodule2.js] // Any attempt to access a private property member outside the class body that contains its declaration results in a compile-time error. var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/amd/testGlo.js b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/amd/testGlo.js index 99a4842f63641..ef754cba47d60 100644 --- a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/amd/testGlo.js +++ b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/amd/testGlo.js @@ -1,5 +1,5 @@ var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/node/testGlo.js b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/node/testGlo.js index 99a4842f63641..ef754cba47d60 100644 --- a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/node/testGlo.js +++ b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/node/testGlo.js @@ -1,5 +1,5 @@ var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/project/prologueEmit/amd/out.js b/tests/baselines/reference/project/prologueEmit/amd/out.js index 7ee160b82efac..8273c054fbdd8 100644 --- a/tests/baselines/reference/project/prologueEmit/amd/out.js +++ b/tests/baselines/reference/project/prologueEmit/amd/out.js @@ -1,5 +1,5 @@ var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/project/prologueEmit/node/out.js b/tests/baselines/reference/project/prologueEmit/node/out.js index 7ee160b82efac..8273c054fbdd8 100644 --- a/tests/baselines/reference/project/prologueEmit/node/out.js +++ b/tests/baselines/reference/project/prologueEmit/node/out.js @@ -1,5 +1,5 @@ var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/project/quotesInFileAndDirectoryNames/amd/m'ain.js b/tests/baselines/reference/project/quotesInFileAndDirectoryNames/amd/m'ain.js index b793b07534c46..dac535093f5c6 100644 --- a/tests/baselines/reference/project/quotesInFileAndDirectoryNames/amd/m'ain.js +++ b/tests/baselines/reference/project/quotesInFileAndDirectoryNames/amd/m'ain.js @@ -1,6 +1,6 @@ /// var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/project/quotesInFileAndDirectoryNames/node/m'ain.js b/tests/baselines/reference/project/quotesInFileAndDirectoryNames/node/m'ain.js index b793b07534c46..dac535093f5c6 100644 --- a/tests/baselines/reference/project/quotesInFileAndDirectoryNames/node/m'ain.js +++ b/tests/baselines/reference/project/quotesInFileAndDirectoryNames/node/m'ain.js @@ -1,6 +1,6 @@ /// var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/propertiesAndIndexers.js b/tests/baselines/reference/propertiesAndIndexers.js index dff86f3954e21..ccf7c50ebc955 100644 --- a/tests/baselines/reference/propertiesAndIndexers.js +++ b/tests/baselines/reference/propertiesAndIndexers.js @@ -53,7 +53,7 @@ var c: { //// [propertiesAndIndexers.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/propertyAccess.js b/tests/baselines/reference/propertyAccess.js index 0a4c9082a2162..3240f46a93502 100644 --- a/tests/baselines/reference/propertyAccess.js +++ b/tests/baselines/reference/propertyAccess.js @@ -152,7 +152,7 @@ var x3: A; //// [propertyAccess.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js index d36d7e27efe94..e813239484b44 100644 --- a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js @@ -84,7 +84,7 @@ var r4 = b.foo(aB, aB); // no inferences for T so constraint isn't satisfied, er //// [propertyAccessOnTypeParameterWithConstraints2.js] // generic types should behave as if they have properties of their constraint type var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js index 4aedfe12b0404..b10642c73c50e 100644 --- a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js @@ -59,7 +59,7 @@ var r4 = b.foo(new B()); // valid call to an invalid function //// [propertyAccessOnTypeParameterWithConstraints3.js] // generic types should behave as if they have properties of their constraint type var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js index 3cb1443814122..97f8e18f91700 100644 --- a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js @@ -46,7 +46,7 @@ var r4 = b.foo(new B()); // error after constraints above made illegal, doesn't //// [propertyAccessOnTypeParameterWithConstraints5.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass.js index 429dfdf6b14aa..226ad97f81fb0 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass.js @@ -40,7 +40,7 @@ class E extends C { //// [protectedClassPropertyAccessibleWithinNestedSubclass.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass1.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass1.js index 0571b85ea9e2a..c98abd2a89af8 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass1.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass1.js @@ -116,7 +116,7 @@ d4.x; // Error, neither within their declaring class nor class //// [protectedClassPropertyAccessibleWithinNestedSubclass1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js index a10b39b402e4d..2557a8abcf9ee 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js @@ -22,7 +22,7 @@ class C extends B { //// [protectedClassPropertyAccessibleWithinSubclass.js] // no errors var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass2.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass2.js index a404b8049bc47..8ee957ec64fe9 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass2.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass2.js @@ -96,7 +96,7 @@ d4.x; // Error, neither within their declaring class nor class //// [protectedClassPropertyAccessibleWithinSubclass2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass3.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass3.js index 7d449bdcbd4c9..31c2f3d149c3e 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass3.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass3.js @@ -15,7 +15,7 @@ class Derived extends Base { //// [protectedClassPropertyAccessibleWithinSubclass3.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedInstanceMemberAccessibility.js b/tests/baselines/reference/protectedInstanceMemberAccessibility.js index 3259d401270d8..84400a37aa7b0 100644 --- a/tests/baselines/reference/protectedInstanceMemberAccessibility.js +++ b/tests/baselines/reference/protectedInstanceMemberAccessibility.js @@ -46,7 +46,7 @@ class C extends A { //// [protectedInstanceMemberAccessibility.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedMembers.js b/tests/baselines/reference/protectedMembers.js index 46b4691dff77f..4757f6134a36f 100644 --- a/tests/baselines/reference/protectedMembers.js +++ b/tests/baselines/reference/protectedMembers.js @@ -117,7 +117,7 @@ class B3 extends A3 { //// [protectedMembers.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass.js b/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass.js index ad1b1682aa73e..ffe163716ed47 100644 --- a/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass.js +++ b/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass.js @@ -45,7 +45,7 @@ Derived3.x; // Error, neither within their declaring class nor classes deriv //// [protectedStaticClassPropertyAccessibleWithinSubclass.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass2.js b/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass2.js index a2346b8be40a3..d21e6511c3489 100644 --- a/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass2.js +++ b/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass2.js @@ -23,7 +23,7 @@ class Derived2 extends Derived1 { //// [protectedStaticClassPropertyAccessibleWithinSubclass2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/qualifiedName_entity-name-resolution-does-not-affect-class-heritage.js b/tests/baselines/reference/qualifiedName_entity-name-resolution-does-not-affect-class-heritage.js index a881eb55a1811..d345bb7e1b19d 100644 --- a/tests/baselines/reference/qualifiedName_entity-name-resolution-does-not-affect-class-heritage.js +++ b/tests/baselines/reference/qualifiedName_entity-name-resolution-does-not-affect-class-heritage.js @@ -8,7 +8,7 @@ class Beta extends Alpha.x { //// [qualifiedName_entity-name-resolution-does-not-affect-class-heritage.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/readonlyConstructorAssignment.js b/tests/baselines/reference/readonlyConstructorAssignment.js index 872c00486c001..d8275690d4a6a 100644 --- a/tests/baselines/reference/readonlyConstructorAssignment.js +++ b/tests/baselines/reference/readonlyConstructorAssignment.js @@ -42,7 +42,7 @@ class E extends D { //// [readonlyConstructorAssignment.js] // Tests that readonly parameter properties behave like regular readonly properties var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/recursiveBaseCheck3.js b/tests/baselines/reference/recursiveBaseCheck3.js index 250a9e0b6183a..92835b848ce18 100644 --- a/tests/baselines/reference/recursiveBaseCheck3.js +++ b/tests/baselines/reference/recursiveBaseCheck3.js @@ -6,7 +6,7 @@ class C extends A { } //// [recursiveBaseCheck3.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/recursiveBaseCheck4.js b/tests/baselines/reference/recursiveBaseCheck4.js index 7f0c6b5f95d51..f0271b2d36ab8 100644 --- a/tests/baselines/reference/recursiveBaseCheck4.js +++ b/tests/baselines/reference/recursiveBaseCheck4.js @@ -4,7 +4,7 @@ class M extends M { } //// [recursiveBaseCheck4.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/recursiveBaseCheck6.js b/tests/baselines/reference/recursiveBaseCheck6.js index 53a608baeca64..97e6cb483e39c 100644 --- a/tests/baselines/reference/recursiveBaseCheck6.js +++ b/tests/baselines/reference/recursiveBaseCheck6.js @@ -4,7 +4,7 @@ class S18 extends S18<{ S19: A; }>{ } //// [recursiveBaseCheck6.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/recursiveBaseConstructorCreation1.js b/tests/baselines/reference/recursiveBaseConstructorCreation1.js index 344750974cbfd..d20d43c405d68 100644 --- a/tests/baselines/reference/recursiveBaseConstructorCreation1.js +++ b/tests/baselines/reference/recursiveBaseConstructorCreation1.js @@ -8,7 +8,7 @@ var x = new C2(); // Valid //// [recursiveBaseConstructorCreation1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/recursiveClassInstantiationsWithDefaultConstructors.js b/tests/baselines/reference/recursiveClassInstantiationsWithDefaultConstructors.js index 34aa110b7ee74..eeda7ef86f40e 100644 --- a/tests/baselines/reference/recursiveClassInstantiationsWithDefaultConstructors.js +++ b/tests/baselines/reference/recursiveClassInstantiationsWithDefaultConstructors.js @@ -11,7 +11,7 @@ export class MemberNameArray extends MemberName { //// [recursiveClassInstantiationsWithDefaultConstructors.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/recursiveClassReferenceTest.js b/tests/baselines/reference/recursiveClassReferenceTest.js index a2cf3319474e5..e59f3ad4c3681 100644 --- a/tests/baselines/reference/recursiveClassReferenceTest.js +++ b/tests/baselines/reference/recursiveClassReferenceTest.js @@ -106,7 +106,7 @@ module Sample.Thing.Languages.PlainText { // Scenario 1: Test reqursive function call with "this" parameter // Scenario 2: Test recursive function call with cast and "this" parameter var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt b/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt index f99a062e2c635..8bfac267dbf6d 100644 --- a/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt +++ b/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt @@ -27,7 +27,7 @@ sourceFile:recursiveClassReferenceTest.ts 2 >Emitted(2, 75) Source(2, 75) + SourceIndex(0) --- >>>var __extends = (this && this.__extends) || function (d, b) { ->>> for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; +>>> Object.setPrototypeOf(d, b); >>> function __() { this.constructor = d; } >>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); >>>}; diff --git a/tests/baselines/reference/recursiveComplicatedClasses.js b/tests/baselines/reference/recursiveComplicatedClasses.js index 8441ff9e15a78..57000180db467 100644 --- a/tests/baselines/reference/recursiveComplicatedClasses.js +++ b/tests/baselines/reference/recursiveComplicatedClasses.js @@ -26,7 +26,7 @@ class TypeSymbol extends InferenceSymbol { //// [recursiveComplicatedClasses.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/recursivelySpecializedConstructorDeclaration.js b/tests/baselines/reference/recursivelySpecializedConstructorDeclaration.js index 76224741e6033..5f6e3ab0b06fd 100644 --- a/tests/baselines/reference/recursivelySpecializedConstructorDeclaration.js +++ b/tests/baselines/reference/recursivelySpecializedConstructorDeclaration.js @@ -31,7 +31,7 @@ declare module MsPortal.Controls.Base.ItemList { //// [recursivelySpecializedConstructorDeclaration.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/reexportClassDefinition.js b/tests/baselines/reference/reexportClassDefinition.js index a75a90d4d8687..d7b644514cc58 100644 --- a/tests/baselines/reference/reexportClassDefinition.js +++ b/tests/baselines/reference/reexportClassDefinition.js @@ -34,7 +34,7 @@ module.exports = { //// [foo3.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js b/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js index 94dc537298a4e..77417da53f367 100644 --- a/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js +++ b/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js @@ -1021,7 +1021,7 @@ module caurinus { //// [resolvingClassDeclarationWhenInBaseTypeResolution.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/returnInConstructor1.js b/tests/baselines/reference/returnInConstructor1.js index a47fa7ed51357..cd56b78f0a3e4 100644 --- a/tests/baselines/reference/returnInConstructor1.js +++ b/tests/baselines/reference/returnInConstructor1.js @@ -68,7 +68,7 @@ class I extends G { //// [returnInConstructor1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/returnStatements.js b/tests/baselines/reference/returnStatements.js index f786e9949634e..783ffb5899e2f 100644 --- a/tests/baselines/reference/returnStatements.js +++ b/tests/baselines/reference/returnStatements.js @@ -26,7 +26,7 @@ function fn13(): C { return null; } //// [returnStatements.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.js b/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.js index 1474f8ab29a82..1ab4b160e7ca7 100644 --- a/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.js +++ b/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.js @@ -10,7 +10,7 @@ class D extends C { //// [scopeCheckExtendedClassInsidePublicMethod2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.js b/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.js index 0baf01870094c..9d1fafea4c9da 100644 --- a/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.js +++ b/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.js @@ -10,7 +10,7 @@ class D extends C { //// [scopeCheckExtendedClassInsideStaticMethod1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/scopeTests.js b/tests/baselines/reference/scopeTests.js index 48863404a8ecb..0ab152adf1198 100644 --- a/tests/baselines/reference/scopeTests.js +++ b/tests/baselines/reference/scopeTests.js @@ -13,7 +13,7 @@ class D extends C { //// [scopeTests.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/shadowPrivateMembers.js b/tests/baselines/reference/shadowPrivateMembers.js index 4906814f7eb43..305c758195929 100644 --- a/tests/baselines/reference/shadowPrivateMembers.js +++ b/tests/baselines/reference/shadowPrivateMembers.js @@ -5,7 +5,7 @@ class derived extends base { private n() {} } //// [shadowPrivateMembers.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js index 4bac0210c85ab..d3ac854d4dd69 100644 --- a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js +++ b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js @@ -9,7 +9,7 @@ class Greeter extends AbstractGreeter { //// [sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt index 91e284fd06385..68dea53e96b33 100644 --- a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt @@ -9,7 +9,7 @@ emittedFile:tests/cases/compiler/sourceMapValidationClassWithDefaultConstructorA sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts ------------------------------------------------------------------- >>>var __extends = (this && this.__extends) || function (d, b) { ->>> for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; +>>> Object.setPrototypeOf(d, b); >>> function __() { this.constructor = d; } >>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); >>>}; diff --git a/tests/baselines/reference/specializedInheritedConstructors1.js b/tests/baselines/reference/specializedInheritedConstructors1.js index f65f42941bfdb..56fd271bb3477 100644 --- a/tests/baselines/reference/specializedInheritedConstructors1.js +++ b/tests/baselines/reference/specializedInheritedConstructors1.js @@ -19,7 +19,7 @@ var myView = new MyView(m); // was error //// [specializedInheritedConstructors1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/specializedOverloadWithRestParameters.js b/tests/baselines/reference/specializedOverloadWithRestParameters.js index b76afaff08c37..3f31e7f61df8a 100644 --- a/tests/baselines/reference/specializedOverloadWithRestParameters.js +++ b/tests/baselines/reference/specializedOverloadWithRestParameters.js @@ -14,7 +14,7 @@ function g(tagName: any): Base { //// [specializedOverloadWithRestParameters.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/staticFactory1.js b/tests/baselines/reference/staticFactory1.js index de7588c3ebefc..d8c53470b813a 100644 --- a/tests/baselines/reference/staticFactory1.js +++ b/tests/baselines/reference/staticFactory1.js @@ -15,7 +15,7 @@ d.foo(); //// [staticFactory1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/staticInheritance.js b/tests/baselines/reference/staticInheritance.js index d204c1aed47a8..c6c95c1e6bf45 100644 --- a/tests/baselines/reference/staticInheritance.js +++ b/tests/baselines/reference/staticInheritance.js @@ -13,7 +13,7 @@ doThing(B); //OK //// [staticInheritance.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/staticMemberAccessOffDerivedType1.js b/tests/baselines/reference/staticMemberAccessOffDerivedType1.js index 7b8ca52b9a41f..ededeec9c5c6a 100644 --- a/tests/baselines/reference/staticMemberAccessOffDerivedType1.js +++ b/tests/baselines/reference/staticMemberAccessOffDerivedType1.js @@ -11,7 +11,7 @@ class P extends SomeBase { //// [staticMemberAccessOffDerivedType1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/staticPropSuper.js b/tests/baselines/reference/staticPropSuper.js index 6240f8c454f49..fdb63a556e022 100644 --- a/tests/baselines/reference/staticPropSuper.js +++ b/tests/baselines/reference/staticPropSuper.js @@ -37,7 +37,7 @@ class E extends A { //// [staticPropSuper.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/strictModeInConstructor.js b/tests/baselines/reference/strictModeInConstructor.js index da45bda5c6efb..ac78decef587e 100644 --- a/tests/baselines/reference/strictModeInConstructor.js +++ b/tests/baselines/reference/strictModeInConstructor.js @@ -62,7 +62,7 @@ class Ds extends A { //// [strictModeInConstructor.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/strictModeReservedWord.js b/tests/baselines/reference/strictModeReservedWord.js index 29715745890eb..e376167c6670d 100644 --- a/tests/baselines/reference/strictModeReservedWord.js +++ b/tests/baselines/reference/strictModeReservedWord.js @@ -29,7 +29,7 @@ function foo() { //// [strictModeReservedWord.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/strictModeReservedWordInClassDeclaration.js b/tests/baselines/reference/strictModeReservedWordInClassDeclaration.js index 1507e53d8cf8d..f6b864047a8df 100644 --- a/tests/baselines/reference/strictModeReservedWordInClassDeclaration.js +++ b/tests/baselines/reference/strictModeReservedWordInClassDeclaration.js @@ -30,7 +30,7 @@ class H extends package.A { } //// [strictModeReservedWordInClassDeclaration.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js b/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js index b532df7b1201a..6836a7adff3b9 100644 --- a/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js +++ b/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js @@ -42,7 +42,7 @@ var b: { [x: string]: A } = { //// [stringIndexerConstrainsPropertyDeclarations2.js] // String indexer providing a constraint of a user defined type var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypesOfTypeParameter.js b/tests/baselines/reference/subtypesOfTypeParameter.js index 38f5b5f1d4b3b..4407e02a1e7ee 100644 --- a/tests/baselines/reference/subtypesOfTypeParameter.js +++ b/tests/baselines/reference/subtypesOfTypeParameter.js @@ -108,7 +108,7 @@ function f2(x: T, y: U) { //// [subtypesOfTypeParameter.js] // checking whether other types are subtypes of type parameters var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints.js b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints.js index 82bcbf14eccf9..ec44364d4a47a 100644 --- a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints.js +++ b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints.js @@ -170,7 +170,7 @@ class D29 extends C3 { //// [subtypesOfTypeParameterWithConstraints.js] // checking whether other types are subtypes of type parameters with constraints var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints4.js b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints4.js index e0baced37a4ea..f25a43a353fd0 100644 --- a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints4.js +++ b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints4.js @@ -81,7 +81,7 @@ class D9 extends B1 { //// [subtypesOfTypeParameterWithConstraints4.js] // checking whether other types are subtypes of type parameters with constraints var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypesOfTypeParameterWithRecursiveConstraints.js b/tests/baselines/reference/subtypesOfTypeParameterWithRecursiveConstraints.js index 0b17fc07f24d5..16797d0e5b5dd 100644 --- a/tests/baselines/reference/subtypesOfTypeParameterWithRecursiveConstraints.js +++ b/tests/baselines/reference/subtypesOfTypeParameterWithRecursiveConstraints.js @@ -160,7 +160,7 @@ module M2 { //// [subtypesOfTypeParameterWithRecursiveConstraints.js] // checking whether other types are subtypes of type parameters with constraints var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingTransitivity.js b/tests/baselines/reference/subtypingTransitivity.js index 9c4c90117589e..ca52f7ed49f9b 100644 --- a/tests/baselines/reference/subtypingTransitivity.js +++ b/tests/baselines/reference/subtypingTransitivity.js @@ -21,7 +21,7 @@ b.x = 1; // assigned number to string //// [subtypingTransitivity.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithCallSignatures2.js b/tests/baselines/reference/subtypingWithCallSignatures2.js index 3b5fada20121b..8086362951fde 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures2.js +++ b/tests/baselines/reference/subtypingWithCallSignatures2.js @@ -175,7 +175,7 @@ var r18 = foo18(r18arg1); //// [subtypingWithCallSignatures2.js] // checking subtype relations for function types as it relates to contextual signature instantiation var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithCallSignatures3.js b/tests/baselines/reference/subtypingWithCallSignatures3.js index 4ac7d3a7f24a9..1fa01910cdb77 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures3.js +++ b/tests/baselines/reference/subtypingWithCallSignatures3.js @@ -122,7 +122,7 @@ module WithGenericSignaturesInBaseType { // checking subtype relations for function types as it relates to contextual signature instantiation // error cases, so function calls will all result in 'any' var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithCallSignatures4.js b/tests/baselines/reference/subtypingWithCallSignatures4.js index 94f549c62c18a..5aaa139f19a3b 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures4.js +++ b/tests/baselines/reference/subtypingWithCallSignatures4.js @@ -114,7 +114,7 @@ var r18 = foo18(r18arg); //// [subtypingWithCallSignatures4.js] // checking subtype relations for function types as it relates to contextual signature instantiation var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithConstructSignatures2.js b/tests/baselines/reference/subtypingWithConstructSignatures2.js index 1d12aeb945f73..1f7ae528b5b8e 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures2.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures2.js @@ -175,7 +175,7 @@ var r18 = foo18(r18arg1); //// [subtypingWithConstructSignatures2.js] // checking subtype relations for function types as it relates to contextual signature instantiation var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithConstructSignatures3.js b/tests/baselines/reference/subtypingWithConstructSignatures3.js index 78582304cb8e5..d86b0519ebe79 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures3.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures3.js @@ -124,7 +124,7 @@ module WithGenericSignaturesInBaseType { // checking subtype relations for function types as it relates to contextual signature instantiation // error cases, so function calls will all result in 'any' var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithConstructSignatures4.js b/tests/baselines/reference/subtypingWithConstructSignatures4.js index 17252fdb809df..f11d2e3c2116b 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures4.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures4.js @@ -114,7 +114,7 @@ var r18 = foo18(r18arg); //// [subtypingWithConstructSignatures4.js] // checking subtype relations for function types as it relates to contextual signature instantiation var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithConstructSignatures5.js b/tests/baselines/reference/subtypingWithConstructSignatures5.js index a0561606393ca..bdce522f1045e 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures5.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures5.js @@ -52,7 +52,7 @@ interface I extends B { // checking subtype relations for function types as it relates to contextual signature instantiation // same as subtypingWithConstructSignatures2 just with an extra level of indirection in the inheritance chain var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithConstructSignatures6.js b/tests/baselines/reference/subtypingWithConstructSignatures6.js index c508781e089bf..2c0b10744f25a 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures6.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures6.js @@ -55,7 +55,7 @@ interface I9 extends A { // same as subtypingWithConstructSignatures4 but using class type parameters instead of generic signatures // all are errors var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithNumericIndexer.js b/tests/baselines/reference/subtypingWithNumericIndexer.js index 3cf75dd83fd78..efe3d5927a983 100644 --- a/tests/baselines/reference/subtypingWithNumericIndexer.js +++ b/tests/baselines/reference/subtypingWithNumericIndexer.js @@ -42,7 +42,7 @@ module Generics { //// [subtypingWithNumericIndexer.js] // Derived type indexer must be subtype of base type indexer var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithNumericIndexer3.js b/tests/baselines/reference/subtypingWithNumericIndexer3.js index e9e8d39bf3c28..a3b1034d6a8e7 100644 --- a/tests/baselines/reference/subtypingWithNumericIndexer3.js +++ b/tests/baselines/reference/subtypingWithNumericIndexer3.js @@ -46,7 +46,7 @@ module Generics { //// [subtypingWithNumericIndexer3.js] // Derived type indexer must be subtype of base type indexer var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithNumericIndexer4.js b/tests/baselines/reference/subtypingWithNumericIndexer4.js index 798e775083fa2..f2657654c8b6f 100644 --- a/tests/baselines/reference/subtypingWithNumericIndexer4.js +++ b/tests/baselines/reference/subtypingWithNumericIndexer4.js @@ -30,7 +30,7 @@ module Generics { //// [subtypingWithNumericIndexer4.js] // Derived type indexer must be subtype of base type indexer var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithObjectMembers.js b/tests/baselines/reference/subtypingWithObjectMembers.js index 3675ed6a41051..04f05b81cefdc 100644 --- a/tests/baselines/reference/subtypingWithObjectMembers.js +++ b/tests/baselines/reference/subtypingWithObjectMembers.js @@ -69,7 +69,7 @@ module TwoLevels { //// [subtypingWithObjectMembers.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithObjectMembers4.js b/tests/baselines/reference/subtypingWithObjectMembers4.js index 404b6cbe98857..2cdf1b4401b40 100644 --- a/tests/baselines/reference/subtypingWithObjectMembers4.js +++ b/tests/baselines/reference/subtypingWithObjectMembers4.js @@ -36,7 +36,7 @@ class B3 extends A3 { //// [subtypingWithObjectMembers4.js] // subtyping when property names do not match var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithObjectMembersAccessibility.js b/tests/baselines/reference/subtypingWithObjectMembersAccessibility.js index 8b168ea73b5cf..386ce78167547 100644 --- a/tests/baselines/reference/subtypingWithObjectMembersAccessibility.js +++ b/tests/baselines/reference/subtypingWithObjectMembersAccessibility.js @@ -36,7 +36,7 @@ class B3 extends A3 { //// [subtypingWithObjectMembersAccessibility.js] // Derived member is private, base member is not causes errors var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.js b/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.js index 0a83b760218d0..5227eac7db425 100644 --- a/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.js +++ b/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.js @@ -64,7 +64,7 @@ module ImplicitPublic { //// [subtypingWithObjectMembersAccessibility2.js] // Derived member is private, base member is not causes errors var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithStringIndexer.js b/tests/baselines/reference/subtypingWithStringIndexer.js index 195b7d2192e87..a1ec5e1f46f8a 100644 --- a/tests/baselines/reference/subtypingWithStringIndexer.js +++ b/tests/baselines/reference/subtypingWithStringIndexer.js @@ -43,7 +43,7 @@ module Generics { //// [subtypingWithStringIndexer.js] // Derived type indexer must be subtype of base type indexer var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithStringIndexer3.js b/tests/baselines/reference/subtypingWithStringIndexer3.js index 0b2a57324ebe2..ea193a206ede7 100644 --- a/tests/baselines/reference/subtypingWithStringIndexer3.js +++ b/tests/baselines/reference/subtypingWithStringIndexer3.js @@ -46,7 +46,7 @@ module Generics { //// [subtypingWithStringIndexer3.js] // Derived type indexer must be subtype of base type indexer var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithStringIndexer4.js b/tests/baselines/reference/subtypingWithStringIndexer4.js index 2937261ad0510..b5a8c75a03e44 100644 --- a/tests/baselines/reference/subtypingWithStringIndexer4.js +++ b/tests/baselines/reference/subtypingWithStringIndexer4.js @@ -30,7 +30,7 @@ module Generics { //// [subtypingWithStringIndexer4.js] // Derived type indexer must be subtype of base type indexer var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/super.js b/tests/baselines/reference/super.js index 504e8542d4d9e..6607c7897dd94 100644 --- a/tests/baselines/reference/super.js +++ b/tests/baselines/reference/super.js @@ -39,7 +39,7 @@ s.foo() + ss.foo(); //// [super.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/super1.js b/tests/baselines/reference/super1.js index 0094f696fafb5..44a48adab77e3 100644 --- a/tests/baselines/reference/super1.js +++ b/tests/baselines/reference/super1.js @@ -68,7 +68,7 @@ module Base4 { //// [super1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/super2.js b/tests/baselines/reference/super2.js index 1d2331052db1a..e46b28254816a 100644 --- a/tests/baselines/reference/super2.js +++ b/tests/baselines/reference/super2.js @@ -52,7 +52,7 @@ results1.x() + results1.y() + results2.y(); //// [super2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superAccess.js b/tests/baselines/reference/superAccess.js index 0bd9d305d2eaf..b300f75b5fa7d 100644 --- a/tests/baselines/reference/superAccess.js +++ b/tests/baselines/reference/superAccess.js @@ -15,7 +15,7 @@ class MyDerived extends MyBase { //// [superAccess.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superAccess2.js b/tests/baselines/reference/superAccess2.js index da19770584acf..0388b8d7f108a 100644 --- a/tests/baselines/reference/superAccess2.js +++ b/tests/baselines/reference/superAccess2.js @@ -26,7 +26,7 @@ class Q extends P { //// [superAccess2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superAccessInFatArrow1.js b/tests/baselines/reference/superAccessInFatArrow1.js index a7f964309f736..ec8488f0dadab 100644 --- a/tests/baselines/reference/superAccessInFatArrow1.js +++ b/tests/baselines/reference/superAccessInFatArrow1.js @@ -17,7 +17,7 @@ module test { //// [superAccessInFatArrow1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallArgsMustMatch.js b/tests/baselines/reference/superCallArgsMustMatch.js index 106d7433bf5a9..7ca13891555a0 100644 --- a/tests/baselines/reference/superCallArgsMustMatch.js +++ b/tests/baselines/reference/superCallArgsMustMatch.js @@ -27,7 +27,7 @@ class T6 extends T5{ //// [superCallArgsMustMatch.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallAssignResult.js b/tests/baselines/reference/superCallAssignResult.js index 6e30cc64052a8..d7ad39fc7a673 100644 --- a/tests/baselines/reference/superCallAssignResult.js +++ b/tests/baselines/reference/superCallAssignResult.js @@ -12,7 +12,7 @@ class H extends E { //// [superCallAssignResult.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing1.js b/tests/baselines/reference/superCallBeforeThisAccessing1.js index e3aed9e40e9e2..916d15682326e 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing1.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing1.js @@ -18,7 +18,7 @@ class D extends Base { //// [superCallBeforeThisAccessing1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing2.js b/tests/baselines/reference/superCallBeforeThisAccessing2.js index 7331718a9edcf..c5a8d293fff10 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing2.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing2.js @@ -12,7 +12,7 @@ class D extends Base { //// [superCallBeforeThisAccessing2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing3.js b/tests/baselines/reference/superCallBeforeThisAccessing3.js index 185767fefb6ba..8a59226d1d682 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing3.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing3.js @@ -15,7 +15,7 @@ class D extends Base { //// [superCallBeforeThisAccessing3.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing4.js b/tests/baselines/reference/superCallBeforeThisAccessing4.js index 91acb88ce224c..6870662435e4c 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing4.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing4.js @@ -17,7 +17,7 @@ class E extends null { //// [superCallBeforeThisAccessing4.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing5.js b/tests/baselines/reference/superCallBeforeThisAccessing5.js index 57228538faf37..0c2f3aa1c2d2a 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing5.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing5.js @@ -9,7 +9,7 @@ class D extends null { //// [superCallBeforeThisAccessing5.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing6.js b/tests/baselines/reference/superCallBeforeThisAccessing6.js index e4dfb3f714ad8..2fe03ab52b5a6 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing6.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing6.js @@ -12,7 +12,7 @@ class D extends Base { //// [superCallBeforeThisAccessing6.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing7.js b/tests/baselines/reference/superCallBeforeThisAccessing7.js index 9cfe87367741d..a843456be7698 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing7.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing7.js @@ -15,7 +15,7 @@ class D extends Base { //// [superCallBeforeThisAccessing7.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing8.js b/tests/baselines/reference/superCallBeforeThisAccessing8.js index fe459b5e03147..3b23949584fbe 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing8.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing8.js @@ -15,7 +15,7 @@ class D extends Base { //// [superCallBeforeThisAccessing8.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType1.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType1.js index bc196299bf9c2..e4f1d4ed105db 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType1.js @@ -13,7 +13,7 @@ class D extends B { //// [superCallFromClassThatDerivesFromGenericType1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType2.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType2.js index 8a0ef085590dd..47d1b5007fe92 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType2.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType2.js @@ -12,7 +12,7 @@ class D extends B { //// [superCallFromClassThatDerivesFromGenericType2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js index 0529d5e3dc222..d29377ed2469e 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js @@ -12,7 +12,7 @@ class B extends A { //// [superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js index fb08ec289028f..844b24a0698b9 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js @@ -12,7 +12,7 @@ class B extends A { //// [superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js b/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js index 50153391f62a5..71587371fa032 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js @@ -12,7 +12,7 @@ class B extends A { //// [superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallInNonStaticMethod.js b/tests/baselines/reference/superCallInNonStaticMethod.js index cd84052ca3cae..99a026a38fde9 100644 --- a/tests/baselines/reference/superCallInNonStaticMethod.js +++ b/tests/baselines/reference/superCallInNonStaticMethod.js @@ -52,7 +52,7 @@ class Other extends Doing { //// [superCallInNonStaticMethod.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallInStaticMethod.js b/tests/baselines/reference/superCallInStaticMethod.js index b31110fdf7896..b65b2b270c569 100644 --- a/tests/baselines/reference/superCallInStaticMethod.js +++ b/tests/baselines/reference/superCallInStaticMethod.js @@ -48,7 +48,7 @@ class Other extends Doing { //// [superCallInStaticMethod.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallInsideClassDeclaration.js b/tests/baselines/reference/superCallInsideClassDeclaration.js index 05e44119608aa..0b6c768c86f5a 100644 --- a/tests/baselines/reference/superCallInsideClassDeclaration.js +++ b/tests/baselines/reference/superCallInsideClassDeclaration.js @@ -18,7 +18,7 @@ class B extends A { //// [superCallInsideClassDeclaration.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallInsideClassExpression.js b/tests/baselines/reference/superCallInsideClassExpression.js index 3d55fe11cff49..c3bd2425dd4fc 100644 --- a/tests/baselines/reference/superCallInsideClassExpression.js +++ b/tests/baselines/reference/superCallInsideClassExpression.js @@ -18,7 +18,7 @@ class B extends A { //// [superCallInsideClassExpression.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallInsideObjectLiteralExpression.js b/tests/baselines/reference/superCallInsideObjectLiteralExpression.js index 636b03c227f89..45b6301a871e2 100644 --- a/tests/baselines/reference/superCallInsideObjectLiteralExpression.js +++ b/tests/baselines/reference/superCallInsideObjectLiteralExpression.js @@ -14,7 +14,7 @@ class B extends A { //// [superCallInsideObjectLiteralExpression.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallOutsideConstructor.js b/tests/baselines/reference/superCallOutsideConstructor.js index e32bfc660502b..a98a9b3a32259 100644 --- a/tests/baselines/reference/superCallOutsideConstructor.js +++ b/tests/baselines/reference/superCallOutsideConstructor.js @@ -24,7 +24,7 @@ var d = new D(); //// [superCallOutsideConstructor.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallParameterContextualTyping1.js b/tests/baselines/reference/superCallParameterContextualTyping1.js index d8491b4ee830a..46aeb97698795 100644 --- a/tests/baselines/reference/superCallParameterContextualTyping1.js +++ b/tests/baselines/reference/superCallParameterContextualTyping1.js @@ -14,7 +14,7 @@ class B extends A { //// [superCallParameterContextualTyping1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallParameterContextualTyping2.js b/tests/baselines/reference/superCallParameterContextualTyping2.js index 9868a7db1240b..a6aed2d1caef5 100644 --- a/tests/baselines/reference/superCallParameterContextualTyping2.js +++ b/tests/baselines/reference/superCallParameterContextualTyping2.js @@ -13,7 +13,7 @@ class C extends A { //// [superCallParameterContextualTyping2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallParameterContextualTyping3.js b/tests/baselines/reference/superCallParameterContextualTyping3.js index 6a43d58c47124..8445e86cfce5f 100644 --- a/tests/baselines/reference/superCallParameterContextualTyping3.js +++ b/tests/baselines/reference/superCallParameterContextualTyping3.js @@ -33,7 +33,7 @@ class C extends CBase { //// [superCallParameterContextualTyping3.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallWithCommentEmit01.js b/tests/baselines/reference/superCallWithCommentEmit01.js index c7ea3cc8b855c..ea23eb3be03c3 100644 --- a/tests/baselines/reference/superCallWithCommentEmit01.js +++ b/tests/baselines/reference/superCallWithCommentEmit01.js @@ -12,7 +12,7 @@ class B extends A { //// [superCallWithCommentEmit01.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallWithMissingBaseClass.js b/tests/baselines/reference/superCallWithMissingBaseClass.js index 16f1108864006..9dff2bc4c5640 100644 --- a/tests/baselines/reference/superCallWithMissingBaseClass.js +++ b/tests/baselines/reference/superCallWithMissingBaseClass.js @@ -11,7 +11,7 @@ class Foo extends Bar { //// [superCallWithMissingBaseClass.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCalls.js b/tests/baselines/reference/superCalls.js index 99a3b78752c9e..d5a9af8e06a3d 100644 --- a/tests/baselines/reference/superCalls.js +++ b/tests/baselines/reference/superCalls.js @@ -32,7 +32,7 @@ class OtherDerived extends OtherBase { //// [superCalls.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallsInConstructor.js b/tests/baselines/reference/superCallsInConstructor.js index 48b79acadf4dc..540eef9984086 100644 --- a/tests/baselines/reference/superCallsInConstructor.js +++ b/tests/baselines/reference/superCallsInConstructor.js @@ -22,7 +22,7 @@ class Derived extends Base { //// [superCallsInConstructor.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superErrors.js b/tests/baselines/reference/superErrors.js index 19f0d74f6774a..c52b2a22173c4 100644 --- a/tests/baselines/reference/superErrors.js +++ b/tests/baselines/reference/superErrors.js @@ -53,7 +53,7 @@ class RegisteredUser extends User { //// [superErrors.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superInCatchBlock1.js b/tests/baselines/reference/superInCatchBlock1.js index e1fc0f970244d..17ac62b8491c5 100644 --- a/tests/baselines/reference/superInCatchBlock1.js +++ b/tests/baselines/reference/superInCatchBlock1.js @@ -15,7 +15,7 @@ class B extends A { //// [superInCatchBlock1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superInConstructorParam1.js b/tests/baselines/reference/superInConstructorParam1.js index 8c99b64991733..7f53128e99ed0 100644 --- a/tests/baselines/reference/superInConstructorParam1.js +++ b/tests/baselines/reference/superInConstructorParam1.js @@ -12,7 +12,7 @@ class C extends B { //// [superInConstructorParam1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superInLambdas.js b/tests/baselines/reference/superInLambdas.js index 73ca53c3b5cb9..8c3d37efb3432 100644 --- a/tests/baselines/reference/superInLambdas.js +++ b/tests/baselines/reference/superInLambdas.js @@ -69,7 +69,7 @@ class RegisteredUser4 extends User { //// [superInLambdas.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superInObjectLiterals_ES5.js b/tests/baselines/reference/superInObjectLiterals_ES5.js index 816277e4e9eb6..f31a2492f3d20 100644 --- a/tests/baselines/reference/superInObjectLiterals_ES5.js +++ b/tests/baselines/reference/superInObjectLiterals_ES5.js @@ -61,7 +61,7 @@ class B extends A { //// [superInObjectLiterals_ES5.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superNewCall1.js b/tests/baselines/reference/superNewCall1.js index 30b07308bb25f..2b6231691b2e3 100644 --- a/tests/baselines/reference/superNewCall1.js +++ b/tests/baselines/reference/superNewCall1.js @@ -14,7 +14,7 @@ class B extends A { //// [superNewCall1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superPropertyAccess.js b/tests/baselines/reference/superPropertyAccess.js index 7b5823e598b31..72353c27624a2 100644 --- a/tests/baselines/reference/superPropertyAccess.js +++ b/tests/baselines/reference/superPropertyAccess.js @@ -38,7 +38,7 @@ class MyDerived extends MyBase { //// [superPropertyAccess.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superPropertyAccess1.js b/tests/baselines/reference/superPropertyAccess1.js index 0b1e4fc280f40..7e07c236eecf4 100644 --- a/tests/baselines/reference/superPropertyAccess1.js +++ b/tests/baselines/reference/superPropertyAccess1.js @@ -29,7 +29,7 @@ class D extends C { //// [superPropertyAccess1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superPropertyAccess2.js b/tests/baselines/reference/superPropertyAccess2.js index 7c72ad5d1bbc4..f07769923120d 100644 --- a/tests/baselines/reference/superPropertyAccess2.js +++ b/tests/baselines/reference/superPropertyAccess2.js @@ -29,7 +29,7 @@ class D extends C { //// [superPropertyAccess2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superPropertyAccessInComputedPropertiesOfNestedType_ES5.js b/tests/baselines/reference/superPropertyAccessInComputedPropertiesOfNestedType_ES5.js index 956bce4ef2eb6..cb5e98ee2d2a7 100644 --- a/tests/baselines/reference/superPropertyAccessInComputedPropertiesOfNestedType_ES5.js +++ b/tests/baselines/reference/superPropertyAccessInComputedPropertiesOfNestedType_ES5.js @@ -16,7 +16,7 @@ class B extends A { //// [superPropertyAccessInComputedPropertiesOfNestedType_ES5.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superPropertyAccessNoError.js b/tests/baselines/reference/superPropertyAccessNoError.js index 88a5da8b8fb13..0f4efbc719f34 100644 --- a/tests/baselines/reference/superPropertyAccessNoError.js +++ b/tests/baselines/reference/superPropertyAccessNoError.js @@ -78,7 +78,7 @@ instance.returnThis().fn(); //super.publicStaticMemberFunction in static member function of derived class //super.publicStaticMemberFunction in static member accessor(get and set) of derived class var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superPropertyAccess_ES5.js b/tests/baselines/reference/superPropertyAccess_ES5.js index 45c32076be960..159b3b86c4c20 100644 --- a/tests/baselines/reference/superPropertyAccess_ES5.js +++ b/tests/baselines/reference/superPropertyAccess_ES5.js @@ -31,7 +31,7 @@ class B extends A { //// [superPropertyAccess_ES5.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superSymbolIndexedAccess5.js b/tests/baselines/reference/superSymbolIndexedAccess5.js index dd37deb5af31d..43565251f792c 100644 --- a/tests/baselines/reference/superSymbolIndexedAccess5.js +++ b/tests/baselines/reference/superSymbolIndexedAccess5.js @@ -15,7 +15,7 @@ class Bar extends Foo { //// [superSymbolIndexedAccess5.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superSymbolIndexedAccess6.js b/tests/baselines/reference/superSymbolIndexedAccess6.js index 8c8534b428ab9..2f47d38660e60 100644 --- a/tests/baselines/reference/superSymbolIndexedAccess6.js +++ b/tests/baselines/reference/superSymbolIndexedAccess6.js @@ -15,7 +15,7 @@ class Bar extends Foo { //// [superSymbolIndexedAccess6.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superWithGenericSpecialization.js b/tests/baselines/reference/superWithGenericSpecialization.js index a0381d0b944d8..e024285dc9ed3 100644 --- a/tests/baselines/reference/superWithGenericSpecialization.js +++ b/tests/baselines/reference/superWithGenericSpecialization.js @@ -16,7 +16,7 @@ var r2: number = d.y; //// [superWithGenericSpecialization.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superWithGenerics.js b/tests/baselines/reference/superWithGenerics.js index 803f229bd4bd4..c8c99ef56cfb7 100644 --- a/tests/baselines/reference/superWithGenerics.js +++ b/tests/baselines/reference/superWithGenerics.js @@ -13,7 +13,7 @@ class D extends B { //// [superWithGenerics.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superWithTypeArgument.js b/tests/baselines/reference/superWithTypeArgument.js index a1c0497540442..638b970d7ffef 100644 --- a/tests/baselines/reference/superWithTypeArgument.js +++ b/tests/baselines/reference/superWithTypeArgument.js @@ -11,7 +11,7 @@ class D extends C { //// [superWithTypeArgument.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superWithTypeArgument2.js b/tests/baselines/reference/superWithTypeArgument2.js index 42a0e46d4c03e..4241cc6a699f3 100644 --- a/tests/baselines/reference/superWithTypeArgument2.js +++ b/tests/baselines/reference/superWithTypeArgument2.js @@ -11,7 +11,7 @@ class D extends C { //// [superWithTypeArgument2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superWithTypeArgument3.js b/tests/baselines/reference/superWithTypeArgument3.js index 803e5c264c22a..8f9d6252a873c 100644 --- a/tests/baselines/reference/superWithTypeArgument3.js +++ b/tests/baselines/reference/superWithTypeArgument3.js @@ -15,7 +15,7 @@ class D extends C { //// [superWithTypeArgument3.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/super_inside-object-literal-getters-and-setters.js b/tests/baselines/reference/super_inside-object-literal-getters-and-setters.js index 6815b71ce117d..e244f31832812 100644 --- a/tests/baselines/reference/super_inside-object-literal-getters-and-setters.js +++ b/tests/baselines/reference/super_inside-object-literal-getters-and-setters.js @@ -29,7 +29,7 @@ class SuperObjectTest extends F { //// [super_inside-object-literal-getters-and-setters.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/switchStatements.js b/tests/baselines/reference/switchStatements.js index 2e1aecc728830..20a9271267033 100644 --- a/tests/baselines/reference/switchStatements.js +++ b/tests/baselines/reference/switchStatements.js @@ -57,7 +57,7 @@ switch (((x: T) => '')(1)) { } //// [switchStatements.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/systemModuleWithSuperClass.js b/tests/baselines/reference/systemModuleWithSuperClass.js index 78c09355fa006..cbb2b5d05dd09 100644 --- a/tests/baselines/reference/systemModuleWithSuperClass.js +++ b/tests/baselines/reference/systemModuleWithSuperClass.js @@ -33,7 +33,7 @@ System.register([], function (exports_1, context_1) { System.register(["./foo"], function (exports_1, context_1) { "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/targetTypeBaseCalls.js b/tests/baselines/reference/targetTypeBaseCalls.js index cac93023a00e0..3c1daae5d31a2 100644 --- a/tests/baselines/reference/targetTypeBaseCalls.js +++ b/tests/baselines/reference/targetTypeBaseCalls.js @@ -20,7 +20,7 @@ class Bar extends Foo { constructor() { super(function(s) { s = 5 }) } } // err //// [targetTypeBaseCalls.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/thisInInvalidContexts.js b/tests/baselines/reference/thisInInvalidContexts.js index 1fc1c7346396b..5eaac48383c0c 100644 --- a/tests/baselines/reference/thisInInvalidContexts.js +++ b/tests/baselines/reference/thisInInvalidContexts.js @@ -50,7 +50,7 @@ enum SomeEnum { //// [thisInInvalidContexts.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/thisInInvalidContextsExternalModule.js b/tests/baselines/reference/thisInInvalidContextsExternalModule.js index f8cb6d695dcce..788eb974e895a 100644 --- a/tests/baselines/reference/thisInInvalidContextsExternalModule.js +++ b/tests/baselines/reference/thisInInvalidContextsExternalModule.js @@ -51,7 +51,7 @@ export = this; // Should be an error //// [thisInInvalidContextsExternalModule.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/thisInSuperCall.js b/tests/baselines/reference/thisInSuperCall.js index 2a4d15973ab2b..f49a0b8eb6533 100644 --- a/tests/baselines/reference/thisInSuperCall.js +++ b/tests/baselines/reference/thisInSuperCall.js @@ -24,7 +24,7 @@ class Foo3 extends Base { //// [thisInSuperCall.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/thisInSuperCall1.js b/tests/baselines/reference/thisInSuperCall1.js index e3eea1fb91de2..bfc9d8b4f17b6 100644 --- a/tests/baselines/reference/thisInSuperCall1.js +++ b/tests/baselines/reference/thisInSuperCall1.js @@ -12,7 +12,7 @@ class Foo extends Base { //// [thisInSuperCall1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/thisInSuperCall2.js b/tests/baselines/reference/thisInSuperCall2.js index eabfa9d562c61..df5dee1a3217e 100644 --- a/tests/baselines/reference/thisInSuperCall2.js +++ b/tests/baselines/reference/thisInSuperCall2.js @@ -21,7 +21,7 @@ class Foo2 extends Base { //// [thisInSuperCall2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/thisInSuperCall3.js b/tests/baselines/reference/thisInSuperCall3.js index 6a72f17248f4b..ac47e685c3800 100644 --- a/tests/baselines/reference/thisInSuperCall3.js +++ b/tests/baselines/reference/thisInSuperCall3.js @@ -14,7 +14,7 @@ class Foo extends Base { //// [thisInSuperCall3.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/thisTypeInFunctions.js b/tests/baselines/reference/thisTypeInFunctions.js index 6400f410a0926..3169e0cd06b22 100644 --- a/tests/baselines/reference/thisTypeInFunctions.js +++ b/tests/baselines/reference/thisTypeInFunctions.js @@ -196,7 +196,7 @@ function missingTypeIsImplicitAny(this, a: number) { return this.anything + a; } //// [thisTypeInFunctions.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/thisTypeInFunctionsNegative.js b/tests/baselines/reference/thisTypeInFunctionsNegative.js index 446bc15e6d9da..4b936e0198fce 100644 --- a/tests/baselines/reference/thisTypeInFunctionsNegative.js +++ b/tests/baselines/reference/thisTypeInFunctionsNegative.js @@ -178,7 +178,7 @@ c.explicitProperty = (this, m) => m + this.n; //// [thisTypeInFunctionsNegative.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/tsxCorrectlyParseLessThanComparison1.js b/tests/baselines/reference/tsxCorrectlyParseLessThanComparison1.js index f5d35ccaf7718..6cfb957dd39c8 100644 --- a/tests/baselines/reference/tsxCorrectlyParseLessThanComparison1.js +++ b/tests/baselines/reference/tsxCorrectlyParseLessThanComparison1.js @@ -22,7 +22,7 @@ export class ShortDetails extends React.Component<{ id: number }, {}> { //// [tsxCorrectlyParseLessThanComparison1.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/tsxDynamicTagName5.js b/tests/baselines/reference/tsxDynamicTagName5.js index d3bb404ceea6c..200a8e2d78d04 100644 --- a/tests/baselines/reference/tsxDynamicTagName5.js +++ b/tests/baselines/reference/tsxDynamicTagName5.js @@ -22,7 +22,7 @@ export class Text extends React.Component<{}, {}> { //// [app.jsx] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/tsxDynamicTagName7.js b/tests/baselines/reference/tsxDynamicTagName7.js index 84debfd3e7194..717caa83310ec 100644 --- a/tests/baselines/reference/tsxDynamicTagName7.js +++ b/tests/baselines/reference/tsxDynamicTagName7.js @@ -22,7 +22,7 @@ export class Text extends React.Component<{}, {}> { //// [app.jsx] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/tsxDynamicTagName8.js b/tests/baselines/reference/tsxDynamicTagName8.js index 6166b99f4accb..725eeec032625 100644 --- a/tests/baselines/reference/tsxDynamicTagName8.js +++ b/tests/baselines/reference/tsxDynamicTagName8.js @@ -22,7 +22,7 @@ export class Text extends React.Component<{}, {}> { //// [app.jsx] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/tsxDynamicTagName9.js b/tests/baselines/reference/tsxDynamicTagName9.js index 928649264c8b6..ff7e4a9a7e204 100644 --- a/tests/baselines/reference/tsxDynamicTagName9.js +++ b/tests/baselines/reference/tsxDynamicTagName9.js @@ -22,7 +22,7 @@ export class Text extends React.Component<{}, {}> { //// [app.jsx] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/tsxExternalModuleEmit1.js b/tests/baselines/reference/tsxExternalModuleEmit1.js index 58e7f1c8d856e..0d515ac211465 100644 --- a/tests/baselines/reference/tsxExternalModuleEmit1.js +++ b/tests/baselines/reference/tsxExternalModuleEmit1.js @@ -34,7 +34,7 @@ export class Button extends React.Component { //// [button.jsx] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -53,7 +53,7 @@ exports.Button = Button; //// [app.jsx] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/tsxStatelessFunctionComponents2.js b/tests/baselines/reference/tsxStatelessFunctionComponents2.js index 88d917235012b..7352f7edef7eb 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponents2.js +++ b/tests/baselines/reference/tsxStatelessFunctionComponents2.js @@ -41,7 +41,7 @@ let i =
x.propertyNotOnHtmlDivElement} />; //// [file.jsx] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/tsxUnionTypeComponent1.js b/tests/baselines/reference/tsxUnionTypeComponent1.js index 3520b5af3720a..a832e26806e88 100644 --- a/tests/baselines/reference/tsxUnionTypeComponent1.js +++ b/tests/baselines/reference/tsxUnionTypeComponent1.js @@ -27,7 +27,7 @@ class MyButtonComponent extends React.Component<{},{}> { //// [file.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeAssertions.js b/tests/baselines/reference/typeAssertions.js index a57fb222a77c0..9e7e39be71068 100644 --- a/tests/baselines/reference/typeAssertions.js +++ b/tests/baselines/reference/typeAssertions.js @@ -53,7 +53,7 @@ if((numOrStr === undefined) as numOrStr is string) { // Error //// [typeAssertions.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardFunction.js b/tests/baselines/reference/typeGuardFunction.js index b88d1038969d2..e261492d35f52 100644 --- a/tests/baselines/reference/typeGuardFunction.js +++ b/tests/baselines/reference/typeGuardFunction.js @@ -85,7 +85,7 @@ let union3: boolean | B = isA(union2) || union2; //// [typeGuardFunction.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardFunctionErrors.js b/tests/baselines/reference/typeGuardFunctionErrors.js index 99c25faaa88ca..2ceec7e12e2d3 100644 --- a/tests/baselines/reference/typeGuardFunctionErrors.js +++ b/tests/baselines/reference/typeGuardFunctionErrors.js @@ -147,7 +147,7 @@ if (hasMissingParameter()) { //// [typeGuardFunctionErrors.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardFunctionGenerics.js b/tests/baselines/reference/typeGuardFunctionGenerics.js index 703c809274fc7..a2b9df419ad7c 100644 --- a/tests/baselines/reference/typeGuardFunctionGenerics.js +++ b/tests/baselines/reference/typeGuardFunctionGenerics.js @@ -35,7 +35,7 @@ let test3: B = funE(isB, 1); //// [typeGuardFunctionGenerics.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardFunctionOfFormThis.js b/tests/baselines/reference/typeGuardFunctionOfFormThis.js index c052ea7d72b3c..f9f102e06ae27 100644 --- a/tests/baselines/reference/typeGuardFunctionOfFormThis.js +++ b/tests/baselines/reference/typeGuardFunctionOfFormThis.js @@ -143,7 +143,7 @@ interface MimicGuardInterface { //// [typeGuardFunctionOfFormThis.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.js b/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.js index a85a207a665f7..c1e5b6b0af1e3 100644 --- a/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.js +++ b/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.js @@ -61,7 +61,7 @@ else { //// [typeGuardFunctionOfFormThisErrors.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardOfFormInstanceOf.js b/tests/baselines/reference/typeGuardOfFormInstanceOf.js index a181a446a81e2..75f0ccdf49228 100644 --- a/tests/baselines/reference/typeGuardOfFormInstanceOf.js +++ b/tests/baselines/reference/typeGuardOfFormInstanceOf.js @@ -74,7 +74,7 @@ else { // it is a subtype of the type of x, or // - when false, has no effect on the type of x. var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardOfFormIsType.js b/tests/baselines/reference/typeGuardOfFormIsType.js index 14e9259a9e781..c48034dfc3676 100644 --- a/tests/baselines/reference/typeGuardOfFormIsType.js +++ b/tests/baselines/reference/typeGuardOfFormIsType.js @@ -39,7 +39,7 @@ var r2: C2 | D1 = isC1(c2Ord1) && c2Ord1; // C2 | D1 //// [typeGuardOfFormIsType.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardOfFormThisMember.js b/tests/baselines/reference/typeGuardOfFormThisMember.js index 52097af34f782..eaaa656a08ec9 100644 --- a/tests/baselines/reference/typeGuardOfFormThisMember.js +++ b/tests/baselines/reference/typeGuardOfFormThisMember.js @@ -84,7 +84,7 @@ namespace Test { //// [typeGuardOfFormThisMember.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js b/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js index c65445a3a5a80..cb7fa087fe189 100644 --- a/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js +++ b/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js @@ -34,7 +34,7 @@ namespace Test { //// [typeGuardOfFormThisMemberErrors.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeMatch2.js b/tests/baselines/reference/typeMatch2.js index 2cae93924bc55..9721d17aac488 100644 --- a/tests/baselines/reference/typeMatch2.js +++ b/tests/baselines/reference/typeMatch2.js @@ -46,7 +46,7 @@ function f4() { //// [typeMatch2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeOfSuperCall.js b/tests/baselines/reference/typeOfSuperCall.js index 179e981b8d1dc..7bad868e33c1a 100644 --- a/tests/baselines/reference/typeOfSuperCall.js +++ b/tests/baselines/reference/typeOfSuperCall.js @@ -10,7 +10,7 @@ class D extends C { //// [typeOfSuperCall.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeParameterAsBaseClass.js b/tests/baselines/reference/typeParameterAsBaseClass.js index 15d1c3b396e3f..4629854dd37c0 100644 --- a/tests/baselines/reference/typeParameterAsBaseClass.js +++ b/tests/baselines/reference/typeParameterAsBaseClass.js @@ -4,7 +4,7 @@ class C2 implements T {} //// [typeParameterAsBaseClass.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeParameterAsBaseType.js b/tests/baselines/reference/typeParameterAsBaseType.js index 2d0962f01d77d..64d0f20c2f04f 100644 --- a/tests/baselines/reference/typeParameterAsBaseType.js +++ b/tests/baselines/reference/typeParameterAsBaseType.js @@ -14,7 +14,7 @@ interface I2 extends U { } // type parameters cannot be used as base types // these are all errors var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeParameterExtendingUnion1.js b/tests/baselines/reference/typeParameterExtendingUnion1.js index 2738aa205281e..73efba3f0d7d3 100644 --- a/tests/baselines/reference/typeParameterExtendingUnion1.js +++ b/tests/baselines/reference/typeParameterExtendingUnion1.js @@ -14,7 +14,7 @@ function f(a: T) { //// [typeParameterExtendingUnion1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeParameterExtendingUnion2.js b/tests/baselines/reference/typeParameterExtendingUnion2.js index b3754436f2684..17d8d02cd9a4d 100644 --- a/tests/baselines/reference/typeParameterExtendingUnion2.js +++ b/tests/baselines/reference/typeParameterExtendingUnion2.js @@ -14,7 +14,7 @@ function f(a: T) { //// [typeParameterExtendingUnion2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeRelationships.js b/tests/baselines/reference/typeRelationships.js index 2f97f4b0d1c07..0d30916767e24 100644 --- a/tests/baselines/reference/typeRelationships.js +++ b/tests/baselines/reference/typeRelationships.js @@ -42,7 +42,7 @@ class D extends C { //// [typeRelationships.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeValueConflict1.js b/tests/baselines/reference/typeValueConflict1.js index 8711a656bf5f9..3abbb5cd21b2d 100644 --- a/tests/baselines/reference/typeValueConflict1.js +++ b/tests/baselines/reference/typeValueConflict1.js @@ -13,7 +13,7 @@ module M2 { //// [typeValueConflict1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeValueConflict2.js b/tests/baselines/reference/typeValueConflict2.js index 7abda8110b6c6..604acf71d1576 100644 --- a/tests/baselines/reference/typeValueConflict2.js +++ b/tests/baselines/reference/typeValueConflict2.js @@ -20,7 +20,7 @@ module M3 { //// [typeValueConflict2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeofClass2.js b/tests/baselines/reference/typeofClass2.js index f1ec6a77b14d3..fb04510e23f74 100644 --- a/tests/baselines/reference/typeofClass2.js +++ b/tests/baselines/reference/typeofClass2.js @@ -23,7 +23,7 @@ var r2: typeof d; //// [typeofClass2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typesWithSpecializedCallSignatures.js b/tests/baselines/reference/typesWithSpecializedCallSignatures.js index 045f7b40e555c..e46c2a3c267b6 100644 --- a/tests/baselines/reference/typesWithSpecializedCallSignatures.js +++ b/tests/baselines/reference/typesWithSpecializedCallSignatures.js @@ -44,7 +44,7 @@ var r3: Base = c.foo('hm'); //// [typesWithSpecializedCallSignatures.js] // basic uses of specialized signatures without errors var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typesWithSpecializedConstructSignatures.js b/tests/baselines/reference/typesWithSpecializedConstructSignatures.js index b4d42d819edb6..37fc51c3f3a3d 100644 --- a/tests/baselines/reference/typesWithSpecializedConstructSignatures.js +++ b/tests/baselines/reference/typesWithSpecializedConstructSignatures.js @@ -42,7 +42,7 @@ var r3: Base = new a('hm'); //// [typesWithSpecializedConstructSignatures.js] // basic uses of specialized signatures without errors var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/undeclaredBase.js b/tests/baselines/reference/undeclaredBase.js index 4b7813231cf86..3d07bc895717f 100644 --- a/tests/baselines/reference/undeclaredBase.js +++ b/tests/baselines/reference/undeclaredBase.js @@ -5,7 +5,7 @@ module M { export class C extends M.I { } } //// [undeclaredBase.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/undefinedIsSubtypeOfEverything.js b/tests/baselines/reference/undefinedIsSubtypeOfEverything.js index 7e480d18a0aa1..393c5e24544e9 100644 --- a/tests/baselines/reference/undefinedIsSubtypeOfEverything.js +++ b/tests/baselines/reference/undefinedIsSubtypeOfEverything.js @@ -124,7 +124,7 @@ class D17 extends Base { //// [undefinedIsSubtypeOfEverything.js] // undefined is a subtype of every other types, no errors expected below var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/underscoreMapFirst.js b/tests/baselines/reference/underscoreMapFirst.js index c8e936af5277f..3edb48cd2d1bf 100644 --- a/tests/baselines/reference/underscoreMapFirst.js +++ b/tests/baselines/reference/underscoreMapFirst.js @@ -50,7 +50,7 @@ class MyView extends View { //// [underscoreMapFirst.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/underscoreThisInDerivedClass01.js b/tests/baselines/reference/underscoreThisInDerivedClass01.js index 000176c213f48..c7f30f0ec87cf 100644 --- a/tests/baselines/reference/underscoreThisInDerivedClass01.js +++ b/tests/baselines/reference/underscoreThisInDerivedClass01.js @@ -26,7 +26,7 @@ class D extends C { //// [underscoreThisInDerivedClass01.js] // @target es5 var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/underscoreThisInDerivedClass02.js b/tests/baselines/reference/underscoreThisInDerivedClass02.js index c1e9494376b53..89d3bf5a4f9f6 100644 --- a/tests/baselines/reference/underscoreThisInDerivedClass02.js +++ b/tests/baselines/reference/underscoreThisInDerivedClass02.js @@ -20,7 +20,7 @@ class D extends C { //// [underscoreThisInDerivedClass02.js] // @target es5 var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/unionTypeEquivalence.js b/tests/baselines/reference/unionTypeEquivalence.js index e4d0acc893cc0..bcb1f28f12b08 100644 --- a/tests/baselines/reference/unionTypeEquivalence.js +++ b/tests/baselines/reference/unionTypeEquivalence.js @@ -21,7 +21,7 @@ var z1: string | typeof BC; //// [unionTypeEquivalence.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/unionTypeFromArrayLiteral.js b/tests/baselines/reference/unionTypeFromArrayLiteral.js index 83ad2a343946b..a908067574f95 100644 --- a/tests/baselines/reference/unionTypeFromArrayLiteral.js +++ b/tests/baselines/reference/unionTypeFromArrayLiteral.js @@ -29,7 +29,7 @@ var arr9 = [e, f]; // (E|F)[] // Otherwise, if the array literal is contextually typed by a type that has a property with the numeric name ‘0’, the resulting type is a tuple type constructed from the types of the element expressions. // Otherwise, the resulting type is an array type with an element type that is the union of the types of the element expressions. var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/unionTypesAssignability.js b/tests/baselines/reference/unionTypesAssignability.js index 231b8b27f3ba6..38c991bed6155 100644 --- a/tests/baselines/reference/unionTypesAssignability.js +++ b/tests/baselines/reference/unionTypesAssignability.js @@ -75,7 +75,7 @@ function foo(t: T, u: U) { //// [unionTypesAssignability.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/unknownSymbols1.js b/tests/baselines/reference/unknownSymbols1.js index 832868c4b8ff8..9fed0f3a716f5 100644 --- a/tests/baselines/reference/unknownSymbols1.js +++ b/tests/baselines/reference/unknownSymbols1.js @@ -34,7 +34,7 @@ class C5 { //// [unknownSymbols1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/unspecializedConstraints.js b/tests/baselines/reference/unspecializedConstraints.js index 1343bea602e39..e4c102d882d8f 100644 --- a/tests/baselines/reference/unspecializedConstraints.js +++ b/tests/baselines/reference/unspecializedConstraints.js @@ -155,7 +155,7 @@ module ts { //// [unspecializedConstraints.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js b/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js index b82a7cbc0ae9e..a651fdf7e8ef6 100644 --- a/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js +++ b/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js @@ -45,7 +45,7 @@ c5(1); // error //// [untypedFunctionCallsWithTypeParameters1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/unusedClassesinNamespace4.js b/tests/baselines/reference/unusedClassesinNamespace4.js index 0ab1227bf3d04..bf5e996d2d24d 100644 --- a/tests/baselines/reference/unusedClassesinNamespace4.js +++ b/tests/baselines/reference/unusedClassesinNamespace4.js @@ -16,7 +16,7 @@ namespace Validation { //// [unusedClassesinNamespace4.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/unusedIdentifiersConsolidated1.js b/tests/baselines/reference/unusedIdentifiersConsolidated1.js index dbb261e5f2a03..6419fbe250bcd 100644 --- a/tests/baselines/reference/unusedIdentifiersConsolidated1.js +++ b/tests/baselines/reference/unusedIdentifiersConsolidated1.js @@ -104,7 +104,7 @@ namespace Greeter { //// [unusedIdentifiersConsolidated1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/validUseOfThisInSuper.js b/tests/baselines/reference/validUseOfThisInSuper.js index 483e905b48ab6..b5eecf1720df0 100644 --- a/tests/baselines/reference/validUseOfThisInSuper.js +++ b/tests/baselines/reference/validUseOfThisInSuper.js @@ -11,7 +11,7 @@ class Super extends Base { //// [validUseOfThisInSuper.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/varArgsOnConstructorTypes.js b/tests/baselines/reference/varArgsOnConstructorTypes.js index 0875f2ba1dd85..547260c619785 100644 --- a/tests/baselines/reference/varArgsOnConstructorTypes.js +++ b/tests/baselines/reference/varArgsOnConstructorTypes.js @@ -26,7 +26,7 @@ reg.register(B); //// [varArgsOnConstructorTypes.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; From 7ea37342408df46b9005560235fbcb7eac8bcdd9 Mon Sep 17 00:00:00 2001 From: vvakame Date: Fri, 25 Nov 2016 13:45:37 +0900 Subject: [PATCH 2/7] address feedback --- src/compiler/transformers/es2015.ts | 6 +- ...sClassHeritageListMemberTypeAnnotations.js | 6 +- ...accessibleTypeInTypeParameterConstraint.js | 6 +- .../reference/abstractClassInLocalScope.js | 6 +- .../abstractClassInLocalScopeIsAbstract.js | 6 +- tests/baselines/reference/abstractProperty.js | 6 +- .../reference/abstractPropertyNegative.js | 6 +- .../accessOverriddenBaseClassMember1.js | 6 +- .../accessors_spec_section-4.5_inference.js | 6 +- .../reference/aliasUsageInAccessorsOfClass.js | 6 +- .../baselines/reference/aliasUsageInArray.js | 6 +- .../aliasUsageInFunctionExpression.js | 6 +- .../reference/aliasUsageInGenericFunction.js | 6 +- .../reference/aliasUsageInIndexerOfClass.js | 6 +- .../reference/aliasUsageInObjectLiteral.js | 6 +- .../reference/aliasUsageInOrExpression.js | 6 +- ...aliasUsageInTypeArgumentOfExtendsClause.js | 12 +- .../reference/aliasUsageInVarAssignment.js | 6 +- .../reference/ambiguousOverloadResolution.js | 6 +- .../reference/apparentTypeSubtyping.js | 6 +- .../reference/apparentTypeSupertype.js | 6 +- .../reference/arrayAssignmentTest1.js | 6 +- .../reference/arrayAssignmentTest2.js | 6 +- .../reference/arrayBestCommonTypes.js | 6 +- .../reference/arrayLiteralTypeInference.js | 6 +- tests/baselines/reference/arrayLiterals.js | 6 +- .../arrayLiteralsWithRecursiveGenerics.js | 6 +- ...rayOfSubtypeIsAssignableToReadonlyArray.js | 6 +- .../reference/arrowFunctionContexts.js | 6 +- .../assignmentCompatWithCallSignatures3.js | 6 +- .../assignmentCompatWithCallSignatures4.js | 6 +- .../assignmentCompatWithCallSignatures5.js | 6 +- .../assignmentCompatWithCallSignatures6.js | 6 +- ...ssignmentCompatWithConstructSignatures3.js | 6 +- ...ssignmentCompatWithConstructSignatures4.js | 6 +- ...ssignmentCompatWithConstructSignatures5.js | 6 +- ...ssignmentCompatWithConstructSignatures6.js | 6 +- .../assignmentCompatWithNumericIndexer.js | 6 +- .../assignmentCompatWithNumericIndexer3.js | 6 +- .../assignmentCompatWithObjectMembers4.js | 6 +- ...nmentCompatWithObjectMembersOptionality.js | 6 +- ...mentCompatWithObjectMembersOptionality2.js | 6 +- .../assignmentCompatWithStringIndexer.js | 6 +- .../reference/assignmentLHSIsValue.js | 6 +- .../reference/asyncImportedPromise_es5.js | 6 +- tests/baselines/reference/autolift4.js | 6 +- tests/baselines/reference/baseCheck.js | 6 +- .../reference/baseIndexSignatureResolution.js | 6 +- .../reference/baseTypeOrderChecking.js | 6 +- .../baseTypeWrappingInstantiationChain.js | 6 +- tests/baselines/reference/bases.js | 6 +- .../bestCommonTypeOfConditionalExpressions.js | 6 +- ...bestCommonTypeOfConditionalExpressions2.js | 6 +- .../reference/bestCommonTypeOfTuple2.js | 6 +- ...allSignatureAssignabilityInInheritance2.js | 6 +- ...allSignatureAssignabilityInInheritance3.js | 6 +- ...allSignatureAssignabilityInInheritance4.js | 6 +- ...allSignatureAssignabilityInInheritance5.js | 6 +- ...allSignatureAssignabilityInInheritance6.js | 6 +- tests/baselines/reference/callWithSpread.js | 6 +- .../reference/captureThisInSuperCall.js | 6 +- tests/baselines/reference/castingTuple.js | 6 +- .../baselines/reference/chainedAssignment3.js | 6 +- ...arameterConstrainedToOtherTypeParameter.js | 6 +- .../reference/checkForObjectTooStrict.js | 6 +- .../checkSuperCallBeforeThisAccessing1.js | 6 +- .../checkSuperCallBeforeThisAccessing2.js | 6 +- .../checkSuperCallBeforeThisAccessing3.js | 6 +- .../checkSuperCallBeforeThisAccessing4.js | 6 +- .../checkSuperCallBeforeThisAccessing5.js | 6 +- .../checkSuperCallBeforeThisAccessing6.js | 6 +- .../checkSuperCallBeforeThisAccessing7.js | 6 +- .../checkSuperCallBeforeThisAccessing8.js | 6 +- .../reference/circularImportAlias.js | 6 +- .../circularTypeofWithFunctionModule.js | 6 +- .../classAbstractConstructorAssignability.js | 6 +- .../reference/classAbstractCrashedOnce.js | 6 +- .../reference/classAbstractExtends.js | 6 +- .../reference/classAbstractFactoryFunction.js | 6 +- .../reference/classAbstractGeneric.js | 6 +- .../reference/classAbstractInAModule.js | 6 +- .../reference/classAbstractInheritance.js | 6 +- .../reference/classAbstractInstantiations1.js | 6 +- .../reference/classAbstractInstantiations2.js | 6 +- .../classAbstractOverrideWithAbstract.js | 6 +- .../reference/classAbstractSuperCalls.js | 6 +- .../classAbstractUsingAbstractMethod1.js | 6 +- .../classAbstractUsingAbstractMethods2.js | 6 +- .../classConstructorAccessibility2.js | 6 +- .../classConstructorAccessibility4.js | 6 +- .../classConstructorAccessibility5.js | 6 +- ...classConstructorParametersAccessibility.js | 6 +- ...lassConstructorParametersAccessibility2.js | 6 +- ...lassConstructorParametersAccessibility3.js | 6 +- ...clarationMergedInModuleWithContinuation.js | 6 +- .../classDeclaredBeforeClassFactory.js | 6 +- .../classDoesNotDependOnBaseTypes.js | 6 +- tests/baselines/reference/classExpression2.js | 6 +- tests/baselines/reference/classExpression3.js | 6 +- .../classExpressionExtendingAbstractClass.js | 6 +- .../reference/classExtendingBuiltinType.js | 6 +- .../reference/classExtendingClass.js | 6 +- .../reference/classExtendingClassLikeType.js | 6 +- .../reference/classExtendingNonConstructor.js | 6 +- .../baselines/reference/classExtendingNull.js | 6 +- .../reference/classExtendingPrimitive.js | 6 +- .../reference/classExtendingPrimitive2.js | 6 +- .../reference/classExtendingQualifiedName.js | 6 +- .../reference/classExtendingQualifiedName2.js | 6 +- .../reference/classExtendsAcrossFiles.js | 12 +- ...sMergedWithModuleNotReferingConstructor.js | 6 +- ...tendsClauseClassNotReferringConstructor.js | 6 +- .../reference/classExtendsEveryObjectType.js | 6 +- .../reference/classExtendsEveryObjectType2.js | 6 +- .../reference/classExtendsInterface.js | 6 +- .../classExtendsInterfaceInExpression.js | 6 +- .../classExtendsInterfaceInModule.js | 6 +- .../baselines/reference/classExtendsItself.js | 6 +- .../reference/classExtendsItselfIndirectly.js | 6 +- .../classExtendsItselfIndirectly2.js | 6 +- .../classExtendsItselfIndirectly3.js | 36 +- .../classExtendsMultipleBaseClasses.js | 6 +- tests/baselines/reference/classExtendsNull.js | 6 +- ...classExtendsShadowedConstructorFunction.js | 6 +- .../classExtendsValidConstructorFunction.js | 6 +- .../classHeritageWithTrailingSeparator.js | 6 +- .../reference/classImplementsClass2.js | 6 +- .../reference/classImplementsClass3.js | 6 +- .../reference/classImplementsClass4.js | 6 +- .../reference/classImplementsClass5.js | 6 +- .../reference/classImplementsClass6.js | 6 +- tests/baselines/reference/classIndexer3.js | 6 +- tests/baselines/reference/classInheritence.js | 6 +- .../reference/classIsSubtypeOfBaseType.js | 6 +- tests/baselines/reference/classOrder2.js | 6 +- tests/baselines/reference/classOrderBug.js | 6 +- .../reference/classSideInheritance1.js | 6 +- .../reference/classSideInheritance2.js | 6 +- .../reference/classSideInheritance3.js | 6 +- tests/baselines/reference/classUpdateTests.js | 6 +- .../classWithBaseClassButNoConstructor.js | 6 +- .../reference/classWithConstructors.js | 6 +- .../reference/classWithProtectedProperty.js | 6 +- .../reference/classWithStaticMembers.js | 6 +- tests/baselines/reference/classdecl.js | 6 +- .../reference/clodulesDerivedClasses.js | 6 +- ...llisionSuperAndLocalFunctionInAccessors.js | 6 +- ...isionSuperAndLocalFunctionInConstructor.js | 6 +- .../collisionSuperAndLocalFunctionInMethod.js | 6 +- ...ollisionSuperAndLocalFunctionInProperty.js | 6 +- .../collisionSuperAndLocalVarInAccessors.js | 6 +- .../collisionSuperAndLocalVarInConstructor.js | 6 +- .../collisionSuperAndLocalVarInMethod.js | 6 +- .../collisionSuperAndLocalVarInProperty.js | 6 +- .../collisionSuperAndNameResolution.js | 6 +- .../reference/collisionSuperAndParameter.js | 6 +- .../reference/collisionSuperAndParameter1.js | 6 +- ...perAndPropertyNameAsConstuctorParameter.js | 6 +- ...xpressionAndLocalVarWithSuperExperssion.js | 6 +- .../reference/commentsInheritance.js | 6 +- .../comparisonOperatorWithIdenticalObjects.js | 6 +- ...ithNoRelationshipObjectsOnCallSignature.js | 6 +- ...lationshipObjectsOnConstructorSignature.js | 6 +- ...thNoRelationshipObjectsOnIndexSignature.js | 6 +- ...nshipObjectsOnInstantiatedCallSignature.js | 6 +- ...jectsOnInstantiatedConstructorSignature.js | 6 +- ...peratorWithSubtypeObjectOnCallSignature.js | 6 +- ...WithSubtypeObjectOnConstructorSignature.js | 6 +- ...eratorWithSubtypeObjectOnIndexSignature.js | 6 +- ...ubtypeObjectOnInstantiatedCallSignature.js | 6 +- ...bjectOnInstantiatedConstructorSignature.js | 6 +- ...isonOperatorWithSubtypeObjectOnProperty.js | 6 +- .../reference/complexClassRelationships.js | 6 +- ...catedGenericRecursiveBaseClassReference.js | 6 +- .../reference/compoundAssignmentLHSIsValue.js | 6 +- ...poundExponentiationAssignmentLHSIsValue.js | 6 +- .../reference/computedPropertyNames24_ES5.js | 6 +- .../reference/computedPropertyNames25_ES5.js | 6 +- .../reference/computedPropertyNames26_ES5.js | 6 +- .../reference/computedPropertyNames27_ES5.js | 6 +- .../reference/computedPropertyNames28_ES5.js | 6 +- .../reference/computedPropertyNames30_ES5.js | 6 +- .../reference/computedPropertyNames31_ES5.js | 6 +- .../reference/computedPropertyNames43_ES5.js | 6 +- .../reference/computedPropertyNames44_ES5.js | 6 +- .../reference/computedPropertyNames45_ES5.js | 6 +- .../conditionalOperatorWithIdenticalBCT.js | 6 +- .../conditionalOperatorWithoutIdenticalBCT.js | 6 +- .../reference/constantOverloadFunction.js | 6 +- .../constantOverloadFunctionNoSubtypeError.js | 6 +- ...nstraintCheckInGenericBaseTypeReference.js | 6 +- ...uctSignatureAssignabilityInInheritance2.js | 6 +- ...uctSignatureAssignabilityInInheritance3.js | 6 +- ...uctSignatureAssignabilityInInheritance4.js | 6 +- ...uctSignatureAssignabilityInInheritance5.js | 6 +- ...uctSignatureAssignabilityInInheritance6.js | 6 +- tests/baselines/reference/constructorArgs.js | 6 +- ...uctorFunctionTypeIsAssignableToBaseType.js | 6 +- ...ctorFunctionTypeIsAssignableToBaseType2.js | 6 +- .../constructorHasPrototypeProperty.js | 6 +- .../reference/constructorOverloads2.js | 6 +- .../reference/constructorOverloads3.js | 6 +- .../reference/constructorWithCapturedSuper.js | 6 +- ...constructorWithIncompleteTypeAnnotation.js | 6 +- .../contextualTypingArrayOfLambdas.js | 6 +- ...contextualTypingOfConditionalExpression.js | 6 +- ...ontextualTypingOfConditionalExpression2.js | 6 +- ...urcePropertyIsRelatableToTargetProperty.js | 6 +- .../reference/declFileClassExtendsNull.js | 6 +- .../declFileForFunctionTypeAsTypeParameter.js | 6 +- ...ileGenericClassWithGenericExtendedClass.js | 6 +- .../reference/declFileGenericType.js | 6 +- .../reference/declFileGenericType2.js | 6 +- ...lictingWithClassReferredByExtendsClause.js | 6 +- ...dsClauseThatHasItsContainerNameConflict.js | 6 +- .../declarationEmitExpressionInExtends.js | 6 +- .../declarationEmitExpressionInExtends2.js | 6 +- .../declarationEmitExpressionInExtends3.js | 6 +- .../declarationEmitExpressionInExtends4.js | 6 +- .../declarationEmitNameConflicts3.js | 6 +- .../declarationEmitProtectedMembers.js | 6 +- .../declarationEmitThisPredicates01.js | 6 +- ...tionEmitThisPredicatesWithPrivateName01.js | 6 +- .../reference/declareDottedExtend.js | 6 +- .../reference/decoratorOnClassConstructor2.js | 6 +- .../reference/decoratorOnClassConstructor3.js | 6 +- .../reference/decoratorOnClassMethod12.js | 6 +- ...edClassConstructorWithExplicitReturns01.js | 6 +- ...assConstructorWithExplicitReturns01.js.map | 2 +- ...tructorWithExplicitReturns01.sourcemap.txt | 268 +++--- ...derivedClassConstructorWithoutSuperCall.js | 6 +- ...ClassFunctionOverridesBaseClassAccessor.js | 6 +- .../derivedClassIncludesInheritedMembers.js | 6 +- ...idesIndexersWithAssignmentCompatibility.js | 6 +- .../derivedClassOverridesPrivateFunction1.js | 6 +- .../derivedClassOverridesPrivates.js | 6 +- .../derivedClassOverridesProtectedMembers.js | 6 +- .../derivedClassOverridesProtectedMembers2.js | 6 +- .../derivedClassOverridesProtectedMembers3.js | 6 +- .../derivedClassOverridesProtectedMembers4.js | 6 +- .../derivedClassOverridesPublicMembers.js | 6 +- .../derivedClassOverridesWithoutSubtype.js | 6 +- .../derivedClassParameterProperties.js | 6 +- ...dClassSuperCallsInNonConstructorMembers.js | 6 +- .../derivedClassSuperCallsWithThisArg.js | 6 +- .../reference/derivedClassTransitivity.js | 6 +- .../reference/derivedClassTransitivity2.js | 6 +- .../reference/derivedClassTransitivity3.js | 6 +- .../reference/derivedClassTransitivity4.js | 6 +- .../reference/derivedClassWithAny.js | 6 +- ...ivateInstanceShadowingProtectedInstance.js | 6 +- ...hPrivateInstanceShadowingPublicInstance.js | 6 +- ...thPrivateStaticShadowingProtectedStatic.js | 6 +- ...sWithPrivateStaticShadowingPublicStatic.js | 6 +- .../derivedClassWithoutExplicitConstructor.js | 6 +- ...derivedClassWithoutExplicitConstructor2.js | 6 +- ...derivedClassWithoutExplicitConstructor3.js | 6 +- tests/baselines/reference/derivedClasses.js | 6 +- .../reference/derivedGenericClassWithAny.js | 6 +- ...sesHiddenBaseCallViaSuperPropertyAccess.js | 6 +- .../derivedTypeDoesNotRequireExtendsClause.js | 6 +- .../destructuringParameterDeclaration5.js | 6 +- ...BeforeEmitParameterPropertyDeclaration1.js | 6 +- ...SuperCallBeforeEmitPropertyDeclaration1.js | 6 +- ...arationAndParameterPropertyDeclaration1.js | 6 +- .../reference/emitThisInSuperMethodCall.js | 6 +- tests/baselines/reference/emptyModuleName.js | 6 +- ...rorForwardReferenceForwadingConstructor.js | 6 +- tests/baselines/reference/errorSuperCalls.js | 6 +- .../reference/errorSuperPropertyAccess.js | 6 +- .../reference/errorsInGenericTypeReference.js | 6 +- .../reference/es6ClassSuperCodegenBug.js | 6 +- tests/baselines/reference/es6ClassTest.js | 6 +- tests/baselines/reference/es6ClassTest2.js | 6 +- tests/baselines/reference/es6ClassTest7.js | 6 +- .../exportAssignmentOfGenericType1.js | 6 +- .../exportDeclarationInInternalModule.js | 6 +- tests/baselines/reference/extBaseClass1.js | 6 +- tests/baselines/reference/extBaseClass2.js | 6 +- .../extendAndImplementTheSameBaseType.js | 6 +- .../extendAndImplementTheSameBaseType2.js | 6 +- .../extendBaseClassBeforeItsDeclared.js | 6 +- .../extendClassExpressionFromModule.js | 6 +- .../extendConstructSignatureInInterface.js | 6 +- .../reference/extendNonClassSymbol1.js | 6 +- .../reference/extendNonClassSymbol2.js | 6 +- .../extendPrivateConstructorClass.js | 6 +- ...xtendingClassFromAliasAndUsageInIndexer.js | 12 +- .../reference/extendsClauseAlreadySeen.js | 6 +- .../reference/extendsClauseAlreadySeen2.js | 6 +- tests/baselines/reference/fluentClasses.js | 6 +- tests/baselines/reference/for-inStatements.js | 6 +- .../reference/for-inStatementsInvalid.js | 6 +- .../forStatementsMultipleInvalidDecl.js | 6 +- .../reference/functionImplementationErrors.js | 6 +- .../reference/functionImplementations.js | 6 +- .../reference/functionSubtypingOfVarArgs.js | 6 +- .../reference/functionSubtypingOfVarArgs2.js | 6 +- .../reference/generatedContextualTyping.js | 6 +- .../genericBaseClassLiteralProperty.js | 6 +- .../genericBaseClassLiteralProperty2.js | 6 +- ...allWithConstraintsTypeArgumentInference.js | 6 +- .../genericCallWithObjectTypeArgs2.js | 6 +- ...icCallWithObjectTypeArgsAndConstraints2.js | 6 +- ...icCallWithObjectTypeArgsAndConstraints3.js | 6 +- .../genericCallbacksAndClassHierarchy.js | 6 +- .../genericClassExpressionInFunction.js | 6 +- ...sInheritsConstructorFromNonGenericClass.js | 6 +- ...cClassPropertyInheritanceSpecialization.js | 6 +- .../reference/genericClassStaticMethod.js | 6 +- tests/baselines/reference/genericClasses3.js | 6 +- ...genericConstraintOnExtendedBuiltinTypes.js | 6 +- ...enericConstraintOnExtendedBuiltinTypes2.js | 6 +- .../genericDerivedTypeWithSpecializedBase.js | 6 +- .../genericDerivedTypeWithSpecializedBase2.js | 6 +- .../genericInheritedDefaultConstructors.js | 6 +- .../reference/genericPrototypeProperty2.js | 6 +- .../reference/genericPrototypeProperty3.js | 6 +- ...ericRecursiveImplicitConstructorErrors2.js | 6 +- ...ericRecursiveImplicitConstructorErrors3.js | 6 +- .../reference/genericTypeAssertions2.js | 6 +- .../reference/genericTypeAssertions4.js | 6 +- .../reference/genericTypeAssertions6.js | 6 +- .../reference/genericTypeConstraints.js | 6 +- ...genericTypeReferenceWithoutTypeArgument.js | 6 +- ...enericTypeReferenceWithoutTypeArgument2.js | 6 +- .../genericWithIndexerOfTypeParameterType2.js | 6 +- .../reference/heterogeneousArrayLiterals.js | 6 +- .../reference/ifDoWhileStatements.js | 6 +- .../illegalSuperCallsInConstructor.js | 6 +- .../implementClausePrecedingExtends.js | 6 +- ...gAnInterfaceExtendingClassWithPrivates2.js | 6 +- ...AnInterfaceExtendingClassWithProtecteds.js | 6 +- .../baselines/reference/importAsBaseClass.js | 6 +- tests/baselines/reference/importHelpers.js | 6 +- .../reference/importHelpersNoHelpers.js | 6 +- .../reference/importHelpersNoModule.js | 6 +- .../reference/importShadowsGlobalName.js | 6 +- .../reference/importUsedInExtendsList1.js | 6 +- .../reference/indexerConstraints2.js | 6 +- .../reference/indirectSelfReference.js | 6 +- .../reference/indirectSelfReferenceGeneric.js | 6 +- .../infinitelyExpandingTypesNonGenericBase.js | 6 +- .../inheritFromGenericTypeParameter.js | 6 +- ...SameNamePrivatePropertiesFromSameOrigin.js | 6 +- tests/baselines/reference/inheritance.js | 6 +- tests/baselines/reference/inheritance1.js | 6 +- ...itanceGrandParentPrivateMemberCollision.js | 6 +- ...tPrivateMemberCollisionWithPublicMember.js | 6 +- ...tPublicMemberCollisionWithPrivateMember.js | 6 +- ...ritanceMemberAccessorOverridingAccessor.js | 6 +- ...heritanceMemberAccessorOverridingMethod.js | 6 +- ...ritanceMemberAccessorOverridingProperty.js | 6 +- ...inheritanceMemberFuncOverridingAccessor.js | 6 +- .../inheritanceMemberFuncOverridingMethod.js | 6 +- ...inheritanceMemberFuncOverridingProperty.js | 6 +- ...ritanceMemberPropertyOverridingAccessor.js | 6 +- ...heritanceMemberPropertyOverridingMethod.js | 6 +- ...ritanceMemberPropertyOverridingProperty.js | 6 +- .../inheritanceOfGenericConstructorMethod1.js | 6 +- .../inheritanceOfGenericConstructorMethod2.js | 6 +- ...ritanceStaticAccessorOverridingAccessor.js | 6 +- ...heritanceStaticAccessorOverridingMethod.js | 6 +- ...ritanceStaticAccessorOverridingProperty.js | 6 +- ...inheritanceStaticFuncOverridingAccessor.js | 6 +- ...eStaticFuncOverridingAccessorOfFuncType.js | 6 +- .../inheritanceStaticFuncOverridingMethod.js | 6 +- ...inheritanceStaticFuncOverridingProperty.js | 6 +- ...eStaticFuncOverridingPropertyOfFuncType.js | 6 +- ...taticFunctionOverridingInstanceProperty.js | 6 +- .../inheritanceStaticMembersCompatible.js | 6 +- .../inheritanceStaticMembersIncompatible.js | 6 +- ...ritanceStaticPropertyOverridingAccessor.js | 6 +- ...heritanceStaticPropertyOverridingMethod.js | 6 +- ...ritanceStaticPropertyOverridingProperty.js | 6 +- .../inheritedConstructorWithRestParams.js | 6 +- .../inheritedConstructorWithRestParams2.js | 6 +- .../inheritedModuleMembersForClodule.js | 6 +- .../reference/instanceOfAssignability.js | 6 +- ...nstancePropertiesInheritedIntoClassType.js | 6 +- .../reference/instanceSubtypeCheck2.js | 6 +- ...nstanceofWithStructurallyIdenticalTypes.js | 6 +- .../instantiatedReturnTypeContravariance.js | 6 +- .../reference/interfaceClassMerging.js | 6 +- .../reference/interfaceClassMerging2.js | 6 +- .../reference/interfaceExtendsClass1.js | 6 +- .../interfaceExtendsClassWithPrivate1.js | 6 +- .../interfaceExtendsClassWithPrivate2.js | 6 +- .../reference/interfaceImplementation8.js | 6 +- .../invalidModuleWithStatementsOfEveryKind.js | 6 +- .../invalidMultipleVariableDeclarations.js | 6 +- .../reference/invalidReturnStatements.js | 6 +- .../isolatedModulesImportExportElision.js | 6 +- tests/baselines/reference/jsxViaImport.js | 6 +- .../reference/keyofAndIndexedAccess.js | 6 +- tests/baselines/reference/lambdaArgCrash.js | 6 +- tests/baselines/reference/lift.js | 6 +- tests/baselines/reference/localTypes1.js | 6 +- tests/baselines/reference/m7Bugs.js | 6 +- .../reference/mergedDeclarations5.js | 6 +- .../reference/mergedDeclarations6.js | 6 +- .../mergedInheritedClassInterface.js | 6 +- .../mergedInterfacesWithInheritedPrivates2.js | 6 +- .../mergedInterfacesWithInheritedPrivates3.js | 6 +- .../missingPropertiesOfClassExpression.js | 6 +- tests/baselines/reference/moduleAsBaseType.js | 6 +- .../moduleImportedForTypeArgumentPosition.js | 6 +- .../moduleWithStatementsOfEveryKind.js | 6 +- .../reference/multipleInheritance.js | 6 +- .../mutuallyRecursiveGenericBaseTypes2.js | 6 +- .../noImplicitAnyMissingGetAccessor.js | 6 +- .../noImplicitAnyMissingSetAccessor.js | 6 +- ...enericClassExtendingGenericClassWithAny.js | 6 +- ...cIndexerConstrainsPropertyDeclarations2.js | 6 +- .../reference/numericIndexerConstraint3.js | 6 +- .../reference/numericIndexerConstraint4.js | 6 +- .../reference/numericIndexerTyping2.js | 6 +- ...objectCreationOfElementAccessExpression.js | 6 +- ...objectTypeHidingMembersOfExtendedObject.js | 6 +- ...objectTypesIdentityWithNumericIndexers1.js | 6 +- ...objectTypesIdentityWithNumericIndexers2.js | 6 +- ...objectTypesIdentityWithNumericIndexers3.js | 6 +- .../objectTypesIdentityWithPrivates.js | 6 +- .../objectTypesIdentityWithPrivates2.js | 6 +- .../objectTypesIdentityWithPrivates3.js | 6 +- .../objectTypesIdentityWithStringIndexers.js | 6 +- .../objectTypesIdentityWithStringIndexers2.js | 6 +- .../optionalConstructorArgInSuper.js | 6 +- tests/baselines/reference/optionalMethods.js | 6 +- .../reference/optionalParamArgsTest.js | 6 +- .../reference/optionalParamInOverride.js | 6 +- .../reference/optionalParameterProperty.js | 6 +- .../baselines/reference/outModuleConcatAmd.js | 6 +- .../reference/outModuleConcatAmd.js.map | 2 +- .../outModuleConcatAmd.sourcemap.txt | 62 +- .../reference/outModuleConcatSystem.js | 6 +- .../reference/outModuleConcatSystem.js.map | 2 +- .../outModuleConcatSystem.sourcemap.txt | 62 +- .../reference/outModuleTripleSlashRefs.js | 6 +- .../reference/outModuleTripleSlashRefs.js.map | 2 +- .../outModuleTripleSlashRefs.sourcemap.txt | 90 +- tests/baselines/reference/overload1.js | 6 +- .../overloadOnConstConstraintChecks1.js | 6 +- .../overloadOnConstConstraintChecks2.js | 6 +- .../overloadOnConstConstraintChecks3.js | 6 +- .../overloadOnConstConstraintChecks4.js | 6 +- .../overloadOnConstantsInvalidOverload1.js | 6 +- .../baselines/reference/overloadResolution.js | 6 +- .../overloadResolutionClassConstructors.js | 6 +- .../overloadResolutionConstructors.js | 6 +- .../reference/overloadingOnConstants1.js | 6 +- .../reference/overloadingOnConstants2.js | 6 +- .../overridingPrivateStaticMembers.js | 6 +- .../reference/parseErrorInHeritageClause1.js | 6 +- tests/baselines/reference/parser509630.js | 6 +- tests/baselines/reference/parserAstSpans1.js | 6 +- .../reference/parserClassDeclaration1.js | 6 +- .../reference/parserClassDeclaration3.js | 6 +- .../reference/parserClassDeclaration4.js | 6 +- .../reference/parserClassDeclaration5.js | 6 +- .../reference/parserClassDeclaration6.js | 6 +- ...rrorRecovery_ExtendsOrImplementsClause2.js | 6 +- ...rrorRecovery_ExtendsOrImplementsClause4.js | 6 +- ...rrorRecovery_ExtendsOrImplementsClause5.js | 6 +- .../parserGenericsInTypeContexts1.js | 6 +- .../parserGenericsInTypeContexts2.js | 6 +- .../baselines/reference/parserRealSource10.js | 6 +- .../baselines/reference/parserRealSource11.js | 6 +- tests/baselines/reference/parserharness.js | 6 +- ...artiallyAnnotatedFunctionInferenceError.js | 6 +- ...tatedFunctionInferenceWithTypeParameter.js | 6 +- tests/baselines/reference/primitiveMembers.js | 6 +- tests/baselines/reference/privacyClass.js | 6 +- .../privacyClassExtendsClauseDeclFile.js | 12 +- tests/baselines/reference/privacyGloClass.js | 6 +- .../reference/privateAccessInSubclass1.js | 6 +- .../privateInstanceMemberAccessibility.js | 6 +- ...tedMembersAreNotAccessibleDestructuring.js | 6 +- .../privateStaticMemberAccessibility.js | 6 +- .../privateStaticNotAccessibleInClodule2.js | 6 +- .../amd/testGlo.js | 6 +- .../node/testGlo.js | 6 +- .../reference/project/prologueEmit/amd/out.js | 6 +- .../project/prologueEmit/node/out.js | 6 +- .../amd/m'ain.js | 6 +- .../node/m'ain.js | 6 +- .../reference/propertiesAndIndexers.js | 6 +- tests/baselines/reference/propertyAccess.js | 6 +- ...tyAccessOnTypeParameterWithConstraints2.js | 6 +- ...tyAccessOnTypeParameterWithConstraints3.js | 6 +- ...tyAccessOnTypeParameterWithConstraints5.js | 6 +- ...sPropertyAccessibleWithinNestedSubclass.js | 6 +- ...PropertyAccessibleWithinNestedSubclass1.js | 6 +- ...edClassPropertyAccessibleWithinSubclass.js | 6 +- ...dClassPropertyAccessibleWithinSubclass2.js | 6 +- ...dClassPropertyAccessibleWithinSubclass3.js | 6 +- .../protectedInstanceMemberAccessibility.js | 6 +- tests/baselines/reference/protectedMembers.js | 6 +- ...icClassPropertyAccessibleWithinSubclass.js | 6 +- ...cClassPropertyAccessibleWithinSubclass2.js | 6 +- ...solution-does-not-affect-class-heritage.js | 6 +- .../readonlyConstructorAssignment.js | 6 +- .../reference/recursiveBaseCheck3.js | 6 +- .../reference/recursiveBaseCheck4.js | 6 +- .../reference/recursiveBaseCheck6.js | 6 +- .../recursiveBaseConstructorCreation1.js | 6 +- ...ssInstantiationsWithDefaultConstructors.js | 6 +- .../reference/recursiveClassReferenceTest.js | 6 +- .../recursiveClassReferenceTest.js.map | 2 +- .../recursiveClassReferenceTest.sourcemap.txt | 776 +++++++++--------- .../reference/recursiveComplicatedClasses.js | 6 +- ...sivelySpecializedConstructorDeclaration.js | 6 +- .../reference/reexportClassDefinition.js | 6 +- ...lassDeclarationWhenInBaseTypeResolution.js | 6 +- .../reference/returnInConstructor1.js | 6 +- tests/baselines/reference/returnStatements.js | 6 +- ...peCheckExtendedClassInsidePublicMethod2.js | 6 +- ...peCheckExtendedClassInsideStaticMethod1.js | 6 +- tests/baselines/reference/scopeTests.js | 6 +- .../reference/shadowPrivateMembers.js | 6 +- ...sWithDefaultConstructorAndExtendsClause.js | 6 +- ...hDefaultConstructorAndExtendsClause.js.map | 2 +- ...tConstructorAndExtendsClause.sourcemap.txt | 78 +- .../specializedInheritedConstructors1.js | 6 +- .../specializedOverloadWithRestParameters.js | 6 +- tests/baselines/reference/staticFactory1.js | 6 +- .../baselines/reference/staticInheritance.js | 6 +- .../staticMemberAccessOffDerivedType1.js | 6 +- tests/baselines/reference/staticPropSuper.js | 6 +- .../reference/strictModeInConstructor.js | 6 +- .../reference/strictModeReservedWord.js | 6 +- ...trictModeReservedWordInClassDeclaration.js | 6 +- ...gIndexerConstrainsPropertyDeclarations2.js | 6 +- .../reference/subtypesOfTypeParameter.js | 6 +- .../subtypesOfTypeParameterWithConstraints.js | 6 +- ...subtypesOfTypeParameterWithConstraints4.js | 6 +- ...OfTypeParameterWithRecursiveConstraints.js | 6 +- .../reference/subtypingTransitivity.js | 6 +- .../reference/subtypingWithCallSignatures2.js | 6 +- .../reference/subtypingWithCallSignatures3.js | 6 +- .../reference/subtypingWithCallSignatures4.js | 6 +- .../subtypingWithConstructSignatures2.js | 6 +- .../subtypingWithConstructSignatures3.js | 6 +- .../subtypingWithConstructSignatures4.js | 6 +- .../subtypingWithConstructSignatures5.js | 6 +- .../subtypingWithConstructSignatures6.js | 6 +- .../reference/subtypingWithNumericIndexer.js | 6 +- .../reference/subtypingWithNumericIndexer3.js | 6 +- .../reference/subtypingWithNumericIndexer4.js | 6 +- .../reference/subtypingWithObjectMembers.js | 6 +- .../reference/subtypingWithObjectMembers4.js | 6 +- ...subtypingWithObjectMembersAccessibility.js | 6 +- ...ubtypingWithObjectMembersAccessibility2.js | 6 +- .../reference/subtypingWithStringIndexer.js | 6 +- .../reference/subtypingWithStringIndexer3.js | 6 +- .../reference/subtypingWithStringIndexer4.js | 6 +- tests/baselines/reference/super.js | 6 +- tests/baselines/reference/super1.js | 6 +- tests/baselines/reference/super2.js | 6 +- tests/baselines/reference/superAccess.js | 6 +- tests/baselines/reference/superAccess2.js | 6 +- .../reference/superAccessInFatArrow1.js | 6 +- .../reference/superCallArgsMustMatch.js | 6 +- .../reference/superCallAssignResult.js | 6 +- .../superCallBeforeThisAccessing1.js | 6 +- .../superCallBeforeThisAccessing2.js | 6 +- .../superCallBeforeThisAccessing3.js | 6 +- .../superCallBeforeThisAccessing4.js | 6 +- .../superCallBeforeThisAccessing5.js | 6 +- .../superCallBeforeThisAccessing6.js | 6 +- .../superCallBeforeThisAccessing7.js | 6 +- .../superCallBeforeThisAccessing8.js | 6 +- ...allFromClassThatDerivesFromGenericType1.js | 6 +- ...allFromClassThatDerivesFromGenericType2.js | 6 +- ...eButWithIncorrectNumberOfTypeArguments1.js | 6 +- ...sFromGenericTypeButWithNoTypeArguments1.js | 6 +- ...ivesNonGenericTypeButWithTypeArguments1.js | 6 +- .../reference/superCallInNonStaticMethod.js | 6 +- .../reference/superCallInStaticMethod.js | 6 +- .../superCallInsideClassDeclaration.js | 6 +- .../superCallInsideClassExpression.js | 6 +- .../superCallInsideObjectLiteralExpression.js | 6 +- .../reference/superCallOutsideConstructor.js | 6 +- .../superCallParameterContextualTyping1.js | 6 +- .../superCallParameterContextualTyping2.js | 6 +- .../superCallParameterContextualTyping3.js | 6 +- .../reference/superCallWithCommentEmit01.js | 6 +- .../superCallWithMissingBaseClass.js | 6 +- tests/baselines/reference/superCalls.js | 6 +- .../reference/superCallsInConstructor.js | 6 +- tests/baselines/reference/superErrors.js | 6 +- .../baselines/reference/superInCatchBlock1.js | 6 +- .../reference/superInConstructorParam1.js | 6 +- tests/baselines/reference/superInLambdas.js | 6 +- .../reference/superInObjectLiterals_ES5.js | 6 +- tests/baselines/reference/superNewCall1.js | 6 +- .../reference/superPropertyAccess.js | 6 +- .../reference/superPropertyAccess1.js | 6 +- .../reference/superPropertyAccess2.js | 6 +- ...essInComputedPropertiesOfNestedType_ES5.js | 6 +- .../reference/superPropertyAccessNoError.js | 6 +- .../reference/superPropertyAccess_ES5.js | 6 +- .../reference/superSymbolIndexedAccess5.js | 6 +- .../reference/superSymbolIndexedAccess6.js | 6 +- .../superWithGenericSpecialization.js | 6 +- .../baselines/reference/superWithGenerics.js | 6 +- .../reference/superWithTypeArgument.js | 6 +- .../reference/superWithTypeArgument2.js | 6 +- .../reference/superWithTypeArgument3.js | 6 +- ...side-object-literal-getters-and-setters.js | 6 +- tests/baselines/reference/switchStatements.js | 6 +- .../reference/systemModuleWithSuperClass.js | 6 +- .../reference/targetTypeBaseCalls.js | 6 +- .../reference/thisInInvalidContexts.js | 6 +- .../thisInInvalidContextsExternalModule.js | 6 +- tests/baselines/reference/thisInSuperCall.js | 6 +- tests/baselines/reference/thisInSuperCall1.js | 6 +- tests/baselines/reference/thisInSuperCall2.js | 6 +- tests/baselines/reference/thisInSuperCall3.js | 6 +- .../reference/thisTypeInFunctions.js | 6 +- .../reference/thisTypeInFunctionsNegative.js | 6 +- .../tsxCorrectlyParseLessThanComparison1.js | 6 +- .../baselines/reference/tsxDynamicTagName5.js | 6 +- .../baselines/reference/tsxDynamicTagName7.js | 6 +- .../baselines/reference/tsxDynamicTagName8.js | 6 +- .../baselines/reference/tsxDynamicTagName9.js | 6 +- .../reference/tsxExternalModuleEmit1.js | 12 +- .../tsxStatelessFunctionComponents2.js | 6 +- .../reference/tsxUnionTypeComponent1.js | 6 +- tests/baselines/reference/typeAssertions.js | 6 +- .../baselines/reference/typeGuardFunction.js | 6 +- .../reference/typeGuardFunctionErrors.js | 6 +- .../reference/typeGuardFunctionGenerics.js | 6 +- .../reference/typeGuardFunctionOfFormThis.js | 6 +- .../typeGuardFunctionOfFormThisErrors.js | 6 +- .../reference/typeGuardOfFormInstanceOf.js | 6 +- .../reference/typeGuardOfFormIsType.js | 6 +- .../reference/typeGuardOfFormThisMember.js | 6 +- .../typeGuardOfFormThisMemberErrors.js | 6 +- tests/baselines/reference/typeMatch2.js | 6 +- tests/baselines/reference/typeOfSuperCall.js | 6 +- .../reference/typeParameterAsBaseClass.js | 6 +- .../reference/typeParameterAsBaseType.js | 6 +- .../reference/typeParameterExtendingUnion1.js | 6 +- .../reference/typeParameterExtendingUnion2.js | 6 +- .../baselines/reference/typeRelationships.js | 6 +- .../baselines/reference/typeValueConflict1.js | 6 +- .../baselines/reference/typeValueConflict2.js | 6 +- tests/baselines/reference/typeofClass2.js | 6 +- .../typesWithSpecializedCallSignatures.js | 6 +- ...typesWithSpecializedConstructSignatures.js | 6 +- tests/baselines/reference/undeclaredBase.js | 6 +- .../undefinedIsSubtypeOfEverything.js | 6 +- .../baselines/reference/underscoreMapFirst.js | 6 +- .../underscoreThisInDerivedClass01.js | 6 +- .../underscoreThisInDerivedClass02.js | 6 +- .../reference/unionTypeEquivalence.js | 6 +- .../reference/unionTypeFromArrayLiteral.js | 6 +- .../reference/unionTypesAssignability.js | 6 +- tests/baselines/reference/unknownSymbols1.js | 6 +- .../reference/unspecializedConstraints.js | 6 +- ...untypedFunctionCallsWithTypeParameters1.js | 6 +- .../reference/unusedClassesinNamespace4.js | 6 +- .../unusedIdentifiersConsolidated1.js | 6 +- .../reference/validUseOfThisInSuper.js | 6 +- .../reference/varArgsOnConstructorTypes.js | 6 +- 666 files changed, 4006 insertions(+), 1326 deletions(-) diff --git a/src/compiler/transformers/es2015.ts b/src/compiler/transformers/es2015.ts index 5dc7870131656..fff52a8705e65 100644 --- a/src/compiler/transformers/es2015.ts +++ b/src/compiler/transformers/es2015.ts @@ -3338,7 +3338,11 @@ namespace ts { priority: 0, text: ` var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); };` diff --git a/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js b/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js index b15cd7f6eb73a..fb158c687ba69 100644 --- a/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js +++ b/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js @@ -22,7 +22,11 @@ module A { //// [ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js b/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js index 955adc728178e..ec67e66bd3f1b 100644 --- a/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js +++ b/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js @@ -26,7 +26,11 @@ module A { //// [ExportClassWithInaccessibleTypeInTypeParameterConstraint.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/abstractClassInLocalScope.js b/tests/baselines/reference/abstractClassInLocalScope.js index b413326e26a0b..8e16f9ccc2967 100644 --- a/tests/baselines/reference/abstractClassInLocalScope.js +++ b/tests/baselines/reference/abstractClassInLocalScope.js @@ -9,7 +9,11 @@ //// [abstractClassInLocalScope.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js b/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js index f143171b54c15..40eae697b445c 100644 --- a/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js +++ b/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js @@ -9,7 +9,11 @@ //// [abstractClassInLocalScopeIsAbstract.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/abstractProperty.js b/tests/baselines/reference/abstractProperty.js index 12735de42cb8f..900f7aebcdd55 100644 --- a/tests/baselines/reference/abstractProperty.js +++ b/tests/baselines/reference/abstractProperty.js @@ -23,7 +23,11 @@ class C extends B { //// [abstractProperty.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/abstractPropertyNegative.js b/tests/baselines/reference/abstractPropertyNegative.js index eaad20d1804d5..fa137057be457 100644 --- a/tests/baselines/reference/abstractPropertyNegative.js +++ b/tests/baselines/reference/abstractPropertyNegative.js @@ -45,7 +45,11 @@ abstract class AbstractAccessorMismatch { //// [abstractPropertyNegative.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/accessOverriddenBaseClassMember1.js b/tests/baselines/reference/accessOverriddenBaseClassMember1.js index 2d06be8df968c..b468f1307df1e 100644 --- a/tests/baselines/reference/accessOverriddenBaseClassMember1.js +++ b/tests/baselines/reference/accessOverriddenBaseClassMember1.js @@ -17,7 +17,11 @@ class ColoredPoint extends Point { //// [accessOverriddenBaseClassMember1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; 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 eddb75c2666e3..aacadd6589f9c 100644 --- a/tests/baselines/reference/accessors_spec_section-4.5_inference.js +++ b/tests/baselines/reference/accessors_spec_section-4.5_inference.js @@ -26,7 +26,11 @@ class LanguageSpec_section_4_5_inference { //// [accessors_spec_section-4.5_inference.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInAccessorsOfClass.js b/tests/baselines/reference/aliasUsageInAccessorsOfClass.js index 817e589d99529..df8662ac8cf3b 100644 --- a/tests/baselines/reference/aliasUsageInAccessorsOfClass.js +++ b/tests/baselines/reference/aliasUsageInAccessorsOfClass.js @@ -38,7 +38,11 @@ exports.Model = Model; //// [aliasUsage1_moduleA.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInArray.js b/tests/baselines/reference/aliasUsageInArray.js index e0d30fb608b55..a8606050394f8 100644 --- a/tests/baselines/reference/aliasUsageInArray.js +++ b/tests/baselines/reference/aliasUsageInArray.js @@ -32,7 +32,11 @@ exports.Model = Model; //// [aliasUsageInArray_moduleA.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInFunctionExpression.js b/tests/baselines/reference/aliasUsageInFunctionExpression.js index 35bf66fed0246..2ce51261eaa77 100644 --- a/tests/baselines/reference/aliasUsageInFunctionExpression.js +++ b/tests/baselines/reference/aliasUsageInFunctionExpression.js @@ -31,7 +31,11 @@ exports.Model = Model; //// [aliasUsageInFunctionExpression_moduleA.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInGenericFunction.js b/tests/baselines/reference/aliasUsageInGenericFunction.js index 373aa0c3b4044..8e69665b03cf6 100644 --- a/tests/baselines/reference/aliasUsageInGenericFunction.js +++ b/tests/baselines/reference/aliasUsageInGenericFunction.js @@ -35,7 +35,11 @@ exports.Model = Model; //// [aliasUsageInGenericFunction_moduleA.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInIndexerOfClass.js b/tests/baselines/reference/aliasUsageInIndexerOfClass.js index 9769a4b005f81..cf96549def6a8 100644 --- a/tests/baselines/reference/aliasUsageInIndexerOfClass.js +++ b/tests/baselines/reference/aliasUsageInIndexerOfClass.js @@ -37,7 +37,11 @@ exports.Model = Model; //// [aliasUsageInIndexerOfClass_moduleA.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInObjectLiteral.js b/tests/baselines/reference/aliasUsageInObjectLiteral.js index 2f4abf75161b3..d660bf2db67cd 100644 --- a/tests/baselines/reference/aliasUsageInObjectLiteral.js +++ b/tests/baselines/reference/aliasUsageInObjectLiteral.js @@ -32,7 +32,11 @@ exports.Model = Model; //// [aliasUsageInObjectLiteral_moduleA.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInOrExpression.js b/tests/baselines/reference/aliasUsageInOrExpression.js index c4902a1b8942d..e81917ed8a326 100644 --- a/tests/baselines/reference/aliasUsageInOrExpression.js +++ b/tests/baselines/reference/aliasUsageInOrExpression.js @@ -35,7 +35,11 @@ exports.Model = Model; //// [aliasUsageInOrExpression_moduleA.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js b/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js index c79f820b106ce..ee4a62008b156 100644 --- a/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js +++ b/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js @@ -35,7 +35,11 @@ exports.Model = Model; //// [aliasUsageInTypeArgumentOfExtendsClause_moduleA.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -51,7 +55,11 @@ exports.VisualizationModel = VisualizationModel; //// [aliasUsageInTypeArgumentOfExtendsClause_main.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInVarAssignment.js b/tests/baselines/reference/aliasUsageInVarAssignment.js index 87c41811d4a9c..83c9bf080be38 100644 --- a/tests/baselines/reference/aliasUsageInVarAssignment.js +++ b/tests/baselines/reference/aliasUsageInVarAssignment.js @@ -31,7 +31,11 @@ exports.Model = Model; //// [aliasUsageInVarAssignment_moduleA.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/ambiguousOverloadResolution.js b/tests/baselines/reference/ambiguousOverloadResolution.js index 9b141141862f0..319d3a75d01e2 100644 --- a/tests/baselines/reference/ambiguousOverloadResolution.js +++ b/tests/baselines/reference/ambiguousOverloadResolution.js @@ -10,7 +10,11 @@ var t: number = f(x, x); // Not an error //// [ambiguousOverloadResolution.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/apparentTypeSubtyping.js b/tests/baselines/reference/apparentTypeSubtyping.js index dc30b51a4488c..8cc81a46cd71a 100644 --- a/tests/baselines/reference/apparentTypeSubtyping.js +++ b/tests/baselines/reference/apparentTypeSubtyping.js @@ -25,7 +25,11 @@ 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 (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/apparentTypeSupertype.js b/tests/baselines/reference/apparentTypeSupertype.js index bb002a9798d7a..ba5d63e357903 100644 --- a/tests/baselines/reference/apparentTypeSupertype.js +++ b/tests/baselines/reference/apparentTypeSupertype.js @@ -15,7 +15,11 @@ 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 (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/arrayAssignmentTest1.js b/tests/baselines/reference/arrayAssignmentTest1.js index 410fb80b3233f..ac8ada2d86f1f 100644 --- a/tests/baselines/reference/arrayAssignmentTest1.js +++ b/tests/baselines/reference/arrayAssignmentTest1.js @@ -87,7 +87,11 @@ arr_any = i1; // should be an error - is //// [arrayAssignmentTest1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/arrayAssignmentTest2.js b/tests/baselines/reference/arrayAssignmentTest2.js index e051b8187cf28..a112a5a7a908c 100644 --- a/tests/baselines/reference/arrayAssignmentTest2.js +++ b/tests/baselines/reference/arrayAssignmentTest2.js @@ -61,7 +61,11 @@ arr_any = i1; // should be an error - is //// [arrayAssignmentTest2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/arrayBestCommonTypes.js b/tests/baselines/reference/arrayBestCommonTypes.js index acaa6c76ffc7d..9ce41a2563aab 100644 --- a/tests/baselines/reference/arrayBestCommonTypes.js +++ b/tests/baselines/reference/arrayBestCommonTypes.js @@ -109,7 +109,11 @@ module NonEmptyTypes { //// [arrayBestCommonTypes.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/arrayLiteralTypeInference.js b/tests/baselines/reference/arrayLiteralTypeInference.js index d836e0afe1d71..a14277c795b68 100644 --- a/tests/baselines/reference/arrayLiteralTypeInference.js +++ b/tests/baselines/reference/arrayLiteralTypeInference.js @@ -53,7 +53,11 @@ var z3: { id: number }[] = //// [arrayLiteralTypeInference.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/arrayLiterals.js b/tests/baselines/reference/arrayLiterals.js index 5e57d827c72be..1e5dcd2e45e8c 100644 --- a/tests/baselines/reference/arrayLiterals.js +++ b/tests/baselines/reference/arrayLiterals.js @@ -39,7 +39,11 @@ var context4: Base[] = [new Derived1(), new Derived1()]; //// [arrayLiterals.js] // Empty array literal with no contextual type has type Undefined[] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js b/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js index 5b8237c25568d..e6e097c8b44d2 100644 --- a/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js +++ b/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js @@ -27,7 +27,11 @@ var as = [list, myDerivedList]; // List[] //// [arrayLiteralsWithRecursiveGenerics.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js b/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js index 6fecfadd07bf4..701811e33de63 100644 --- a/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js +++ b/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js @@ -21,7 +21,11 @@ rrb = cra; // error: 'A' is not assignable to 'B' //// [arrayOfSubtypeIsAssignableToReadonlyArray.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/arrowFunctionContexts.js b/tests/baselines/reference/arrowFunctionContexts.js index 7075cdc0a58b1..e425ebf93377e 100644 --- a/tests/baselines/reference/arrowFunctionContexts.js +++ b/tests/baselines/reference/arrowFunctionContexts.js @@ -98,7 +98,11 @@ var asserted2: any; //// [arrowFunctionContexts.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures3.js b/tests/baselines/reference/assignmentCompatWithCallSignatures3.js index d4761781bd360..f241b28597da1 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures3.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures3.js @@ -102,7 +102,11 @@ b18 = a18; // ok //// [assignmentCompatWithCallSignatures3.js] // these are all permitted with the current rules, since we do not do contextual signature instantiation var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures4.js b/tests/baselines/reference/assignmentCompatWithCallSignatures4.js index 1a3d939ba234e..eade43f4dc8a8 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures4.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures4.js @@ -101,7 +101,11 @@ module Errors { //// [assignmentCompatWithCallSignatures4.js] // These are mostly permitted with the current loose rules. All ok unless otherwise noted. var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures5.js b/tests/baselines/reference/assignmentCompatWithCallSignatures5.js index 8d33f3565bf6b..36a024cbd3fbb 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures5.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures5.js @@ -68,7 +68,11 @@ b18 = a18; // ok //// [assignmentCompatWithCallSignatures5.js] // checking assignment compat for function types. No errors in this file var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures6.js b/tests/baselines/reference/assignmentCompatWithCallSignatures6.js index 5949ad582fab7..eb727863c77d9 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures6.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures6.js @@ -45,7 +45,11 @@ b16 = x.a16; //// [assignmentCompatWithCallSignatures6.js] // checking assignment compatibility relations for function types. All valid var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js index 97da2c5884895..bff2b84f273d6 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js @@ -102,7 +102,11 @@ b18 = a18; // ok //// [assignmentCompatWithConstructSignatures3.js] // checking assignment compatibility relations for function types. All of these are valid. var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js index 44e9c8e8a36b4..8aefc846d9b0f 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js @@ -101,7 +101,11 @@ module Errors { //// [assignmentCompatWithConstructSignatures4.js] // checking assignment compatibility relations for function types. var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js index a80ece9d4d51a..b21074b8ff34b 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js @@ -68,7 +68,11 @@ b18 = a18; // ok //// [assignmentCompatWithConstructSignatures5.js] // checking assignment compat for function types. All valid var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js index ea5c5c61e3bce..95f585e892969 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js @@ -45,7 +45,11 @@ b16 = x.a16; //// [assignmentCompatWithConstructSignatures6.js] // checking assignment compatibility relations for function types. All valid. var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer.js b/tests/baselines/reference/assignmentCompatWithNumericIndexer.js index f5ec41091e09e..05dce80507d8b 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer.js +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer.js @@ -46,7 +46,11 @@ module Generics { //// [assignmentCompatWithNumericIndexer.js] // Derived type indexer must be subtype of base type indexer var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js b/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js index c6e262c444617..7785aa2b01f4f 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js @@ -43,7 +43,11 @@ module Generics { //// [assignmentCompatWithNumericIndexer3.js] // Derived type indexer must be subtype of base type indexer var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers4.js b/tests/baselines/reference/assignmentCompatWithObjectMembers4.js index b7ff16e11fc6a..dbc0612153f95 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers4.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers4.js @@ -94,7 +94,11 @@ module WithBase { //// [assignmentCompatWithObjectMembers4.js] // members N and M of types S and T have the same name, same accessibility, same optionality, and N is not assignable M var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js index b5148d063a797..fcbea350773b9 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js @@ -91,7 +91,11 @@ module SourceHasOptional { //// [assignmentCompatWithObjectMembersOptionality.js] // Derived member is not optional but base member is, should be ok var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js index 4b22c46979174..91f212c9fd9e6 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js @@ -93,7 +93,11 @@ module SourceHasOptional { // M is optional and S contains no property with the same name as M // N is optional and T contains no property with the same name as N var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithStringIndexer.js b/tests/baselines/reference/assignmentCompatWithStringIndexer.js index b319af595cd37..a0fb08df8d2c9 100644 --- a/tests/baselines/reference/assignmentCompatWithStringIndexer.js +++ b/tests/baselines/reference/assignmentCompatWithStringIndexer.js @@ -56,7 +56,11 @@ module Generics { //// [assignmentCompatWithStringIndexer.js] // index signatures must be compatible in assignments var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentLHSIsValue.js b/tests/baselines/reference/assignmentLHSIsValue.js index add2c59e15f75..e4fa0fcc6b7bf 100644 --- a/tests/baselines/reference/assignmentLHSIsValue.js +++ b/tests/baselines/reference/assignmentLHSIsValue.js @@ -72,7 +72,11 @@ foo() = value; //// [assignmentLHSIsValue.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/asyncImportedPromise_es5.js b/tests/baselines/reference/asyncImportedPromise_es5.js index f13b4f962c73e..a90d4254c6166 100644 --- a/tests/baselines/reference/asyncImportedPromise_es5.js +++ b/tests/baselines/reference/asyncImportedPromise_es5.js @@ -12,7 +12,11 @@ class Test { //// [task.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/autolift4.js b/tests/baselines/reference/autolift4.js index 5d27475ba42d7..d516e1e9b7b68 100644 --- a/tests/baselines/reference/autolift4.js +++ b/tests/baselines/reference/autolift4.js @@ -25,7 +25,11 @@ class Point3D extends Point { //// [autolift4.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/baseCheck.js b/tests/baselines/reference/baseCheck.js index 80271d13e83e8..9684189d565be 100644 --- a/tests/baselines/reference/baseCheck.js +++ b/tests/baselines/reference/baseCheck.js @@ -31,7 +31,11 @@ function f() { //// [baseCheck.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/baseIndexSignatureResolution.js b/tests/baselines/reference/baseIndexSignatureResolution.js index bd6dd5a40e81e..b1cb7c05ffc30 100644 --- a/tests/baselines/reference/baseIndexSignatureResolution.js +++ b/tests/baselines/reference/baseIndexSignatureResolution.js @@ -26,7 +26,11 @@ var z: Derived = b.foo(); //// [baseIndexSignatureResolution.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/baseTypeOrderChecking.js b/tests/baselines/reference/baseTypeOrderChecking.js index 1c87fb1dd5d44..5f7f6550ab927 100644 --- a/tests/baselines/reference/baseTypeOrderChecking.js +++ b/tests/baselines/reference/baseTypeOrderChecking.js @@ -38,7 +38,11 @@ class Class4 extends Class3 //// [baseTypeOrderChecking.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/baseTypeWrappingInstantiationChain.js b/tests/baselines/reference/baseTypeWrappingInstantiationChain.js index cc6c091b6c799..822c9584e1f81 100644 --- a/tests/baselines/reference/baseTypeWrappingInstantiationChain.js +++ b/tests/baselines/reference/baseTypeWrappingInstantiationChain.js @@ -29,7 +29,11 @@ class C extends CBase { //// [baseTypeWrappingInstantiationChain.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/bases.js b/tests/baselines/reference/bases.js index f23750c439127..e45b934f1ade8 100644 --- a/tests/baselines/reference/bases.js +++ b/tests/baselines/reference/bases.js @@ -22,7 +22,11 @@ new C().y; //// [bases.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js index 755c3f4ab8448..c5e124e638a7d 100644 --- a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js +++ b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js @@ -30,7 +30,11 @@ 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 (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js index 796706dd248e4..1390eeb5a5dc4 100644 --- a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js +++ b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js @@ -28,7 +28,11 @@ 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 (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/bestCommonTypeOfTuple2.js b/tests/baselines/reference/bestCommonTypeOfTuple2.js index 1bd3ac45bccd1..17c9242e6aa78 100644 --- a/tests/baselines/reference/bestCommonTypeOfTuple2.js +++ b/tests/baselines/reference/bestCommonTypeOfTuple2.js @@ -24,7 +24,11 @@ var e51 = t5[2]; // {} //// [bestCommonTypeOfTuple2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js index 3c581096d6bbb..3d7d1167db531 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js @@ -72,7 +72,11 @@ interface I extends A { //// [callSignatureAssignabilityInInheritance2.js] // checking subtype relations for function types as it relates to contextual signature instantiation var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js index 909a9bbb8cbb2..8674a9def64c7 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js @@ -117,7 +117,11 @@ module Errors { // checking subtype relations for function types as it relates to contextual signature instantiation // error cases var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js index d42769a1e6717..3173b6bd6615f 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js @@ -52,7 +52,11 @@ interface I extends A { //// [callSignatureAssignabilityInInheritance4.js] // checking subtype relations for function types as it relates to contextual signature instantiation var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js index 94f5fecd2f8e5..b1c387fb3e7a3 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js @@ -52,7 +52,11 @@ interface I extends B { // checking subtype relations for function types as it relates to contextual signature instantiation // same as subtypingWithCallSignatures2 just with an extra level of indirection in the inheritance chain var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js index b73ed7070d8b3..1b7688262cb40 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js @@ -55,7 +55,11 @@ 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 (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/callWithSpread.js b/tests/baselines/reference/callWithSpread.js index 2bce24e46374e..c5d6bbf2401d8 100644 --- a/tests/baselines/reference/callWithSpread.js +++ b/tests/baselines/reference/callWithSpread.js @@ -60,7 +60,11 @@ class D extends C { //// [callWithSpread.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/captureThisInSuperCall.js b/tests/baselines/reference/captureThisInSuperCall.js index 1a1d5562531be..062d50e8ad95d 100644 --- a/tests/baselines/reference/captureThisInSuperCall.js +++ b/tests/baselines/reference/captureThisInSuperCall.js @@ -10,7 +10,11 @@ class B extends A { //// [captureThisInSuperCall.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/castingTuple.js b/tests/baselines/reference/castingTuple.js index 331a61a6f78bb..4b45f444f5449 100644 --- a/tests/baselines/reference/castingTuple.js +++ b/tests/baselines/reference/castingTuple.js @@ -34,7 +34,11 @@ t4[2] = 10; //// [castingTuple.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/chainedAssignment3.js b/tests/baselines/reference/chainedAssignment3.js index 3bfe61f2664d0..6c8453c23488d 100644 --- a/tests/baselines/reference/chainedAssignment3.js +++ b/tests/baselines/reference/chainedAssignment3.js @@ -24,7 +24,11 @@ a = b = new A(); //// [chainedAssignment3.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js index 59a4b8b12ce7d..769f74d39ae04 100644 --- a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js +++ b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js @@ -21,7 +21,11 @@ class C extends B { //// [chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkForObjectTooStrict.js b/tests/baselines/reference/checkForObjectTooStrict.js index 80f12196d0d03..cd65885b1522f 100644 --- a/tests/baselines/reference/checkForObjectTooStrict.js +++ b/tests/baselines/reference/checkForObjectTooStrict.js @@ -33,7 +33,11 @@ class Baz extends Object { //// [checkForObjectTooStrict.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js index 006bdbf356f74..fece927ea9c8b 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js @@ -12,7 +12,11 @@ class Derived extends Based { //// [checkSuperCallBeforeThisAccessing1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js index 5c35d42ca4f0f..143514be551f9 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js @@ -12,7 +12,11 @@ class Derived extends Based { //// [checkSuperCallBeforeThisAccessing2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js index 16b8181ac5d29..a080d62434fdd 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js @@ -17,7 +17,11 @@ class Derived extends Based { //// [checkSuperCallBeforeThisAccessing3.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js index 9ac1fdaaa21e7..2309600b2b814 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js @@ -21,7 +21,11 @@ class Derived extends Based { //// [checkSuperCallBeforeThisAccessing4.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js index 6f8d758916338..cc3838fd40d87 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js @@ -9,7 +9,11 @@ class Derived extends Based { //// [checkSuperCallBeforeThisAccessing5.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js index 415bbb065016d..e6183330d97e8 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js @@ -12,7 +12,11 @@ class Super extends Base { //// [checkSuperCallBeforeThisAccessing6.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js index 39eea670c57ce..3040a118a757e 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js @@ -11,7 +11,11 @@ class Super extends Base { //// [checkSuperCallBeforeThisAccessing7.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js index ff1801d1f9356..899128b6836b2 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js @@ -12,7 +12,11 @@ class Super extends Base { //// [checkSuperCallBeforeThisAccessing8.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/circularImportAlias.js b/tests/baselines/reference/circularImportAlias.js index 49e1124b46710..6f2d3213aeb2c 100644 --- a/tests/baselines/reference/circularImportAlias.js +++ b/tests/baselines/reference/circularImportAlias.js @@ -22,7 +22,11 @@ var c = new B.a.C(); //// [circularImportAlias.js] // expected no error var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/circularTypeofWithFunctionModule.js b/tests/baselines/reference/circularTypeofWithFunctionModule.js index aa2987725bdfa..92403f0cb6b65 100644 --- a/tests/baselines/reference/circularTypeofWithFunctionModule.js +++ b/tests/baselines/reference/circularTypeofWithFunctionModule.js @@ -15,7 +15,11 @@ namespace maker { //// [circularTypeofWithFunctionModule.js] // Repro from #6072 var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractConstructorAssignability.js b/tests/baselines/reference/classAbstractConstructorAssignability.js index 20f3de041be60..704ff554a008c 100644 --- a/tests/baselines/reference/classAbstractConstructorAssignability.js +++ b/tests/baselines/reference/classAbstractConstructorAssignability.js @@ -16,7 +16,11 @@ new CC; //// [classAbstractConstructorAssignability.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractCrashedOnce.js b/tests/baselines/reference/classAbstractCrashedOnce.js index 2037dbbc64fe9..107d827436977 100644 --- a/tests/baselines/reference/classAbstractCrashedOnce.js +++ b/tests/baselines/reference/classAbstractCrashedOnce.js @@ -12,7 +12,11 @@ var x = new bar(); //// [classAbstractCrashedOnce.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractExtends.js b/tests/baselines/reference/classAbstractExtends.js index d7e9a04d189a9..f9fa0ba2b3242 100644 --- a/tests/baselines/reference/classAbstractExtends.js +++ b/tests/baselines/reference/classAbstractExtends.js @@ -18,7 +18,11 @@ class E extends B { //// [classAbstractExtends.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractFactoryFunction.js b/tests/baselines/reference/classAbstractFactoryFunction.js index 71850654425b8..addb71da71712 100644 --- a/tests/baselines/reference/classAbstractFactoryFunction.js +++ b/tests/baselines/reference/classAbstractFactoryFunction.js @@ -19,7 +19,11 @@ NewB(B); //// [classAbstractFactoryFunction.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractGeneric.js b/tests/baselines/reference/classAbstractGeneric.js index e5f5598c14c97..486fe97f83820 100644 --- a/tests/baselines/reference/classAbstractGeneric.js +++ b/tests/baselines/reference/classAbstractGeneric.js @@ -27,7 +27,11 @@ class G extends A { //// [classAbstractGeneric.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractInAModule.js b/tests/baselines/reference/classAbstractInAModule.js index 5ff60d21ca9c3..4681a422c8d2b 100644 --- a/tests/baselines/reference/classAbstractInAModule.js +++ b/tests/baselines/reference/classAbstractInAModule.js @@ -9,7 +9,11 @@ new M.B; //// [classAbstractInAModule.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractInheritance.js b/tests/baselines/reference/classAbstractInheritance.js index 90d8216647a1e..ebaef77181a5e 100644 --- a/tests/baselines/reference/classAbstractInheritance.js +++ b/tests/baselines/reference/classAbstractInheritance.js @@ -23,7 +23,11 @@ abstract class GG extends CC {} //// [classAbstractInheritance.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractInstantiations1.js b/tests/baselines/reference/classAbstractInstantiations1.js index 4c6ed144e0bcd..96a0c1207be71 100644 --- a/tests/baselines/reference/classAbstractInstantiations1.js +++ b/tests/baselines/reference/classAbstractInstantiations1.js @@ -29,7 +29,11 @@ c = new B; // Calling new with (non)abstract classes. // var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractInstantiations2.js b/tests/baselines/reference/classAbstractInstantiations2.js index e5b678ee715e9..3b93e78aebd0c 100644 --- a/tests/baselines/reference/classAbstractInstantiations2.js +++ b/tests/baselines/reference/classAbstractInstantiations2.js @@ -53,7 +53,11 @@ class H { // error -- not declared abstract //// [classAbstractInstantiations2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractOverrideWithAbstract.js b/tests/baselines/reference/classAbstractOverrideWithAbstract.js index 0cf9c039b3559..59cd1186ef9d9 100644 --- a/tests/baselines/reference/classAbstractOverrideWithAbstract.js +++ b/tests/baselines/reference/classAbstractOverrideWithAbstract.js @@ -25,7 +25,11 @@ class DD extends BB { //// [classAbstractOverrideWithAbstract.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractSuperCalls.js b/tests/baselines/reference/classAbstractSuperCalls.js index 30c33822be961..c63b2673713bc 100644 --- a/tests/baselines/reference/classAbstractSuperCalls.js +++ b/tests/baselines/reference/classAbstractSuperCalls.js @@ -29,7 +29,11 @@ abstract class BB extends AA { //// [classAbstractSuperCalls.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractUsingAbstractMethod1.js b/tests/baselines/reference/classAbstractUsingAbstractMethod1.js index 5aa616dcb7c30..421f3278489d7 100644 --- a/tests/baselines/reference/classAbstractUsingAbstractMethod1.js +++ b/tests/baselines/reference/classAbstractUsingAbstractMethod1.js @@ -19,7 +19,11 @@ a.foo(); //// [classAbstractUsingAbstractMethod1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractUsingAbstractMethods2.js b/tests/baselines/reference/classAbstractUsingAbstractMethods2.js index 56aa39377729e..397d5a3a411e1 100644 --- a/tests/baselines/reference/classAbstractUsingAbstractMethods2.js +++ b/tests/baselines/reference/classAbstractUsingAbstractMethods2.js @@ -29,7 +29,11 @@ class DD extends AA { //// [classAbstractUsingAbstractMethods2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classConstructorAccessibility2.js b/tests/baselines/reference/classConstructorAccessibility2.js index eeff60323b7e6..6cbf33cddffc8 100644 --- a/tests/baselines/reference/classConstructorAccessibility2.js +++ b/tests/baselines/reference/classConstructorAccessibility2.js @@ -48,7 +48,11 @@ var dc = new DerivedC(1); //// [classConstructorAccessibility2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classConstructorAccessibility4.js b/tests/baselines/reference/classConstructorAccessibility4.js index 199383b6a71c4..61ce64ef19bde 100644 --- a/tests/baselines/reference/classConstructorAccessibility4.js +++ b/tests/baselines/reference/classConstructorAccessibility4.js @@ -32,7 +32,11 @@ class D { //// [classConstructorAccessibility4.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classConstructorAccessibility5.js b/tests/baselines/reference/classConstructorAccessibility5.js index cb01b23378117..8d0f9ad40699d 100644 --- a/tests/baselines/reference/classConstructorAccessibility5.js +++ b/tests/baselines/reference/classConstructorAccessibility5.js @@ -13,7 +13,11 @@ class Unrelated { //// [classConstructorAccessibility5.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classConstructorParametersAccessibility.js b/tests/baselines/reference/classConstructorParametersAccessibility.js index 4b086a854a133..2433a6d39347c 100644 --- a/tests/baselines/reference/classConstructorParametersAccessibility.js +++ b/tests/baselines/reference/classConstructorParametersAccessibility.js @@ -28,7 +28,11 @@ class Derived extends C3 { //// [classConstructorParametersAccessibility.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classConstructorParametersAccessibility2.js b/tests/baselines/reference/classConstructorParametersAccessibility2.js index 244b56dddc092..b29e3f0650376 100644 --- a/tests/baselines/reference/classConstructorParametersAccessibility2.js +++ b/tests/baselines/reference/classConstructorParametersAccessibility2.js @@ -28,7 +28,11 @@ class Derived extends C3 { //// [classConstructorParametersAccessibility2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classConstructorParametersAccessibility3.js b/tests/baselines/reference/classConstructorParametersAccessibility3.js index ef3e6d5b4bdde..10031b9c74e02 100644 --- a/tests/baselines/reference/classConstructorParametersAccessibility3.js +++ b/tests/baselines/reference/classConstructorParametersAccessibility3.js @@ -15,7 +15,11 @@ d.p; // public, OK //// [classConstructorParametersAccessibility3.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js b/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js index 1fa51632ba7c1..1521745f9510b 100644 --- a/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js +++ b/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js @@ -13,7 +13,11 @@ module M { //// [classDeclarationMergedInModuleWithContinuation.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classDeclaredBeforeClassFactory.js b/tests/baselines/reference/classDeclaredBeforeClassFactory.js index c30c913a0104f..24df98a089f40 100644 --- a/tests/baselines/reference/classDeclaredBeforeClassFactory.js +++ b/tests/baselines/reference/classDeclaredBeforeClassFactory.js @@ -9,7 +9,11 @@ function makeBaseClass() { //// [classDeclaredBeforeClassFactory.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classDoesNotDependOnBaseTypes.js b/tests/baselines/reference/classDoesNotDependOnBaseTypes.js index e195506c29420..88a1ab19d141b 100644 --- a/tests/baselines/reference/classDoesNotDependOnBaseTypes.js +++ b/tests/baselines/reference/classDoesNotDependOnBaseTypes.js @@ -14,7 +14,11 @@ class StringTreeCollection extends StringTreeCollectionBase { } //// [classDoesNotDependOnBaseTypes.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExpression2.js b/tests/baselines/reference/classExpression2.js index 7e78007badcf6..86d4509310de4 100644 --- a/tests/baselines/reference/classExpression2.js +++ b/tests/baselines/reference/classExpression2.js @@ -4,7 +4,11 @@ var v = class C extends D {}; //// [classExpression2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExpression3.js b/tests/baselines/reference/classExpression3.js index 9c29f35cd19ee..0d999b57a1a48 100644 --- a/tests/baselines/reference/classExpression3.js +++ b/tests/baselines/reference/classExpression3.js @@ -8,7 +8,11 @@ c.c; //// [classExpression3.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExpressionExtendingAbstractClass.js b/tests/baselines/reference/classExpressionExtendingAbstractClass.js index 3031f69117aeb..3c9db5e28ac3a 100644 --- a/tests/baselines/reference/classExpressionExtendingAbstractClass.js +++ b/tests/baselines/reference/classExpressionExtendingAbstractClass.js @@ -10,7 +10,11 @@ var C = class extends A { // no error reported! //// [classExpressionExtendingAbstractClass.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingBuiltinType.js b/tests/baselines/reference/classExtendingBuiltinType.js index c0988a01296d7..d2be7a12da2a6 100644 --- a/tests/baselines/reference/classExtendingBuiltinType.js +++ b/tests/baselines/reference/classExtendingBuiltinType.js @@ -13,7 +13,11 @@ class C10 extends Array { } //// [classExtendingBuiltinType.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingClass.js b/tests/baselines/reference/classExtendingClass.js index 5b5a1386322d0..a81efb38bd037 100644 --- a/tests/baselines/reference/classExtendingClass.js +++ b/tests/baselines/reference/classExtendingClass.js @@ -33,7 +33,11 @@ var r8 = D2.other(1); //// [classExtendingClass.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingClassLikeType.js b/tests/baselines/reference/classExtendingClassLikeType.js index 1d16866904e78..7760490a2442b 100644 --- a/tests/baselines/reference/classExtendingClassLikeType.js +++ b/tests/baselines/reference/classExtendingClassLikeType.js @@ -60,7 +60,11 @@ class D5 extends getBadBase() { //// [classExtendingClassLikeType.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingNonConstructor.js b/tests/baselines/reference/classExtendingNonConstructor.js index 74070c3bc0ccc..d14663b4edcb5 100644 --- a/tests/baselines/reference/classExtendingNonConstructor.js +++ b/tests/baselines/reference/classExtendingNonConstructor.js @@ -16,7 +16,11 @@ class C7 extends foo { } //// [classExtendingNonConstructor.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingNull.js b/tests/baselines/reference/classExtendingNull.js index 3a227b564e901..9ce3714c1bd2b 100644 --- a/tests/baselines/reference/classExtendingNull.js +++ b/tests/baselines/reference/classExtendingNull.js @@ -5,7 +5,11 @@ class C2 extends (null) { } //// [classExtendingNull.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingPrimitive.js b/tests/baselines/reference/classExtendingPrimitive.js index 04fd2d57e5210..9e1a855379cac 100644 --- a/tests/baselines/reference/classExtendingPrimitive.js +++ b/tests/baselines/reference/classExtendingPrimitive.js @@ -17,7 +17,11 @@ class C8 extends E { } //// [classExtendingPrimitive.js] // classes cannot extend primitives var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingPrimitive2.js b/tests/baselines/reference/classExtendingPrimitive2.js index a85bcb21f0951..ff7f19fc68d76 100644 --- a/tests/baselines/reference/classExtendingPrimitive2.js +++ b/tests/baselines/reference/classExtendingPrimitive2.js @@ -7,7 +7,11 @@ class C5a extends null { } //// [classExtendingPrimitive2.js] // classes cannot extend primitives var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingQualifiedName.js b/tests/baselines/reference/classExtendingQualifiedName.js index 6c2d5b6c2e468..9a7d4551cf3a2 100644 --- a/tests/baselines/reference/classExtendingQualifiedName.js +++ b/tests/baselines/reference/classExtendingQualifiedName.js @@ -9,7 +9,11 @@ module M { //// [classExtendingQualifiedName.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingQualifiedName2.js b/tests/baselines/reference/classExtendingQualifiedName2.js index 946a7604ca4a6..adf590b680425 100644 --- a/tests/baselines/reference/classExtendingQualifiedName2.js +++ b/tests/baselines/reference/classExtendingQualifiedName2.js @@ -9,7 +9,11 @@ module M { //// [classExtendingQualifiedName2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsAcrossFiles.js b/tests/baselines/reference/classExtendsAcrossFiles.js index 0fa873d378f9c..4559814254932 100644 --- a/tests/baselines/reference/classExtendsAcrossFiles.js +++ b/tests/baselines/reference/classExtendsAcrossFiles.js @@ -22,7 +22,11 @@ export const b = { //// [b.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -47,7 +51,11 @@ exports.b = { //// [a.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js b/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js index b164b77d31954..187108fcf5465 100644 --- a/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js +++ b/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js @@ -15,7 +15,11 @@ module Foo { //// [classExtendsClauseClassMergedWithModuleNotReferingConstructor.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.js b/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.js index 619d1488ff813..4d63c45f2c9cb 100644 --- a/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.js +++ b/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.js @@ -8,7 +8,11 @@ module Foo { //// [classExtendsClauseClassNotReferringConstructor.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsEveryObjectType.js b/tests/baselines/reference/classExtendsEveryObjectType.js index 044ef0fca514f..e5b5651153c5d 100644 --- a/tests/baselines/reference/classExtendsEveryObjectType.js +++ b/tests/baselines/reference/classExtendsEveryObjectType.js @@ -18,7 +18,11 @@ class C6 extends []{ } // error //// [classExtendsEveryObjectType.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsEveryObjectType2.js b/tests/baselines/reference/classExtendsEveryObjectType2.js index 88929e72c57f1..9e935e789e4bc 100644 --- a/tests/baselines/reference/classExtendsEveryObjectType2.js +++ b/tests/baselines/reference/classExtendsEveryObjectType2.js @@ -5,7 +5,11 @@ class C6 extends []{ } // error //// [classExtendsEveryObjectType2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsInterface.js b/tests/baselines/reference/classExtendsInterface.js index 1005ccbdd3f73..6816708202126 100644 --- a/tests/baselines/reference/classExtendsInterface.js +++ b/tests/baselines/reference/classExtendsInterface.js @@ -10,7 +10,11 @@ class B2 implements Comparable2 {} //// [classExtendsInterface.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsInterfaceInExpression.js b/tests/baselines/reference/classExtendsInterfaceInExpression.js index 511d22e93f147..fa433e139c7a6 100644 --- a/tests/baselines/reference/classExtendsInterfaceInExpression.js +++ b/tests/baselines/reference/classExtendsInterfaceInExpression.js @@ -10,7 +10,11 @@ class C extends factory(A) {} //// [classExtendsInterfaceInExpression.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsInterfaceInModule.js b/tests/baselines/reference/classExtendsInterfaceInModule.js index a3034d59df726..933c5162477cb 100644 --- a/tests/baselines/reference/classExtendsInterfaceInModule.js +++ b/tests/baselines/reference/classExtendsInterfaceInModule.js @@ -17,7 +17,11 @@ class D extends Mod.Nested.I {} //// [classExtendsInterfaceInModule.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsItself.js b/tests/baselines/reference/classExtendsItself.js index ad4ce10cfc666..e13cd6dee6e81 100644 --- a/tests/baselines/reference/classExtendsItself.js +++ b/tests/baselines/reference/classExtendsItself.js @@ -7,7 +7,11 @@ class E extends E { } // error //// [classExtendsItself.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsItselfIndirectly.js b/tests/baselines/reference/classExtendsItselfIndirectly.js index dfbfb7720fa4e..bef7ca9f8cfbb 100644 --- a/tests/baselines/reference/classExtendsItselfIndirectly.js +++ b/tests/baselines/reference/classExtendsItselfIndirectly.js @@ -13,7 +13,11 @@ class E2 extends D2 { baz: T; } //// [classExtendsItselfIndirectly.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsItselfIndirectly2.js b/tests/baselines/reference/classExtendsItselfIndirectly2.js index 6751b19335d75..e9df1ddf908d7 100644 --- a/tests/baselines/reference/classExtendsItselfIndirectly2.js +++ b/tests/baselines/reference/classExtendsItselfIndirectly2.js @@ -24,7 +24,11 @@ module O { //// [classExtendsItselfIndirectly2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsItselfIndirectly3.js b/tests/baselines/reference/classExtendsItselfIndirectly3.js index 750e5ddfd1ce4..a324fa1ce724d 100644 --- a/tests/baselines/reference/classExtendsItselfIndirectly3.js +++ b/tests/baselines/reference/classExtendsItselfIndirectly3.js @@ -20,7 +20,11 @@ class E2 extends D2 { baz: T; } //// [classExtendsItselfIndirectly_file1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -33,7 +37,11 @@ var C = (function (_super) { }(E)); // error //// [classExtendsItselfIndirectly_file2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -46,7 +54,11 @@ var D = (function (_super) { }(C)); //// [classExtendsItselfIndirectly_file3.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -59,7 +71,11 @@ var E = (function (_super) { }(D)); //// [classExtendsItselfIndirectly_file4.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -72,7 +88,11 @@ var C2 = (function (_super) { }(E2)); // error //// [classExtendsItselfIndirectly_file5.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -85,7 +105,11 @@ var D2 = (function (_super) { }(C2)); //// [classExtendsItselfIndirectly_file6.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsMultipleBaseClasses.js b/tests/baselines/reference/classExtendsMultipleBaseClasses.js index 6cb987186c4b1..7cef2b247ccc3 100644 --- a/tests/baselines/reference/classExtendsMultipleBaseClasses.js +++ b/tests/baselines/reference/classExtendsMultipleBaseClasses.js @@ -5,7 +5,11 @@ class C extends A,B { } //// [classExtendsMultipleBaseClasses.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsNull.js b/tests/baselines/reference/classExtendsNull.js index 45cd0132bdae3..5171dbc0085ed 100644 --- a/tests/baselines/reference/classExtendsNull.js +++ b/tests/baselines/reference/classExtendsNull.js @@ -14,7 +14,11 @@ class D extends null { //// [classExtendsNull.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsShadowedConstructorFunction.js b/tests/baselines/reference/classExtendsShadowedConstructorFunction.js index fde420bca3935..ad16e0aacaa0f 100644 --- a/tests/baselines/reference/classExtendsShadowedConstructorFunction.js +++ b/tests/baselines/reference/classExtendsShadowedConstructorFunction.js @@ -10,7 +10,11 @@ module M { //// [classExtendsShadowedConstructorFunction.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsValidConstructorFunction.js b/tests/baselines/reference/classExtendsValidConstructorFunction.js index 7346096d803e3..4e284b0c64c79 100644 --- a/tests/baselines/reference/classExtendsValidConstructorFunction.js +++ b/tests/baselines/reference/classExtendsValidConstructorFunction.js @@ -7,7 +7,11 @@ class C extends foo { } // error, cannot extend it though //// [classExtendsValidConstructorFunction.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classHeritageWithTrailingSeparator.js b/tests/baselines/reference/classHeritageWithTrailingSeparator.js index ab37b45f3bedd..3314583f338c4 100644 --- a/tests/baselines/reference/classHeritageWithTrailingSeparator.js +++ b/tests/baselines/reference/classHeritageWithTrailingSeparator.js @@ -5,7 +5,11 @@ class D extends C, { //// [classHeritageWithTrailingSeparator.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classImplementsClass2.js b/tests/baselines/reference/classImplementsClass2.js index 372f8ce84ef05..0aeda35463f7a 100644 --- a/tests/baselines/reference/classImplementsClass2.js +++ b/tests/baselines/reference/classImplementsClass2.js @@ -15,7 +15,11 @@ c2 = c; //// [classImplementsClass2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classImplementsClass3.js b/tests/baselines/reference/classImplementsClass3.js index 09c2a9fbe6b4b..40fd20005e127 100644 --- a/tests/baselines/reference/classImplementsClass3.js +++ b/tests/baselines/reference/classImplementsClass3.js @@ -16,7 +16,11 @@ c2 = c; //// [classImplementsClass3.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classImplementsClass4.js b/tests/baselines/reference/classImplementsClass4.js index c80e21525986a..631b5b38560da 100644 --- a/tests/baselines/reference/classImplementsClass4.js +++ b/tests/baselines/reference/classImplementsClass4.js @@ -18,7 +18,11 @@ c2 = c; //// [classImplementsClass4.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classImplementsClass5.js b/tests/baselines/reference/classImplementsClass5.js index de0bb4469e161..a54c02f4b6b02 100644 --- a/tests/baselines/reference/classImplementsClass5.js +++ b/tests/baselines/reference/classImplementsClass5.js @@ -19,7 +19,11 @@ c2 = c; //// [classImplementsClass5.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classImplementsClass6.js b/tests/baselines/reference/classImplementsClass6.js index c87c1b59d2f7a..c2987ac066e69 100644 --- a/tests/baselines/reference/classImplementsClass6.js +++ b/tests/baselines/reference/classImplementsClass6.js @@ -23,7 +23,11 @@ c2.bar(); // should error //// [classImplementsClass6.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classIndexer3.js b/tests/baselines/reference/classIndexer3.js index 759804baa41f8..8bce923689929 100644 --- a/tests/baselines/reference/classIndexer3.js +++ b/tests/baselines/reference/classIndexer3.js @@ -12,7 +12,11 @@ class D123 extends C123 { //// [classIndexer3.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classInheritence.js b/tests/baselines/reference/classInheritence.js index 614124c7a09e6..23506947e9b06 100644 --- a/tests/baselines/reference/classInheritence.js +++ b/tests/baselines/reference/classInheritence.js @@ -4,7 +4,11 @@ class A extends A { } //// [classInheritence.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classIsSubtypeOfBaseType.js b/tests/baselines/reference/classIsSubtypeOfBaseType.js index fe056e41813ac..df822eff3126b 100644 --- a/tests/baselines/reference/classIsSubtypeOfBaseType.js +++ b/tests/baselines/reference/classIsSubtypeOfBaseType.js @@ -17,7 +17,11 @@ class Derived2 extends Base<{ bar: string; }> { //// [classIsSubtypeOfBaseType.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classOrder2.js b/tests/baselines/reference/classOrder2.js index 34bbf93fd2fb2..d05dd72e24532 100644 --- a/tests/baselines/reference/classOrder2.js +++ b/tests/baselines/reference/classOrder2.js @@ -21,7 +21,11 @@ a.foo(); //// [classOrder2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classOrderBug.js b/tests/baselines/reference/classOrderBug.js index 69ed7723a98d4..22596246d645d 100644 --- a/tests/baselines/reference/classOrderBug.js +++ b/tests/baselines/reference/classOrderBug.js @@ -17,7 +17,11 @@ class foo extends baz {} //// [classOrderBug.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classSideInheritance1.js b/tests/baselines/reference/classSideInheritance1.js index b3882d64b874c..bdaaec468f88f 100644 --- a/tests/baselines/reference/classSideInheritance1.js +++ b/tests/baselines/reference/classSideInheritance1.js @@ -17,7 +17,11 @@ C2.bar(); // valid //// [classSideInheritance1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classSideInheritance2.js b/tests/baselines/reference/classSideInheritance2.js index 8a6564f4f9f59..34c7467a8649c 100644 --- a/tests/baselines/reference/classSideInheritance2.js +++ b/tests/baselines/reference/classSideInheritance2.js @@ -22,7 +22,11 @@ class TextBase implements IText { //// [classSideInheritance2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classSideInheritance3.js b/tests/baselines/reference/classSideInheritance3.js index 44035af4f3016..a9fb09199301c 100644 --- a/tests/baselines/reference/classSideInheritance3.js +++ b/tests/baselines/reference/classSideInheritance3.js @@ -20,7 +20,11 @@ var r3: typeof A = C; // ok //// [classSideInheritance3.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classUpdateTests.js b/tests/baselines/reference/classUpdateTests.js index d29277a84e43a..89dd0bded249b 100644 --- a/tests/baselines/reference/classUpdateTests.js +++ b/tests/baselines/reference/classUpdateTests.js @@ -115,7 +115,11 @@ class R { //// [classUpdateTests.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classWithBaseClassButNoConstructor.js b/tests/baselines/reference/classWithBaseClassButNoConstructor.js index db10ddb072710..b23e0a13ba131 100644 --- a/tests/baselines/reference/classWithBaseClassButNoConstructor.js +++ b/tests/baselines/reference/classWithBaseClassButNoConstructor.js @@ -42,7 +42,11 @@ var d6 = new D(1); // ok //// [classWithBaseClassButNoConstructor.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classWithConstructors.js b/tests/baselines/reference/classWithConstructors.js index 3e038e3a424a8..c3609f99b8609 100644 --- a/tests/baselines/reference/classWithConstructors.js +++ b/tests/baselines/reference/classWithConstructors.js @@ -51,7 +51,11 @@ module Generics { //// [classWithConstructors.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classWithProtectedProperty.js b/tests/baselines/reference/classWithProtectedProperty.js index 35c26afef983d..4a1b09ff35069 100644 --- a/tests/baselines/reference/classWithProtectedProperty.js +++ b/tests/baselines/reference/classWithProtectedProperty.js @@ -30,7 +30,11 @@ class D extends C { //// [classWithProtectedProperty.js] // accessing any protected outside the class is an error var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classWithStaticMembers.js b/tests/baselines/reference/classWithStaticMembers.js index 5deb8f996434e..5563e859c6a0b 100644 --- a/tests/baselines/reference/classWithStaticMembers.js +++ b/tests/baselines/reference/classWithStaticMembers.js @@ -21,7 +21,11 @@ var r3 = r.foo; //// [classWithStaticMembers.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classdecl.js b/tests/baselines/reference/classdecl.js index 99d7bba92b091..c88b0ccae0e2b 100644 --- a/tests/baselines/reference/classdecl.js +++ b/tests/baselines/reference/classdecl.js @@ -95,7 +95,11 @@ class e { //// [classdecl.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/clodulesDerivedClasses.js b/tests/baselines/reference/clodulesDerivedClasses.js index 209b135fb15dd..1bb3fc7b705ed 100644 --- a/tests/baselines/reference/clodulesDerivedClasses.js +++ b/tests/baselines/reference/clodulesDerivedClasses.js @@ -24,7 +24,11 @@ module Path.Utils { //// [clodulesDerivedClasses.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js index ec87855ba4640..2242c6667a686 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js @@ -41,7 +41,11 @@ class c extends Foo { //// [collisionSuperAndLocalFunctionInAccessors.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.js index 09f1db5dd4095..e761534649e93 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.js +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.js @@ -26,7 +26,11 @@ class c extends Foo { //// [collisionSuperAndLocalFunctionInConstructor.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.js index 40084c7c2a5a6..70a9b22ddbdab 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.js +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.js @@ -30,7 +30,11 @@ class c extends Foo { //// [collisionSuperAndLocalFunctionInMethod.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js index 457779fe3954f..258ad86c096bb 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js @@ -20,7 +20,11 @@ class b extends Foo { //// [collisionSuperAndLocalFunctionInProperty.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js b/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js index 92a538bea04cd..81ef63068e683 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js +++ b/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js @@ -34,7 +34,11 @@ class c extends Foo { //// [collisionSuperAndLocalVarInAccessors.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js b/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js index c498658a97421..355bf0af8af80 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js +++ b/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js @@ -22,7 +22,11 @@ class c extends Foo { //// [collisionSuperAndLocalVarInConstructor.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js b/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js index 94e42d3569143..33512c6065873 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js +++ b/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js @@ -20,7 +20,11 @@ class c extends Foo { //// [collisionSuperAndLocalVarInMethod.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js b/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js index 750de147841fa..ee582bddbc5fe 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js +++ b/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js @@ -19,7 +19,11 @@ class b extends Foo { //// [collisionSuperAndLocalVarInProperty.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndNameResolution.js b/tests/baselines/reference/collisionSuperAndNameResolution.js index dcfd4529266b7..e36a2a3cbad18 100644 --- a/tests/baselines/reference/collisionSuperAndNameResolution.js +++ b/tests/baselines/reference/collisionSuperAndNameResolution.js @@ -13,7 +13,11 @@ class Foo extends base { //// [collisionSuperAndNameResolution.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndParameter.js b/tests/baselines/reference/collisionSuperAndParameter.js index 408158ba2a599..7413002635d4d 100644 --- a/tests/baselines/reference/collisionSuperAndParameter.js +++ b/tests/baselines/reference/collisionSuperAndParameter.js @@ -64,7 +64,11 @@ class Foo4 extends Foo { //// [collisionSuperAndParameter.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndParameter1.js b/tests/baselines/reference/collisionSuperAndParameter1.js index 58b1cbd4989cf..0a7e21e8ca280 100644 --- a/tests/baselines/reference/collisionSuperAndParameter1.js +++ b/tests/baselines/reference/collisionSuperAndParameter1.js @@ -11,7 +11,11 @@ class Foo2 extends Foo { //// [collisionSuperAndParameter1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js b/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js index f6f38b6f0991b..5b12a0f9a9d2f 100644 --- a/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js +++ b/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js @@ -32,7 +32,11 @@ class b4 extends a { //// [collisionSuperAndPropertyNameAsConstuctorParameter.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js b/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js index 68707fd675dad..d3270d4db5734 100644 --- a/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js +++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js @@ -20,7 +20,11 @@ class b2 extends a { //// [collisionThisExpressionAndLocalVarWithSuperExperssion.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/commentsInheritance.js b/tests/baselines/reference/commentsInheritance.js index a1e8748284390..691854bffb0ae 100644 --- a/tests/baselines/reference/commentsInheritance.js +++ b/tests/baselines/reference/commentsInheritance.js @@ -153,7 +153,11 @@ i2_i = i3_i; //// [commentsInheritance.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.js b/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.js index 914820332552e..3053f86f345ec 100644 --- a/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.js +++ b/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.js @@ -196,7 +196,11 @@ var r8b7 = b6 !== a6; //// [comparisonOperatorWithIdenticalObjects.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js index 95dfc215bfe65..bf522a88367ee 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js @@ -170,7 +170,11 @@ var r8b7 = b7 !== a7; //// [comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js index fbcd4a72b99fa..50e31f1d79c26 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js @@ -170,7 +170,11 @@ var r8b7 = b7 !== a7; //// [comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js index ec2e2556cc99a..8e4e7e7840df2 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js @@ -113,7 +113,11 @@ var r8b4 = b4 !== a4; //// [comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js index 2e38deb0e5561..f208bd500cd35 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js @@ -151,7 +151,11 @@ var r8b6 = b6 !== a6; //// [comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js index 675cce7d49ad8..4cff1bf058468 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js @@ -151,7 +151,11 @@ var r8b6 = b6 !== a6; //// [comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnCallSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnCallSignature.js index 634a64485816e..0a7cbce0c3279 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnCallSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnCallSignature.js @@ -261,7 +261,11 @@ var r8b11 = b11 !== a11; //// [comparisonOperatorWithSubtypeObjectOnCallSignature.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnConstructorSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnConstructorSignature.js index d7857dcfd2a63..bf8a6024faa2b 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnConstructorSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnConstructorSignature.js @@ -223,7 +223,11 @@ var r8b9 = b9 !== a9; //// [comparisonOperatorWithSubtypeObjectOnConstructorSignature.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnIndexSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnIndexSignature.js index 08f08546aa92e..f1e06f733e417 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnIndexSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnIndexSignature.js @@ -109,7 +109,11 @@ var r8b1 = b4 !== a4; //// [comparisonOperatorWithSubtypeObjectOnIndexSignature.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js index ada0ee77486b3..78a7b45692499 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js @@ -166,7 +166,11 @@ var r8b6 = b6 !== a6; //// [comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js index 28d960fc3c9c5..d08b7fbf11b5d 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js @@ -166,7 +166,11 @@ var r8b6 = b6 !== a6; //// [comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.js index 62fee91b7a3e7..d1f29b650c6a0 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.js @@ -80,7 +80,11 @@ var rh4 = b2 !== a2; //// [comparisonOperatorWithSubtypeObjectOnProperty.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/complexClassRelationships.js b/tests/baselines/reference/complexClassRelationships.js index 3094d43eed22c..34cc2754746bc 100644 --- a/tests/baselines/reference/complexClassRelationships.js +++ b/tests/baselines/reference/complexClassRelationships.js @@ -49,7 +49,11 @@ class FooBase { //// [complexClassRelationships.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.js b/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.js index d93177894557a..0e3dc9f3d3199 100644 --- a/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.js +++ b/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.js @@ -7,7 +7,11 @@ class S18 extends S18 //// [complicatedGenericRecursiveBaseClassReference.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/compoundAssignmentLHSIsValue.js b/tests/baselines/reference/compoundAssignmentLHSIsValue.js index a1f6274b38b31..8d17fcbfe10fa 100644 --- a/tests/baselines/reference/compoundAssignmentLHSIsValue.js +++ b/tests/baselines/reference/compoundAssignmentLHSIsValue.js @@ -125,7 +125,11 @@ foo() += value; //// [compoundAssignmentLHSIsValue.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js b/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js index 0c90b7b60f802..e7d1bef436e3f 100644 --- a/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js +++ b/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js @@ -87,7 +87,11 @@ foo() **= value; //// [compoundExponentiationAssignmentLHSIsValue.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames24_ES5.js b/tests/baselines/reference/computedPropertyNames24_ES5.js index 03b7347165cd7..426b7cbaa65cf 100644 --- a/tests/baselines/reference/computedPropertyNames24_ES5.js +++ b/tests/baselines/reference/computedPropertyNames24_ES5.js @@ -10,7 +10,11 @@ class C extends Base { //// [computedPropertyNames24_ES5.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames25_ES5.js b/tests/baselines/reference/computedPropertyNames25_ES5.js index e98865176fb3d..239a5cada1a8a 100644 --- a/tests/baselines/reference/computedPropertyNames25_ES5.js +++ b/tests/baselines/reference/computedPropertyNames25_ES5.js @@ -15,7 +15,11 @@ class C extends Base { //// [computedPropertyNames25_ES5.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames26_ES5.js b/tests/baselines/reference/computedPropertyNames26_ES5.js index c10c3b112e425..89e8dd391693c 100644 --- a/tests/baselines/reference/computedPropertyNames26_ES5.js +++ b/tests/baselines/reference/computedPropertyNames26_ES5.js @@ -12,7 +12,11 @@ class C extends Base { //// [computedPropertyNames26_ES5.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames27_ES5.js b/tests/baselines/reference/computedPropertyNames27_ES5.js index 0801b4b5e7133..7438ea49fd281 100644 --- a/tests/baselines/reference/computedPropertyNames27_ES5.js +++ b/tests/baselines/reference/computedPropertyNames27_ES5.js @@ -7,7 +7,11 @@ class C extends Base { //// [computedPropertyNames27_ES5.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames28_ES5.js b/tests/baselines/reference/computedPropertyNames28_ES5.js index dc360dfd86aba..132f811b49ebf 100644 --- a/tests/baselines/reference/computedPropertyNames28_ES5.js +++ b/tests/baselines/reference/computedPropertyNames28_ES5.js @@ -12,7 +12,11 @@ class C extends Base { //// [computedPropertyNames28_ES5.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames30_ES5.js b/tests/baselines/reference/computedPropertyNames30_ES5.js index 30c6fa33bbe9f..63e448df3c1c3 100644 --- a/tests/baselines/reference/computedPropertyNames30_ES5.js +++ b/tests/baselines/reference/computedPropertyNames30_ES5.js @@ -17,7 +17,11 @@ class C extends Base { //// [computedPropertyNames30_ES5.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames31_ES5.js b/tests/baselines/reference/computedPropertyNames31_ES5.js index 856fbe88f68b1..e3145b8c0a189 100644 --- a/tests/baselines/reference/computedPropertyNames31_ES5.js +++ b/tests/baselines/reference/computedPropertyNames31_ES5.js @@ -17,7 +17,11 @@ class C extends Base { //// [computedPropertyNames31_ES5.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames43_ES5.js b/tests/baselines/reference/computedPropertyNames43_ES5.js index ccc7aed37256c..383da77c55042 100644 --- a/tests/baselines/reference/computedPropertyNames43_ES5.js +++ b/tests/baselines/reference/computedPropertyNames43_ES5.js @@ -14,7 +14,11 @@ class D extends C { //// [computedPropertyNames43_ES5.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames44_ES5.js b/tests/baselines/reference/computedPropertyNames44_ES5.js index d16c7fc2f4655..43bf2849333e7 100644 --- a/tests/baselines/reference/computedPropertyNames44_ES5.js +++ b/tests/baselines/reference/computedPropertyNames44_ES5.js @@ -13,7 +13,11 @@ class D extends C { //// [computedPropertyNames44_ES5.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames45_ES5.js b/tests/baselines/reference/computedPropertyNames45_ES5.js index 8585f28e5d6ba..933e6ea66ffcf 100644 --- a/tests/baselines/reference/computedPropertyNames45_ES5.js +++ b/tests/baselines/reference/computedPropertyNames45_ES5.js @@ -14,7 +14,11 @@ class D extends C { //// [computedPropertyNames45_ES5.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js b/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js index 030fba2525b0e..c3a197e2a6402 100644 --- a/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js +++ b/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js @@ -49,7 +49,11 @@ var result11: any = true ? 1 : 'string'; //// [conditionalOperatorWithIdenticalBCT.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js b/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js index 85633af2a259a..0a1e2be65e96d 100644 --- a/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js +++ b/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js @@ -25,7 +25,11 @@ var result61: (t: X) => number| string = true ? (m) => m.propertyX1 : (n) => n.p //// [conditionalOperatorWithoutIdenticalBCT.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constantOverloadFunction.js b/tests/baselines/reference/constantOverloadFunction.js index 09e0c2788c413..05cb517f9e0bf 100644 --- a/tests/baselines/reference/constantOverloadFunction.js +++ b/tests/baselines/reference/constantOverloadFunction.js @@ -15,7 +15,11 @@ function foo(tagName: any): Base { //// [constantOverloadFunction.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js b/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js index dd5bbf27d6114..754abfd106e0e 100644 --- a/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js +++ b/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js @@ -16,7 +16,11 @@ function foo(tagName: any): Base { //// [constantOverloadFunctionNoSubtypeError.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js b/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js index a68f14118213d..c1747ba54ff22 100644 --- a/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js +++ b/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js @@ -21,7 +21,11 @@ class Container { //// [constraintCheckInGenericBaseTypeReference.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.js index f082035064b8e..9b6d759951664 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.js @@ -72,7 +72,11 @@ interface I extends A { //// [constructSignatureAssignabilityInInheritance2.js] // checking subtype relations for function types as it relates to contextual signature instantiation var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.js index ad834dd6cb419..c7b62f9521f3a 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.js @@ -115,7 +115,11 @@ module Errors { // checking subtype relations for function types as it relates to contextual signature instantiation // error cases var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance4.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance4.js index 12fc6bc872f94..c328a70455fe8 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance4.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance4.js @@ -62,7 +62,11 @@ interface I extends A { //// [constructSignatureAssignabilityInInheritance4.js] // checking subtype relations for function types as it relates to contextual signature instantiation var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.js index 10172a751abdf..4f2addd338bd0 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.js @@ -52,7 +52,11 @@ interface I extends B { // checking subtype relations for function types as it relates to contextual signature instantiation // same as subtypingWithConstructSignatures2 just with an extra level of indirection in the inheritance chain var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.js index 8c0fc83b4063d..a8bac464ac3e1 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.js @@ -55,7 +55,11 @@ interface I9 extends A { // same as subtypingWithConstructSignatures4 but using class type parameters instead of generic signatures // all are errors var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructorArgs.js b/tests/baselines/reference/constructorArgs.js index 333cc84316244..001a0656c9118 100644 --- a/tests/baselines/reference/constructorArgs.js +++ b/tests/baselines/reference/constructorArgs.js @@ -17,7 +17,11 @@ class Sub extends Super { //// [constructorArgs.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType.js b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType.js index 806ff9581cab0..4132399c97035 100644 --- a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType.js +++ b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType.js @@ -21,7 +21,11 @@ class Derived2 extends Base { //// [constructorFunctionTypeIsAssignableToBaseType.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js index 4308710ef8184..339edd29823cf 100644 --- a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js +++ b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js @@ -35,7 +35,11 @@ class Derived2 extends Base { //// [constructorFunctionTypeIsAssignableToBaseType2.js] // the constructor function itself does not need to be a subtype of the base type constructor function var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructorHasPrototypeProperty.js b/tests/baselines/reference/constructorHasPrototypeProperty.js index c36307ee7feb1..551b2644518f3 100644 --- a/tests/baselines/reference/constructorHasPrototypeProperty.js +++ b/tests/baselines/reference/constructorHasPrototypeProperty.js @@ -33,7 +33,11 @@ module Generic { //// [constructorHasPrototypeProperty.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructorOverloads2.js b/tests/baselines/reference/constructorOverloads2.js index 43553c8f72cd5..5aca4c6583a24 100644 --- a/tests/baselines/reference/constructorOverloads2.js +++ b/tests/baselines/reference/constructorOverloads2.js @@ -27,7 +27,11 @@ f1.bar1(); //// [constructorOverloads2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructorOverloads3.js b/tests/baselines/reference/constructorOverloads3.js index fc916a1b2837a..063f4c72443f3 100644 --- a/tests/baselines/reference/constructorOverloads3.js +++ b/tests/baselines/reference/constructorOverloads3.js @@ -24,7 +24,11 @@ f1.bar1(); //// [constructorOverloads3.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructorWithCapturedSuper.js b/tests/baselines/reference/constructorWithCapturedSuper.js index f128a5f25a0f7..706d2522cfb14 100644 --- a/tests/baselines/reference/constructorWithCapturedSuper.js +++ b/tests/baselines/reference/constructorWithCapturedSuper.js @@ -54,7 +54,11 @@ class D extends A { //// [constructorWithCapturedSuper.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js index bcf6ee23d9163..6c670b245c56c 100644 --- a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js +++ b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js @@ -282,7 +282,11 @@ TypeScriptAllInOne.Program.Main(); //// [constructorWithIncompleteTypeAnnotation.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/contextualTypingArrayOfLambdas.js b/tests/baselines/reference/contextualTypingArrayOfLambdas.js index 6358453f4facb..9a172c202b2ca 100644 --- a/tests/baselines/reference/contextualTypingArrayOfLambdas.js +++ b/tests/baselines/reference/contextualTypingArrayOfLambdas.js @@ -16,7 +16,11 @@ var xs = [(x: A) => { }, (x: B) => { }, (x: C) => { }]; //// [contextualTypingArrayOfLambdas.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/contextualTypingOfConditionalExpression.js b/tests/baselines/reference/contextualTypingOfConditionalExpression.js index 70234ea3fec81..c573962825b09 100644 --- a/tests/baselines/reference/contextualTypingOfConditionalExpression.js +++ b/tests/baselines/reference/contextualTypingOfConditionalExpression.js @@ -16,7 +16,11 @@ var x2: (a: A) => void = true ? (a) => a.foo : (b) => b.foo; //// [contextualTypingOfConditionalExpression.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/contextualTypingOfConditionalExpression2.js b/tests/baselines/reference/contextualTypingOfConditionalExpression2.js index 5c40163b2e034..9ee11aeb985cf 100644 --- a/tests/baselines/reference/contextualTypingOfConditionalExpression2.js +++ b/tests/baselines/reference/contextualTypingOfConditionalExpression2.js @@ -14,7 +14,11 @@ var x2: (a: A) => void = true ? (a: C) => a.foo : (b: number) => { }; //// [contextualTypingOfConditionalExpression2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.js b/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.js index 2afea65e32af0..2d7ca989a81f8 100644 --- a/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.js +++ b/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.js @@ -12,7 +12,11 @@ var a: D = foo("hi", []); //// [crashInsourcePropertyIsRelatableToTargetProperty.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declFileClassExtendsNull.js b/tests/baselines/reference/declFileClassExtendsNull.js index 0638373ab222c..483c1ca448123 100644 --- a/tests/baselines/reference/declFileClassExtendsNull.js +++ b/tests/baselines/reference/declFileClassExtendsNull.js @@ -5,7 +5,11 @@ class ExtendsNull extends null { //// [declFileClassExtendsNull.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declFileForFunctionTypeAsTypeParameter.js b/tests/baselines/reference/declFileForFunctionTypeAsTypeParameter.js index 889ab313c01e3..f7465149b923f 100644 --- a/tests/baselines/reference/declFileForFunctionTypeAsTypeParameter.js +++ b/tests/baselines/reference/declFileForFunctionTypeAsTypeParameter.js @@ -11,7 +11,11 @@ interface I extends X<() => number> { //// [declFileForFunctionTypeAsTypeParameter.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declFileGenericClassWithGenericExtendedClass.js b/tests/baselines/reference/declFileGenericClassWithGenericExtendedClass.js index 005e33950bcd3..8d0e10f73f9d9 100644 --- a/tests/baselines/reference/declFileGenericClassWithGenericExtendedClass.js +++ b/tests/baselines/reference/declFileGenericClassWithGenericExtendedClass.js @@ -14,7 +14,11 @@ class Baz implements IBar { //// [declFileGenericClassWithGenericExtendedClass.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declFileGenericType.js b/tests/baselines/reference/declFileGenericType.js index 47af8dc415af7..f579968df06f4 100644 --- a/tests/baselines/reference/declFileGenericType.js +++ b/tests/baselines/reference/declFileGenericType.js @@ -42,7 +42,11 @@ export var j = C.F6; //// [declFileGenericType.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declFileGenericType2.js b/tests/baselines/reference/declFileGenericType2.js index f6fb93cb28b96..4f01f058b190e 100644 --- a/tests/baselines/reference/declFileGenericType2.js +++ b/tests/baselines/reference/declFileGenericType2.js @@ -44,7 +44,11 @@ module templa.dom.mvc.composite { //// [declFileGenericType2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js b/tests/baselines/reference/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js index 45cde43ee4f8b..8f38d09160f81 100644 --- a/tests/baselines/reference/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js +++ b/tests/baselines/reference/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js @@ -22,7 +22,11 @@ module X.Y.base.Z { //// [declFileWithClassNameConflictingWithClassReferredByExtendsClause.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declFileWithExtendsClauseThatHasItsContainerNameConflict.js b/tests/baselines/reference/declFileWithExtendsClauseThatHasItsContainerNameConflict.js index c7b4a7483e9ae..cacaa58760963 100644 --- a/tests/baselines/reference/declFileWithExtendsClauseThatHasItsContainerNameConflict.js +++ b/tests/baselines/reference/declFileWithExtendsClauseThatHasItsContainerNameConflict.js @@ -20,7 +20,11 @@ module A.B.C { //// [declFileWithExtendsClauseThatHasItsContainerNameConflict.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declarationEmitExpressionInExtends.js b/tests/baselines/reference/declarationEmitExpressionInExtends.js index 34b8206e43ab0..acda258919593 100644 --- a/tests/baselines/reference/declarationEmitExpressionInExtends.js +++ b/tests/baselines/reference/declarationEmitExpressionInExtends.js @@ -16,7 +16,11 @@ q.s; //// [declarationEmitExpressionInExtends.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declarationEmitExpressionInExtends2.js b/tests/baselines/reference/declarationEmitExpressionInExtends2.js index 106fe00152bd7..8f0c53f66ac64 100644 --- a/tests/baselines/reference/declarationEmitExpressionInExtends2.js +++ b/tests/baselines/reference/declarationEmitExpressionInExtends2.js @@ -14,7 +14,11 @@ class MyClass extends getClass(2) { //// [declarationEmitExpressionInExtends2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declarationEmitExpressionInExtends3.js b/tests/baselines/reference/declarationEmitExpressionInExtends3.js index c1fbd1fea902e..902ddc08bc001 100644 --- a/tests/baselines/reference/declarationEmitExpressionInExtends3.js +++ b/tests/baselines/reference/declarationEmitExpressionInExtends3.js @@ -46,7 +46,11 @@ export class MyClass4 extends getExportedClass(undefined)>>var __extends = (this && this.__extends) || function (d, b) { ->>> Object.setPrototypeOf(d, b); +>>> if (typeof Object.setPrototypeOf === "function") { +>>> Object.setPrototypeOf(d, b); +>>> } else { +>>> d.__proto__ = b; +>>> } >>> function __() { this.constructor = d; } >>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); >>>}; @@ -18,7 +22,7 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 2 >^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(6, 1) Source(2, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(2, 1) + SourceIndex(0) --- >>> function C(value) { 1->^^^^ @@ -33,9 +37,9 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts > 2 > constructor( 3 > value: number -1->Emitted(7, 5) Source(7, 5) + SourceIndex(0) -2 >Emitted(7, 16) Source(7, 17) + SourceIndex(0) -3 >Emitted(7, 21) Source(7, 30) + SourceIndex(0) +1->Emitted(11, 5) Source(7, 5) + SourceIndex(0) +2 >Emitted(11, 16) Source(7, 17) + SourceIndex(0) +3 >Emitted(11, 21) Source(7, 30) + SourceIndex(0) --- >>> this.cProp = 10; 1->^^^^^^^^ @@ -48,11 +52,11 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 3 > = 4 > 10 5 > ; -1->Emitted(8, 9) Source(3, 5) + SourceIndex(0) -2 >Emitted(8, 19) Source(3, 10) + SourceIndex(0) -3 >Emitted(8, 22) Source(3, 13) + SourceIndex(0) -4 >Emitted(8, 24) Source(3, 15) + SourceIndex(0) -5 >Emitted(8, 25) Source(3, 16) + SourceIndex(0) +1->Emitted(12, 9) Source(3, 5) + SourceIndex(0) +2 >Emitted(12, 19) Source(3, 10) + SourceIndex(0) +3 >Emitted(12, 22) Source(3, 13) + SourceIndex(0) +4 >Emitted(12, 24) Source(3, 15) + SourceIndex(0) +5 >Emitted(12, 25) Source(3, 16) + SourceIndex(0) --- >>> return { 1 >^^^^^^^^ @@ -67,9 +71,9 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts > 2 > return 3 > -1 >Emitted(9, 9) Source(8, 9) + SourceIndex(0) -2 >Emitted(9, 15) Source(8, 15) + SourceIndex(0) -3 >Emitted(9, 16) Source(8, 16) + SourceIndex(0) +1 >Emitted(13, 9) Source(8, 9) + SourceIndex(0) +2 >Emitted(13, 15) Source(8, 15) + SourceIndex(0) +3 >Emitted(13, 16) Source(8, 16) + SourceIndex(0) --- >>> cProp: value, 1->^^^^^^^^^^^^ @@ -82,10 +86,10 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 2 > cProp 3 > : 4 > value -1->Emitted(10, 13) Source(9, 13) + SourceIndex(0) -2 >Emitted(10, 18) Source(9, 18) + SourceIndex(0) -3 >Emitted(10, 20) Source(9, 20) + SourceIndex(0) -4 >Emitted(10, 25) Source(9, 25) + SourceIndex(0) +1->Emitted(14, 13) Source(9, 13) + SourceIndex(0) +2 >Emitted(14, 18) Source(9, 18) + SourceIndex(0) +3 >Emitted(14, 20) Source(9, 20) + SourceIndex(0) +4 >Emitted(14, 25) Source(9, 25) + SourceIndex(0) --- >>> foo: function () { 1->^^^^^^^^^^^^ @@ -94,8 +98,8 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 1->, > 2 > foo -1->Emitted(11, 13) Source(10, 13) + SourceIndex(0) -2 >Emitted(11, 16) Source(10, 16) + SourceIndex(0) +1->Emitted(15, 13) Source(10, 13) + SourceIndex(0) +2 >Emitted(15, 16) Source(10, 16) + SourceIndex(0) --- >>> return "well this looks kinda C-ish."; 1->^^^^^^^^^^^^^^^^ @@ -109,11 +113,11 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 3 > 4 > "well this looks kinda C-ish." 5 > ; -1->Emitted(12, 17) Source(11, 17) + SourceIndex(0) -2 >Emitted(12, 23) Source(11, 23) + SourceIndex(0) -3 >Emitted(12, 24) Source(11, 24) + SourceIndex(0) -4 >Emitted(12, 54) Source(11, 54) + SourceIndex(0) -5 >Emitted(12, 55) Source(11, 55) + SourceIndex(0) +1->Emitted(16, 17) Source(11, 17) + SourceIndex(0) +2 >Emitted(16, 23) Source(11, 23) + SourceIndex(0) +3 >Emitted(16, 24) Source(11, 24) + SourceIndex(0) +4 >Emitted(16, 54) Source(11, 54) + SourceIndex(0) +5 >Emitted(16, 55) Source(11, 55) + SourceIndex(0) --- >>> } 1 >^^^^^^^^^^^^ @@ -121,8 +125,8 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 1 > > 2 > } -1 >Emitted(13, 13) Source(12, 13) + SourceIndex(0) -2 >Emitted(13, 14) Source(12, 14) + SourceIndex(0) +1 >Emitted(17, 13) Source(12, 13) + SourceIndex(0) +2 >Emitted(17, 14) Source(12, 14) + SourceIndex(0) --- >>> }; 1 >^^^^^^^^^ @@ -130,8 +134,8 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 1 > > } 2 > -1 >Emitted(14, 10) Source(13, 10) + SourceIndex(0) -2 >Emitted(14, 11) Source(13, 10) + SourceIndex(0) +1 >Emitted(18, 10) Source(13, 10) + SourceIndex(0) +2 >Emitted(18, 11) Source(13, 10) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -140,8 +144,8 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 1 > > 2 > } -1 >Emitted(15, 5) Source(14, 5) + SourceIndex(0) -2 >Emitted(15, 6) Source(14, 6) + SourceIndex(0) +1 >Emitted(19, 5) Source(14, 5) + SourceIndex(0) +2 >Emitted(19, 6) Source(14, 6) + SourceIndex(0) --- >>> C.prototype.foo = function () { return "this never gets used."; }; 1->^^^^ @@ -164,16 +168,16 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 8 > ; 9 > 10> } -1->Emitted(16, 5) Source(5, 5) + SourceIndex(0) -2 >Emitted(16, 20) Source(5, 8) + SourceIndex(0) -3 >Emitted(16, 23) Source(5, 5) + SourceIndex(0) -4 >Emitted(16, 37) Source(5, 13) + SourceIndex(0) -5 >Emitted(16, 43) Source(5, 19) + SourceIndex(0) -6 >Emitted(16, 44) Source(5, 20) + SourceIndex(0) -7 >Emitted(16, 67) Source(5, 43) + SourceIndex(0) -8 >Emitted(16, 68) Source(5, 44) + SourceIndex(0) -9 >Emitted(16, 69) Source(5, 45) + SourceIndex(0) -10>Emitted(16, 70) Source(5, 46) + SourceIndex(0) +1->Emitted(20, 5) Source(5, 5) + SourceIndex(0) +2 >Emitted(20, 20) Source(5, 8) + SourceIndex(0) +3 >Emitted(20, 23) Source(5, 5) + SourceIndex(0) +4 >Emitted(20, 37) Source(5, 13) + SourceIndex(0) +5 >Emitted(20, 43) Source(5, 19) + SourceIndex(0) +6 >Emitted(20, 44) Source(5, 20) + SourceIndex(0) +7 >Emitted(20, 67) Source(5, 43) + SourceIndex(0) +8 >Emitted(20, 68) Source(5, 44) + SourceIndex(0) +9 >Emitted(20, 69) Source(5, 45) + SourceIndex(0) +10>Emitted(20, 70) Source(5, 46) + SourceIndex(0) --- >>> return C; 1 >^^^^ @@ -190,8 +194,8 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts > } > 2 > } -1 >Emitted(17, 5) Source(15, 1) + SourceIndex(0) -2 >Emitted(17, 13) Source(15, 2) + SourceIndex(0) +1 >Emitted(21, 5) Source(15, 1) + SourceIndex(0) +2 >Emitted(21, 13) Source(15, 2) + SourceIndex(0) --- >>>}()); 1 > @@ -216,10 +220,10 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts > } > } > } -1 >Emitted(18, 1) Source(15, 1) + SourceIndex(0) -2 >Emitted(18, 2) Source(15, 2) + SourceIndex(0) -3 >Emitted(18, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(18, 6) Source(15, 2) + SourceIndex(0) +1 >Emitted(22, 1) Source(15, 1) + SourceIndex(0) +2 >Emitted(22, 2) Source(15, 2) + SourceIndex(0) +3 >Emitted(22, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(22, 6) Source(15, 2) + SourceIndex(0) --- >>>var D = (function (_super) { 1-> @@ -227,15 +231,15 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 1-> > > -1->Emitted(19, 1) Source(17, 1) + SourceIndex(0) +1->Emitted(23, 1) Source(17, 1) + SourceIndex(0) --- >>> __extends(D, _super); 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^ 1->class D extends 2 > C -1->Emitted(20, 5) Source(17, 17) + SourceIndex(0) -2 >Emitted(20, 26) Source(17, 18) + SourceIndex(0) +1->Emitted(24, 5) Source(17, 17) + SourceIndex(0) +2 >Emitted(24, 26) Source(17, 18) + SourceIndex(0) --- >>> function D(a) { 1 >^^^^ @@ -248,9 +252,9 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts > 2 > constructor( 3 > a = 100 -1 >Emitted(21, 5) Source(20, 5) + SourceIndex(0) -2 >Emitted(21, 16) Source(20, 17) + SourceIndex(0) -3 >Emitted(21, 17) Source(20, 24) + SourceIndex(0) +1 >Emitted(25, 5) Source(20, 5) + SourceIndex(0) +2 >Emitted(25, 16) Source(20, 17) + SourceIndex(0) +3 >Emitted(25, 17) Source(20, 24) + SourceIndex(0) --- >>> if (a === void 0) { a = 100; } 1->^^^^^^^^ @@ -262,10 +266,10 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 2 > 3 > 4 > a = 100 -1->Emitted(22, 9) Source(20, 17) + SourceIndex(0) -2 >Emitted(22, 27) Source(20, 17) + SourceIndex(0) -3 >Emitted(22, 29) Source(20, 17) + SourceIndex(0) -4 >Emitted(22, 36) Source(20, 24) + SourceIndex(0) +1->Emitted(26, 9) Source(20, 17) + SourceIndex(0) +2 >Emitted(26, 27) Source(20, 17) + SourceIndex(0) +3 >Emitted(26, 29) Source(20, 17) + SourceIndex(0) +4 >Emitted(26, 36) Source(20, 24) + SourceIndex(0) --- >>> var _this = _super.call(this, a) || this; 1->^^^^^^^^ @@ -294,12 +298,12 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts > else > return null; > } -1->Emitted(23, 9) Source(20, 5) + SourceIndex(0) -2 >Emitted(23, 21) Source(21, 9) + SourceIndex(0) -3 >Emitted(23, 39) Source(21, 15) + SourceIndex(0) -4 >Emitted(23, 40) Source(21, 16) + SourceIndex(0) -5 >Emitted(23, 41) Source(21, 17) + SourceIndex(0) -6 >Emitted(23, 50) Source(33, 6) + SourceIndex(0) +1->Emitted(27, 9) Source(20, 5) + SourceIndex(0) +2 >Emitted(27, 21) Source(21, 9) + SourceIndex(0) +3 >Emitted(27, 39) Source(21, 15) + SourceIndex(0) +4 >Emitted(27, 40) Source(21, 16) + SourceIndex(0) +5 >Emitted(27, 41) Source(21, 17) + SourceIndex(0) +6 >Emitted(27, 50) Source(33, 6) + SourceIndex(0) --- >>> _this.dProp = function () { return _this; }; 1->^^^^^^^^ @@ -320,15 +324,15 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 7 > 8 > this 9 > ; -1->Emitted(24, 9) Source(18, 5) + SourceIndex(0) -2 >Emitted(24, 20) Source(18, 10) + SourceIndex(0) -3 >Emitted(24, 23) Source(18, 13) + SourceIndex(0) -4 >Emitted(24, 37) Source(18, 19) + SourceIndex(0) -5 >Emitted(24, 44) Source(18, 19) + SourceIndex(0) -6 >Emitted(24, 49) Source(18, 23) + SourceIndex(0) -7 >Emitted(24, 51) Source(18, 19) + SourceIndex(0) -8 >Emitted(24, 52) Source(18, 23) + SourceIndex(0) -9 >Emitted(24, 53) Source(18, 24) + SourceIndex(0) +1->Emitted(28, 9) Source(18, 5) + SourceIndex(0) +2 >Emitted(28, 20) Source(18, 10) + SourceIndex(0) +3 >Emitted(28, 23) Source(18, 13) + SourceIndex(0) +4 >Emitted(28, 37) Source(18, 19) + SourceIndex(0) +5 >Emitted(28, 44) Source(18, 19) + SourceIndex(0) +6 >Emitted(28, 49) Source(18, 23) + SourceIndex(0) +7 >Emitted(28, 51) Source(18, 19) + SourceIndex(0) +8 >Emitted(28, 52) Source(18, 23) + SourceIndex(0) +9 >Emitted(28, 53) Source(18, 24) + SourceIndex(0) --- >>> if (Math.random() < 0.5) { 1 >^^^^^^^^ @@ -362,19 +366,19 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 11> ) 12> 13> { -1 >Emitted(25, 9) Source(23, 9) + SourceIndex(0) -2 >Emitted(25, 11) Source(23, 11) + SourceIndex(0) -3 >Emitted(25, 12) Source(23, 12) + SourceIndex(0) -4 >Emitted(25, 13) Source(23, 13) + SourceIndex(0) -5 >Emitted(25, 17) Source(23, 17) + SourceIndex(0) -6 >Emitted(25, 18) Source(23, 18) + SourceIndex(0) -7 >Emitted(25, 24) Source(23, 24) + SourceIndex(0) -8 >Emitted(25, 26) Source(23, 26) + SourceIndex(0) -9 >Emitted(25, 29) Source(23, 29) + SourceIndex(0) -10>Emitted(25, 32) Source(23, 32) + SourceIndex(0) -11>Emitted(25, 33) Source(23, 33) + SourceIndex(0) -12>Emitted(25, 34) Source(23, 34) + SourceIndex(0) -13>Emitted(25, 35) Source(23, 35) + SourceIndex(0) +1 >Emitted(29, 9) Source(23, 9) + SourceIndex(0) +2 >Emitted(29, 11) Source(23, 11) + SourceIndex(0) +3 >Emitted(29, 12) Source(23, 12) + SourceIndex(0) +4 >Emitted(29, 13) Source(23, 13) + SourceIndex(0) +5 >Emitted(29, 17) Source(23, 17) + SourceIndex(0) +6 >Emitted(29, 18) Source(23, 18) + SourceIndex(0) +7 >Emitted(29, 24) Source(23, 24) + SourceIndex(0) +8 >Emitted(29, 26) Source(23, 26) + SourceIndex(0) +9 >Emitted(29, 29) Source(23, 29) + SourceIndex(0) +10>Emitted(29, 32) Source(23, 32) + SourceIndex(0) +11>Emitted(29, 33) Source(23, 33) + SourceIndex(0) +12>Emitted(29, 34) Source(23, 34) + SourceIndex(0) +13>Emitted(29, 35) Source(23, 35) + SourceIndex(0) --- >>> "You win!"; 1 >^^^^^^^^^^^^ @@ -384,9 +388,9 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts > 2 > "You win!" 3 > -1 >Emitted(26, 13) Source(24, 13) + SourceIndex(0) -2 >Emitted(26, 23) Source(24, 23) + SourceIndex(0) -3 >Emitted(26, 24) Source(24, 23) + SourceIndex(0) +1 >Emitted(30, 13) Source(24, 13) + SourceIndex(0) +2 >Emitted(30, 23) Source(24, 23) + SourceIndex(0) +3 >Emitted(30, 24) Source(24, 23) + SourceIndex(0) --- >>> return { 1 >^^^^^^^^^^^^ @@ -397,9 +401,9 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts > 2 > return 3 > -1 >Emitted(27, 13) Source(25, 13) + SourceIndex(0) -2 >Emitted(27, 19) Source(25, 19) + SourceIndex(0) -3 >Emitted(27, 20) Source(25, 20) + SourceIndex(0) +1 >Emitted(31, 13) Source(25, 13) + SourceIndex(0) +2 >Emitted(31, 19) Source(25, 19) + SourceIndex(0) +3 >Emitted(31, 20) Source(25, 20) + SourceIndex(0) --- >>> cProp: 1, 1->^^^^^^^^^^^^^^^^ @@ -412,10 +416,10 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 2 > cProp 3 > : 4 > 1 -1->Emitted(28, 17) Source(26, 17) + SourceIndex(0) -2 >Emitted(28, 22) Source(26, 22) + SourceIndex(0) -3 >Emitted(28, 24) Source(26, 24) + SourceIndex(0) -4 >Emitted(28, 25) Source(26, 25) + SourceIndex(0) +1->Emitted(32, 17) Source(26, 17) + SourceIndex(0) +2 >Emitted(32, 22) Source(26, 22) + SourceIndex(0) +3 >Emitted(32, 24) Source(26, 24) + SourceIndex(0) +4 >Emitted(32, 25) Source(26, 25) + SourceIndex(0) --- >>> dProp: function () { return _this; }, 1->^^^^^^^^^^^^^^^^ @@ -436,14 +440,14 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 6 > this 7 > 8 > this -1->Emitted(29, 17) Source(27, 17) + SourceIndex(0) -2 >Emitted(29, 22) Source(27, 22) + SourceIndex(0) -3 >Emitted(29, 24) Source(27, 24) + SourceIndex(0) -4 >Emitted(29, 38) Source(27, 30) + SourceIndex(0) -5 >Emitted(29, 45) Source(27, 30) + SourceIndex(0) -6 >Emitted(29, 50) Source(27, 34) + SourceIndex(0) -7 >Emitted(29, 52) Source(27, 30) + SourceIndex(0) -8 >Emitted(29, 53) Source(27, 34) + SourceIndex(0) +1->Emitted(33, 17) Source(27, 17) + SourceIndex(0) +2 >Emitted(33, 22) Source(27, 22) + SourceIndex(0) +3 >Emitted(33, 24) Source(27, 24) + SourceIndex(0) +4 >Emitted(33, 38) Source(27, 30) + SourceIndex(0) +5 >Emitted(33, 45) Source(27, 30) + SourceIndex(0) +6 >Emitted(33, 50) Source(27, 34) + SourceIndex(0) +7 >Emitted(33, 52) Source(27, 30) + SourceIndex(0) +8 >Emitted(33, 53) Source(27, 34) + SourceIndex(0) --- >>> foo: function () { return "You win!!!!!"; } 1->^^^^^^^^^^^^^^^^ @@ -465,15 +469,15 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 7 > 8 > 9 > } -1->Emitted(30, 17) Source(28, 17) + SourceIndex(0) -2 >Emitted(30, 20) Source(28, 20) + SourceIndex(0) -3 >Emitted(30, 36) Source(28, 25) + SourceIndex(0) -4 >Emitted(30, 42) Source(28, 31) + SourceIndex(0) -5 >Emitted(30, 43) Source(28, 32) + SourceIndex(0) -6 >Emitted(30, 57) Source(28, 46) + SourceIndex(0) -7 >Emitted(30, 58) Source(28, 46) + SourceIndex(0) -8 >Emitted(30, 59) Source(28, 47) + SourceIndex(0) -9 >Emitted(30, 60) Source(28, 48) + SourceIndex(0) +1->Emitted(34, 17) Source(28, 17) + SourceIndex(0) +2 >Emitted(34, 20) Source(28, 20) + SourceIndex(0) +3 >Emitted(34, 36) Source(28, 25) + SourceIndex(0) +4 >Emitted(34, 42) Source(28, 31) + SourceIndex(0) +5 >Emitted(34, 43) Source(28, 32) + SourceIndex(0) +6 >Emitted(34, 57) Source(28, 46) + SourceIndex(0) +7 >Emitted(34, 58) Source(28, 46) + SourceIndex(0) +8 >Emitted(34, 59) Source(28, 47) + SourceIndex(0) +9 >Emitted(34, 60) Source(28, 48) + SourceIndex(0) --- >>> }; 1 >^^^^^^^^^^^^^ @@ -481,8 +485,8 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 1 > > } 2 > ; -1 >Emitted(31, 14) Source(29, 14) + SourceIndex(0) -2 >Emitted(31, 15) Source(29, 15) + SourceIndex(0) +1 >Emitted(35, 14) Source(29, 14) + SourceIndex(0) +2 >Emitted(35, 15) Source(29, 15) + SourceIndex(0) --- >>> } 1 >^^^^^^^^ @@ -491,8 +495,8 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 1 > > 2 > } -1 >Emitted(32, 9) Source(30, 9) + SourceIndex(0) -2 >Emitted(32, 10) Source(30, 10) + SourceIndex(0) +1 >Emitted(36, 9) Source(30, 9) + SourceIndex(0) +2 >Emitted(36, 10) Source(30, 10) + SourceIndex(0) --- >>> else 1->^^^^^^^^ @@ -501,8 +505,8 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 1-> > 2 > else -1->Emitted(33, 9) Source(31, 9) + SourceIndex(0) -2 >Emitted(33, 13) Source(31, 13) + SourceIndex(0) +1->Emitted(37, 9) Source(31, 9) + SourceIndex(0) +2 >Emitted(37, 13) Source(31, 13) + SourceIndex(0) --- >>> return null; 1->^^^^^^^^^^^^ @@ -516,11 +520,11 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 3 > 4 > null 5 > ; -1->Emitted(34, 13) Source(32, 13) + SourceIndex(0) -2 >Emitted(34, 19) Source(32, 19) + SourceIndex(0) -3 >Emitted(34, 20) Source(32, 20) + SourceIndex(0) -4 >Emitted(34, 24) Source(32, 24) + SourceIndex(0) -5 >Emitted(34, 25) Source(32, 25) + SourceIndex(0) +1->Emitted(38, 13) Source(32, 13) + SourceIndex(0) +2 >Emitted(38, 19) Source(32, 19) + SourceIndex(0) +3 >Emitted(38, 20) Source(32, 20) + SourceIndex(0) +4 >Emitted(38, 24) Source(32, 24) + SourceIndex(0) +5 >Emitted(38, 25) Source(32, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -529,8 +533,8 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 1 > > 2 > } -1 >Emitted(35, 5) Source(33, 5) + SourceIndex(0) -2 >Emitted(35, 6) Source(33, 6) + SourceIndex(0) +1 >Emitted(39, 5) Source(33, 5) + SourceIndex(0) +2 >Emitted(39, 6) Source(33, 6) + SourceIndex(0) --- >>> return D; 1->^^^^ @@ -538,8 +542,8 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 1-> > 2 > } -1->Emitted(36, 5) Source(34, 1) + SourceIndex(0) -2 >Emitted(36, 13) Source(34, 2) + SourceIndex(0) +1->Emitted(40, 5) Source(34, 1) + SourceIndex(0) +2 >Emitted(40, 13) Source(34, 2) + SourceIndex(0) --- >>>}(C)); 1 > @@ -572,11 +576,11 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts > return null; > } > } -1 >Emitted(37, 1) Source(34, 1) + SourceIndex(0) -2 >Emitted(37, 2) Source(34, 2) + SourceIndex(0) -3 >Emitted(37, 2) Source(17, 1) + SourceIndex(0) -4 >Emitted(37, 3) Source(17, 17) + SourceIndex(0) -5 >Emitted(37, 4) Source(17, 18) + SourceIndex(0) -6 >Emitted(37, 7) Source(34, 2) + SourceIndex(0) +1 >Emitted(41, 1) Source(34, 1) + SourceIndex(0) +2 >Emitted(41, 2) Source(34, 2) + SourceIndex(0) +3 >Emitted(41, 2) Source(17, 1) + SourceIndex(0) +4 >Emitted(41, 3) Source(17, 17) + SourceIndex(0) +5 >Emitted(41, 4) Source(17, 18) + SourceIndex(0) +6 >Emitted(41, 7) Source(34, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=derivedClassConstructorWithExplicitReturns01.js.map \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js b/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js index 55ceea201ed72..31c8c3f722c3a 100644 --- a/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js +++ b/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js @@ -35,7 +35,11 @@ class Derived4 extends Base2 { //// [derivedClassConstructorWithoutSuperCall.js] // derived class constructors must contain a super call var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.js b/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.js index fe6be20e2ac89..b948302a2d542 100644 --- a/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.js +++ b/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.js @@ -16,7 +16,11 @@ class Derived extends Base { //// [derivedClassFunctionOverridesBaseClassAccessor.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassIncludesInheritedMembers.js b/tests/baselines/reference/derivedClassIncludesInheritedMembers.js index 8b6f6fe34cb6d..cf5454d704f29 100644 --- a/tests/baselines/reference/derivedClassIncludesInheritedMembers.js +++ b/tests/baselines/reference/derivedClassIncludesInheritedMembers.js @@ -42,7 +42,11 @@ var r8 = d2[1]; //// [derivedClassIncludesInheritedMembers.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesIndexersWithAssignmentCompatibility.js b/tests/baselines/reference/derivedClassOverridesIndexersWithAssignmentCompatibility.js index 80fd6fd251c7e..0d483a3eff6f0 100644 --- a/tests/baselines/reference/derivedClassOverridesIndexersWithAssignmentCompatibility.js +++ b/tests/baselines/reference/derivedClassOverridesIndexersWithAssignmentCompatibility.js @@ -19,7 +19,11 @@ class Derived2 extends Base2 { //// [derivedClassOverridesIndexersWithAssignmentCompatibility.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesPrivateFunction1.js b/tests/baselines/reference/derivedClassOverridesPrivateFunction1.js index c5d48de031ed7..8306e702cb123 100644 --- a/tests/baselines/reference/derivedClassOverridesPrivateFunction1.js +++ b/tests/baselines/reference/derivedClassOverridesPrivateFunction1.js @@ -17,7 +17,11 @@ new DerivedClass(); //// [derivedClassOverridesPrivateFunction1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesPrivates.js b/tests/baselines/reference/derivedClassOverridesPrivates.js index fa4b88bdc56d2..c32560eca59f7 100644 --- a/tests/baselines/reference/derivedClassOverridesPrivates.js +++ b/tests/baselines/reference/derivedClassOverridesPrivates.js @@ -17,7 +17,11 @@ class Derived2 extends Base2 { //// [derivedClassOverridesPrivates.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers.js index b4fb59ffd2c16..03addf8ace5db 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers.js @@ -38,7 +38,11 @@ class Derived extends Base { //// [derivedClassOverridesProtectedMembers.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js index 13f2cfc469804..0cfe6f3dd9d84 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js @@ -65,7 +65,11 @@ var r8 = d2[1]; //// [derivedClassOverridesProtectedMembers2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js index 24602737e6b46..d18fd9d1a30be 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js @@ -73,7 +73,11 @@ class Derived10 extends Base { //// [derivedClassOverridesProtectedMembers3.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers4.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers4.js index add886d198563..2d89040ff13ce 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers4.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers4.js @@ -16,7 +16,11 @@ class Derived2 extends Derived1 { //// [derivedClassOverridesProtectedMembers4.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesPublicMembers.js b/tests/baselines/reference/derivedClassOverridesPublicMembers.js index d8fa9e826834b..2ef057082bdcb 100644 --- a/tests/baselines/reference/derivedClassOverridesPublicMembers.js +++ b/tests/baselines/reference/derivedClassOverridesPublicMembers.js @@ -64,7 +64,11 @@ var r8 = d2[1]; //// [derivedClassOverridesPublicMembers.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesWithoutSubtype.js b/tests/baselines/reference/derivedClassOverridesWithoutSubtype.js index bcd4e505721b1..4a1f7c0cbebf9 100644 --- a/tests/baselines/reference/derivedClassOverridesWithoutSubtype.js +++ b/tests/baselines/reference/derivedClassOverridesWithoutSubtype.js @@ -25,7 +25,11 @@ class Derived2 extends Base2 { //// [derivedClassOverridesWithoutSubtype.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassParameterProperties.js b/tests/baselines/reference/derivedClassParameterProperties.js index cb08d4d854561..cdf1ab4cbbd09 100644 --- a/tests/baselines/reference/derivedClassParameterProperties.js +++ b/tests/baselines/reference/derivedClassParameterProperties.js @@ -97,7 +97,11 @@ class Derived10 extends Base2 { //// [derivedClassParameterProperties.js] // ordering of super calls in derived constructors matters depending on other class contents var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js b/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js index cf7845a4d9ad4..c7a90e31dfe35 100644 --- a/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js +++ b/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js @@ -34,7 +34,11 @@ class Derived extends Base { //// [derivedClassSuperCallsInNonConstructorMembers.js] // error to use super calls outside a constructor var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js b/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js index 59a4ff7e1d17f..3d3aacdf55b57 100644 --- a/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js +++ b/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js @@ -30,7 +30,11 @@ class Derived4 extends Base { //// [derivedClassSuperCallsWithThisArg.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassTransitivity.js b/tests/baselines/reference/derivedClassTransitivity.js index 6a6b713f25001..c5ea3722feb81 100644 --- a/tests/baselines/reference/derivedClassTransitivity.js +++ b/tests/baselines/reference/derivedClassTransitivity.js @@ -23,7 +23,11 @@ var r2 = e.foo(''); //// [derivedClassTransitivity.js] // subclassing is not transitive when you can remove required parameters and add optional parameters var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassTransitivity2.js b/tests/baselines/reference/derivedClassTransitivity2.js index 2d05dd09cee43..bf9f1dbb5746e 100644 --- a/tests/baselines/reference/derivedClassTransitivity2.js +++ b/tests/baselines/reference/derivedClassTransitivity2.js @@ -23,7 +23,11 @@ var r2 = e.foo(1, ''); //// [derivedClassTransitivity2.js] // subclassing is not transitive when you can remove required parameters and add optional parameters var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassTransitivity3.js b/tests/baselines/reference/derivedClassTransitivity3.js index 6c02e2055d919..d149d9f5aa9e1 100644 --- a/tests/baselines/reference/derivedClassTransitivity3.js +++ b/tests/baselines/reference/derivedClassTransitivity3.js @@ -23,7 +23,11 @@ var r2 = e.foo('', 1); //// [derivedClassTransitivity3.js] // subclassing is not transitive when you can remove required parameters and add optional parameters var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassTransitivity4.js b/tests/baselines/reference/derivedClassTransitivity4.js index 7d375e8e94e1f..2d48cf287285b 100644 --- a/tests/baselines/reference/derivedClassTransitivity4.js +++ b/tests/baselines/reference/derivedClassTransitivity4.js @@ -23,7 +23,11 @@ var r2 = e.foo(''); //// [derivedClassTransitivity4.js] // subclassing is not transitive when you can remove required parameters and add optional parameters on protected members var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassWithAny.js b/tests/baselines/reference/derivedClassWithAny.js index 51b4e5739f6c6..b376364e542be 100644 --- a/tests/baselines/reference/derivedClassWithAny.js +++ b/tests/baselines/reference/derivedClassWithAny.js @@ -61,7 +61,11 @@ var r = c.foo(); // e.foo would return string //// [derivedClassWithAny.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js index 8a86f4ab4a996..e5fe6eb2560de 100644 --- a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js +++ b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js @@ -24,7 +24,11 @@ class Derived extends Base { //// [derivedClassWithPrivateInstanceShadowingProtectedInstance.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js index fab643265cb30..5ac36e99b5749 100644 --- a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js +++ b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js @@ -34,7 +34,11 @@ Derived.a = 2; // error //// [derivedClassWithPrivateInstanceShadowingPublicInstance.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js index 322514e1c8246..9994c1bfb05ea 100644 --- a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js +++ b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js @@ -23,7 +23,11 @@ class Derived extends Base { //// [derivedClassWithPrivateStaticShadowingProtectedStatic.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js index 8c01a45e1ae0d..4183017f378fd 100644 --- a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js +++ b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js @@ -35,7 +35,11 @@ Derived.a = 2; // error //// [derivedClassWithPrivateStaticShadowingPublicStatic.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js b/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js index 462819c551da3..d21cb14bcc440 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js @@ -27,7 +27,11 @@ var d2 = new D(new Date()); // ok //// [derivedClassWithoutExplicitConstructor.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js b/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js index 6e7c75ef37d97..0acf65cd177cb 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js @@ -35,7 +35,11 @@ var d4 = new D(new Date(), new Date(), new Date()); //// [derivedClassWithoutExplicitConstructor2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js b/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js index 4d4527c172ee9..696ebcc1f9e4c 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js @@ -49,7 +49,11 @@ var d3 = new D2(new Date(), new Date()); // ok //// [derivedClassWithoutExplicitConstructor3.js] // automatic constructors with a class hieararchy of depth > 2 var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClasses.js b/tests/baselines/reference/derivedClasses.js index 00bdfcfde4e98..36f1dcc799b01 100644 --- a/tests/baselines/reference/derivedClasses.js +++ b/tests/baselines/reference/derivedClasses.js @@ -32,7 +32,11 @@ b.hue(); //// [derivedClasses.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedGenericClassWithAny.js b/tests/baselines/reference/derivedGenericClassWithAny.js index 410027ce76d3c..afba93ccac67b 100644 --- a/tests/baselines/reference/derivedGenericClassWithAny.js +++ b/tests/baselines/reference/derivedGenericClassWithAny.js @@ -44,7 +44,11 @@ var r = c.foo(); // e.foo would return string //// [derivedGenericClassWithAny.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js b/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js index 367b0d895cf81..c33bd3713fc62 100644 --- a/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js +++ b/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js @@ -19,7 +19,11 @@ class Derived extends Base { //// [derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js b/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js index c890a28b110b9..3e28aece101cf 100644 --- a/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js +++ b/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js @@ -22,7 +22,11 @@ var r: Base[] = [d1, d2]; //// [derivedTypeDoesNotRequireExtendsClause.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/destructuringParameterDeclaration5.js b/tests/baselines/reference/destructuringParameterDeclaration5.js index d7b75ede23df5..0c27e9b7f8580 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration5.js +++ b/tests/baselines/reference/destructuringParameterDeclaration5.js @@ -53,7 +53,11 @@ d3({ y: "world" }); //// [destructuringParameterDeclaration5.js] // Parameter Declaration with generic var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js b/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js index fbc08b66624cf..80613c66be877 100644 --- a/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js +++ b/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js @@ -15,7 +15,11 @@ class B extends A { //// [emitSuperCallBeforeEmitParameterPropertyDeclaration1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js index 1328ece2af0ca..c0478a993c40e 100644 --- a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js +++ b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js @@ -17,7 +17,11 @@ class B extends A { //// [emitSuperCallBeforeEmitPropertyDeclaration1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js index a9883b26e3037..5d63f4f32afe2 100644 --- a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js +++ b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js @@ -15,7 +15,11 @@ class B extends A { //// [emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/emitThisInSuperMethodCall.js b/tests/baselines/reference/emitThisInSuperMethodCall.js index 1e23553a2d94d..22d641e3414da 100644 --- a/tests/baselines/reference/emitThisInSuperMethodCall.js +++ b/tests/baselines/reference/emitThisInSuperMethodCall.js @@ -29,7 +29,11 @@ class RegisteredUser extends User { //// [emitThisInSuperMethodCall.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/emptyModuleName.js b/tests/baselines/reference/emptyModuleName.js index 404abf6a42c02..f6f4ea759a68b 100644 --- a/tests/baselines/reference/emptyModuleName.js +++ b/tests/baselines/reference/emptyModuleName.js @@ -6,7 +6,11 @@ class B extends A { //// [emptyModuleName.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/errorForwardReferenceForwadingConstructor.js b/tests/baselines/reference/errorForwardReferenceForwadingConstructor.js index 2bfac7ec0f03d..3320b144f11c1 100644 --- a/tests/baselines/reference/errorForwardReferenceForwadingConstructor.js +++ b/tests/baselines/reference/errorForwardReferenceForwadingConstructor.js @@ -13,7 +13,11 @@ class derived extends base { } //// [errorForwardReferenceForwadingConstructor.js] // Error forward referencing derived class with forwarding constructor var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/errorSuperCalls.js b/tests/baselines/reference/errorSuperCalls.js index 4e22877756783..69691a62bb7ac 100644 --- a/tests/baselines/reference/errorSuperCalls.js +++ b/tests/baselines/reference/errorSuperCalls.js @@ -76,7 +76,11 @@ class OtherDerived extends OtherBase { //// [errorSuperCalls.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/errorSuperPropertyAccess.js b/tests/baselines/reference/errorSuperPropertyAccess.js index 62bb99191711d..ed9ac2d8dd534 100644 --- a/tests/baselines/reference/errorSuperPropertyAccess.js +++ b/tests/baselines/reference/errorSuperPropertyAccess.js @@ -130,7 +130,11 @@ var obj = { n: super.wat, p: super.foo() }; //// [errorSuperPropertyAccess.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/errorsInGenericTypeReference.js b/tests/baselines/reference/errorsInGenericTypeReference.js index bb80f73f21676..e63005bfe1a60 100644 --- a/tests/baselines/reference/errorsInGenericTypeReference.js +++ b/tests/baselines/reference/errorsInGenericTypeReference.js @@ -74,7 +74,11 @@ interface testInterface2 { //// [errorsInGenericTypeReference.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/es6ClassSuperCodegenBug.js b/tests/baselines/reference/es6ClassSuperCodegenBug.js index fc6ad83738dba..af87c3db8216b 100644 --- a/tests/baselines/reference/es6ClassSuperCodegenBug.js +++ b/tests/baselines/reference/es6ClassSuperCodegenBug.js @@ -16,7 +16,11 @@ class B extends A { //// [es6ClassSuperCodegenBug.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/es6ClassTest.js b/tests/baselines/reference/es6ClassTest.js index 8fa5be0ba3e50..a20d939a794b1 100644 --- a/tests/baselines/reference/es6ClassTest.js +++ b/tests/baselines/reference/es6ClassTest.js @@ -86,7 +86,11 @@ declare module AmbientMod { //// [es6ClassTest.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/es6ClassTest2.js b/tests/baselines/reference/es6ClassTest2.js index 7004c7056f2a9..11d494c6291ef 100644 --- a/tests/baselines/reference/es6ClassTest2.js +++ b/tests/baselines/reference/es6ClassTest2.js @@ -160,7 +160,11 @@ var ccwc = new ChildClassWithoutConstructor(1, "s"); //// [es6ClassTest2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/es6ClassTest7.js b/tests/baselines/reference/es6ClassTest7.js index 20d46e6b53ce0..9cd21f4468547 100644 --- a/tests/baselines/reference/es6ClassTest7.js +++ b/tests/baselines/reference/es6ClassTest7.js @@ -10,7 +10,11 @@ class Bar extends M.Foo { //// [es6ClassTest7.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/exportAssignmentOfGenericType1.js b/tests/baselines/reference/exportAssignmentOfGenericType1.js index 431da58c12e3c..e5d43bfaa9ea3 100644 --- a/tests/baselines/reference/exportAssignmentOfGenericType1.js +++ b/tests/baselines/reference/exportAssignmentOfGenericType1.js @@ -25,7 +25,11 @@ define(["require", "exports"], function (require, exports) { }); //// [exportAssignmentOfGenericType1_1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/exportDeclarationInInternalModule.js b/tests/baselines/reference/exportDeclarationInInternalModule.js index ddc2e15a5b224..934b3bb6ef021 100644 --- a/tests/baselines/reference/exportDeclarationInInternalModule.js +++ b/tests/baselines/reference/exportDeclarationInInternalModule.js @@ -20,7 +20,11 @@ var a: Bbb.SomeType; //// [exportDeclarationInInternalModule.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extBaseClass1.js b/tests/baselines/reference/extBaseClass1.js index d8eb5e75f9f8f..4603ff26320f8 100644 --- a/tests/baselines/reference/extBaseClass1.js +++ b/tests/baselines/reference/extBaseClass1.js @@ -21,7 +21,11 @@ module N { //// [extBaseClass1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extBaseClass2.js b/tests/baselines/reference/extBaseClass2.js index 474a91d2a7278..285c96551b547 100644 --- a/tests/baselines/reference/extBaseClass2.js +++ b/tests/baselines/reference/extBaseClass2.js @@ -12,7 +12,11 @@ module M { //// [extBaseClass2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendAndImplementTheSameBaseType.js b/tests/baselines/reference/extendAndImplementTheSameBaseType.js index 1342df1b99293..b3150a12bde7a 100644 --- a/tests/baselines/reference/extendAndImplementTheSameBaseType.js +++ b/tests/baselines/reference/extendAndImplementTheSameBaseType.js @@ -15,7 +15,11 @@ d.foo; //// [extendAndImplementTheSameBaseType.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendAndImplementTheSameBaseType2.js b/tests/baselines/reference/extendAndImplementTheSameBaseType2.js index 38b76b199428e..1ecd77668d3b8 100644 --- a/tests/baselines/reference/extendAndImplementTheSameBaseType2.js +++ b/tests/baselines/reference/extendAndImplementTheSameBaseType2.js @@ -18,7 +18,11 @@ var r4: number = d.bar(); //// [extendAndImplementTheSameBaseType2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendBaseClassBeforeItsDeclared.js b/tests/baselines/reference/extendBaseClassBeforeItsDeclared.js index 8cf5164283179..73c19b7256571 100644 --- a/tests/baselines/reference/extendBaseClassBeforeItsDeclared.js +++ b/tests/baselines/reference/extendBaseClassBeforeItsDeclared.js @@ -5,7 +5,11 @@ class base { constructor (public n: number) { } } //// [extendBaseClassBeforeItsDeclared.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendClassExpressionFromModule.js b/tests/baselines/reference/extendClassExpressionFromModule.js index 27420b55d1c8f..bd3e01a7b296c 100644 --- a/tests/baselines/reference/extendClassExpressionFromModule.js +++ b/tests/baselines/reference/extendClassExpressionFromModule.js @@ -22,7 +22,11 @@ module.exports = x; //// [foo2.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendConstructSignatureInInterface.js b/tests/baselines/reference/extendConstructSignatureInInterface.js index db87c4c14fdef..28c5108f23810 100644 --- a/tests/baselines/reference/extendConstructSignatureInInterface.js +++ b/tests/baselines/reference/extendConstructSignatureInInterface.js @@ -12,7 +12,11 @@ var e: E = new E(1); //// [extendConstructSignatureInInterface.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendNonClassSymbol1.js b/tests/baselines/reference/extendNonClassSymbol1.js index 00326e241030d..8a6da5f4fa773 100644 --- a/tests/baselines/reference/extendNonClassSymbol1.js +++ b/tests/baselines/reference/extendNonClassSymbol1.js @@ -5,7 +5,11 @@ class C extends x { } // error, could not find symbol xs //// [extendNonClassSymbol1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendNonClassSymbol2.js b/tests/baselines/reference/extendNonClassSymbol2.js index ce030629af5ce..60f7a46a14fb9 100644 --- a/tests/baselines/reference/extendNonClassSymbol2.js +++ b/tests/baselines/reference/extendNonClassSymbol2.js @@ -7,7 +7,11 @@ class C extends Foo {} // error, could not find symbol Foo //// [extendNonClassSymbol2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendPrivateConstructorClass.js b/tests/baselines/reference/extendPrivateConstructorClass.js index 52b96e316113e..983c72203978d 100644 --- a/tests/baselines/reference/extendPrivateConstructorClass.js +++ b/tests/baselines/reference/extendPrivateConstructorClass.js @@ -11,7 +11,11 @@ class C extends abc.XYZ { //// [extendPrivateConstructorClass.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js b/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js index 92c5dc696817d..af5f78dfcecb2 100644 --- a/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js +++ b/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js @@ -43,7 +43,11 @@ exports.Model = Model; //// [extendingClassFromAliasAndUsageInIndexer_moduleA.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -59,7 +63,11 @@ exports.VisualizationModel = VisualizationModel; //// [extendingClassFromAliasAndUsageInIndexer_moduleB.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendsClauseAlreadySeen.js b/tests/baselines/reference/extendsClauseAlreadySeen.js index 37cdd0eb9bcc0..06326b5428292 100644 --- a/tests/baselines/reference/extendsClauseAlreadySeen.js +++ b/tests/baselines/reference/extendsClauseAlreadySeen.js @@ -8,7 +8,11 @@ class D extends C extends C { //// [extendsClauseAlreadySeen.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendsClauseAlreadySeen2.js b/tests/baselines/reference/extendsClauseAlreadySeen2.js index bc4306884a3c6..7155524855662 100644 --- a/tests/baselines/reference/extendsClauseAlreadySeen2.js +++ b/tests/baselines/reference/extendsClauseAlreadySeen2.js @@ -8,7 +8,11 @@ class D extends C extends C { //// [extendsClauseAlreadySeen2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/fluentClasses.js b/tests/baselines/reference/fluentClasses.js index ade60a06331de..360c7775d3597 100644 --- a/tests/baselines/reference/fluentClasses.js +++ b/tests/baselines/reference/fluentClasses.js @@ -20,7 +20,11 @@ var z = c.foo().bar().baz(); // Fluent pattern //// [fluentClasses.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/for-inStatements.js b/tests/baselines/reference/for-inStatements.js index b34fd91192bd3..90ab9a3f96ba4 100644 --- a/tests/baselines/reference/for-inStatements.js +++ b/tests/baselines/reference/for-inStatements.js @@ -82,7 +82,11 @@ for (var x in Color.Blue) { } //// [for-inStatements.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/for-inStatementsInvalid.js b/tests/baselines/reference/for-inStatementsInvalid.js index 3d39fb2903bd1..2ba55110f2e0e 100644 --- a/tests/baselines/reference/for-inStatementsInvalid.js +++ b/tests/baselines/reference/for-inStatementsInvalid.js @@ -65,7 +65,11 @@ for (var x in i[42]) { } //// [for-inStatementsInvalid.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/forStatementsMultipleInvalidDecl.js b/tests/baselines/reference/forStatementsMultipleInvalidDecl.js index 8ca8c794cf53d..31398cb2af9f7 100644 --- a/tests/baselines/reference/forStatementsMultipleInvalidDecl.js +++ b/tests/baselines/reference/forStatementsMultipleInvalidDecl.js @@ -56,7 +56,11 @@ for( var m = M.A;;){} //// [forStatementsMultipleInvalidDecl.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/functionImplementationErrors.js b/tests/baselines/reference/functionImplementationErrors.js index 5c8defcf814a0..a91b1b78f07f1 100644 --- a/tests/baselines/reference/functionImplementationErrors.js +++ b/tests/baselines/reference/functionImplementationErrors.js @@ -76,7 +76,11 @@ var f13 = () => { //// [functionImplementationErrors.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/functionImplementations.js b/tests/baselines/reference/functionImplementations.js index e73e509570141..4854d715c32f6 100644 --- a/tests/baselines/reference/functionImplementations.js +++ b/tests/baselines/reference/functionImplementations.js @@ -159,7 +159,11 @@ var f12: (x: number) => any = x => { // should be (x: number) => Base | AnotherC //// [functionImplementations.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/functionSubtypingOfVarArgs.js b/tests/baselines/reference/functionSubtypingOfVarArgs.js index 89e8b1e95ef82..4cd1f1096f380 100644 --- a/tests/baselines/reference/functionSubtypingOfVarArgs.js +++ b/tests/baselines/reference/functionSubtypingOfVarArgs.js @@ -16,7 +16,11 @@ class StringEvent extends EventBase { // should work //// [functionSubtypingOfVarArgs.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/functionSubtypingOfVarArgs2.js b/tests/baselines/reference/functionSubtypingOfVarArgs2.js index be9c293ae7288..fc3562ca339ac 100644 --- a/tests/baselines/reference/functionSubtypingOfVarArgs2.js +++ b/tests/baselines/reference/functionSubtypingOfVarArgs2.js @@ -16,7 +16,11 @@ class StringEvent extends EventBase { //// [functionSubtypingOfVarArgs2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/generatedContextualTyping.js b/tests/baselines/reference/generatedContextualTyping.js index 06abd1b9a8bb2..0cf8767aa5858 100644 --- a/tests/baselines/reference/generatedContextualTyping.js +++ b/tests/baselines/reference/generatedContextualTyping.js @@ -357,7 +357,11 @@ var x356 = function(n: Genric) { }; x356({ func: n => { return [d1, d2]; } //// [generatedContextualTyping.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericBaseClassLiteralProperty.js b/tests/baselines/reference/genericBaseClassLiteralProperty.js index b572cfae97d71..753aa2f07339c 100644 --- a/tests/baselines/reference/genericBaseClassLiteralProperty.js +++ b/tests/baselines/reference/genericBaseClassLiteralProperty.js @@ -14,7 +14,11 @@ class SubClass extends BaseClass { //// [genericBaseClassLiteralProperty.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericBaseClassLiteralProperty2.js b/tests/baselines/reference/genericBaseClassLiteralProperty2.js index 9e99dee2b4c1d..131fc2d36abc6 100644 --- a/tests/baselines/reference/genericBaseClassLiteralProperty2.js +++ b/tests/baselines/reference/genericBaseClassLiteralProperty2.js @@ -17,7 +17,11 @@ class DataView2 extends BaseCollection2 { //// [genericBaseClassLiteralProperty2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.js b/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.js index 68a3e77f9aedb..055ef9d2f8626 100644 --- a/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.js +++ b/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.js @@ -110,7 +110,11 @@ var r11 = i.foo8(); // Base //// [genericCallWithConstraintsTypeArgumentInference.js] // Basic type inference with generic calls and constraints, no errors expected var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgs2.js b/tests/baselines/reference/genericCallWithObjectTypeArgs2.js index 0b643db14cbaf..e4399d1903757 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgs2.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgs2.js @@ -34,7 +34,11 @@ var r4 = f2(i); // Base => Derived //// [genericCallWithObjectTypeArgs2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js index 98448645d1591..f86cc2da29322 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js @@ -42,7 +42,11 @@ var r7 = f3(null, x => x); // any // Generic call with constraints infering type parameter from object member properties // No errors expected var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js index 71bf682b0dc19..01a11c7f90ba1 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js @@ -40,7 +40,11 @@ var r6 = f3(x => x, null); //// [genericCallWithObjectTypeArgsAndConstraints3.js] // Generic call with constraints infering type parameter from object member properties var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericCallbacksAndClassHierarchy.js b/tests/baselines/reference/genericCallbacksAndClassHierarchy.js index 67d0df1bc22be..d4303fa2037c1 100644 --- a/tests/baselines/reference/genericCallbacksAndClassHierarchy.js +++ b/tests/baselines/reference/genericCallbacksAndClassHierarchy.js @@ -25,7 +25,11 @@ module M { //// [genericCallbacksAndClassHierarchy.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericClassExpressionInFunction.js b/tests/baselines/reference/genericClassExpressionInFunction.js index 3db4d9693af85..ab826e2916dc8 100644 --- a/tests/baselines/reference/genericClassExpressionInFunction.js +++ b/tests/baselines/reference/genericClassExpressionInFunction.js @@ -33,7 +33,11 @@ s.genericVar = 12; //// [genericClassExpressionInFunction.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericClassInheritsConstructorFromNonGenericClass.js b/tests/baselines/reference/genericClassInheritsConstructorFromNonGenericClass.js index 307c891f92882..dbd654576ecf5 100644 --- a/tests/baselines/reference/genericClassInheritsConstructorFromNonGenericClass.js +++ b/tests/baselines/reference/genericClassInheritsConstructorFromNonGenericClass.js @@ -7,7 +7,11 @@ class C { //// [genericClassInheritsConstructorFromNonGenericClass.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js b/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js index 147bbd8fb87d2..fa64843f29fad 100644 --- a/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js +++ b/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js @@ -77,7 +77,11 @@ class ViewModel implements Contract { //// [genericClassPropertyInheritanceSpecialization.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericClassStaticMethod.js b/tests/baselines/reference/genericClassStaticMethod.js index 257e7dbce9752..8345b3d93a7fe 100644 --- a/tests/baselines/reference/genericClassStaticMethod.js +++ b/tests/baselines/reference/genericClassStaticMethod.js @@ -12,7 +12,11 @@ class Bar extends Foo { //// [genericClassStaticMethod.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericClasses3.js b/tests/baselines/reference/genericClasses3.js index fbc62b23aabfe..2f8d09eae03e1 100644 --- a/tests/baselines/reference/genericClasses3.js +++ b/tests/baselines/reference/genericClasses3.js @@ -19,7 +19,11 @@ var z = v2.b; //// [genericClasses3.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js index 4043924bf5416..73fed8b3ea238 100644 --- a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js +++ b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js @@ -28,7 +28,11 @@ module EndGate.Tweening { //// [genericConstraintOnExtendedBuiltinTypes.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js index 33394ee4fce7d..8ec4552b70d12 100644 --- a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js +++ b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js @@ -27,7 +27,11 @@ module EndGate.Tweening { //// [genericConstraintOnExtendedBuiltinTypes2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.js b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.js index 413eed2a4c899..9da46a15ef7b0 100644 --- a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.js +++ b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.js @@ -14,7 +14,11 @@ x = y; // error //// [genericDerivedTypeWithSpecializedBase.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.js b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.js index da81eaf564078..df9c113ceb515 100644 --- a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.js +++ b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.js @@ -14,7 +14,11 @@ x = y; // error //// [genericDerivedTypeWithSpecializedBase2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericInheritedDefaultConstructors.js b/tests/baselines/reference/genericInheritedDefaultConstructors.js index d7aaa6224eff9..f287a5f934cea 100644 --- a/tests/baselines/reference/genericInheritedDefaultConstructors.js +++ b/tests/baselines/reference/genericInheritedDefaultConstructors.js @@ -12,7 +12,11 @@ var c:Constructor> = B; // shouldn't error here //// [genericInheritedDefaultConstructors.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericPrototypeProperty2.js b/tests/baselines/reference/genericPrototypeProperty2.js index 6ce627694ca46..892e6cc0217ee 100644 --- a/tests/baselines/reference/genericPrototypeProperty2.js +++ b/tests/baselines/reference/genericPrototypeProperty2.js @@ -17,7 +17,11 @@ class MyEventWrapper extends BaseEventWrapper { //// [genericPrototypeProperty2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericPrototypeProperty3.js b/tests/baselines/reference/genericPrototypeProperty3.js index a2817d82e9fcf..03755b2868303 100644 --- a/tests/baselines/reference/genericPrototypeProperty3.js +++ b/tests/baselines/reference/genericPrototypeProperty3.js @@ -16,7 +16,11 @@ class MyEventWrapper extends BaseEventWrapper { //// [genericPrototypeProperty3.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js index 2fbb5f7ef5025..f5c12bacce83e 100644 --- a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js +++ b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js @@ -28,7 +28,11 @@ module TypeScript2 { //// [genericRecursiveImplicitConstructorErrors2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js index c88dd78765a94..3c68033735100 100644 --- a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js +++ b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js @@ -32,7 +32,11 @@ module TypeScript { //// [genericRecursiveImplicitConstructorErrors3.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericTypeAssertions2.js b/tests/baselines/reference/genericTypeAssertions2.js index 25e4d3f3baeea..d13e06a8dddbb 100644 --- a/tests/baselines/reference/genericTypeAssertions2.js +++ b/tests/baselines/reference/genericTypeAssertions2.js @@ -15,7 +15,11 @@ var r5: A = >[]; // error //// [genericTypeAssertions2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericTypeAssertions4.js b/tests/baselines/reference/genericTypeAssertions4.js index d54f37408a318..e1c4cab059c2c 100644 --- a/tests/baselines/reference/genericTypeAssertions4.js +++ b/tests/baselines/reference/genericTypeAssertions4.js @@ -27,7 +27,11 @@ function foo2(x: T) { //// [genericTypeAssertions4.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericTypeAssertions6.js b/tests/baselines/reference/genericTypeAssertions6.js index 6ace4b38a1321..20a13d5718e0b 100644 --- a/tests/baselines/reference/genericTypeAssertions6.js +++ b/tests/baselines/reference/genericTypeAssertions6.js @@ -26,7 +26,11 @@ var c: A = >b; //// [genericTypeAssertions6.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericTypeConstraints.js b/tests/baselines/reference/genericTypeConstraints.js index 4aae830a0d131..b2332451507fb 100644 --- a/tests/baselines/reference/genericTypeConstraints.js +++ b/tests/baselines/reference/genericTypeConstraints.js @@ -15,7 +15,11 @@ class BarExtended extends Bar { //// [genericTypeConstraints.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js index ec7029135a9e7..267666439b102 100644 --- a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js +++ b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js @@ -41,7 +41,11 @@ var k = null; // it is an error to use a generic type without type arguments // all of these are errors var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js index d3797663e0e5a..7fce4984d9c5e 100644 --- a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js +++ b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js @@ -41,7 +41,11 @@ var k = null; // it is an error to use a generic type without type arguments // all of these are errors var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js b/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js index b5c3316ab12e5..444043fbeacfb 100644 --- a/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js +++ b/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js @@ -16,7 +16,11 @@ export class ListItem extends CollectionItem { //// [genericWithIndexerOfTypeParameterType2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/heterogeneousArrayLiterals.js b/tests/baselines/reference/heterogeneousArrayLiterals.js index 43ec9a0958789..6a9f8ae1453ca 100644 --- a/tests/baselines/reference/heterogeneousArrayLiterals.js +++ b/tests/baselines/reference/heterogeneousArrayLiterals.js @@ -134,7 +134,11 @@ function foo4(t: T, u: U) { //// [heterogeneousArrayLiterals.js] // type of an array is the best common type of its elements (plus its contextual type if it exists) var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/ifDoWhileStatements.js b/tests/baselines/reference/ifDoWhileStatements.js index 8d1ad1a834f9d..fea4eee36fa5f 100644 --- a/tests/baselines/reference/ifDoWhileStatements.js +++ b/tests/baselines/reference/ifDoWhileStatements.js @@ -165,7 +165,11 @@ do { }while(fn) //// [ifDoWhileStatements.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/illegalSuperCallsInConstructor.js b/tests/baselines/reference/illegalSuperCallsInConstructor.js index 5299bac5eb393..3de32da45c056 100644 --- a/tests/baselines/reference/illegalSuperCallsInConstructor.js +++ b/tests/baselines/reference/illegalSuperCallsInConstructor.js @@ -22,7 +22,11 @@ class Derived extends Base { //// [illegalSuperCallsInConstructor.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/implementClausePrecedingExtends.js b/tests/baselines/reference/implementClausePrecedingExtends.js index 669a6794618d9..5d7173588636f 100644 --- a/tests/baselines/reference/implementClausePrecedingExtends.js +++ b/tests/baselines/reference/implementClausePrecedingExtends.js @@ -4,7 +4,11 @@ class D implements C extends C { } //// [implementClausePrecedingExtends.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.js b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.js index 5d93d2b04a493..87b22c74f6bb2 100644 --- a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.js +++ b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.js @@ -87,7 +87,11 @@ module M2 { //// [implementingAnInterfaceExtendingClassWithPrivates2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.js b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.js index 082b9d801dc82..68ecf9ede2ba0 100644 --- a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.js +++ b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.js @@ -43,7 +43,11 @@ class Bar8 extends Foo implements I { //// [implementingAnInterfaceExtendingClassWithProtecteds.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/importAsBaseClass.js b/tests/baselines/reference/importAsBaseClass.js index f61703de5f09b..ea7c757e035f3 100644 --- a/tests/baselines/reference/importAsBaseClass.js +++ b/tests/baselines/reference/importAsBaseClass.js @@ -22,7 +22,11 @@ exports.Greeter = Greeter; //// [importAsBaseClass_1.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/importHelpers.js b/tests/baselines/reference/importHelpers.js index ec294a342deda..0a9dcd4a78044 100644 --- a/tests/baselines/reference/importHelpers.js +++ b/tests/baselines/reference/importHelpers.js @@ -69,7 +69,11 @@ C = tslib_1.__decorate([ ], C); //// [script.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/importHelpersNoHelpers.js b/tests/baselines/reference/importHelpersNoHelpers.js index 3a2e4823337cb..c7c575f5402b1 100644 --- a/tests/baselines/reference/importHelpersNoHelpers.js +++ b/tests/baselines/reference/importHelpersNoHelpers.js @@ -71,7 +71,11 @@ var y = tslib_1.__assign({}, o); var x = tslib_1.__rest(y, []); //// [script.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/importHelpersNoModule.js b/tests/baselines/reference/importHelpersNoModule.js index 991733f4b3752..212bc7a54f778 100644 --- a/tests/baselines/reference/importHelpersNoModule.js +++ b/tests/baselines/reference/importHelpersNoModule.js @@ -61,7 +61,11 @@ C = tslib_1.__decorate([ ], C); //// [script.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/importShadowsGlobalName.js b/tests/baselines/reference/importShadowsGlobalName.js index abdf7e28cbb06..8431a87ce03c7 100644 --- a/tests/baselines/reference/importShadowsGlobalName.js +++ b/tests/baselines/reference/importShadowsGlobalName.js @@ -22,7 +22,11 @@ define(["require", "exports"], function (require, exports) { }); //// [Bar.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/importUsedInExtendsList1.js b/tests/baselines/reference/importUsedInExtendsList1.js index 941436e7e7547..f44a0fcfce49c 100644 --- a/tests/baselines/reference/importUsedInExtendsList1.js +++ b/tests/baselines/reference/importUsedInExtendsList1.js @@ -22,7 +22,11 @@ exports.Super = Super; //// [importUsedInExtendsList1_1.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/indexerConstraints2.js b/tests/baselines/reference/indexerConstraints2.js index 81bb114e39415..45980beb09c78 100644 --- a/tests/baselines/reference/indexerConstraints2.js +++ b/tests/baselines/reference/indexerConstraints2.js @@ -30,7 +30,11 @@ class K extends J { //// [indexerConstraints2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/indirectSelfReference.js b/tests/baselines/reference/indirectSelfReference.js index a61a14a2d6b16..931525d4b6bc5 100644 --- a/tests/baselines/reference/indirectSelfReference.js +++ b/tests/baselines/reference/indirectSelfReference.js @@ -4,7 +4,11 @@ class b extends a{ } //// [indirectSelfReference.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/indirectSelfReferenceGeneric.js b/tests/baselines/reference/indirectSelfReferenceGeneric.js index 989a02b194396..e7d2bdf2a2b32 100644 --- a/tests/baselines/reference/indirectSelfReferenceGeneric.js +++ b/tests/baselines/reference/indirectSelfReferenceGeneric.js @@ -4,7 +4,11 @@ class b extends a { } //// [indirectSelfReferenceGeneric.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/infinitelyExpandingTypesNonGenericBase.js b/tests/baselines/reference/infinitelyExpandingTypesNonGenericBase.js index 7336e2c0f69af..96a8e84ff600a 100644 --- a/tests/baselines/reference/infinitelyExpandingTypesNonGenericBase.js +++ b/tests/baselines/reference/infinitelyExpandingTypesNonGenericBase.js @@ -26,7 +26,11 @@ o(A); //// [infinitelyExpandingTypesNonGenericBase.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritFromGenericTypeParameter.js b/tests/baselines/reference/inheritFromGenericTypeParameter.js index 57ad5b71bd8cf..d95150bbccc61 100644 --- a/tests/baselines/reference/inheritFromGenericTypeParameter.js +++ b/tests/baselines/reference/inheritFromGenericTypeParameter.js @@ -4,7 +4,11 @@ interface I extends T { } //// [inheritFromGenericTypeParameter.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritSameNamePrivatePropertiesFromSameOrigin.js b/tests/baselines/reference/inheritSameNamePrivatePropertiesFromSameOrigin.js index 679e91dc38a27..b1224117edea2 100644 --- a/tests/baselines/reference/inheritSameNamePrivatePropertiesFromSameOrigin.js +++ b/tests/baselines/reference/inheritSameNamePrivatePropertiesFromSameOrigin.js @@ -12,7 +12,11 @@ interface A extends C, C2 { // ok //// [inheritSameNamePrivatePropertiesFromSameOrigin.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritance.js b/tests/baselines/reference/inheritance.js index 01fdd0a3d67a4..b9a7c5a336f42 100644 --- a/tests/baselines/reference/inheritance.js +++ b/tests/baselines/reference/inheritance.js @@ -36,7 +36,11 @@ class Baad extends Good { //// [inheritance.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritance1.js b/tests/baselines/reference/inheritance1.js index c33c73a6e60fd..0e5bff48a3bcb 100644 --- a/tests/baselines/reference/inheritance1.js +++ b/tests/baselines/reference/inheritance1.js @@ -63,7 +63,11 @@ l1 = c; //// [inheritance1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js index 180f48f613c7d..bd4b70f793850 100644 --- a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js +++ b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js @@ -12,7 +12,11 @@ class C extends B { //// [inheritanceGrandParentPrivateMemberCollision.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js index 73121951e7c98..d72f85cf599d5 100644 --- a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js +++ b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js @@ -12,7 +12,11 @@ class C extends B { //// [inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js b/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js index 60183c5749ef5..c6b32f6bc5dfe 100644 --- a/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js +++ b/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js @@ -12,7 +12,11 @@ class C extends B { //// [inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js b/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js index fc1ff97e8cf47..fdc53cc7e9c69 100644 --- a/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js @@ -19,7 +19,11 @@ class b extends a { //// [inheritanceMemberAccessorOverridingAccessor.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.js b/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.js index 0ba2a70f257e5..13e624a9d5788 100644 --- a/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.js +++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.js @@ -16,7 +16,11 @@ class b extends a { //// [inheritanceMemberAccessorOverridingMethod.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js b/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js index 26c911694a25b..243992d5bd31e 100644 --- a/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js +++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js @@ -14,7 +14,11 @@ class b extends a { //// [inheritanceMemberAccessorOverridingProperty.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js b/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js index d0dfcc5923a1b..001f7b888e3e3 100644 --- a/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js @@ -16,7 +16,11 @@ class b extends a { //// [inheritanceMemberFuncOverridingAccessor.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.js b/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.js index 64e5e923178c6..33a35428b8ec1 100644 --- a/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.js +++ b/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.js @@ -13,7 +13,11 @@ class b extends a { //// [inheritanceMemberFuncOverridingMethod.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.js b/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.js index f3835a78f1485..0675aead22243 100644 --- a/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.js +++ b/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.js @@ -11,7 +11,11 @@ class b extends a { //// [inheritanceMemberFuncOverridingProperty.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js b/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js index 82fc4906ca6bc..ec3e8519e62d0 100644 --- a/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js @@ -15,7 +15,11 @@ class b extends a { //// [inheritanceMemberPropertyOverridingAccessor.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.js b/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.js index e13a111fef9ad..e2e1d7340012f 100644 --- a/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.js +++ b/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.js @@ -11,7 +11,11 @@ class b extends a { //// [inheritanceMemberPropertyOverridingMethod.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberPropertyOverridingProperty.js b/tests/baselines/reference/inheritanceMemberPropertyOverridingProperty.js index b6496085a61fe..50d6b108588a4 100644 --- a/tests/baselines/reference/inheritanceMemberPropertyOverridingProperty.js +++ b/tests/baselines/reference/inheritanceMemberPropertyOverridingProperty.js @@ -9,7 +9,11 @@ class b extends a { //// [inheritanceMemberPropertyOverridingProperty.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js b/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js index ac99c90e82923..871acd1d62446 100644 --- a/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js +++ b/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js @@ -9,7 +9,11 @@ var b3 = new B(); // error, could not select overload for 'new' expression //// [inheritanceOfGenericConstructorMethod1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js b/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js index 406675d88d99b..72f12c8f81fa8 100644 --- a/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js +++ b/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js @@ -16,7 +16,11 @@ var n3 = new N.D2(); // no error, D2 //// [inheritanceOfGenericConstructorMethod2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js b/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js index 3faa8f8388dca..c58a0643a06ec 100644 --- a/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js @@ -19,7 +19,11 @@ class b extends a { //// [inheritanceStaticAccessorOverridingAccessor.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js b/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js index 543651ea6f0e2..beba3dbdf5e61 100644 --- a/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js +++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js @@ -16,7 +16,11 @@ class b extends a { //// [inheritanceStaticAccessorOverridingMethod.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js b/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js index 5053cd3946ab2..d3f4b177e951e 100644 --- a/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js +++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js @@ -14,7 +14,11 @@ class b extends a { //// [inheritanceStaticAccessorOverridingProperty.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js index 6090bd4f74f2e..d86d08e7add3b 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js @@ -16,7 +16,11 @@ class b extends a { //// [inheritanceStaticFuncOverridingAccessor.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js index 5213eae20ddeb..1decf45e015ae 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js @@ -13,7 +13,11 @@ class b extends a { //// [inheritanceStaticFuncOverridingAccessorOfFuncType.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.js b/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.js index 4d85f383ef6aa..e9ea5d2f6a10b 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.js @@ -13,7 +13,11 @@ class b extends a { //// [inheritanceStaticFuncOverridingMethod.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.js b/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.js index a548d70861b70..dd2260ecf3175 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.js @@ -11,7 +11,11 @@ class b extends a { //// [inheritanceStaticFuncOverridingProperty.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.js b/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.js index 9f2a7acfd14b5..9a555ce218ff2 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.js @@ -11,7 +11,11 @@ class b extends a { //// [inheritanceStaticFuncOverridingPropertyOfFuncType.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticFunctionOverridingInstanceProperty.js b/tests/baselines/reference/inheritanceStaticFunctionOverridingInstanceProperty.js index c489493375e58..e357eb6e01f55 100644 --- a/tests/baselines/reference/inheritanceStaticFunctionOverridingInstanceProperty.js +++ b/tests/baselines/reference/inheritanceStaticFunctionOverridingInstanceProperty.js @@ -11,7 +11,11 @@ class b extends a { //// [inheritanceStaticFunctionOverridingInstanceProperty.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticMembersCompatible.js b/tests/baselines/reference/inheritanceStaticMembersCompatible.js index b57ada542129c..044db517290c9 100644 --- a/tests/baselines/reference/inheritanceStaticMembersCompatible.js +++ b/tests/baselines/reference/inheritanceStaticMembersCompatible.js @@ -9,7 +9,11 @@ class b extends a { //// [inheritanceStaticMembersCompatible.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticMembersIncompatible.js b/tests/baselines/reference/inheritanceStaticMembersIncompatible.js index 11e8e0117db67..0c21f4a1af5ee 100644 --- a/tests/baselines/reference/inheritanceStaticMembersIncompatible.js +++ b/tests/baselines/reference/inheritanceStaticMembersIncompatible.js @@ -9,7 +9,11 @@ class b extends a { //// [inheritanceStaticMembersIncompatible.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js b/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js index 7283ee4dbb0d6..de05071c11675 100644 --- a/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js @@ -14,7 +14,11 @@ class b extends a { //// [inheritanceStaticPropertyOverridingAccessor.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.js b/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.js index e9308f977db3b..4c1ca7e00cb29 100644 --- a/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.js +++ b/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.js @@ -11,7 +11,11 @@ class b extends a { //// [inheritanceStaticPropertyOverridingMethod.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticPropertyOverridingProperty.js b/tests/baselines/reference/inheritanceStaticPropertyOverridingProperty.js index 4feb0e06b8c6c..a351a84d98b48 100644 --- a/tests/baselines/reference/inheritanceStaticPropertyOverridingProperty.js +++ b/tests/baselines/reference/inheritanceStaticPropertyOverridingProperty.js @@ -9,7 +9,11 @@ class b extends a { //// [inheritanceStaticPropertyOverridingProperty.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritedConstructorWithRestParams.js b/tests/baselines/reference/inheritedConstructorWithRestParams.js index 4d3b055dcdb5e..e9f362ead4223 100644 --- a/tests/baselines/reference/inheritedConstructorWithRestParams.js +++ b/tests/baselines/reference/inheritedConstructorWithRestParams.js @@ -16,7 +16,11 @@ new Derived(3); //// [inheritedConstructorWithRestParams.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritedConstructorWithRestParams2.js b/tests/baselines/reference/inheritedConstructorWithRestParams2.js index 146677ff09c6d..3d89d237ad538 100644 --- a/tests/baselines/reference/inheritedConstructorWithRestParams2.js +++ b/tests/baselines/reference/inheritedConstructorWithRestParams2.js @@ -36,7 +36,11 @@ new Derived("", 3, "", ""); //// [inheritedConstructorWithRestParams2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritedModuleMembersForClodule.js b/tests/baselines/reference/inheritedModuleMembersForClodule.js index 666f4d703be7a..512d8bbca57d2 100644 --- a/tests/baselines/reference/inheritedModuleMembersForClodule.js +++ b/tests/baselines/reference/inheritedModuleMembersForClodule.js @@ -23,7 +23,11 @@ class E extends D { //// [inheritedModuleMembersForClodule.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/instanceOfAssignability.js b/tests/baselines/reference/instanceOfAssignability.js index 1492a9f919b1e..4f7b0bead561b 100644 --- a/tests/baselines/reference/instanceOfAssignability.js +++ b/tests/baselines/reference/instanceOfAssignability.js @@ -91,7 +91,11 @@ function fn8(x: Alpha|Beta|Gamma) { //// [instanceOfAssignability.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js b/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js index a421814ea2db5..57c7e5161b2dc 100644 --- a/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js +++ b/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js @@ -44,7 +44,11 @@ module Generic { //// [instancePropertiesInheritedIntoClassType.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/instanceSubtypeCheck2.js b/tests/baselines/reference/instanceSubtypeCheck2.js index c6c657aa82e8f..7f4b0803382c9 100644 --- a/tests/baselines/reference/instanceSubtypeCheck2.js +++ b/tests/baselines/reference/instanceSubtypeCheck2.js @@ -9,7 +9,11 @@ class C2 extends C1 { //// [instanceSubtypeCheck2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/instanceofWithStructurallyIdenticalTypes.js b/tests/baselines/reference/instanceofWithStructurallyIdenticalTypes.js index 46c842c86a75f..59ea127015560 100644 --- a/tests/baselines/reference/instanceofWithStructurallyIdenticalTypes.js +++ b/tests/baselines/reference/instanceofWithStructurallyIdenticalTypes.js @@ -73,7 +73,11 @@ function goo(x: A) { //// [instanceofWithStructurallyIdenticalTypes.js] // Repro from #7271 var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/instantiatedReturnTypeContravariance.js b/tests/baselines/reference/instantiatedReturnTypeContravariance.js index ac3470cb288e0..338a60610a05b 100644 --- a/tests/baselines/reference/instantiatedReturnTypeContravariance.js +++ b/tests/baselines/reference/instantiatedReturnTypeContravariance.js @@ -32,7 +32,11 @@ return null; //// [instantiatedReturnTypeContravariance.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/interfaceClassMerging.js b/tests/baselines/reference/interfaceClassMerging.js index 931d94f6eda09..36e4719549a07 100644 --- a/tests/baselines/reference/interfaceClassMerging.js +++ b/tests/baselines/reference/interfaceClassMerging.js @@ -42,7 +42,11 @@ obj = bar; //// [interfaceClassMerging.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/interfaceClassMerging2.js b/tests/baselines/reference/interfaceClassMerging2.js index c0c9b17b3e8ed..f230544e492eb 100644 --- a/tests/baselines/reference/interfaceClassMerging2.js +++ b/tests/baselines/reference/interfaceClassMerging2.js @@ -38,7 +38,11 @@ foo = bar; //// [interfaceClassMerging2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/interfaceExtendsClass1.js b/tests/baselines/reference/interfaceExtendsClass1.js index 85b4a42302df7..0afae83d4b9df 100644 --- a/tests/baselines/reference/interfaceExtendsClass1.js +++ b/tests/baselines/reference/interfaceExtendsClass1.js @@ -20,7 +20,11 @@ class Location { //// [interfaceExtendsClass1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js b/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js index 05ae7d83678d5..0b493aded807c 100644 --- a/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js +++ b/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js @@ -29,7 +29,11 @@ d = c; // error //// [interfaceExtendsClassWithPrivate1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js b/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js index a1ff0fff763d6..699b924a85483 100644 --- a/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js +++ b/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js @@ -25,7 +25,11 @@ class D2 extends C implements I { // error //// [interfaceExtendsClassWithPrivate2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/interfaceImplementation8.js b/tests/baselines/reference/interfaceImplementation8.js index 2193189eaf1a6..04f341d1f0646 100644 --- a/tests/baselines/reference/interfaceImplementation8.js +++ b/tests/baselines/reference/interfaceImplementation8.js @@ -42,7 +42,11 @@ class C8 extends C7 implements i2{ //// [interfaceImplementation8.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.js b/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.js index dc4284495b178..8fa200638e490 100644 --- a/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.js +++ b/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.js @@ -81,7 +81,11 @@ module YYY4 { //// [invalidModuleWithStatementsOfEveryKind.js] // All of these should be an error var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/invalidMultipleVariableDeclarations.js b/tests/baselines/reference/invalidMultipleVariableDeclarations.js index 2117e176f08e3..3380d5847a9a8 100644 --- a/tests/baselines/reference/invalidMultipleVariableDeclarations.js +++ b/tests/baselines/reference/invalidMultipleVariableDeclarations.js @@ -55,7 +55,11 @@ var m = M.A; //// [invalidMultipleVariableDeclarations.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/invalidReturnStatements.js b/tests/baselines/reference/invalidReturnStatements.js index 8f1adc05fa69e..01982b322bb75 100644 --- a/tests/baselines/reference/invalidReturnStatements.js +++ b/tests/baselines/reference/invalidReturnStatements.js @@ -22,7 +22,11 @@ function fn11(): D { return new C(); } //// [invalidReturnStatements.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/isolatedModulesImportExportElision.js b/tests/baselines/reference/isolatedModulesImportExportElision.js index e98932901e3fc..747e69d7c5945 100644 --- a/tests/baselines/reference/isolatedModulesImportExportElision.js +++ b/tests/baselines/reference/isolatedModulesImportExportElision.js @@ -16,7 +16,11 @@ export var z = x; //// [file1.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/jsxViaImport.js b/tests/baselines/reference/jsxViaImport.js index 99b9229f2a5e1..61e196daaa4bc 100644 --- a/tests/baselines/reference/jsxViaImport.js +++ b/tests/baselines/reference/jsxViaImport.js @@ -26,7 +26,11 @@ class TestComponent extends React.Component { //// [consumer.jsx] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/keyofAndIndexedAccess.js b/tests/baselines/reference/keyofAndIndexedAccess.js index 50bb51dbae71d..319875eef2cce 100644 --- a/tests/baselines/reference/keyofAndIndexedAccess.js +++ b/tests/baselines/reference/keyofAndIndexedAccess.js @@ -295,7 +295,11 @@ var hashOfEmpty2 = on({ test: (x: boolean) => {} }); // { test: boolean } //// [keyofAndIndexedAccess.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/lambdaArgCrash.js b/tests/baselines/reference/lambdaArgCrash.js index 911232722bd3f..c4343a67452a6 100644 --- a/tests/baselines/reference/lambdaArgCrash.js +++ b/tests/baselines/reference/lambdaArgCrash.js @@ -36,7 +36,11 @@ class ItemSetEvent extends Event { //// [lambdaArgCrash.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/lift.js b/tests/baselines/reference/lift.js index cd6f4fffd0038..44932a3ad14d5 100644 --- a/tests/baselines/reference/lift.js +++ b/tests/baselines/reference/lift.js @@ -19,7 +19,11 @@ class C extends B { //// [lift.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/localTypes1.js b/tests/baselines/reference/localTypes1.js index a887a3e07b07b..2a3510860ef44 100644 --- a/tests/baselines/reference/localTypes1.js +++ b/tests/baselines/reference/localTypes1.js @@ -143,7 +143,11 @@ function f6() { //// [localTypes1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/m7Bugs.js b/tests/baselines/reference/m7Bugs.js index 078c77c5e3ca3..0ae1f77a62a04 100644 --- a/tests/baselines/reference/m7Bugs.js +++ b/tests/baselines/reference/m7Bugs.js @@ -28,7 +28,11 @@ var y3: C1 = {}; //// [m7Bugs.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/mergedDeclarations5.js b/tests/baselines/reference/mergedDeclarations5.js index f731d4de428bc..d8426a5ce2832 100644 --- a/tests/baselines/reference/mergedDeclarations5.js +++ b/tests/baselines/reference/mergedDeclarations5.js @@ -20,7 +20,11 @@ var A = (function () { }()); //// [b.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/mergedDeclarations6.js b/tests/baselines/reference/mergedDeclarations6.js index 42ef570206185..c573190dc8b32 100644 --- a/tests/baselines/reference/mergedDeclarations6.js +++ b/tests/baselines/reference/mergedDeclarations6.js @@ -38,7 +38,11 @@ define(["require", "exports"], function (require, exports) { }); //// [b.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/mergedInheritedClassInterface.js b/tests/baselines/reference/mergedInheritedClassInterface.js index 38d4f94adde5d..ec1b72bf5d75c 100644 --- a/tests/baselines/reference/mergedInheritedClassInterface.js +++ b/tests/baselines/reference/mergedInheritedClassInterface.js @@ -48,7 +48,11 @@ grandchild.method2(); //// [mergedInheritedClassInterface.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.js b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.js index fd3d2da41e3f8..ac82060f270dc 100644 --- a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.js +++ b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.js @@ -33,7 +33,11 @@ var r2 = a.w; // error //// [mergedInterfacesWithInheritedPrivates2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.js b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.js index 1c8ba88d786a3..31c3deff6d1c0 100644 --- a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.js +++ b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.js @@ -40,7 +40,11 @@ module M { //// [mergedInterfacesWithInheritedPrivates3.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/missingPropertiesOfClassExpression.js b/tests/baselines/reference/missingPropertiesOfClassExpression.js index 8df4153b72dbf..aa832f39416e0 100644 --- a/tests/baselines/reference/missingPropertiesOfClassExpression.js +++ b/tests/baselines/reference/missingPropertiesOfClassExpression.js @@ -8,7 +8,11 @@ class George extends class { reset() { return this.y; } } { //// [missingPropertiesOfClassExpression.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/moduleAsBaseType.js b/tests/baselines/reference/moduleAsBaseType.js index a4caea585ac9a..00a4f4178043d 100644 --- a/tests/baselines/reference/moduleAsBaseType.js +++ b/tests/baselines/reference/moduleAsBaseType.js @@ -6,7 +6,11 @@ class C2 implements M { } //// [moduleAsBaseType.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/moduleImportedForTypeArgumentPosition.js b/tests/baselines/reference/moduleImportedForTypeArgumentPosition.js index bf074378d4bf1..a12c2af9439db 100644 --- a/tests/baselines/reference/moduleImportedForTypeArgumentPosition.js +++ b/tests/baselines/reference/moduleImportedForTypeArgumentPosition.js @@ -17,7 +17,11 @@ define(["require", "exports"], function (require, exports) { }); //// [moduleImportedForTypeArgumentPosition_1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/moduleWithStatementsOfEveryKind.js b/tests/baselines/reference/moduleWithStatementsOfEveryKind.js index 6efcddf7201a7..7a36ad10376af 100644 --- a/tests/baselines/reference/moduleWithStatementsOfEveryKind.js +++ b/tests/baselines/reference/moduleWithStatementsOfEveryKind.js @@ -60,7 +60,11 @@ module Y { //// [moduleWithStatementsOfEveryKind.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/multipleInheritance.js b/tests/baselines/reference/multipleInheritance.js index d05f10568ade5..4122bcb40ee87 100644 --- a/tests/baselines/reference/multipleInheritance.js +++ b/tests/baselines/reference/multipleInheritance.js @@ -40,7 +40,11 @@ class Baad extends Good { //// [multipleInheritance.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/mutuallyRecursiveGenericBaseTypes2.js b/tests/baselines/reference/mutuallyRecursiveGenericBaseTypes2.js index 570a93e8534f1..1ac0e7db55ddc 100644 --- a/tests/baselines/reference/mutuallyRecursiveGenericBaseTypes2.js +++ b/tests/baselines/reference/mutuallyRecursiveGenericBaseTypes2.js @@ -12,7 +12,11 @@ var test = new foo(); //// [mutuallyRecursiveGenericBaseTypes2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/noImplicitAnyMissingGetAccessor.js b/tests/baselines/reference/noImplicitAnyMissingGetAccessor.js index 78ea4e74a97eb..e08985796c378 100644 --- a/tests/baselines/reference/noImplicitAnyMissingGetAccessor.js +++ b/tests/baselines/reference/noImplicitAnyMissingGetAccessor.js @@ -14,7 +14,11 @@ class Child extends Parent { //// [noImplicitAnyMissingGetAccessor.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/noImplicitAnyMissingSetAccessor.js b/tests/baselines/reference/noImplicitAnyMissingSetAccessor.js index 64c480cc8e1d3..45cf29fd567a0 100644 --- a/tests/baselines/reference/noImplicitAnyMissingSetAccessor.js +++ b/tests/baselines/reference/noImplicitAnyMissingSetAccessor.js @@ -13,7 +13,11 @@ class Child extends Parent { //// [noImplicitAnyMissingSetAccessor.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/nonGenericClassExtendingGenericClassWithAny.js b/tests/baselines/reference/nonGenericClassExtendingGenericClassWithAny.js index 33f7e696126c6..270ea7f3bfc41 100644 --- a/tests/baselines/reference/nonGenericClassExtendingGenericClassWithAny.js +++ b/tests/baselines/reference/nonGenericClassExtendingGenericClassWithAny.js @@ -7,7 +7,11 @@ class Bar extends Foo { } // Valid //// [nonGenericClassExtendingGenericClassWithAny.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js index c8ec0d9da7859..2f2be923f1718 100644 --- a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js +++ b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js @@ -48,7 +48,11 @@ var b: { [x: number]: A } = { //// [numericIndexerConstrainsPropertyDeclarations2.js] // String indexer providing a constraint of a user defined type var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/numericIndexerConstraint3.js b/tests/baselines/reference/numericIndexerConstraint3.js index 02b54a2bbadc5..85556b4c83d3c 100644 --- a/tests/baselines/reference/numericIndexerConstraint3.js +++ b/tests/baselines/reference/numericIndexerConstraint3.js @@ -14,7 +14,11 @@ class C { //// [numericIndexerConstraint3.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/numericIndexerConstraint4.js b/tests/baselines/reference/numericIndexerConstraint4.js index 0f82789285d35..8958392fe78be 100644 --- a/tests/baselines/reference/numericIndexerConstraint4.js +++ b/tests/baselines/reference/numericIndexerConstraint4.js @@ -14,7 +14,11 @@ var x: { //// [numericIndexerConstraint4.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/numericIndexerTyping2.js b/tests/baselines/reference/numericIndexerTyping2.js index 1086d9745908f..5ce85e4c5eb02 100644 --- a/tests/baselines/reference/numericIndexerTyping2.js +++ b/tests/baselines/reference/numericIndexerTyping2.js @@ -14,7 +14,11 @@ var r2: string = i2[1]; // error: numeric indexer returns the type of the string //// [numericIndexerTyping2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectCreationOfElementAccessExpression.js b/tests/baselines/reference/objectCreationOfElementAccessExpression.js index 2b7ac176c7e07..3f251e470290d 100644 --- a/tests/baselines/reference/objectCreationOfElementAccessExpression.js +++ b/tests/baselines/reference/objectCreationOfElementAccessExpression.js @@ -57,7 +57,11 @@ var foods2: MonsterFood[] = new PetFood[new IceCream('Mint chocolate chip') , Co //// [objectCreationOfElementAccessExpression.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js b/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js index 301761c284937..05dfd4bc818d8 100644 --- a/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js +++ b/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js @@ -56,7 +56,11 @@ var r4: void = b.valueOf(); //// [objectTypeHidingMembersOfExtendedObject.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js index 1b88926972440..9518317f2300d 100644 --- a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js +++ b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js @@ -125,7 +125,11 @@ function foo16(x: any) { } //// [objectTypesIdentityWithNumericIndexers1.js] // object types are identical structurally var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js index 767f10adc889c..a5b93a32853a7 100644 --- a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js +++ b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js @@ -128,7 +128,11 @@ function foo16(x: any) { } //// [objectTypesIdentityWithNumericIndexers2.js] // object types are identical structurally var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js index 8ae7b92b4dd73..14a70059adc11 100644 --- a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js +++ b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js @@ -125,7 +125,11 @@ function foo16(x: any) { } //// [objectTypesIdentityWithNumericIndexers3.js] // object types are identical structurally var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypesIdentityWithPrivates.js b/tests/baselines/reference/objectTypesIdentityWithPrivates.js index 9f9319a3cf8bf..0d3ebae0bb853 100644 --- a/tests/baselines/reference/objectTypesIdentityWithPrivates.js +++ b/tests/baselines/reference/objectTypesIdentityWithPrivates.js @@ -123,7 +123,11 @@ function foo16(x: any) { } //// [objectTypesIdentityWithPrivates.js] // object types are identical structurally var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypesIdentityWithPrivates2.js b/tests/baselines/reference/objectTypesIdentityWithPrivates2.js index e1426e4a3b5c0..4fa90889d8177 100644 --- a/tests/baselines/reference/objectTypesIdentityWithPrivates2.js +++ b/tests/baselines/reference/objectTypesIdentityWithPrivates2.js @@ -41,7 +41,11 @@ function foo6(x: any): any { } //// [objectTypesIdentityWithPrivates2.js] // object types are identical structurally var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypesIdentityWithPrivates3.js b/tests/baselines/reference/objectTypesIdentityWithPrivates3.js index 1105c06c204ba..6ca413637f537 100644 --- a/tests/baselines/reference/objectTypesIdentityWithPrivates3.js +++ b/tests/baselines/reference/objectTypesIdentityWithPrivates3.js @@ -27,7 +27,11 @@ var c3: C3; //// [objectTypesIdentityWithPrivates3.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js b/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js index 9f076b52c6070..6758afd5cb3e2 100644 --- a/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js +++ b/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js @@ -125,7 +125,11 @@ function foo16(x: any) { } //// [objectTypesIdentityWithStringIndexers.js] // object types are identical structurally var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js b/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js index 75ad2243fe3ad..370c71533fb94 100644 --- a/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js +++ b/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js @@ -128,7 +128,11 @@ function foo16(x: any) { } //// [objectTypesIdentityWithStringIndexers2.js] // object types are identical structurally var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/optionalConstructorArgInSuper.js b/tests/baselines/reference/optionalConstructorArgInSuper.js index 4ebc12261463d..e13ea6a702d2c 100644 --- a/tests/baselines/reference/optionalConstructorArgInSuper.js +++ b/tests/baselines/reference/optionalConstructorArgInSuper.js @@ -12,7 +12,11 @@ d2.foo(); //// [optionalConstructorArgInSuper.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/optionalMethods.js b/tests/baselines/reference/optionalMethods.js index 5cbd798ec8996..b0af91c92f857 100644 --- a/tests/baselines/reference/optionalMethods.js +++ b/tests/baselines/reference/optionalMethods.js @@ -59,7 +59,11 @@ class Derived extends Base { //// [optionalMethods.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/optionalParamArgsTest.js b/tests/baselines/reference/optionalParamArgsTest.js index 23ab515057999..91507916a55d6 100644 --- a/tests/baselines/reference/optionalParamArgsTest.js +++ b/tests/baselines/reference/optionalParamArgsTest.js @@ -126,7 +126,11 @@ fnOpt2(1, [2, 3], [1], true); //// [optionalParamArgsTest.js] // Optional parameter and default argument tests var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/optionalParamInOverride.js b/tests/baselines/reference/optionalParamInOverride.js index 9d318cd9ae5f7..bc60d2507b063 100644 --- a/tests/baselines/reference/optionalParamInOverride.js +++ b/tests/baselines/reference/optionalParamInOverride.js @@ -9,7 +9,11 @@ class Y extends Z { //// [optionalParamInOverride.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/optionalParameterProperty.js b/tests/baselines/reference/optionalParameterProperty.js index 3203c4e2e09e2..62058c1ecb3fb 100644 --- a/tests/baselines/reference/optionalParameterProperty.js +++ b/tests/baselines/reference/optionalParameterProperty.js @@ -13,7 +13,11 @@ class D extends C { //// [optionalParameterProperty.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/outModuleConcatAmd.js b/tests/baselines/reference/outModuleConcatAmd.js index cab6be31d072a..8a28677dbbf84 100644 --- a/tests/baselines/reference/outModuleConcatAmd.js +++ b/tests/baselines/reference/outModuleConcatAmd.js @@ -10,7 +10,11 @@ export class B extends A { } //// [all.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/outModuleConcatAmd.js.map b/tests/baselines/reference/outModuleConcatAmd.js.map index 9187aca0646db..937bec9396901 100644 --- a/tests/baselines/reference/outModuleConcatAmd.js.map +++ b/tests/baselines/reference/outModuleConcatAmd.js.map @@ -1,2 +1,2 @@ //// [all.js.map] -{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":";;;;;;;IACA;QAAA;QAAiB,CAAC;QAAD,QAAC;IAAD,CAAC,AAAlB,IAAkB;IAAL,cAAC;;;;ICAd;QAAuB,qBAAC;QAAxB;;QAA2B,CAAC;QAAD,QAAC;IAAD,CAAC,AAA5B,CAAuB,KAAC,GAAI;IAAf,cAAC"} \ No newline at end of file +{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":";;;;;;;;;;;IACA;QAAA;QAAiB,CAAC;QAAD,QAAC;IAAD,CAAC,AAAlB,IAAkB;IAAL,cAAC;;;;ICAd;QAAuB,qBAAC;QAAxB;;QAA2B,CAAC;QAAD,QAAC;IAAD,CAAC,AAA5B,CAAuB,KAAC,GAAI;IAAf,cAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt b/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt index f07a95163f642..75af3bb54ace2 100644 --- a/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt +++ b/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt @@ -9,7 +9,11 @@ emittedFile:all.js sourceFile:tests/cases/compiler/ref/a.ts ------------------------------------------------------------------- >>>var __extends = (this && this.__extends) || function (d, b) { ->>> Object.setPrototypeOf(d, b); +>>> if (typeof Object.setPrototypeOf === "function") { +>>> Object.setPrototypeOf(d, b); +>>> } else { +>>> d.__proto__ = b; +>>> } >>> function __() { this.constructor = d; } >>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); >>>}; @@ -20,13 +24,13 @@ sourceFile:tests/cases/compiler/ref/a.ts 2 > ^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(8, 5) Source(2, 1) + SourceIndex(0) +1 >Emitted(12, 5) Source(2, 1) + SourceIndex(0) --- >>> function A() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(9, 9) Source(2, 1) + SourceIndex(0) +1->Emitted(13, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -34,16 +38,16 @@ sourceFile:tests/cases/compiler/ref/a.ts 3 > ^^^^^^^^^-> 1->export class A { 2 > } -1->Emitted(10, 9) Source(2, 18) + SourceIndex(0) -2 >Emitted(10, 10) Source(2, 19) + SourceIndex(0) +1->Emitted(14, 9) Source(2, 18) + SourceIndex(0) +2 >Emitted(14, 10) Source(2, 19) + SourceIndex(0) --- >>> return A; 1->^^^^^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(11, 9) Source(2, 18) + SourceIndex(0) -2 >Emitted(11, 17) Source(2, 19) + SourceIndex(0) +1->Emitted(15, 9) Source(2, 18) + SourceIndex(0) +2 >Emitted(15, 17) Source(2, 19) + SourceIndex(0) --- >>> }()); 1 >^^^^ @@ -55,18 +59,18 @@ sourceFile:tests/cases/compiler/ref/a.ts 2 > } 3 > 4 > export class A { } -1 >Emitted(12, 5) Source(2, 18) + SourceIndex(0) -2 >Emitted(12, 6) Source(2, 19) + SourceIndex(0) -3 >Emitted(12, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(12, 10) Source(2, 19) + SourceIndex(0) +1 >Emitted(16, 5) Source(2, 18) + SourceIndex(0) +2 >Emitted(16, 6) Source(2, 19) + SourceIndex(0) +3 >Emitted(16, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(16, 10) Source(2, 19) + SourceIndex(0) --- >>> exports.A = A; 1->^^^^ 2 > ^^^^^^^^^^^^^^ 1-> 2 > A -1->Emitted(13, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(13, 19) Source(2, 15) + SourceIndex(0) +1->Emitted(17, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(17, 19) Source(2, 15) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:all.js @@ -80,21 +84,21 @@ sourceFile:tests/cases/compiler/b.ts 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >import {A} from "./ref/a"; > -1 >Emitted(17, 5) Source(2, 1) + SourceIndex(1) +1 >Emitted(21, 5) Source(2, 1) + SourceIndex(1) --- >>> __extends(B, _super); 1->^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^ 1->export class B extends 2 > A -1->Emitted(18, 9) Source(2, 24) + SourceIndex(1) -2 >Emitted(18, 30) Source(2, 25) + SourceIndex(1) +1->Emitted(22, 9) Source(2, 24) + SourceIndex(1) +2 >Emitted(22, 30) Source(2, 25) + SourceIndex(1) --- >>> function B() { 1 >^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > -1 >Emitted(19, 9) Source(2, 1) + SourceIndex(1) +1 >Emitted(23, 9) Source(2, 1) + SourceIndex(1) --- >>> return _super.apply(this, arguments) || this; >>> } @@ -103,16 +107,16 @@ sourceFile:tests/cases/compiler/b.ts 3 > ^^^^^^^^^-> 1->export class B extends A { 2 > } -1->Emitted(21, 9) Source(2, 28) + SourceIndex(1) -2 >Emitted(21, 10) Source(2, 29) + SourceIndex(1) +1->Emitted(25, 9) Source(2, 28) + SourceIndex(1) +2 >Emitted(25, 10) Source(2, 29) + SourceIndex(1) --- >>> return B; 1->^^^^^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(22, 9) Source(2, 28) + SourceIndex(1) -2 >Emitted(22, 17) Source(2, 29) + SourceIndex(1) +1->Emitted(26, 9) Source(2, 28) + SourceIndex(1) +2 >Emitted(26, 17) Source(2, 29) + SourceIndex(1) --- >>> }(a_1.A)); 1 >^^^^ @@ -128,20 +132,20 @@ sourceFile:tests/cases/compiler/b.ts 4 > export class B extends 5 > A 6 > { } -1 >Emitted(23, 5) Source(2, 28) + SourceIndex(1) -2 >Emitted(23, 6) Source(2, 29) + SourceIndex(1) -3 >Emitted(23, 6) Source(2, 1) + SourceIndex(1) -4 >Emitted(23, 7) Source(2, 24) + SourceIndex(1) -5 >Emitted(23, 12) Source(2, 25) + SourceIndex(1) -6 >Emitted(23, 15) Source(2, 29) + SourceIndex(1) +1 >Emitted(27, 5) Source(2, 28) + SourceIndex(1) +2 >Emitted(27, 6) Source(2, 29) + SourceIndex(1) +3 >Emitted(27, 6) Source(2, 1) + SourceIndex(1) +4 >Emitted(27, 7) Source(2, 24) + SourceIndex(1) +5 >Emitted(27, 12) Source(2, 25) + SourceIndex(1) +6 >Emitted(27, 15) Source(2, 29) + SourceIndex(1) --- >>> exports.B = B; 1->^^^^ 2 > ^^^^^^^^^^^^^^ 1-> 2 > B -1->Emitted(24, 5) Source(2, 14) + SourceIndex(1) -2 >Emitted(24, 19) Source(2, 15) + SourceIndex(1) +1->Emitted(28, 5) Source(2, 14) + SourceIndex(1) +2 >Emitted(28, 19) Source(2, 15) + SourceIndex(1) --- >>>}); >>>//# sourceMappingURL=all.js.map \ No newline at end of file diff --git a/tests/baselines/reference/outModuleConcatSystem.js b/tests/baselines/reference/outModuleConcatSystem.js index 6f6e1c3b3663b..4a7552bcde8cf 100644 --- a/tests/baselines/reference/outModuleConcatSystem.js +++ b/tests/baselines/reference/outModuleConcatSystem.js @@ -10,7 +10,11 @@ export class B extends A { } //// [all.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/outModuleConcatSystem.js.map b/tests/baselines/reference/outModuleConcatSystem.js.map index ac8fb23d87c13..275b47b1363ad 100644 --- a/tests/baselines/reference/outModuleConcatSystem.js.map +++ b/tests/baselines/reference/outModuleConcatSystem.js.map @@ -1,2 +1,2 @@ //// [all.js.map] -{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":";;;;;;;;;;;;YACA;gBAAA;gBAAiB,CAAC;gBAAD,QAAC;YAAD,CAAC,AAAlB,IAAkB;;QAClB,CAAC;;;;;;;;;;;;;;YCDD;gBAAuB,qBAAC;gBAAxB;;gBAA2B,CAAC;gBAAD,QAAC;YAAD,CAAC,AAA5B,CAAuB,KAAC,GAAI;;QAAA,CAAC"} \ No newline at end of file +{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;YACA;gBAAA;gBAAiB,CAAC;gBAAD,QAAC;YAAD,CAAC,AAAlB,IAAkB;;QAClB,CAAC;;;;;;;;;;;;;;YCDD;gBAAuB,qBAAC;gBAAxB;;gBAA2B,CAAC;gBAAD,QAAC;YAAD,CAAC,AAA5B,CAAuB,KAAC,GAAI;;QAAA,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt b/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt index 47558a3812a1f..e5a439aea1a6f 100644 --- a/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt +++ b/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt @@ -9,7 +9,11 @@ emittedFile:all.js sourceFile:tests/cases/compiler/ref/a.ts ------------------------------------------------------------------- >>>var __extends = (this && this.__extends) || function (d, b) { ->>> Object.setPrototypeOf(d, b); +>>> if (typeof Object.setPrototypeOf === "function") { +>>> Object.setPrototypeOf(d, b); +>>> } else { +>>> d.__proto__ = b; +>>> } >>> function __() { this.constructor = d; } >>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); >>>}; @@ -25,13 +29,13 @@ sourceFile:tests/cases/compiler/ref/a.ts 2 > ^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(13, 13) Source(2, 1) + SourceIndex(0) +1 >Emitted(17, 13) Source(2, 1) + SourceIndex(0) --- >>> function A() { 1->^^^^^^^^^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(14, 17) Source(2, 1) + SourceIndex(0) +1->Emitted(18, 17) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^^^^^^^^^ @@ -39,16 +43,16 @@ sourceFile:tests/cases/compiler/ref/a.ts 3 > ^^^^^^^^^-> 1->export class A { 2 > } -1->Emitted(15, 17) Source(2, 18) + SourceIndex(0) -2 >Emitted(15, 18) Source(2, 19) + SourceIndex(0) +1->Emitted(19, 17) Source(2, 18) + SourceIndex(0) +2 >Emitted(19, 18) Source(2, 19) + SourceIndex(0) --- >>> return A; 1->^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(16, 17) Source(2, 18) + SourceIndex(0) -2 >Emitted(16, 25) Source(2, 19) + SourceIndex(0) +1->Emitted(20, 17) Source(2, 18) + SourceIndex(0) +2 >Emitted(20, 25) Source(2, 19) + SourceIndex(0) --- >>> }()); 1 >^^^^^^^^^^^^ @@ -60,10 +64,10 @@ sourceFile:tests/cases/compiler/ref/a.ts 2 > } 3 > 4 > export class A { } -1 >Emitted(17, 13) Source(2, 18) + SourceIndex(0) -2 >Emitted(17, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(17, 14) Source(2, 1) + SourceIndex(0) -4 >Emitted(17, 18) Source(2, 19) + SourceIndex(0) +1 >Emitted(21, 13) Source(2, 18) + SourceIndex(0) +2 >Emitted(21, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(21, 14) Source(2, 1) + SourceIndex(0) +4 >Emitted(21, 18) Source(2, 19) + SourceIndex(0) --- >>> exports_1("A", A); >>> } @@ -72,8 +76,8 @@ sourceFile:tests/cases/compiler/ref/a.ts 1-> > 2 > -1->Emitted(19, 9) Source(3, 1) + SourceIndex(0) -2 >Emitted(19, 10) Source(3, 2) + SourceIndex(0) +1->Emitted(23, 9) Source(3, 1) + SourceIndex(0) +2 >Emitted(23, 10) Source(3, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:all.js @@ -97,21 +101,21 @@ sourceFile:tests/cases/compiler/b.ts 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >import {A} from "./ref/a"; > -1 >Emitted(33, 13) Source(2, 1) + SourceIndex(1) +1 >Emitted(37, 13) Source(2, 1) + SourceIndex(1) --- >>> __extends(B, _super); 1->^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^ 1->export class B extends 2 > A -1->Emitted(34, 17) Source(2, 24) + SourceIndex(1) -2 >Emitted(34, 38) Source(2, 25) + SourceIndex(1) +1->Emitted(38, 17) Source(2, 24) + SourceIndex(1) +2 >Emitted(38, 38) Source(2, 25) + SourceIndex(1) --- >>> function B() { 1 >^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > -1 >Emitted(35, 17) Source(2, 1) + SourceIndex(1) +1 >Emitted(39, 17) Source(2, 1) + SourceIndex(1) --- >>> return _super.apply(this, arguments) || this; >>> } @@ -120,16 +124,16 @@ sourceFile:tests/cases/compiler/b.ts 3 > ^^^^^^^^^-> 1->export class B extends A { 2 > } -1->Emitted(37, 17) Source(2, 28) + SourceIndex(1) -2 >Emitted(37, 18) Source(2, 29) + SourceIndex(1) +1->Emitted(41, 17) Source(2, 28) + SourceIndex(1) +2 >Emitted(41, 18) Source(2, 29) + SourceIndex(1) --- >>> return B; 1->^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(38, 17) Source(2, 28) + SourceIndex(1) -2 >Emitted(38, 25) Source(2, 29) + SourceIndex(1) +1->Emitted(42, 17) Source(2, 28) + SourceIndex(1) +2 >Emitted(42, 25) Source(2, 29) + SourceIndex(1) --- >>> }(a_1.A)); 1 >^^^^^^^^^^^^ @@ -145,12 +149,12 @@ sourceFile:tests/cases/compiler/b.ts 4 > export class B extends 5 > A 6 > { } -1 >Emitted(39, 13) Source(2, 28) + SourceIndex(1) -2 >Emitted(39, 14) Source(2, 29) + SourceIndex(1) -3 >Emitted(39, 14) Source(2, 1) + SourceIndex(1) -4 >Emitted(39, 15) Source(2, 24) + SourceIndex(1) -5 >Emitted(39, 20) Source(2, 25) + SourceIndex(1) -6 >Emitted(39, 23) Source(2, 29) + SourceIndex(1) +1 >Emitted(43, 13) Source(2, 28) + SourceIndex(1) +2 >Emitted(43, 14) Source(2, 29) + SourceIndex(1) +3 >Emitted(43, 14) Source(2, 1) + SourceIndex(1) +4 >Emitted(43, 15) Source(2, 24) + SourceIndex(1) +5 >Emitted(43, 20) Source(2, 25) + SourceIndex(1) +6 >Emitted(43, 23) Source(2, 29) + SourceIndex(1) --- >>> exports_2("B", B); >>> } @@ -158,8 +162,8 @@ sourceFile:tests/cases/compiler/b.ts 2 > ^ 1-> 2 > -1->Emitted(41, 9) Source(2, 29) + SourceIndex(1) -2 >Emitted(41, 10) Source(2, 30) + SourceIndex(1) +1->Emitted(45, 9) Source(2, 29) + SourceIndex(1) +2 >Emitted(45, 10) Source(2, 30) + SourceIndex(1) --- >>> }; >>>}); diff --git a/tests/baselines/reference/outModuleTripleSlashRefs.js b/tests/baselines/reference/outModuleTripleSlashRefs.js index 5f6def67a480f..c5f6da0fdf53e 100644 --- a/tests/baselines/reference/outModuleTripleSlashRefs.js +++ b/tests/baselines/reference/outModuleTripleSlashRefs.js @@ -32,7 +32,11 @@ export class B extends A { } //// [all.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/outModuleTripleSlashRefs.js.map b/tests/baselines/reference/outModuleTripleSlashRefs.js.map index 5ccc59aeabfb3..cb10515edd282 100644 --- a/tests/baselines/reference/outModuleTripleSlashRefs.js.map +++ b/tests/baselines/reference/outModuleTripleSlashRefs.js.map @@ -1,2 +1,2 @@ //// [all.js.map] -{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/b.ts","tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":";;;;;AAAA,iCAAiC;AACjC;IAAA;IAEA,CAAC;IAAD,UAAC;AAAD,CAAC,AAFD,IAEC;;;ICFD,+BAA+B;IAC/B;QAAA;QAEA,CAAC;QAAD,QAAC;IAAD,CAAC,AAFD,IAEC;IAFY,cAAC;;;;ICDd;QAAuB,qBAAC;QAAxB;;QAA2B,CAAC;QAAD,QAAC;IAAD,CAAC,AAA5B,CAAuB,KAAC,GAAI;IAAf,cAAC"} \ No newline at end of file +{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/b.ts","tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":";;;;;;;;;AAAA,iCAAiC;AACjC;IAAA;IAEA,CAAC;IAAD,UAAC;AAAD,CAAC,AAFD,IAEC;;;ICFD,+BAA+B;IAC/B;QAAA;QAEA,CAAC;QAAD,QAAC;IAAD,CAAC,AAFD,IAEC;IAFY,cAAC;;;;ICDd;QAAuB,qBAAC;QAAxB;;QAA2B,CAAC;QAAD,QAAC;IAAD,CAAC,AAA5B,CAAuB,KAAC,GAAI;IAAf,cAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt b/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt index 9f15bc0eaee24..c3e619a4c2dba 100644 --- a/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt +++ b/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt @@ -9,7 +9,11 @@ emittedFile:all.js sourceFile:tests/cases/compiler/ref/b.ts ------------------------------------------------------------------- >>>var __extends = (this && this.__extends) || function (d, b) { ->>> Object.setPrototypeOf(d, b); +>>> if (typeof Object.setPrototypeOf === "function") { +>>> Object.setPrototypeOf(d, b); +>>> } else { +>>> d.__proto__ = b; +>>> } >>> function __() { this.constructor = d; } >>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); >>>}; @@ -18,21 +22,21 @@ sourceFile:tests/cases/compiler/ref/b.ts 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1 > 2 >/// -1 >Emitted(6, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(6, 34) Source(1, 34) + SourceIndex(0) +1 >Emitted(10, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(10, 34) Source(1, 34) + SourceIndex(0) --- >>>var Foo = (function () { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(7, 1) Source(2, 1) + SourceIndex(0) +1 >Emitted(11, 1) Source(2, 1) + SourceIndex(0) --- >>> function Foo() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(8, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(12, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -42,16 +46,16 @@ sourceFile:tests/cases/compiler/ref/b.ts > member: Bar; > 2 > } -1->Emitted(9, 5) Source(4, 1) + SourceIndex(0) -2 >Emitted(9, 6) Source(4, 2) + SourceIndex(0) +1->Emitted(13, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(4, 2) + SourceIndex(0) --- >>> return Foo; 1->^^^^ 2 > ^^^^^^^^^^ 1-> 2 > } -1->Emitted(10, 5) Source(4, 1) + SourceIndex(0) -2 >Emitted(10, 15) Source(4, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(14, 15) Source(4, 2) + SourceIndex(0) --- >>>}()); 1 > @@ -65,10 +69,10 @@ sourceFile:tests/cases/compiler/ref/b.ts 4 > class Foo { > member: Bar; > } -1 >Emitted(11, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(11, 2) Source(4, 2) + SourceIndex(0) -3 >Emitted(11, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(11, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(15, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(15, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(15, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(15, 6) Source(4, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:all.js @@ -82,21 +86,21 @@ sourceFile:tests/cases/compiler/ref/a.ts 1-> > 2 > /// -1->Emitted(14, 5) Source(2, 1) + SourceIndex(1) -2 >Emitted(14, 36) Source(2, 32) + SourceIndex(1) +1->Emitted(18, 5) Source(2, 1) + SourceIndex(1) +2 >Emitted(18, 36) Source(2, 32) + SourceIndex(1) --- >>> var A = (function () { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(15, 5) Source(3, 1) + SourceIndex(1) +1 >Emitted(19, 5) Source(3, 1) + SourceIndex(1) --- >>> function A() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(16, 9) Source(3, 1) + SourceIndex(1) +1->Emitted(20, 9) Source(3, 1) + SourceIndex(1) --- >>> } 1->^^^^^^^^ @@ -106,16 +110,16 @@ sourceFile:tests/cases/compiler/ref/a.ts > member: typeof GlobalFoo; > 2 > } -1->Emitted(17, 9) Source(5, 1) + SourceIndex(1) -2 >Emitted(17, 10) Source(5, 2) + SourceIndex(1) +1->Emitted(21, 9) Source(5, 1) + SourceIndex(1) +2 >Emitted(21, 10) Source(5, 2) + SourceIndex(1) --- >>> return A; 1->^^^^^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(18, 9) Source(5, 1) + SourceIndex(1) -2 >Emitted(18, 17) Source(5, 2) + SourceIndex(1) +1->Emitted(22, 9) Source(5, 1) + SourceIndex(1) +2 >Emitted(22, 17) Source(5, 2) + SourceIndex(1) --- >>> }()); 1 >^^^^ @@ -129,18 +133,18 @@ sourceFile:tests/cases/compiler/ref/a.ts 4 > export class A { > member: typeof GlobalFoo; > } -1 >Emitted(19, 5) Source(5, 1) + SourceIndex(1) -2 >Emitted(19, 6) Source(5, 2) + SourceIndex(1) -3 >Emitted(19, 6) Source(3, 1) + SourceIndex(1) -4 >Emitted(19, 10) Source(5, 2) + SourceIndex(1) +1 >Emitted(23, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(23, 6) Source(5, 2) + SourceIndex(1) +3 >Emitted(23, 6) Source(3, 1) + SourceIndex(1) +4 >Emitted(23, 10) Source(5, 2) + SourceIndex(1) --- >>> exports.A = A; 1->^^^^ 2 > ^^^^^^^^^^^^^^ 1-> 2 > A -1->Emitted(20, 5) Source(3, 14) + SourceIndex(1) -2 >Emitted(20, 19) Source(3, 15) + SourceIndex(1) +1->Emitted(24, 5) Source(3, 14) + SourceIndex(1) +2 >Emitted(24, 19) Source(3, 15) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:all.js @@ -154,21 +158,21 @@ sourceFile:tests/cases/compiler/b.ts 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >import {A} from "./ref/a"; > -1 >Emitted(24, 5) Source(2, 1) + SourceIndex(2) +1 >Emitted(28, 5) Source(2, 1) + SourceIndex(2) --- >>> __extends(B, _super); 1->^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^ 1->export class B extends 2 > A -1->Emitted(25, 9) Source(2, 24) + SourceIndex(2) -2 >Emitted(25, 30) Source(2, 25) + SourceIndex(2) +1->Emitted(29, 9) Source(2, 24) + SourceIndex(2) +2 >Emitted(29, 30) Source(2, 25) + SourceIndex(2) --- >>> function B() { 1 >^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > -1 >Emitted(26, 9) Source(2, 1) + SourceIndex(2) +1 >Emitted(30, 9) Source(2, 1) + SourceIndex(2) --- >>> return _super.apply(this, arguments) || this; >>> } @@ -177,16 +181,16 @@ sourceFile:tests/cases/compiler/b.ts 3 > ^^^^^^^^^-> 1->export class B extends A { 2 > } -1->Emitted(28, 9) Source(2, 28) + SourceIndex(2) -2 >Emitted(28, 10) Source(2, 29) + SourceIndex(2) +1->Emitted(32, 9) Source(2, 28) + SourceIndex(2) +2 >Emitted(32, 10) Source(2, 29) + SourceIndex(2) --- >>> return B; 1->^^^^^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(29, 9) Source(2, 28) + SourceIndex(2) -2 >Emitted(29, 17) Source(2, 29) + SourceIndex(2) +1->Emitted(33, 9) Source(2, 28) + SourceIndex(2) +2 >Emitted(33, 17) Source(2, 29) + SourceIndex(2) --- >>> }(a_1.A)); 1 >^^^^ @@ -202,20 +206,20 @@ sourceFile:tests/cases/compiler/b.ts 4 > export class B extends 5 > A 6 > { } -1 >Emitted(30, 5) Source(2, 28) + SourceIndex(2) -2 >Emitted(30, 6) Source(2, 29) + SourceIndex(2) -3 >Emitted(30, 6) Source(2, 1) + SourceIndex(2) -4 >Emitted(30, 7) Source(2, 24) + SourceIndex(2) -5 >Emitted(30, 12) Source(2, 25) + SourceIndex(2) -6 >Emitted(30, 15) Source(2, 29) + SourceIndex(2) +1 >Emitted(34, 5) Source(2, 28) + SourceIndex(2) +2 >Emitted(34, 6) Source(2, 29) + SourceIndex(2) +3 >Emitted(34, 6) Source(2, 1) + SourceIndex(2) +4 >Emitted(34, 7) Source(2, 24) + SourceIndex(2) +5 >Emitted(34, 12) Source(2, 25) + SourceIndex(2) +6 >Emitted(34, 15) Source(2, 29) + SourceIndex(2) --- >>> exports.B = B; 1->^^^^ 2 > ^^^^^^^^^^^^^^ 1-> 2 > B -1->Emitted(31, 5) Source(2, 14) + SourceIndex(2) -2 >Emitted(31, 19) Source(2, 15) + SourceIndex(2) +1->Emitted(35, 5) Source(2, 14) + SourceIndex(2) +2 >Emitted(35, 19) Source(2, 15) + SourceIndex(2) --- >>>}); >>>//# sourceMappingURL=all.js.map \ No newline at end of file diff --git a/tests/baselines/reference/overload1.js b/tests/baselines/reference/overload1.js index 6cbfb843812bf..8377a62f2c7fe 100644 --- a/tests/baselines/reference/overload1.js +++ b/tests/baselines/reference/overload1.js @@ -41,7 +41,11 @@ var v=x.g; //// [overload1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks1.js b/tests/baselines/reference/overloadOnConstConstraintChecks1.js index 8bc8ccd161258..ae8e1178be53e 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks1.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks1.js @@ -24,7 +24,11 @@ class D implements MyDoc { //// [overloadOnConstConstraintChecks1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks2.js b/tests/baselines/reference/overloadOnConstConstraintChecks2.js index 16cfb630a5dd8..43468e15fd850 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks2.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks2.js @@ -13,7 +13,11 @@ function foo(name: any): A { //// [overloadOnConstConstraintChecks2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks3.js b/tests/baselines/reference/overloadOnConstConstraintChecks3.js index 1540bc4dc499b..5e8d70d3d6e32 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks3.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks3.js @@ -14,7 +14,11 @@ function foo(name: any): A { //// [overloadOnConstConstraintChecks3.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks4.js b/tests/baselines/reference/overloadOnConstConstraintChecks4.js index a634547a36bc4..c4ac235a6717e 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks4.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks4.js @@ -15,7 +15,11 @@ function foo(name: any): Z { //// [overloadOnConstConstraintChecks4.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js b/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js index 0edadc3c692bb..58807808f5c31 100644 --- a/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js +++ b/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js @@ -13,7 +13,11 @@ foo("HI"); //// [overloadOnConstantsInvalidOverload1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadResolution.js b/tests/baselines/reference/overloadResolution.js index 56ebebc454e3f..bb1fce13a0a1b 100644 --- a/tests/baselines/reference/overloadResolution.js +++ b/tests/baselines/reference/overloadResolution.js @@ -96,7 +96,11 @@ var s = fn5((n) => n.substr(0)); //// [overloadResolution.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadResolutionClassConstructors.js b/tests/baselines/reference/overloadResolutionClassConstructors.js index 5cf41a3b44a90..16bdd16eaa2bc 100644 --- a/tests/baselines/reference/overloadResolutionClassConstructors.js +++ b/tests/baselines/reference/overloadResolutionClassConstructors.js @@ -103,7 +103,11 @@ new fn5((n) => n.blah); // Error //// [overloadResolutionClassConstructors.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadResolutionConstructors.js b/tests/baselines/reference/overloadResolutionConstructors.js index 85ec9fb06fb37..4b7e487466cc6 100644 --- a/tests/baselines/reference/overloadResolutionConstructors.js +++ b/tests/baselines/reference/overloadResolutionConstructors.js @@ -104,7 +104,11 @@ var s = new fn5((n) => n.substr(0)); //// [overloadResolutionConstructors.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadingOnConstants1.js b/tests/baselines/reference/overloadingOnConstants1.js index c8f5a8fd9ae2a..d52d97cefc78a 100644 --- a/tests/baselines/reference/overloadingOnConstants1.js +++ b/tests/baselines/reference/overloadingOnConstants1.js @@ -27,7 +27,11 @@ var htmlSpanElement2: Derived1 = d2.createElement("span"); //// [overloadingOnConstants1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadingOnConstants2.js b/tests/baselines/reference/overloadingOnConstants2.js index 9792485e1cfa9..3b666b2351bc2 100644 --- a/tests/baselines/reference/overloadingOnConstants2.js +++ b/tests/baselines/reference/overloadingOnConstants2.js @@ -29,7 +29,11 @@ var f: C = bar("um", []); // C //// [overloadingOnConstants2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overridingPrivateStaticMembers.js b/tests/baselines/reference/overridingPrivateStaticMembers.js index 50f957c7fdd11..f1cc4b05a4052 100644 --- a/tests/baselines/reference/overridingPrivateStaticMembers.js +++ b/tests/baselines/reference/overridingPrivateStaticMembers.js @@ -9,7 +9,11 @@ class Derived2 extends Base2 { //// [overridingPrivateStaticMembers.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parseErrorInHeritageClause1.js b/tests/baselines/reference/parseErrorInHeritageClause1.js index 3409c13e2f129..a82e4eb8ea71b 100644 --- a/tests/baselines/reference/parseErrorInHeritageClause1.js +++ b/tests/baselines/reference/parseErrorInHeritageClause1.js @@ -4,7 +4,11 @@ class C extends A # { //// [parseErrorInHeritageClause1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parser509630.js b/tests/baselines/reference/parser509630.js index cce7df3db54a4..3c80c2bfd163e 100644 --- a/tests/baselines/reference/parser509630.js +++ b/tests/baselines/reference/parser509630.js @@ -8,7 +8,11 @@ class Any extends Type { //// [parser509630.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserAstSpans1.js b/tests/baselines/reference/parserAstSpans1.js index 12de33e4738de..5ba4ba4d96d29 100644 --- a/tests/baselines/reference/parserAstSpans1.js +++ b/tests/baselines/reference/parserAstSpans1.js @@ -221,7 +221,11 @@ class c6 extends c5 { //// [parserAstSpans1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserClassDeclaration1.js b/tests/baselines/reference/parserClassDeclaration1.js index 555d625d52238..4ce80bdec21e3 100644 --- a/tests/baselines/reference/parserClassDeclaration1.js +++ b/tests/baselines/reference/parserClassDeclaration1.js @@ -4,7 +4,11 @@ class C extends A extends B { //// [parserClassDeclaration1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserClassDeclaration3.js b/tests/baselines/reference/parserClassDeclaration3.js index b63483411b2c5..ac58fb2334267 100644 --- a/tests/baselines/reference/parserClassDeclaration3.js +++ b/tests/baselines/reference/parserClassDeclaration3.js @@ -4,7 +4,11 @@ class C implements A extends B { //// [parserClassDeclaration3.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserClassDeclaration4.js b/tests/baselines/reference/parserClassDeclaration4.js index 2f3cdf0e16609..fa85ee2659c2e 100644 --- a/tests/baselines/reference/parserClassDeclaration4.js +++ b/tests/baselines/reference/parserClassDeclaration4.js @@ -4,7 +4,11 @@ class C extends A implements B extends C { //// [parserClassDeclaration4.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserClassDeclaration5.js b/tests/baselines/reference/parserClassDeclaration5.js index da843d0629253..a77e0867d5935 100644 --- a/tests/baselines/reference/parserClassDeclaration5.js +++ b/tests/baselines/reference/parserClassDeclaration5.js @@ -4,7 +4,11 @@ class C extends A implements B implements C { //// [parserClassDeclaration5.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserClassDeclaration6.js b/tests/baselines/reference/parserClassDeclaration6.js index 842b811de9b63..23820f706df58 100644 --- a/tests/baselines/reference/parserClassDeclaration6.js +++ b/tests/baselines/reference/parserClassDeclaration6.js @@ -4,7 +4,11 @@ class C extends A, B { //// [parserClassDeclaration6.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause2.js b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause2.js index 22225819435a6..d81e0e7cf6513 100644 --- a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause2.js +++ b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause2.js @@ -4,7 +4,11 @@ class C extends A, { //// [parserErrorRecovery_ExtendsOrImplementsClause2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause4.js b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause4.js index 92af44f7cc43e..34f0bce2d1ca9 100644 --- a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause4.js +++ b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause4.js @@ -4,7 +4,11 @@ class C extends A implements { //// [parserErrorRecovery_ExtendsOrImplementsClause4.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause5.js b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause5.js index 07adb1e2001de..9eb5a99563725 100644 --- a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause5.js +++ b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause5.js @@ -4,7 +4,11 @@ class C extends A, implements B, { //// [parserErrorRecovery_ExtendsOrImplementsClause5.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserGenericsInTypeContexts1.js b/tests/baselines/reference/parserGenericsInTypeContexts1.js index ef93433301b52..99cfeb0c61f18 100644 --- a/tests/baselines/reference/parserGenericsInTypeContexts1.js +++ b/tests/baselines/reference/parserGenericsInTypeContexts1.js @@ -19,7 +19,11 @@ function f2(): F { //// [parserGenericsInTypeContexts1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserGenericsInTypeContexts2.js b/tests/baselines/reference/parserGenericsInTypeContexts2.js index a3bfafc19b4df..b34364d5b9e9a 100644 --- a/tests/baselines/reference/parserGenericsInTypeContexts2.js +++ b/tests/baselines/reference/parserGenericsInTypeContexts2.js @@ -19,7 +19,11 @@ function f2(): F, Y>> { //// [parserGenericsInTypeContexts2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserRealSource10.js b/tests/baselines/reference/parserRealSource10.js index b89e47d3e7552..25112efe2317b 100644 --- a/tests/baselines/reference/parserRealSource10.js +++ b/tests/baselines/reference/parserRealSource10.js @@ -459,7 +459,11 @@ module TypeScript { // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. // See LICENSE.txt in the project root for complete license information. var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserRealSource11.js b/tests/baselines/reference/parserRealSource11.js index daaa9f79cee03..23ea8da3d5ccc 100644 --- a/tests/baselines/reference/parserRealSource11.js +++ b/tests/baselines/reference/parserRealSource11.js @@ -2368,7 +2368,11 @@ module TypeScript { // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. // See LICENSE.txt in the project root for complete license information. var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserharness.js b/tests/baselines/reference/parserharness.js index fd432660b529c..ac60a5b18adba 100644 --- a/tests/baselines/reference/parserharness.js +++ b/tests/baselines/reference/parserharness.js @@ -2097,7 +2097,11 @@ module Harness { // limitations under the License. // var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/partiallyAnnotatedFunctionInferenceError.js b/tests/baselines/reference/partiallyAnnotatedFunctionInferenceError.js index c81647e79b553..b57b3a8bff691 100644 --- a/tests/baselines/reference/partiallyAnnotatedFunctionInferenceError.js +++ b/tests/baselines/reference/partiallyAnnotatedFunctionInferenceError.js @@ -17,7 +17,11 @@ testError((t1, t2, t3: D) => {}) //// [partiallyAnnotatedFunctionInferenceError.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/partiallyAnnotatedFunctionInferenceWithTypeParameter.js b/tests/baselines/reference/partiallyAnnotatedFunctionInferenceWithTypeParameter.js index e54441df4d6d9..f8bd04cde38c2 100644 --- a/tests/baselines/reference/partiallyAnnotatedFunctionInferenceWithTypeParameter.js +++ b/tests/baselines/reference/partiallyAnnotatedFunctionInferenceWithTypeParameter.js @@ -36,7 +36,11 @@ testRest((t2, ...t3: D[]) => {}) //// [partiallyAnnotatedFunctionInferenceWithTypeParameter.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/primitiveMembers.js b/tests/baselines/reference/primitiveMembers.js index 64b699496bfa5..2aa2efbba10da 100644 --- a/tests/baselines/reference/primitiveMembers.js +++ b/tests/baselines/reference/primitiveMembers.js @@ -33,7 +33,11 @@ class foo extends baz { public bar(){ return undefined}; } //// [primitiveMembers.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/privacyClass.js b/tests/baselines/reference/privacyClass.js index 64e1c63eca124..c310bf6e77d0b 100644 --- a/tests/baselines/reference/privacyClass.js +++ b/tests/baselines/reference/privacyClass.js @@ -130,7 +130,11 @@ export class glo_C12_public extends glo_c_private implements glo_i_private, glo //// [privacyClass.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js b/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js index 377b4082bea68..68feed955d3d9 100644 --- a/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js +++ b/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js @@ -100,7 +100,11 @@ class publicClassExtendingPublicClassInGlobal extends publicClassInGlobal { //// [privacyClassExtendsClauseDeclFile_externalModule.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -286,7 +290,11 @@ var publicClassExtendingFromPrivateModuleClass = (function (_super) { exports.publicClassExtendingFromPrivateModuleClass = publicClassExtendingFromPrivateModuleClass; //// [privacyClassExtendsClauseDeclFile_GlobalFile.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/privacyGloClass.js b/tests/baselines/reference/privacyGloClass.js index b93ed51025d42..4824da462ad92 100644 --- a/tests/baselines/reference/privacyGloClass.js +++ b/tests/baselines/reference/privacyGloClass.js @@ -62,7 +62,11 @@ class glo_C11_public extends glo_c_public implements glo_i_public { //// [privacyGloClass.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/privateAccessInSubclass1.js b/tests/baselines/reference/privateAccessInSubclass1.js index 2118eb072d76c..63e8172576a3c 100644 --- a/tests/baselines/reference/privateAccessInSubclass1.js +++ b/tests/baselines/reference/privateAccessInSubclass1.js @@ -11,7 +11,11 @@ class D extends Base { //// [privateAccessInSubclass1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/privateInstanceMemberAccessibility.js b/tests/baselines/reference/privateInstanceMemberAccessibility.js index 98b2671d23e4e..3df2708569c91 100644 --- a/tests/baselines/reference/privateInstanceMemberAccessibility.js +++ b/tests/baselines/reference/privateInstanceMemberAccessibility.js @@ -15,7 +15,11 @@ class Derived extends Base { //// [privateInstanceMemberAccessibility.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/privateProtectedMembersAreNotAccessibleDestructuring.js b/tests/baselines/reference/privateProtectedMembersAreNotAccessibleDestructuring.js index bcef17bf63f74..239d0a4281b1f 100644 --- a/tests/baselines/reference/privateProtectedMembersAreNotAccessibleDestructuring.js +++ b/tests/baselines/reference/privateProtectedMembersAreNotAccessibleDestructuring.js @@ -23,7 +23,11 @@ let { priv: a, prot: b, privateMethod: f } = k; // error //// [privateProtectedMembersAreNotAccessibleDestructuring.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/privateStaticMemberAccessibility.js b/tests/baselines/reference/privateStaticMemberAccessibility.js index 438f485e03172..d21d13070d8a0 100644 --- a/tests/baselines/reference/privateStaticMemberAccessibility.js +++ b/tests/baselines/reference/privateStaticMemberAccessibility.js @@ -10,7 +10,11 @@ class Derived extends Base { //// [privateStaticMemberAccessibility.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/privateStaticNotAccessibleInClodule2.js b/tests/baselines/reference/privateStaticNotAccessibleInClodule2.js index 618d6d88e8a5a..e7e1e468aed7a 100644 --- a/tests/baselines/reference/privateStaticNotAccessibleInClodule2.js +++ b/tests/baselines/reference/privateStaticNotAccessibleInClodule2.js @@ -17,7 +17,11 @@ module D { //// [privateStaticNotAccessibleInClodule2.js] // Any attempt to access a private property member outside the class body that contains its declaration results in a compile-time error. var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/amd/testGlo.js b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/amd/testGlo.js index ef754cba47d60..93d8685224bc4 100644 --- a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/amd/testGlo.js +++ b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/amd/testGlo.js @@ -1,5 +1,9 @@ var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/node/testGlo.js b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/node/testGlo.js index ef754cba47d60..93d8685224bc4 100644 --- a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/node/testGlo.js +++ b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/node/testGlo.js @@ -1,5 +1,9 @@ var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/project/prologueEmit/amd/out.js b/tests/baselines/reference/project/prologueEmit/amd/out.js index 8273c054fbdd8..f80f316d3c86b 100644 --- a/tests/baselines/reference/project/prologueEmit/amd/out.js +++ b/tests/baselines/reference/project/prologueEmit/amd/out.js @@ -1,5 +1,9 @@ var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/project/prologueEmit/node/out.js b/tests/baselines/reference/project/prologueEmit/node/out.js index 8273c054fbdd8..f80f316d3c86b 100644 --- a/tests/baselines/reference/project/prologueEmit/node/out.js +++ b/tests/baselines/reference/project/prologueEmit/node/out.js @@ -1,5 +1,9 @@ var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/project/quotesInFileAndDirectoryNames/amd/m'ain.js b/tests/baselines/reference/project/quotesInFileAndDirectoryNames/amd/m'ain.js index dac535093f5c6..65483bd492ad3 100644 --- a/tests/baselines/reference/project/quotesInFileAndDirectoryNames/amd/m'ain.js +++ b/tests/baselines/reference/project/quotesInFileAndDirectoryNames/amd/m'ain.js @@ -1,6 +1,10 @@ /// var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/project/quotesInFileAndDirectoryNames/node/m'ain.js b/tests/baselines/reference/project/quotesInFileAndDirectoryNames/node/m'ain.js index dac535093f5c6..65483bd492ad3 100644 --- a/tests/baselines/reference/project/quotesInFileAndDirectoryNames/node/m'ain.js +++ b/tests/baselines/reference/project/quotesInFileAndDirectoryNames/node/m'ain.js @@ -1,6 +1,10 @@ /// var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/propertiesAndIndexers.js b/tests/baselines/reference/propertiesAndIndexers.js index ccf7c50ebc955..9d65b48702eaa 100644 --- a/tests/baselines/reference/propertiesAndIndexers.js +++ b/tests/baselines/reference/propertiesAndIndexers.js @@ -53,7 +53,11 @@ var c: { //// [propertiesAndIndexers.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/propertyAccess.js b/tests/baselines/reference/propertyAccess.js index 3240f46a93502..3da9b5cc64702 100644 --- a/tests/baselines/reference/propertyAccess.js +++ b/tests/baselines/reference/propertyAccess.js @@ -152,7 +152,11 @@ var x3: A; //// [propertyAccess.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js index e813239484b44..cc874197c3c73 100644 --- a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js @@ -84,7 +84,11 @@ var r4 = b.foo(aB, aB); // no inferences for T so constraint isn't satisfied, er //// [propertyAccessOnTypeParameterWithConstraints2.js] // generic types should behave as if they have properties of their constraint type var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js index b10642c73c50e..bcaa145832515 100644 --- a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js @@ -59,7 +59,11 @@ var r4 = b.foo(new B()); // valid call to an invalid function //// [propertyAccessOnTypeParameterWithConstraints3.js] // generic types should behave as if they have properties of their constraint type var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js index 97f8e18f91700..8cc85faa10037 100644 --- a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js @@ -46,7 +46,11 @@ var r4 = b.foo(new B()); // error after constraints above made illegal, doesn't //// [propertyAccessOnTypeParameterWithConstraints5.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass.js index 226ad97f81fb0..babef969a107c 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass.js @@ -40,7 +40,11 @@ class E extends C { //// [protectedClassPropertyAccessibleWithinNestedSubclass.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass1.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass1.js index c98abd2a89af8..3a3013d670455 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass1.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass1.js @@ -116,7 +116,11 @@ d4.x; // Error, neither within their declaring class nor class //// [protectedClassPropertyAccessibleWithinNestedSubclass1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js index 2557a8abcf9ee..3c59a316d71e7 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js @@ -22,7 +22,11 @@ class C extends B { //// [protectedClassPropertyAccessibleWithinSubclass.js] // no errors var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass2.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass2.js index 8ee957ec64fe9..fb818c42c7e10 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass2.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass2.js @@ -96,7 +96,11 @@ d4.x; // Error, neither within their declaring class nor class //// [protectedClassPropertyAccessibleWithinSubclass2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass3.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass3.js index 31c2f3d149c3e..20984b107b91e 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass3.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass3.js @@ -15,7 +15,11 @@ class Derived extends Base { //// [protectedClassPropertyAccessibleWithinSubclass3.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedInstanceMemberAccessibility.js b/tests/baselines/reference/protectedInstanceMemberAccessibility.js index 84400a37aa7b0..c906f456d67b8 100644 --- a/tests/baselines/reference/protectedInstanceMemberAccessibility.js +++ b/tests/baselines/reference/protectedInstanceMemberAccessibility.js @@ -46,7 +46,11 @@ class C extends A { //// [protectedInstanceMemberAccessibility.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedMembers.js b/tests/baselines/reference/protectedMembers.js index 4757f6134a36f..d2e8bfe47cecc 100644 --- a/tests/baselines/reference/protectedMembers.js +++ b/tests/baselines/reference/protectedMembers.js @@ -117,7 +117,11 @@ class B3 extends A3 { //// [protectedMembers.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass.js b/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass.js index ffe163716ed47..e0ad17934c3a3 100644 --- a/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass.js +++ b/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass.js @@ -45,7 +45,11 @@ Derived3.x; // Error, neither within their declaring class nor classes deriv //// [protectedStaticClassPropertyAccessibleWithinSubclass.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass2.js b/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass2.js index d21e6511c3489..37ddb2b0d2c0a 100644 --- a/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass2.js +++ b/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass2.js @@ -23,7 +23,11 @@ class Derived2 extends Derived1 { //// [protectedStaticClassPropertyAccessibleWithinSubclass2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/qualifiedName_entity-name-resolution-does-not-affect-class-heritage.js b/tests/baselines/reference/qualifiedName_entity-name-resolution-does-not-affect-class-heritage.js index d345bb7e1b19d..3fc3b29ff45ac 100644 --- a/tests/baselines/reference/qualifiedName_entity-name-resolution-does-not-affect-class-heritage.js +++ b/tests/baselines/reference/qualifiedName_entity-name-resolution-does-not-affect-class-heritage.js @@ -8,7 +8,11 @@ class Beta extends Alpha.x { //// [qualifiedName_entity-name-resolution-does-not-affect-class-heritage.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/readonlyConstructorAssignment.js b/tests/baselines/reference/readonlyConstructorAssignment.js index d8275690d4a6a..a3a46c4e14fcc 100644 --- a/tests/baselines/reference/readonlyConstructorAssignment.js +++ b/tests/baselines/reference/readonlyConstructorAssignment.js @@ -42,7 +42,11 @@ class E extends D { //// [readonlyConstructorAssignment.js] // Tests that readonly parameter properties behave like regular readonly properties var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/recursiveBaseCheck3.js b/tests/baselines/reference/recursiveBaseCheck3.js index 92835b848ce18..bd89b8c65749a 100644 --- a/tests/baselines/reference/recursiveBaseCheck3.js +++ b/tests/baselines/reference/recursiveBaseCheck3.js @@ -6,7 +6,11 @@ class C extends A { } //// [recursiveBaseCheck3.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/recursiveBaseCheck4.js b/tests/baselines/reference/recursiveBaseCheck4.js index f0271b2d36ab8..f89b52e719fa0 100644 --- a/tests/baselines/reference/recursiveBaseCheck4.js +++ b/tests/baselines/reference/recursiveBaseCheck4.js @@ -4,7 +4,11 @@ class M extends M { } //// [recursiveBaseCheck4.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/recursiveBaseCheck6.js b/tests/baselines/reference/recursiveBaseCheck6.js index 97e6cb483e39c..05a72e1121333 100644 --- a/tests/baselines/reference/recursiveBaseCheck6.js +++ b/tests/baselines/reference/recursiveBaseCheck6.js @@ -4,7 +4,11 @@ class S18 extends S18<{ S19: A; }>{ } //// [recursiveBaseCheck6.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/recursiveBaseConstructorCreation1.js b/tests/baselines/reference/recursiveBaseConstructorCreation1.js index d20d43c405d68..b0a11841dd89e 100644 --- a/tests/baselines/reference/recursiveBaseConstructorCreation1.js +++ b/tests/baselines/reference/recursiveBaseConstructorCreation1.js @@ -8,7 +8,11 @@ var x = new C2(); // Valid //// [recursiveBaseConstructorCreation1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/recursiveClassInstantiationsWithDefaultConstructors.js b/tests/baselines/reference/recursiveClassInstantiationsWithDefaultConstructors.js index eeda7ef86f40e..bfd014a3fe11c 100644 --- a/tests/baselines/reference/recursiveClassInstantiationsWithDefaultConstructors.js +++ b/tests/baselines/reference/recursiveClassInstantiationsWithDefaultConstructors.js @@ -11,7 +11,11 @@ export class MemberNameArray extends MemberName { //// [recursiveClassInstantiationsWithDefaultConstructors.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/recursiveClassReferenceTest.js b/tests/baselines/reference/recursiveClassReferenceTest.js index e59f3ad4c3681..11eb4f8ba8f5b 100644 --- a/tests/baselines/reference/recursiveClassReferenceTest.js +++ b/tests/baselines/reference/recursiveClassReferenceTest.js @@ -106,7 +106,11 @@ module Sample.Thing.Languages.PlainText { // Scenario 1: Test reqursive function call with "this" parameter // Scenario 2: Test recursive function call with cast and "this" parameter var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/recursiveClassReferenceTest.js.map b/tests/baselines/reference/recursiveClassReferenceTest.js.map index 0b9bb8281bccf..f322d6f051041 100644 --- a/tests/baselines/reference/recursiveClassReferenceTest.js.map +++ b/tests/baselines/reference/recursiveClassReferenceTest.js.map @@ -1,2 +1,2 @@ //// [recursiveClassReferenceTest.js.map] -{"version":3,"file":"recursiveClassReferenceTest.js","sourceRoot":"","sources":["recursiveClassReferenceTest.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,0EAA0E;;;;;;AA8B1E,IAAO,MAAM,CAUZ;AAVD,WAAO,MAAM;IAAC,IAAA,OAAO,CAUpB;IAVa,WAAA,OAAO;QAAC,IAAA,KAAK,CAU1B;QAVqB,WAAA,OAAK;YAAC,IAAA,IAAI,CAU/B;YAV2B,WAAA,IAAI;gBAC/B;oBAAA;oBAQA,CAAC;oBANO,+BAAK,GAAZ,cAAiB,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;oBAExB,6BAAG,GAAV,UAAW,KAA6B;wBAEvC,MAAM,CAAC,IAAI,CAAC;oBACb,CAAC;oBACF,sBAAC;gBAAD,CAAC,AARD,IAQC;gBARY,oBAAe,kBAQ3B,CAAA;YACF,CAAC,EAV2B,IAAI,GAAJ,YAAI,KAAJ,YAAI,QAU/B;QAAD,CAAC,EAVqB,KAAK,GAAL,aAAK,KAAL,aAAK,QAU1B;IAAD,CAAC,EAVa,OAAO,GAAP,cAAO,KAAP,cAAO,QAUpB;AAAD,CAAC,EAVM,MAAM,KAAN,MAAM,QAUZ;AAED,WAAO,MAAM;IAAC,IAAA,KAAK,CAoBlB;IApBa,WAAA,KAAK;QAAC,IAAA,OAAO,CAoB1B;QApBmB,WAAA,OAAO;YAC1B;gBAKC,oBAAoB,SAAkC;oBAAlC,cAAS,GAAT,SAAS,CAAyB;oBAD9C,YAAO,GAAO,IAAI,CAAC;oBAEvB,aAAa;oBACb,SAAS,CAAC,SAAS,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;gBAC3C,CAAC;gBANM,wBAAG,GAAV,UAAW,MAAyC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;oBAAA,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;gBAAA,CAAC,CAAA,CAAC;gBAQlF,+BAAU,GAAjB;oBACC,MAAM,CAAC,OAAO,CAAC;gBAChB,CAAC;gBAEM,4BAAO,GAAd;gBAEA,CAAC;gBAEF,iBAAC;YAAD,CAAC,AAlBD,IAkBC;YAlBY,kBAAU,aAkBtB,CAAA;QACF,CAAC,EApBmB,OAAO,GAAP,aAAO,KAAP,aAAO,QAoB1B;IAAD,CAAC,EApBa,KAAK,GAAL,YAAK,KAAL,YAAK,QAoBlB;AAAD,CAAC,EApBM,MAAM,KAAN,MAAM,QAoBZ;AAGD;IAAA;IAAuF,CAAC;IAA3C,sCAAe,GAAtB,cAAmC,MAAM,CAAC,IAAI,CAAC,CAAA,CAAC;IAAC,mBAAC;AAAD,CAAC,AAAxF,IAAwF;AASxF,WAAO,MAAM;IAAC,IAAA,KAAK,CAwBlB;IAxBa,WAAA,KAAK;QAAC,IAAA,SAAS,CAwB5B;QAxBmB,WAAA,SAAS;YAAC,IAAA,SAAS,CAwBtC;YAxB6B,WAAA,SAAS;gBAEtC;oBACO,eAAoB,IAAW;wBAAX,SAAI,GAAJ,IAAI,CAAO;oBAAI,CAAC;oBACnC,qBAAK,GAAZ;wBACC,MAAM,CAAC,IAAI,CAAC;oBACb,CAAC;oBAEM,sBAAM,GAAb,UAAc,KAAY;wBACzB,MAAM,CAAC,IAAI,KAAK,KAAK,CAAC;oBACvB,CAAC;oBAEM,uBAAO,GAAd,cAA0B,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;oBACzC,YAAC;gBAAD,CAAC,AAXD,IAWC;gBAXY,eAAK,QAWjB,CAAA;gBAED;oBAA0B,wBAAY;oBAAtC;;oBAQA,CAAC;oBANA,aAAa;oBACN,8BAAe,GAAtB;wBACC,MAAM,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC;oBACxB,CAAC;oBAGF,WAAC;gBAAD,CAAC,AARD,CAA0B,YAAY,GAQrC;gBARY,cAAI,OAQhB,CAAA;YACF,CAAC,EAxB6B,SAAS,GAAT,mBAAS,KAAT,mBAAS,QAwBtC;QAAD,CAAC,EAxBmB,SAAS,GAAT,eAAS,KAAT,eAAS,QAwB5B;IAAD,CAAC,EAxBa,KAAK,GAAL,YAAK,KAAL,YAAK,QAwBlB;AAAD,CAAC,EAxBM,MAAM,KAAN,MAAM,QAwBZ"} \ No newline at end of file +{"version":3,"file":"recursiveClassReferenceTest.js","sourceRoot":"","sources":["recursiveClassReferenceTest.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,0EAA0E;;;;;;;;;;AA8B1E,IAAO,MAAM,CAUZ;AAVD,WAAO,MAAM;IAAC,IAAA,OAAO,CAUpB;IAVa,WAAA,OAAO;QAAC,IAAA,KAAK,CAU1B;QAVqB,WAAA,OAAK;YAAC,IAAA,IAAI,CAU/B;YAV2B,WAAA,IAAI;gBAC/B;oBAAA;oBAQA,CAAC;oBANO,+BAAK,GAAZ,cAAiB,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;oBAExB,6BAAG,GAAV,UAAW,KAA6B;wBAEvC,MAAM,CAAC,IAAI,CAAC;oBACb,CAAC;oBACF,sBAAC;gBAAD,CAAC,AARD,IAQC;gBARY,oBAAe,kBAQ3B,CAAA;YACF,CAAC,EAV2B,IAAI,GAAJ,YAAI,KAAJ,YAAI,QAU/B;QAAD,CAAC,EAVqB,KAAK,GAAL,aAAK,KAAL,aAAK,QAU1B;IAAD,CAAC,EAVa,OAAO,GAAP,cAAO,KAAP,cAAO,QAUpB;AAAD,CAAC,EAVM,MAAM,KAAN,MAAM,QAUZ;AAED,WAAO,MAAM;IAAC,IAAA,KAAK,CAoBlB;IApBa,WAAA,KAAK;QAAC,IAAA,OAAO,CAoB1B;QApBmB,WAAA,OAAO;YAC1B;gBAKC,oBAAoB,SAAkC;oBAAlC,cAAS,GAAT,SAAS,CAAyB;oBAD9C,YAAO,GAAO,IAAI,CAAC;oBAEvB,aAAa;oBACb,SAAS,CAAC,SAAS,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;gBAC3C,CAAC;gBANM,wBAAG,GAAV,UAAW,MAAyC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;oBAAA,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;gBAAA,CAAC,CAAA,CAAC;gBAQlF,+BAAU,GAAjB;oBACC,MAAM,CAAC,OAAO,CAAC;gBAChB,CAAC;gBAEM,4BAAO,GAAd;gBAEA,CAAC;gBAEF,iBAAC;YAAD,CAAC,AAlBD,IAkBC;YAlBY,kBAAU,aAkBtB,CAAA;QACF,CAAC,EApBmB,OAAO,GAAP,aAAO,KAAP,aAAO,QAoB1B;IAAD,CAAC,EApBa,KAAK,GAAL,YAAK,KAAL,YAAK,QAoBlB;AAAD,CAAC,EApBM,MAAM,KAAN,MAAM,QAoBZ;AAGD;IAAA;IAAuF,CAAC;IAA3C,sCAAe,GAAtB,cAAmC,MAAM,CAAC,IAAI,CAAC,CAAA,CAAC;IAAC,mBAAC;AAAD,CAAC,AAAxF,IAAwF;AASxF,WAAO,MAAM;IAAC,IAAA,KAAK,CAwBlB;IAxBa,WAAA,KAAK;QAAC,IAAA,SAAS,CAwB5B;QAxBmB,WAAA,SAAS;YAAC,IAAA,SAAS,CAwBtC;YAxB6B,WAAA,SAAS;gBAEtC;oBACO,eAAoB,IAAW;wBAAX,SAAI,GAAJ,IAAI,CAAO;oBAAI,CAAC;oBACnC,qBAAK,GAAZ;wBACC,MAAM,CAAC,IAAI,CAAC;oBACb,CAAC;oBAEM,sBAAM,GAAb,UAAc,KAAY;wBACzB,MAAM,CAAC,IAAI,KAAK,KAAK,CAAC;oBACvB,CAAC;oBAEM,uBAAO,GAAd,cAA0B,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;oBACzC,YAAC;gBAAD,CAAC,AAXD,IAWC;gBAXY,eAAK,QAWjB,CAAA;gBAED;oBAA0B,wBAAY;oBAAtC;;oBAQA,CAAC;oBANA,aAAa;oBACN,8BAAe,GAAtB;wBACC,MAAM,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC;oBACxB,CAAC;oBAGF,WAAC;gBAAD,CAAC,AARD,CAA0B,YAAY,GAQrC;gBARY,cAAI,OAQhB,CAAA;YACF,CAAC,EAxB6B,SAAS,GAAT,mBAAS,KAAT,mBAAS,QAwBtC;QAAD,CAAC,EAxBmB,SAAS,GAAT,eAAS,KAAT,eAAS,QAwB5B;IAAD,CAAC,EAxBa,KAAK,GAAL,YAAK,KAAL,YAAK,QAwBlB;AAAD,CAAC,EAxBM,MAAM,KAAN,MAAM,QAwBZ"} \ No newline at end of file diff --git a/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt b/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt index 8bfac267dbf6d..5bb43de1b9f19 100644 --- a/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt +++ b/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt @@ -27,7 +27,11 @@ sourceFile:recursiveClassReferenceTest.ts 2 >Emitted(2, 75) Source(2, 75) + SourceIndex(0) --- >>>var __extends = (this && this.__extends) || function (d, b) { ->>> Object.setPrototypeOf(d, b); +>>> if (typeof Object.setPrototypeOf === "function") { +>>> Object.setPrototypeOf(d, b); +>>> } else { +>>> d.__proto__ = b; +>>> } >>> function __() { this.constructor = d; } >>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); >>>}; @@ -81,10 +85,10 @@ sourceFile:recursiveClassReferenceTest.ts > } > } > } -1 >Emitted(8, 1) Source(32, 1) + SourceIndex(0) -2 >Emitted(8, 5) Source(32, 8) + SourceIndex(0) -3 >Emitted(8, 11) Source(32, 14) + SourceIndex(0) -4 >Emitted(8, 12) Source(42, 2) + SourceIndex(0) +1 >Emitted(12, 1) Source(32, 1) + SourceIndex(0) +2 >Emitted(12, 5) Source(32, 8) + SourceIndex(0) +3 >Emitted(12, 11) Source(32, 14) + SourceIndex(0) +4 >Emitted(12, 12) Source(42, 2) + SourceIndex(0) --- >>>(function (Sample) { 1-> @@ -93,9 +97,9 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 >module 3 > Sample -1->Emitted(9, 1) Source(32, 1) + SourceIndex(0) -2 >Emitted(9, 12) Source(32, 8) + SourceIndex(0) -3 >Emitted(9, 18) Source(32, 14) + SourceIndex(0) +1->Emitted(13, 1) Source(32, 1) + SourceIndex(0) +2 >Emitted(13, 12) Source(32, 8) + SourceIndex(0) +3 >Emitted(13, 18) Source(32, 14) + SourceIndex(0) --- >>> var Actions; 1 >^^^^ @@ -117,10 +121,10 @@ sourceFile:recursiveClassReferenceTest.ts > } > } > } -1 >Emitted(10, 5) Source(32, 15) + SourceIndex(0) -2 >Emitted(10, 9) Source(32, 15) + SourceIndex(0) -3 >Emitted(10, 16) Source(32, 22) + SourceIndex(0) -4 >Emitted(10, 17) Source(42, 2) + SourceIndex(0) +1 >Emitted(14, 5) Source(32, 15) + SourceIndex(0) +2 >Emitted(14, 9) Source(32, 15) + SourceIndex(0) +3 >Emitted(14, 16) Source(32, 22) + SourceIndex(0) +4 >Emitted(14, 17) Source(42, 2) + SourceIndex(0) --- >>> (function (Actions) { 1->^^^^ @@ -129,9 +133,9 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 > 3 > Actions -1->Emitted(11, 5) Source(32, 15) + SourceIndex(0) -2 >Emitted(11, 16) Source(32, 15) + SourceIndex(0) -3 >Emitted(11, 23) Source(32, 22) + SourceIndex(0) +1->Emitted(15, 5) Source(32, 15) + SourceIndex(0) +2 >Emitted(15, 16) Source(32, 15) + SourceIndex(0) +3 >Emitted(15, 23) Source(32, 22) + SourceIndex(0) --- >>> var Thing; 1 >^^^^^^^^ @@ -153,10 +157,10 @@ sourceFile:recursiveClassReferenceTest.ts > } > } > } -1 >Emitted(12, 9) Source(32, 23) + SourceIndex(0) -2 >Emitted(12, 13) Source(32, 23) + SourceIndex(0) -3 >Emitted(12, 18) Source(32, 28) + SourceIndex(0) -4 >Emitted(12, 19) Source(42, 2) + SourceIndex(0) +1 >Emitted(16, 9) Source(32, 23) + SourceIndex(0) +2 >Emitted(16, 13) Source(32, 23) + SourceIndex(0) +3 >Emitted(16, 18) Source(32, 28) + SourceIndex(0) +4 >Emitted(16, 19) Source(42, 2) + SourceIndex(0) --- >>> (function (Thing_1) { 1->^^^^^^^^ @@ -165,9 +169,9 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 > 3 > Thing -1->Emitted(13, 9) Source(32, 23) + SourceIndex(0) -2 >Emitted(13, 20) Source(32, 23) + SourceIndex(0) -3 >Emitted(13, 27) Source(32, 28) + SourceIndex(0) +1->Emitted(17, 9) Source(32, 23) + SourceIndex(0) +2 >Emitted(17, 20) Source(32, 23) + SourceIndex(0) +3 >Emitted(17, 27) Source(32, 28) + SourceIndex(0) --- >>> var Find; 1 >^^^^^^^^^^^^ @@ -189,10 +193,10 @@ sourceFile:recursiveClassReferenceTest.ts > } > } > } -1 >Emitted(14, 13) Source(32, 29) + SourceIndex(0) -2 >Emitted(14, 17) Source(32, 29) + SourceIndex(0) -3 >Emitted(14, 21) Source(32, 33) + SourceIndex(0) -4 >Emitted(14, 22) Source(42, 2) + SourceIndex(0) +1 >Emitted(18, 13) Source(32, 29) + SourceIndex(0) +2 >Emitted(18, 17) Source(32, 29) + SourceIndex(0) +3 >Emitted(18, 21) Source(32, 33) + SourceIndex(0) +4 >Emitted(18, 22) Source(42, 2) + SourceIndex(0) --- >>> (function (Find) { 1->^^^^^^^^^^^^ @@ -202,22 +206,22 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 > 3 > Find -1->Emitted(15, 13) Source(32, 29) + SourceIndex(0) -2 >Emitted(15, 24) Source(32, 29) + SourceIndex(0) -3 >Emitted(15, 28) Source(32, 33) + SourceIndex(0) +1->Emitted(19, 13) Source(32, 29) + SourceIndex(0) +2 >Emitted(19, 24) Source(32, 29) + SourceIndex(0) +3 >Emitted(19, 28) Source(32, 33) + SourceIndex(0) --- >>> var StartFindAction = (function () { 1->^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> { > -1->Emitted(16, 17) Source(33, 2) + SourceIndex(0) +1->Emitted(20, 17) Source(33, 2) + SourceIndex(0) --- >>> function StartFindAction() { 1->^^^^^^^^^^^^^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(17, 21) Source(33, 2) + SourceIndex(0) +1->Emitted(21, 21) Source(33, 2) + SourceIndex(0) --- >>> } 1->^^^^^^^^^^^^^^^^^^^^ @@ -233,8 +237,8 @@ sourceFile:recursiveClassReferenceTest.ts > } > 2 > } -1->Emitted(18, 21) Source(41, 2) + SourceIndex(0) -2 >Emitted(18, 22) Source(41, 3) + SourceIndex(0) +1->Emitted(22, 21) Source(41, 2) + SourceIndex(0) +2 >Emitted(22, 22) Source(41, 3) + SourceIndex(0) --- >>> StartFindAction.prototype.getId = function () { return "yo"; }; 1->^^^^^^^^^^^^^^^^^^^^ @@ -257,16 +261,16 @@ sourceFile:recursiveClassReferenceTest.ts 8 > ; 9 > 10> } -1->Emitted(19, 21) Source(35, 10) + SourceIndex(0) -2 >Emitted(19, 52) Source(35, 15) + SourceIndex(0) -3 >Emitted(19, 55) Source(35, 3) + SourceIndex(0) -4 >Emitted(19, 69) Source(35, 20) + SourceIndex(0) -5 >Emitted(19, 75) Source(35, 26) + SourceIndex(0) -6 >Emitted(19, 76) Source(35, 27) + SourceIndex(0) -7 >Emitted(19, 80) Source(35, 31) + SourceIndex(0) -8 >Emitted(19, 81) Source(35, 32) + SourceIndex(0) -9 >Emitted(19, 82) Source(35, 33) + SourceIndex(0) -10>Emitted(19, 83) Source(35, 34) + SourceIndex(0) +1->Emitted(23, 21) Source(35, 10) + SourceIndex(0) +2 >Emitted(23, 52) Source(35, 15) + SourceIndex(0) +3 >Emitted(23, 55) Source(35, 3) + SourceIndex(0) +4 >Emitted(23, 69) Source(35, 20) + SourceIndex(0) +5 >Emitted(23, 75) Source(35, 26) + SourceIndex(0) +6 >Emitted(23, 76) Source(35, 27) + SourceIndex(0) +7 >Emitted(23, 80) Source(35, 31) + SourceIndex(0) +8 >Emitted(23, 81) Source(35, 32) + SourceIndex(0) +9 >Emitted(23, 82) Source(35, 33) + SourceIndex(0) +10>Emitted(23, 83) Source(35, 34) + SourceIndex(0) --- >>> StartFindAction.prototype.run = function (Thing) { 1 >^^^^^^^^^^^^^^^^^^^^ @@ -281,11 +285,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > 4 > public run( 5 > Thing:Sample.Thing.ICodeThing -1 >Emitted(20, 21) Source(37, 10) + SourceIndex(0) -2 >Emitted(20, 50) Source(37, 13) + SourceIndex(0) -3 >Emitted(20, 53) Source(37, 3) + SourceIndex(0) -4 >Emitted(20, 63) Source(37, 14) + SourceIndex(0) -5 >Emitted(20, 68) Source(37, 43) + SourceIndex(0) +1 >Emitted(24, 21) Source(37, 10) + SourceIndex(0) +2 >Emitted(24, 50) Source(37, 13) + SourceIndex(0) +3 >Emitted(24, 53) Source(37, 3) + SourceIndex(0) +4 >Emitted(24, 63) Source(37, 14) + SourceIndex(0) +5 >Emitted(24, 68) Source(37, 43) + SourceIndex(0) --- >>> return true; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -300,11 +304,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > 4 > true 5 > ; -1 >Emitted(21, 25) Source(39, 4) + SourceIndex(0) -2 >Emitted(21, 31) Source(39, 10) + SourceIndex(0) -3 >Emitted(21, 32) Source(39, 11) + SourceIndex(0) -4 >Emitted(21, 36) Source(39, 15) + SourceIndex(0) -5 >Emitted(21, 37) Source(39, 16) + SourceIndex(0) +1 >Emitted(25, 25) Source(39, 4) + SourceIndex(0) +2 >Emitted(25, 31) Source(39, 10) + SourceIndex(0) +3 >Emitted(25, 32) Source(39, 11) + SourceIndex(0) +4 >Emitted(25, 36) Source(39, 15) + SourceIndex(0) +5 >Emitted(25, 37) Source(39, 16) + SourceIndex(0) --- >>> }; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -313,8 +317,8 @@ sourceFile:recursiveClassReferenceTest.ts 1 > > 2 > } -1 >Emitted(22, 21) Source(40, 3) + SourceIndex(0) -2 >Emitted(22, 22) Source(40, 4) + SourceIndex(0) +1 >Emitted(26, 21) Source(40, 3) + SourceIndex(0) +2 >Emitted(26, 22) Source(40, 4) + SourceIndex(0) --- >>> return StartFindAction; 1->^^^^^^^^^^^^^^^^^^^^ @@ -322,8 +326,8 @@ sourceFile:recursiveClassReferenceTest.ts 1-> > 2 > } -1->Emitted(23, 21) Source(41, 2) + SourceIndex(0) -2 >Emitted(23, 43) Source(41, 3) + SourceIndex(0) +1->Emitted(27, 21) Source(41, 2) + SourceIndex(0) +2 >Emitted(27, 43) Source(41, 3) + SourceIndex(0) --- >>> }()); 1 >^^^^^^^^^^^^^^^^ @@ -343,10 +347,10 @@ sourceFile:recursiveClassReferenceTest.ts > return true; > } > } -1 >Emitted(24, 17) Source(41, 2) + SourceIndex(0) -2 >Emitted(24, 18) Source(41, 3) + SourceIndex(0) -3 >Emitted(24, 18) Source(33, 2) + SourceIndex(0) -4 >Emitted(24, 22) Source(41, 3) + SourceIndex(0) +1 >Emitted(28, 17) Source(41, 2) + SourceIndex(0) +2 >Emitted(28, 18) Source(41, 3) + SourceIndex(0) +3 >Emitted(28, 18) Source(33, 2) + SourceIndex(0) +4 >Emitted(28, 22) Source(41, 3) + SourceIndex(0) --- >>> Find.StartFindAction = StartFindAction; 1->^^^^^^^^^^^^^^^^ @@ -366,10 +370,10 @@ sourceFile:recursiveClassReferenceTest.ts > } > } 4 > -1->Emitted(25, 17) Source(33, 15) + SourceIndex(0) -2 >Emitted(25, 37) Source(33, 30) + SourceIndex(0) -3 >Emitted(25, 55) Source(41, 3) + SourceIndex(0) -4 >Emitted(25, 56) Source(41, 3) + SourceIndex(0) +1->Emitted(29, 17) Source(33, 15) + SourceIndex(0) +2 >Emitted(29, 37) Source(33, 30) + SourceIndex(0) +3 >Emitted(29, 55) Source(41, 3) + SourceIndex(0) +4 >Emitted(29, 56) Source(41, 3) + SourceIndex(0) --- >>> })(Find = Thing_1.Find || (Thing_1.Find = {})); 1->^^^^^^^^^^^^ @@ -401,15 +405,15 @@ sourceFile:recursiveClassReferenceTest.ts > } > } > } -1->Emitted(26, 13) Source(42, 1) + SourceIndex(0) -2 >Emitted(26, 14) Source(42, 2) + SourceIndex(0) -3 >Emitted(26, 16) Source(32, 29) + SourceIndex(0) -4 >Emitted(26, 20) Source(32, 33) + SourceIndex(0) -5 >Emitted(26, 23) Source(32, 29) + SourceIndex(0) -6 >Emitted(26, 35) Source(32, 33) + SourceIndex(0) -7 >Emitted(26, 40) Source(32, 29) + SourceIndex(0) -8 >Emitted(26, 52) Source(32, 33) + SourceIndex(0) -9 >Emitted(26, 60) Source(42, 2) + SourceIndex(0) +1->Emitted(30, 13) Source(42, 1) + SourceIndex(0) +2 >Emitted(30, 14) Source(42, 2) + SourceIndex(0) +3 >Emitted(30, 16) Source(32, 29) + SourceIndex(0) +4 >Emitted(30, 20) Source(32, 33) + SourceIndex(0) +5 >Emitted(30, 23) Source(32, 29) + SourceIndex(0) +6 >Emitted(30, 35) Source(32, 33) + SourceIndex(0) +7 >Emitted(30, 40) Source(32, 29) + SourceIndex(0) +8 >Emitted(30, 52) Source(32, 33) + SourceIndex(0) +9 >Emitted(30, 60) Source(42, 2) + SourceIndex(0) --- >>> })(Thing = Actions.Thing || (Actions.Thing = {})); 1 >^^^^^^^^ @@ -441,15 +445,15 @@ sourceFile:recursiveClassReferenceTest.ts > } > } > } -1 >Emitted(27, 9) Source(42, 1) + SourceIndex(0) -2 >Emitted(27, 10) Source(42, 2) + SourceIndex(0) -3 >Emitted(27, 12) Source(32, 23) + SourceIndex(0) -4 >Emitted(27, 17) Source(32, 28) + SourceIndex(0) -5 >Emitted(27, 20) Source(32, 23) + SourceIndex(0) -6 >Emitted(27, 33) Source(32, 28) + SourceIndex(0) -7 >Emitted(27, 38) Source(32, 23) + SourceIndex(0) -8 >Emitted(27, 51) Source(32, 28) + SourceIndex(0) -9 >Emitted(27, 59) Source(42, 2) + SourceIndex(0) +1 >Emitted(31, 9) Source(42, 1) + SourceIndex(0) +2 >Emitted(31, 10) Source(42, 2) + SourceIndex(0) +3 >Emitted(31, 12) Source(32, 23) + SourceIndex(0) +4 >Emitted(31, 17) Source(32, 28) + SourceIndex(0) +5 >Emitted(31, 20) Source(32, 23) + SourceIndex(0) +6 >Emitted(31, 33) Source(32, 28) + SourceIndex(0) +7 >Emitted(31, 38) Source(32, 23) + SourceIndex(0) +8 >Emitted(31, 51) Source(32, 28) + SourceIndex(0) +9 >Emitted(31, 59) Source(42, 2) + SourceIndex(0) --- >>> })(Actions = Sample.Actions || (Sample.Actions = {})); 1->^^^^ @@ -480,15 +484,15 @@ sourceFile:recursiveClassReferenceTest.ts > } > } > } -1->Emitted(28, 5) Source(42, 1) + SourceIndex(0) -2 >Emitted(28, 6) Source(42, 2) + SourceIndex(0) -3 >Emitted(28, 8) Source(32, 15) + SourceIndex(0) -4 >Emitted(28, 15) Source(32, 22) + SourceIndex(0) -5 >Emitted(28, 18) Source(32, 15) + SourceIndex(0) -6 >Emitted(28, 32) Source(32, 22) + SourceIndex(0) -7 >Emitted(28, 37) Source(32, 15) + SourceIndex(0) -8 >Emitted(28, 51) Source(32, 22) + SourceIndex(0) -9 >Emitted(28, 59) Source(42, 2) + SourceIndex(0) +1->Emitted(32, 5) Source(42, 1) + SourceIndex(0) +2 >Emitted(32, 6) Source(42, 2) + SourceIndex(0) +3 >Emitted(32, 8) Source(32, 15) + SourceIndex(0) +4 >Emitted(32, 15) Source(32, 22) + SourceIndex(0) +5 >Emitted(32, 18) Source(32, 15) + SourceIndex(0) +6 >Emitted(32, 32) Source(32, 22) + SourceIndex(0) +7 >Emitted(32, 37) Source(32, 15) + SourceIndex(0) +8 >Emitted(32, 51) Source(32, 22) + SourceIndex(0) +9 >Emitted(32, 59) Source(42, 2) + SourceIndex(0) --- >>>})(Sample || (Sample = {})); 1 > @@ -515,13 +519,13 @@ sourceFile:recursiveClassReferenceTest.ts > } > } > } -1 >Emitted(29, 1) Source(42, 1) + SourceIndex(0) -2 >Emitted(29, 2) Source(42, 2) + SourceIndex(0) -3 >Emitted(29, 4) Source(32, 8) + SourceIndex(0) -4 >Emitted(29, 10) Source(32, 14) + SourceIndex(0) -5 >Emitted(29, 15) Source(32, 8) + SourceIndex(0) -6 >Emitted(29, 21) Source(32, 14) + SourceIndex(0) -7 >Emitted(29, 29) Source(42, 2) + SourceIndex(0) +1 >Emitted(33, 1) Source(42, 1) + SourceIndex(0) +2 >Emitted(33, 2) Source(42, 2) + SourceIndex(0) +3 >Emitted(33, 4) Source(32, 8) + SourceIndex(0) +4 >Emitted(33, 10) Source(32, 14) + SourceIndex(0) +5 >Emitted(33, 15) Source(32, 8) + SourceIndex(0) +6 >Emitted(33, 21) Source(32, 14) + SourceIndex(0) +7 >Emitted(33, 29) Source(42, 2) + SourceIndex(0) --- >>>(function (Sample) { 1 > @@ -532,9 +536,9 @@ sourceFile:recursiveClassReferenceTest.ts > 2 >module 3 > Sample -1 >Emitted(30, 1) Source(44, 1) + SourceIndex(0) -2 >Emitted(30, 12) Source(44, 8) + SourceIndex(0) -3 >Emitted(30, 18) Source(44, 14) + SourceIndex(0) +1 >Emitted(34, 1) Source(44, 1) + SourceIndex(0) +2 >Emitted(34, 12) Source(44, 8) + SourceIndex(0) +3 >Emitted(34, 18) Source(44, 14) + SourceIndex(0) --- >>> var Thing; 1 >^^^^ @@ -566,10 +570,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(31, 5) Source(44, 15) + SourceIndex(0) -2 >Emitted(31, 9) Source(44, 15) + SourceIndex(0) -3 >Emitted(31, 14) Source(44, 20) + SourceIndex(0) -4 >Emitted(31, 15) Source(64, 2) + SourceIndex(0) +1 >Emitted(35, 5) Source(44, 15) + SourceIndex(0) +2 >Emitted(35, 9) Source(44, 15) + SourceIndex(0) +3 >Emitted(35, 14) Source(44, 20) + SourceIndex(0) +4 >Emitted(35, 15) Source(64, 2) + SourceIndex(0) --- >>> (function (Thing) { 1->^^^^ @@ -579,9 +583,9 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 > 3 > Thing -1->Emitted(32, 5) Source(44, 15) + SourceIndex(0) -2 >Emitted(32, 16) Source(44, 15) + SourceIndex(0) -3 >Emitted(32, 21) Source(44, 20) + SourceIndex(0) +1->Emitted(36, 5) Source(44, 15) + SourceIndex(0) +2 >Emitted(36, 16) Source(44, 15) + SourceIndex(0) +3 >Emitted(36, 21) Source(44, 20) + SourceIndex(0) --- >>> var Widgets; 1->^^^^^^^^ @@ -613,10 +617,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1->Emitted(33, 9) Source(44, 21) + SourceIndex(0) -2 >Emitted(33, 13) Source(44, 21) + SourceIndex(0) -3 >Emitted(33, 20) Source(44, 28) + SourceIndex(0) -4 >Emitted(33, 21) Source(64, 2) + SourceIndex(0) +1->Emitted(37, 9) Source(44, 21) + SourceIndex(0) +2 >Emitted(37, 13) Source(44, 21) + SourceIndex(0) +3 >Emitted(37, 20) Source(44, 28) + SourceIndex(0) +4 >Emitted(37, 21) Source(64, 2) + SourceIndex(0) --- >>> (function (Widgets) { 1->^^^^^^^^ @@ -626,16 +630,16 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 > 3 > Widgets -1->Emitted(34, 9) Source(44, 21) + SourceIndex(0) -2 >Emitted(34, 20) Source(44, 21) + SourceIndex(0) -3 >Emitted(34, 27) Source(44, 28) + SourceIndex(0) +1->Emitted(38, 9) Source(44, 21) + SourceIndex(0) +2 >Emitted(38, 20) Source(44, 21) + SourceIndex(0) +3 >Emitted(38, 27) Source(44, 28) + SourceIndex(0) --- >>> var FindWidget = (function () { 1->^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> { > -1->Emitted(35, 13) Source(45, 2) + SourceIndex(0) +1->Emitted(39, 13) Source(45, 2) + SourceIndex(0) --- >>> function FindWidget(codeThing) { 1->^^^^^^^^^^^^^^^^ @@ -650,9 +654,9 @@ sourceFile:recursiveClassReferenceTest.ts > 2 > constructor(private 3 > codeThing: Sample.Thing.ICodeThing -1->Emitted(36, 17) Source(50, 3) + SourceIndex(0) -2 >Emitted(36, 37) Source(50, 23) + SourceIndex(0) -3 >Emitted(36, 46) Source(50, 57) + SourceIndex(0) +1->Emitted(40, 17) Source(50, 3) + SourceIndex(0) +2 >Emitted(40, 37) Source(50, 23) + SourceIndex(0) +3 >Emitted(40, 46) Source(50, 57) + SourceIndex(0) --- >>> this.codeThing = codeThing; 1->^^^^^^^^^^^^^^^^^^^^ @@ -665,11 +669,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > 4 > codeThing 5 > : Sample.Thing.ICodeThing -1->Emitted(37, 21) Source(50, 23) + SourceIndex(0) -2 >Emitted(37, 35) Source(50, 32) + SourceIndex(0) -3 >Emitted(37, 38) Source(50, 23) + SourceIndex(0) -4 >Emitted(37, 47) Source(50, 32) + SourceIndex(0) -5 >Emitted(37, 48) Source(50, 57) + SourceIndex(0) +1->Emitted(41, 21) Source(50, 23) + SourceIndex(0) +2 >Emitted(41, 35) Source(50, 32) + SourceIndex(0) +3 >Emitted(41, 38) Source(50, 23) + SourceIndex(0) +4 >Emitted(41, 47) Source(50, 32) + SourceIndex(0) +5 >Emitted(41, 48) Source(50, 57) + SourceIndex(0) --- >>> this.domNode = null; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -682,11 +686,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > :any = 4 > null 5 > ; -1 >Emitted(38, 21) Source(49, 11) + SourceIndex(0) -2 >Emitted(38, 33) Source(49, 18) + SourceIndex(0) -3 >Emitted(38, 36) Source(49, 25) + SourceIndex(0) -4 >Emitted(38, 40) Source(49, 29) + SourceIndex(0) -5 >Emitted(38, 41) Source(49, 30) + SourceIndex(0) +1 >Emitted(42, 21) Source(49, 11) + SourceIndex(0) +2 >Emitted(42, 33) Source(49, 18) + SourceIndex(0) +3 >Emitted(42, 36) Source(49, 25) + SourceIndex(0) +4 >Emitted(42, 40) Source(49, 29) + SourceIndex(0) +5 >Emitted(42, 41) Source(49, 30) + SourceIndex(0) --- >>> // scenario 1 1 >^^^^^^^^^^^^^^^^^^^^ @@ -696,8 +700,8 @@ sourceFile:recursiveClassReferenceTest.ts > constructor(private codeThing: Sample.Thing.ICodeThing) { > 2 > // scenario 1 -1 >Emitted(39, 21) Source(51, 7) + SourceIndex(0) -2 >Emitted(39, 34) Source(51, 20) + SourceIndex(0) +1 >Emitted(43, 21) Source(51, 7) + SourceIndex(0) +2 >Emitted(43, 34) Source(51, 20) + SourceIndex(0) --- >>> codeThing.addWidget("addWidget", this); 1->^^^^^^^^^^^^^^^^^^^^ @@ -721,16 +725,16 @@ sourceFile:recursiveClassReferenceTest.ts 8 > this 9 > ) 10> ; -1->Emitted(40, 21) Source(52, 7) + SourceIndex(0) -2 >Emitted(40, 30) Source(52, 16) + SourceIndex(0) -3 >Emitted(40, 31) Source(52, 17) + SourceIndex(0) -4 >Emitted(40, 40) Source(52, 26) + SourceIndex(0) -5 >Emitted(40, 41) Source(52, 27) + SourceIndex(0) -6 >Emitted(40, 52) Source(52, 38) + SourceIndex(0) -7 >Emitted(40, 54) Source(52, 40) + SourceIndex(0) -8 >Emitted(40, 58) Source(52, 44) + SourceIndex(0) -9 >Emitted(40, 59) Source(52, 45) + SourceIndex(0) -10>Emitted(40, 60) Source(52, 46) + SourceIndex(0) +1->Emitted(44, 21) Source(52, 7) + SourceIndex(0) +2 >Emitted(44, 30) Source(52, 16) + SourceIndex(0) +3 >Emitted(44, 31) Source(52, 17) + SourceIndex(0) +4 >Emitted(44, 40) Source(52, 26) + SourceIndex(0) +5 >Emitted(44, 41) Source(52, 27) + SourceIndex(0) +6 >Emitted(44, 52) Source(52, 38) + SourceIndex(0) +7 >Emitted(44, 54) Source(52, 40) + SourceIndex(0) +8 >Emitted(44, 58) Source(52, 44) + SourceIndex(0) +9 >Emitted(44, 59) Source(52, 45) + SourceIndex(0) +10>Emitted(44, 60) Source(52, 46) + SourceIndex(0) --- >>> } 1 >^^^^^^^^^^^^^^^^ @@ -739,8 +743,8 @@ sourceFile:recursiveClassReferenceTest.ts 1 > > 2 > } -1 >Emitted(41, 17) Source(53, 3) + SourceIndex(0) -2 >Emitted(41, 18) Source(53, 4) + SourceIndex(0) +1 >Emitted(45, 17) Source(53, 3) + SourceIndex(0) +2 >Emitted(45, 18) Source(53, 4) + SourceIndex(0) --- >>> FindWidget.prototype.gar = function (runner) { if (true) { 1->^^^^^^^^^^^^^^^^ @@ -769,19 +773,19 @@ sourceFile:recursiveClassReferenceTest.ts 11> ) 12> 13> { -1->Emitted(42, 17) Source(47, 10) + SourceIndex(0) -2 >Emitted(42, 41) Source(47, 13) + SourceIndex(0) -3 >Emitted(42, 44) Source(47, 3) + SourceIndex(0) -4 >Emitted(42, 54) Source(47, 14) + SourceIndex(0) -5 >Emitted(42, 60) Source(47, 55) + SourceIndex(0) -6 >Emitted(42, 64) Source(47, 59) + SourceIndex(0) -7 >Emitted(42, 66) Source(47, 61) + SourceIndex(0) -8 >Emitted(42, 67) Source(47, 62) + SourceIndex(0) -9 >Emitted(42, 68) Source(47, 63) + SourceIndex(0) -10>Emitted(42, 72) Source(47, 67) + SourceIndex(0) -11>Emitted(42, 73) Source(47, 68) + SourceIndex(0) -12>Emitted(42, 74) Source(47, 69) + SourceIndex(0) -13>Emitted(42, 75) Source(47, 70) + SourceIndex(0) +1->Emitted(46, 17) Source(47, 10) + SourceIndex(0) +2 >Emitted(46, 41) Source(47, 13) + SourceIndex(0) +3 >Emitted(46, 44) Source(47, 3) + SourceIndex(0) +4 >Emitted(46, 54) Source(47, 14) + SourceIndex(0) +5 >Emitted(46, 60) Source(47, 55) + SourceIndex(0) +6 >Emitted(46, 64) Source(47, 59) + SourceIndex(0) +7 >Emitted(46, 66) Source(47, 61) + SourceIndex(0) +8 >Emitted(46, 67) Source(47, 62) + SourceIndex(0) +9 >Emitted(46, 68) Source(47, 63) + SourceIndex(0) +10>Emitted(46, 72) Source(47, 67) + SourceIndex(0) +11>Emitted(46, 73) Source(47, 68) + SourceIndex(0) +12>Emitted(46, 74) Source(47, 69) + SourceIndex(0) +13>Emitted(46, 75) Source(47, 70) + SourceIndex(0) --- >>> return runner(this); 1 >^^^^^^^^^^^^^^^^^^^^ @@ -800,14 +804,14 @@ sourceFile:recursiveClassReferenceTest.ts 6 > this 7 > ) 8 > ; -1 >Emitted(43, 21) Source(47, 70) + SourceIndex(0) -2 >Emitted(43, 27) Source(47, 76) + SourceIndex(0) -3 >Emitted(43, 28) Source(47, 77) + SourceIndex(0) -4 >Emitted(43, 34) Source(47, 83) + SourceIndex(0) -5 >Emitted(43, 35) Source(47, 84) + SourceIndex(0) -6 >Emitted(43, 39) Source(47, 88) + SourceIndex(0) -7 >Emitted(43, 40) Source(47, 89) + SourceIndex(0) -8 >Emitted(43, 41) Source(47, 90) + SourceIndex(0) +1 >Emitted(47, 21) Source(47, 70) + SourceIndex(0) +2 >Emitted(47, 27) Source(47, 76) + SourceIndex(0) +3 >Emitted(47, 28) Source(47, 77) + SourceIndex(0) +4 >Emitted(47, 34) Source(47, 83) + SourceIndex(0) +5 >Emitted(47, 35) Source(47, 84) + SourceIndex(0) +6 >Emitted(47, 39) Source(47, 88) + SourceIndex(0) +7 >Emitted(47, 40) Source(47, 89) + SourceIndex(0) +8 >Emitted(47, 41) Source(47, 90) + SourceIndex(0) --- >>> } }; 1 >^^^^^^^^^^^^^^^^ @@ -819,10 +823,10 @@ sourceFile:recursiveClassReferenceTest.ts 2 > } 3 > 4 > } -1 >Emitted(44, 17) Source(47, 90) + SourceIndex(0) -2 >Emitted(44, 18) Source(47, 91) + SourceIndex(0) -3 >Emitted(44, 19) Source(47, 91) + SourceIndex(0) -4 >Emitted(44, 20) Source(47, 92) + SourceIndex(0) +1 >Emitted(48, 17) Source(47, 90) + SourceIndex(0) +2 >Emitted(48, 18) Source(47, 91) + SourceIndex(0) +3 >Emitted(48, 19) Source(47, 91) + SourceIndex(0) +4 >Emitted(48, 20) Source(47, 92) + SourceIndex(0) --- >>> FindWidget.prototype.getDomNode = function () { 1->^^^^^^^^^^^^^^^^ @@ -839,9 +843,9 @@ sourceFile:recursiveClassReferenceTest.ts > public 2 > getDomNode 3 > -1->Emitted(45, 17) Source(55, 10) + SourceIndex(0) -2 >Emitted(45, 48) Source(55, 20) + SourceIndex(0) -3 >Emitted(45, 51) Source(55, 3) + SourceIndex(0) +1->Emitted(49, 17) Source(55, 10) + SourceIndex(0) +2 >Emitted(49, 48) Source(55, 20) + SourceIndex(0) +3 >Emitted(49, 51) Source(55, 3) + SourceIndex(0) --- >>> return domNode; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -855,11 +859,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > 4 > domNode 5 > ; -1 >Emitted(46, 21) Source(56, 4) + SourceIndex(0) -2 >Emitted(46, 27) Source(56, 10) + SourceIndex(0) -3 >Emitted(46, 28) Source(56, 11) + SourceIndex(0) -4 >Emitted(46, 35) Source(56, 18) + SourceIndex(0) -5 >Emitted(46, 36) Source(56, 19) + SourceIndex(0) +1 >Emitted(50, 21) Source(56, 4) + SourceIndex(0) +2 >Emitted(50, 27) Source(56, 10) + SourceIndex(0) +3 >Emitted(50, 28) Source(56, 11) + SourceIndex(0) +4 >Emitted(50, 35) Source(56, 18) + SourceIndex(0) +5 >Emitted(50, 36) Source(56, 19) + SourceIndex(0) --- >>> }; 1 >^^^^^^^^^^^^^^^^ @@ -868,8 +872,8 @@ sourceFile:recursiveClassReferenceTest.ts 1 > > 2 > } -1 >Emitted(47, 17) Source(57, 3) + SourceIndex(0) -2 >Emitted(47, 18) Source(57, 4) + SourceIndex(0) +1 >Emitted(51, 17) Source(57, 3) + SourceIndex(0) +2 >Emitted(51, 18) Source(57, 4) + SourceIndex(0) --- >>> FindWidget.prototype.destroy = function () { 1->^^^^^^^^^^^^^^^^ @@ -880,9 +884,9 @@ sourceFile:recursiveClassReferenceTest.ts > public 2 > destroy 3 > -1->Emitted(48, 17) Source(59, 10) + SourceIndex(0) -2 >Emitted(48, 45) Source(59, 17) + SourceIndex(0) -3 >Emitted(48, 48) Source(59, 3) + SourceIndex(0) +1->Emitted(52, 17) Source(59, 10) + SourceIndex(0) +2 >Emitted(52, 45) Source(59, 17) + SourceIndex(0) +3 >Emitted(52, 48) Source(59, 3) + SourceIndex(0) --- >>> }; 1 >^^^^^^^^^^^^^^^^ @@ -892,8 +896,8 @@ sourceFile:recursiveClassReferenceTest.ts > > 2 > } -1 >Emitted(49, 17) Source(61, 3) + SourceIndex(0) -2 >Emitted(49, 18) Source(61, 4) + SourceIndex(0) +1 >Emitted(53, 17) Source(61, 3) + SourceIndex(0) +2 >Emitted(53, 18) Source(61, 4) + SourceIndex(0) --- >>> return FindWidget; 1->^^^^^^^^^^^^^^^^ @@ -902,8 +906,8 @@ sourceFile:recursiveClassReferenceTest.ts > > 2 > } -1->Emitted(50, 17) Source(63, 2) + SourceIndex(0) -2 >Emitted(50, 34) Source(63, 3) + SourceIndex(0) +1->Emitted(54, 17) Source(63, 2) + SourceIndex(0) +2 >Emitted(54, 34) Source(63, 3) + SourceIndex(0) --- >>> }()); 1 >^^^^^^^^^^^^ @@ -933,10 +937,10 @@ sourceFile:recursiveClassReferenceTest.ts > } > > } -1 >Emitted(51, 13) Source(63, 2) + SourceIndex(0) -2 >Emitted(51, 14) Source(63, 3) + SourceIndex(0) -3 >Emitted(51, 14) Source(45, 2) + SourceIndex(0) -4 >Emitted(51, 18) Source(63, 3) + SourceIndex(0) +1 >Emitted(55, 13) Source(63, 2) + SourceIndex(0) +2 >Emitted(55, 14) Source(63, 3) + SourceIndex(0) +3 >Emitted(55, 14) Source(45, 2) + SourceIndex(0) +4 >Emitted(55, 18) Source(63, 3) + SourceIndex(0) --- >>> Widgets.FindWidget = FindWidget; 1->^^^^^^^^^^^^ @@ -966,10 +970,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } 4 > -1->Emitted(52, 13) Source(45, 15) + SourceIndex(0) -2 >Emitted(52, 31) Source(45, 25) + SourceIndex(0) -3 >Emitted(52, 44) Source(63, 3) + SourceIndex(0) -4 >Emitted(52, 45) Source(63, 3) + SourceIndex(0) +1->Emitted(56, 13) Source(45, 15) + SourceIndex(0) +2 >Emitted(56, 31) Source(45, 25) + SourceIndex(0) +3 >Emitted(56, 44) Source(63, 3) + SourceIndex(0) +4 >Emitted(56, 45) Source(63, 3) + SourceIndex(0) --- >>> })(Widgets = Thing.Widgets || (Thing.Widgets = {})); 1->^^^^^^^^ @@ -1011,15 +1015,15 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1->Emitted(53, 9) Source(64, 1) + SourceIndex(0) -2 >Emitted(53, 10) Source(64, 2) + SourceIndex(0) -3 >Emitted(53, 12) Source(44, 21) + SourceIndex(0) -4 >Emitted(53, 19) Source(44, 28) + SourceIndex(0) -5 >Emitted(53, 22) Source(44, 21) + SourceIndex(0) -6 >Emitted(53, 35) Source(44, 28) + SourceIndex(0) -7 >Emitted(53, 40) Source(44, 21) + SourceIndex(0) -8 >Emitted(53, 53) Source(44, 28) + SourceIndex(0) -9 >Emitted(53, 61) Source(64, 2) + SourceIndex(0) +1->Emitted(57, 9) Source(64, 1) + SourceIndex(0) +2 >Emitted(57, 10) Source(64, 2) + SourceIndex(0) +3 >Emitted(57, 12) Source(44, 21) + SourceIndex(0) +4 >Emitted(57, 19) Source(44, 28) + SourceIndex(0) +5 >Emitted(57, 22) Source(44, 21) + SourceIndex(0) +6 >Emitted(57, 35) Source(44, 28) + SourceIndex(0) +7 >Emitted(57, 40) Source(44, 21) + SourceIndex(0) +8 >Emitted(57, 53) Source(44, 28) + SourceIndex(0) +9 >Emitted(57, 61) Source(64, 2) + SourceIndex(0) --- >>> })(Thing = Sample.Thing || (Sample.Thing = {})); 1 >^^^^ @@ -1060,15 +1064,15 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(54, 5) Source(64, 1) + SourceIndex(0) -2 >Emitted(54, 6) Source(64, 2) + SourceIndex(0) -3 >Emitted(54, 8) Source(44, 15) + SourceIndex(0) -4 >Emitted(54, 13) Source(44, 20) + SourceIndex(0) -5 >Emitted(54, 16) Source(44, 15) + SourceIndex(0) -6 >Emitted(54, 28) Source(44, 20) + SourceIndex(0) -7 >Emitted(54, 33) Source(44, 15) + SourceIndex(0) -8 >Emitted(54, 45) Source(44, 20) + SourceIndex(0) -9 >Emitted(54, 53) Source(64, 2) + SourceIndex(0) +1 >Emitted(58, 5) Source(64, 1) + SourceIndex(0) +2 >Emitted(58, 6) Source(64, 2) + SourceIndex(0) +3 >Emitted(58, 8) Source(44, 15) + SourceIndex(0) +4 >Emitted(58, 13) Source(44, 20) + SourceIndex(0) +5 >Emitted(58, 16) Source(44, 15) + SourceIndex(0) +6 >Emitted(58, 28) Source(44, 20) + SourceIndex(0) +7 >Emitted(58, 33) Source(44, 15) + SourceIndex(0) +8 >Emitted(58, 45) Source(44, 20) + SourceIndex(0) +9 >Emitted(58, 53) Source(64, 2) + SourceIndex(0) --- >>>})(Sample || (Sample = {})); 1 > @@ -1106,13 +1110,13 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(55, 1) Source(64, 1) + SourceIndex(0) -2 >Emitted(55, 2) Source(64, 2) + SourceIndex(0) -3 >Emitted(55, 4) Source(44, 8) + SourceIndex(0) -4 >Emitted(55, 10) Source(44, 14) + SourceIndex(0) -5 >Emitted(55, 15) Source(44, 8) + SourceIndex(0) -6 >Emitted(55, 21) Source(44, 14) + SourceIndex(0) -7 >Emitted(55, 29) Source(64, 2) + SourceIndex(0) +1 >Emitted(59, 1) Source(64, 1) + SourceIndex(0) +2 >Emitted(59, 2) Source(64, 2) + SourceIndex(0) +3 >Emitted(59, 4) Source(44, 8) + SourceIndex(0) +4 >Emitted(59, 10) Source(44, 14) + SourceIndex(0) +5 >Emitted(59, 15) Source(44, 8) + SourceIndex(0) +6 >Emitted(59, 21) Source(44, 14) + SourceIndex(0) +7 >Emitted(59, 29) Source(64, 2) + SourceIndex(0) --- >>>var AbstractMode = (function () { 1-> @@ -1121,13 +1125,13 @@ sourceFile:recursiveClassReferenceTest.ts > >interface IMode { getInitialState(): IState;} > -1->Emitted(56, 1) Source(67, 1) + SourceIndex(0) +1->Emitted(60, 1) Source(67, 1) + SourceIndex(0) --- >>> function AbstractMode() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(57, 5) Source(67, 1) + SourceIndex(0) +1->Emitted(61, 5) Source(67, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -1135,8 +1139,8 @@ sourceFile:recursiveClassReferenceTest.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1->class AbstractMode implements IMode { public getInitialState(): IState { return null;} 2 > } -1->Emitted(58, 5) Source(67, 88) + SourceIndex(0) -2 >Emitted(58, 6) Source(67, 89) + SourceIndex(0) +1->Emitted(62, 5) Source(67, 88) + SourceIndex(0) +2 >Emitted(62, 6) Source(67, 89) + SourceIndex(0) --- >>> AbstractMode.prototype.getInitialState = function () { return null; }; 1->^^^^ @@ -1159,24 +1163,24 @@ sourceFile:recursiveClassReferenceTest.ts 8 > ; 9 > 10> } -1->Emitted(59, 5) Source(67, 46) + SourceIndex(0) -2 >Emitted(59, 43) Source(67, 61) + SourceIndex(0) -3 >Emitted(59, 46) Source(67, 39) + SourceIndex(0) -4 >Emitted(59, 60) Source(67, 74) + SourceIndex(0) -5 >Emitted(59, 66) Source(67, 80) + SourceIndex(0) -6 >Emitted(59, 67) Source(67, 81) + SourceIndex(0) -7 >Emitted(59, 71) Source(67, 85) + SourceIndex(0) -8 >Emitted(59, 72) Source(67, 86) + SourceIndex(0) -9 >Emitted(59, 73) Source(67, 86) + SourceIndex(0) -10>Emitted(59, 74) Source(67, 87) + SourceIndex(0) +1->Emitted(63, 5) Source(67, 46) + SourceIndex(0) +2 >Emitted(63, 43) Source(67, 61) + SourceIndex(0) +3 >Emitted(63, 46) Source(67, 39) + SourceIndex(0) +4 >Emitted(63, 60) Source(67, 74) + SourceIndex(0) +5 >Emitted(63, 66) Source(67, 80) + SourceIndex(0) +6 >Emitted(63, 67) Source(67, 81) + SourceIndex(0) +7 >Emitted(63, 71) Source(67, 85) + SourceIndex(0) +8 >Emitted(63, 72) Source(67, 86) + SourceIndex(0) +9 >Emitted(63, 73) Source(67, 86) + SourceIndex(0) +10>Emitted(63, 74) Source(67, 87) + SourceIndex(0) --- >>> return AbstractMode; 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^ 1 > 2 > } -1 >Emitted(60, 5) Source(67, 88) + SourceIndex(0) -2 >Emitted(60, 24) Source(67, 89) + SourceIndex(0) +1 >Emitted(64, 5) Source(67, 88) + SourceIndex(0) +2 >Emitted(64, 24) Source(67, 89) + SourceIndex(0) --- >>>}()); 1 > @@ -1188,10 +1192,10 @@ sourceFile:recursiveClassReferenceTest.ts 2 >} 3 > 4 > class AbstractMode implements IMode { public getInitialState(): IState { return null;} } -1 >Emitted(61, 1) Source(67, 88) + SourceIndex(0) -2 >Emitted(61, 2) Source(67, 89) + SourceIndex(0) -3 >Emitted(61, 2) Source(67, 1) + SourceIndex(0) -4 >Emitted(61, 6) Source(67, 89) + SourceIndex(0) +1 >Emitted(65, 1) Source(67, 88) + SourceIndex(0) +2 >Emitted(65, 2) Source(67, 89) + SourceIndex(0) +3 >Emitted(65, 2) Source(67, 1) + SourceIndex(0) +4 >Emitted(65, 6) Source(67, 89) + SourceIndex(0) --- >>>(function (Sample) { 1-> @@ -1209,9 +1213,9 @@ sourceFile:recursiveClassReferenceTest.ts > 2 >module 3 > Sample -1->Emitted(62, 1) Source(76, 1) + SourceIndex(0) -2 >Emitted(62, 12) Source(76, 8) + SourceIndex(0) -3 >Emitted(62, 18) Source(76, 14) + SourceIndex(0) +1->Emitted(66, 1) Source(76, 1) + SourceIndex(0) +2 >Emitted(66, 12) Source(76, 8) + SourceIndex(0) +3 >Emitted(66, 18) Source(76, 14) + SourceIndex(0) --- >>> var Thing; 1 >^^^^ @@ -1247,10 +1251,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(63, 5) Source(76, 15) + SourceIndex(0) -2 >Emitted(63, 9) Source(76, 15) + SourceIndex(0) -3 >Emitted(63, 14) Source(76, 20) + SourceIndex(0) -4 >Emitted(63, 15) Source(100, 2) + SourceIndex(0) +1 >Emitted(67, 5) Source(76, 15) + SourceIndex(0) +2 >Emitted(67, 9) Source(76, 15) + SourceIndex(0) +3 >Emitted(67, 14) Source(76, 20) + SourceIndex(0) +4 >Emitted(67, 15) Source(100, 2) + SourceIndex(0) --- >>> (function (Thing) { 1->^^^^ @@ -1260,9 +1264,9 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 > 3 > Thing -1->Emitted(64, 5) Source(76, 15) + SourceIndex(0) -2 >Emitted(64, 16) Source(76, 15) + SourceIndex(0) -3 >Emitted(64, 21) Source(76, 20) + SourceIndex(0) +1->Emitted(68, 5) Source(76, 15) + SourceIndex(0) +2 >Emitted(68, 16) Source(76, 15) + SourceIndex(0) +3 >Emitted(68, 21) Source(76, 20) + SourceIndex(0) --- >>> var Languages; 1->^^^^^^^^ @@ -1298,10 +1302,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1->Emitted(65, 9) Source(76, 21) + SourceIndex(0) -2 >Emitted(65, 13) Source(76, 21) + SourceIndex(0) -3 >Emitted(65, 22) Source(76, 30) + SourceIndex(0) -4 >Emitted(65, 23) Source(100, 2) + SourceIndex(0) +1->Emitted(69, 9) Source(76, 21) + SourceIndex(0) +2 >Emitted(69, 13) Source(76, 21) + SourceIndex(0) +3 >Emitted(69, 22) Source(76, 30) + SourceIndex(0) +4 >Emitted(69, 23) Source(100, 2) + SourceIndex(0) --- >>> (function (Languages) { 1->^^^^^^^^ @@ -1310,9 +1314,9 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 > 3 > Languages -1->Emitted(66, 9) Source(76, 21) + SourceIndex(0) -2 >Emitted(66, 20) Source(76, 21) + SourceIndex(0) -3 >Emitted(66, 29) Source(76, 30) + SourceIndex(0) +1->Emitted(70, 9) Source(76, 21) + SourceIndex(0) +2 >Emitted(70, 20) Source(76, 21) + SourceIndex(0) +3 >Emitted(70, 29) Source(76, 30) + SourceIndex(0) --- >>> var PlainText; 1 >^^^^^^^^^^^^ @@ -1348,10 +1352,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(67, 13) Source(76, 31) + SourceIndex(0) -2 >Emitted(67, 17) Source(76, 31) + SourceIndex(0) -3 >Emitted(67, 26) Source(76, 40) + SourceIndex(0) -4 >Emitted(67, 27) Source(100, 2) + SourceIndex(0) +1 >Emitted(71, 13) Source(76, 31) + SourceIndex(0) +2 >Emitted(71, 17) Source(76, 31) + SourceIndex(0) +3 >Emitted(71, 26) Source(76, 40) + SourceIndex(0) +4 >Emitted(71, 27) Source(100, 2) + SourceIndex(0) --- >>> (function (PlainText) { 1->^^^^^^^^^^^^ @@ -1361,9 +1365,9 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 > 3 > PlainText -1->Emitted(68, 13) Source(76, 31) + SourceIndex(0) -2 >Emitted(68, 24) Source(76, 31) + SourceIndex(0) -3 >Emitted(68, 33) Source(76, 40) + SourceIndex(0) +1->Emitted(72, 13) Source(76, 31) + SourceIndex(0) +2 >Emitted(72, 24) Source(76, 31) + SourceIndex(0) +3 >Emitted(72, 33) Source(76, 40) + SourceIndex(0) --- >>> var State = (function () { 1->^^^^^^^^^^^^^^^^ @@ -1371,7 +1375,7 @@ sourceFile:recursiveClassReferenceTest.ts 1-> { > > -1->Emitted(69, 17) Source(78, 2) + SourceIndex(0) +1->Emitted(73, 17) Source(78, 2) + SourceIndex(0) --- >>> function State(mode) { 1->^^^^^^^^^^^^^^^^^^^^ @@ -1382,9 +1386,9 @@ sourceFile:recursiveClassReferenceTest.ts > 2 > constructor(private 3 > mode: IMode -1->Emitted(70, 21) Source(79, 9) + SourceIndex(0) -2 >Emitted(70, 36) Source(79, 29) + SourceIndex(0) -3 >Emitted(70, 40) Source(79, 40) + SourceIndex(0) +1->Emitted(74, 21) Source(79, 9) + SourceIndex(0) +2 >Emitted(74, 36) Source(79, 29) + SourceIndex(0) +3 >Emitted(74, 40) Source(79, 40) + SourceIndex(0) --- >>> this.mode = mode; 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1397,11 +1401,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > 4 > mode 5 > : IMode -1->Emitted(71, 25) Source(79, 29) + SourceIndex(0) -2 >Emitted(71, 34) Source(79, 33) + SourceIndex(0) -3 >Emitted(71, 37) Source(79, 29) + SourceIndex(0) -4 >Emitted(71, 41) Source(79, 33) + SourceIndex(0) -5 >Emitted(71, 42) Source(79, 40) + SourceIndex(0) +1->Emitted(75, 25) Source(79, 29) + SourceIndex(0) +2 >Emitted(75, 34) Source(79, 33) + SourceIndex(0) +3 >Emitted(75, 37) Source(79, 29) + SourceIndex(0) +4 >Emitted(75, 41) Source(79, 33) + SourceIndex(0) +5 >Emitted(75, 42) Source(79, 40) + SourceIndex(0) --- >>> } 1 >^^^^^^^^^^^^^^^^^^^^ @@ -1409,8 +1413,8 @@ sourceFile:recursiveClassReferenceTest.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >) { 2 > } -1 >Emitted(72, 21) Source(79, 44) + SourceIndex(0) -2 >Emitted(72, 22) Source(79, 45) + SourceIndex(0) +1 >Emitted(76, 21) Source(79, 44) + SourceIndex(0) +2 >Emitted(76, 22) Source(79, 45) + SourceIndex(0) --- >>> State.prototype.clone = function () { 1->^^^^^^^^^^^^^^^^^^^^ @@ -1420,9 +1424,9 @@ sourceFile:recursiveClassReferenceTest.ts > public 2 > clone 3 > -1->Emitted(73, 21) Source(80, 10) + SourceIndex(0) -2 >Emitted(73, 42) Source(80, 15) + SourceIndex(0) -3 >Emitted(73, 45) Source(80, 3) + SourceIndex(0) +1->Emitted(77, 21) Source(80, 10) + SourceIndex(0) +2 >Emitted(77, 42) Source(80, 15) + SourceIndex(0) +3 >Emitted(77, 45) Source(80, 3) + SourceIndex(0) --- >>> return this; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1436,11 +1440,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > 4 > this 5 > ; -1 >Emitted(74, 25) Source(81, 4) + SourceIndex(0) -2 >Emitted(74, 31) Source(81, 10) + SourceIndex(0) -3 >Emitted(74, 32) Source(81, 11) + SourceIndex(0) -4 >Emitted(74, 36) Source(81, 15) + SourceIndex(0) -5 >Emitted(74, 37) Source(81, 16) + SourceIndex(0) +1 >Emitted(78, 25) Source(81, 4) + SourceIndex(0) +2 >Emitted(78, 31) Source(81, 10) + SourceIndex(0) +3 >Emitted(78, 32) Source(81, 11) + SourceIndex(0) +4 >Emitted(78, 36) Source(81, 15) + SourceIndex(0) +5 >Emitted(78, 37) Source(81, 16) + SourceIndex(0) --- >>> }; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -1449,8 +1453,8 @@ sourceFile:recursiveClassReferenceTest.ts 1 > > 2 > } -1 >Emitted(75, 21) Source(82, 3) + SourceIndex(0) -2 >Emitted(75, 22) Source(82, 4) + SourceIndex(0) +1 >Emitted(79, 21) Source(82, 3) + SourceIndex(0) +2 >Emitted(79, 22) Source(82, 4) + SourceIndex(0) --- >>> State.prototype.equals = function (other) { 1->^^^^^^^^^^^^^^^^^^^^ @@ -1465,11 +1469,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > 4 > public equals( 5 > other:IState -1->Emitted(76, 21) Source(84, 10) + SourceIndex(0) -2 >Emitted(76, 43) Source(84, 16) + SourceIndex(0) -3 >Emitted(76, 46) Source(84, 3) + SourceIndex(0) -4 >Emitted(76, 56) Source(84, 17) + SourceIndex(0) -5 >Emitted(76, 61) Source(84, 29) + SourceIndex(0) +1->Emitted(80, 21) Source(84, 10) + SourceIndex(0) +2 >Emitted(80, 43) Source(84, 16) + SourceIndex(0) +3 >Emitted(80, 46) Source(84, 3) + SourceIndex(0) +4 >Emitted(80, 56) Source(84, 17) + SourceIndex(0) +5 >Emitted(80, 61) Source(84, 29) + SourceIndex(0) --- >>> return this === other; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1487,13 +1491,13 @@ sourceFile:recursiveClassReferenceTest.ts 5 > === 6 > other 7 > ; -1 >Emitted(77, 25) Source(85, 4) + SourceIndex(0) -2 >Emitted(77, 31) Source(85, 10) + SourceIndex(0) -3 >Emitted(77, 32) Source(85, 11) + SourceIndex(0) -4 >Emitted(77, 36) Source(85, 15) + SourceIndex(0) -5 >Emitted(77, 41) Source(85, 20) + SourceIndex(0) -6 >Emitted(77, 46) Source(85, 25) + SourceIndex(0) -7 >Emitted(77, 47) Source(85, 26) + SourceIndex(0) +1 >Emitted(81, 25) Source(85, 4) + SourceIndex(0) +2 >Emitted(81, 31) Source(85, 10) + SourceIndex(0) +3 >Emitted(81, 32) Source(85, 11) + SourceIndex(0) +4 >Emitted(81, 36) Source(85, 15) + SourceIndex(0) +5 >Emitted(81, 41) Source(85, 20) + SourceIndex(0) +6 >Emitted(81, 46) Source(85, 25) + SourceIndex(0) +7 >Emitted(81, 47) Source(85, 26) + SourceIndex(0) --- >>> }; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -1502,8 +1506,8 @@ sourceFile:recursiveClassReferenceTest.ts 1 > > 2 > } -1 >Emitted(78, 21) Source(86, 3) + SourceIndex(0) -2 >Emitted(78, 22) Source(86, 4) + SourceIndex(0) +1 >Emitted(82, 21) Source(86, 3) + SourceIndex(0) +2 >Emitted(82, 22) Source(86, 4) + SourceIndex(0) --- >>> State.prototype.getMode = function () { return mode; }; 1->^^^^^^^^^^^^^^^^^^^^ @@ -1528,16 +1532,16 @@ sourceFile:recursiveClassReferenceTest.ts 8 > ; 9 > 10> } -1->Emitted(79, 21) Source(88, 10) + SourceIndex(0) -2 >Emitted(79, 44) Source(88, 17) + SourceIndex(0) -3 >Emitted(79, 47) Source(88, 3) + SourceIndex(0) -4 >Emitted(79, 61) Source(88, 29) + SourceIndex(0) -5 >Emitted(79, 67) Source(88, 35) + SourceIndex(0) -6 >Emitted(79, 68) Source(88, 36) + SourceIndex(0) -7 >Emitted(79, 72) Source(88, 40) + SourceIndex(0) -8 >Emitted(79, 73) Source(88, 41) + SourceIndex(0) -9 >Emitted(79, 74) Source(88, 42) + SourceIndex(0) -10>Emitted(79, 75) Source(88, 43) + SourceIndex(0) +1->Emitted(83, 21) Source(88, 10) + SourceIndex(0) +2 >Emitted(83, 44) Source(88, 17) + SourceIndex(0) +3 >Emitted(83, 47) Source(88, 3) + SourceIndex(0) +4 >Emitted(83, 61) Source(88, 29) + SourceIndex(0) +5 >Emitted(83, 67) Source(88, 35) + SourceIndex(0) +6 >Emitted(83, 68) Source(88, 36) + SourceIndex(0) +7 >Emitted(83, 72) Source(88, 40) + SourceIndex(0) +8 >Emitted(83, 73) Source(88, 41) + SourceIndex(0) +9 >Emitted(83, 74) Source(88, 42) + SourceIndex(0) +10>Emitted(83, 75) Source(88, 43) + SourceIndex(0) --- >>> return State; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -1545,8 +1549,8 @@ sourceFile:recursiveClassReferenceTest.ts 1 > > 2 > } -1 >Emitted(80, 21) Source(89, 2) + SourceIndex(0) -2 >Emitted(80, 33) Source(89, 3) + SourceIndex(0) +1 >Emitted(84, 21) Source(89, 2) + SourceIndex(0) +2 >Emitted(84, 33) Source(89, 3) + SourceIndex(0) --- >>> }()); 1 >^^^^^^^^^^^^^^^^ @@ -1569,10 +1573,10 @@ sourceFile:recursiveClassReferenceTest.ts > > public getMode(): IMode { return mode; } > } -1 >Emitted(81, 17) Source(89, 2) + SourceIndex(0) -2 >Emitted(81, 18) Source(89, 3) + SourceIndex(0) -3 >Emitted(81, 18) Source(78, 2) + SourceIndex(0) -4 >Emitted(81, 22) Source(89, 3) + SourceIndex(0) +1 >Emitted(85, 17) Source(89, 2) + SourceIndex(0) +2 >Emitted(85, 18) Source(89, 3) + SourceIndex(0) +3 >Emitted(85, 18) Source(78, 2) + SourceIndex(0) +4 >Emitted(85, 22) Source(89, 3) + SourceIndex(0) --- >>> PlainText.State = State; 1->^^^^^^^^^^^^^^^^ @@ -1595,10 +1599,10 @@ sourceFile:recursiveClassReferenceTest.ts > public getMode(): IMode { return mode; } > } 4 > -1->Emitted(82, 17) Source(78, 15) + SourceIndex(0) -2 >Emitted(82, 32) Source(78, 20) + SourceIndex(0) -3 >Emitted(82, 40) Source(89, 3) + SourceIndex(0) -4 >Emitted(82, 41) Source(89, 3) + SourceIndex(0) +1->Emitted(86, 17) Source(78, 15) + SourceIndex(0) +2 >Emitted(86, 32) Source(78, 20) + SourceIndex(0) +3 >Emitted(86, 40) Source(89, 3) + SourceIndex(0) +4 >Emitted(86, 41) Source(89, 3) + SourceIndex(0) --- >>> var Mode = (function (_super) { 1->^^^^^^^^^^^^^^^^ @@ -1606,21 +1610,21 @@ sourceFile:recursiveClassReferenceTest.ts 1-> > > -1->Emitted(83, 17) Source(91, 2) + SourceIndex(0) +1->Emitted(87, 17) Source(91, 2) + SourceIndex(0) --- >>> __extends(Mode, _super); 1->^^^^^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^ 1->export class Mode extends 2 > AbstractMode -1->Emitted(84, 21) Source(91, 28) + SourceIndex(0) -2 >Emitted(84, 45) Source(91, 40) + SourceIndex(0) +1->Emitted(88, 21) Source(91, 28) + SourceIndex(0) +2 >Emitted(88, 45) Source(91, 40) + SourceIndex(0) --- >>> function Mode() { 1 >^^^^^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > -1 >Emitted(85, 21) Source(91, 2) + SourceIndex(0) +1 >Emitted(89, 21) Source(91, 2) + SourceIndex(0) --- >>> return _super.apply(this, arguments) || this; >>> } @@ -1637,8 +1641,8 @@ sourceFile:recursiveClassReferenceTest.ts > > 2 > } -1->Emitted(87, 21) Source(99, 2) + SourceIndex(0) -2 >Emitted(87, 22) Source(99, 3) + SourceIndex(0) +1->Emitted(91, 21) Source(99, 2) + SourceIndex(0) +2 >Emitted(91, 22) Source(99, 3) + SourceIndex(0) --- >>> // scenario 2 1->^^^^^^^^^^^^^^^^^^^^ @@ -1646,8 +1650,8 @@ sourceFile:recursiveClassReferenceTest.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 > // scenario 2 -1->Emitted(88, 21) Source(93, 3) + SourceIndex(0) -2 >Emitted(88, 34) Source(93, 16) + SourceIndex(0) +1->Emitted(92, 21) Source(93, 3) + SourceIndex(0) +2 >Emitted(92, 34) Source(93, 16) + SourceIndex(0) --- >>> Mode.prototype.getInitialState = function () { 1->^^^^^^^^^^^^^^^^^^^^ @@ -1657,9 +1661,9 @@ sourceFile:recursiveClassReferenceTest.ts > public 2 > getInitialState 3 > -1->Emitted(89, 21) Source(94, 10) + SourceIndex(0) -2 >Emitted(89, 51) Source(94, 25) + SourceIndex(0) -3 >Emitted(89, 54) Source(94, 3) + SourceIndex(0) +1->Emitted(93, 21) Source(94, 10) + SourceIndex(0) +2 >Emitted(93, 51) Source(94, 25) + SourceIndex(0) +3 >Emitted(93, 54) Source(94, 3) + SourceIndex(0) --- >>> return new State(self); 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1681,15 +1685,15 @@ sourceFile:recursiveClassReferenceTest.ts 7 > self 8 > ) 9 > ; -1 >Emitted(90, 25) Source(95, 4) + SourceIndex(0) -2 >Emitted(90, 31) Source(95, 10) + SourceIndex(0) -3 >Emitted(90, 32) Source(95, 11) + SourceIndex(0) -4 >Emitted(90, 36) Source(95, 15) + SourceIndex(0) -5 >Emitted(90, 41) Source(95, 20) + SourceIndex(0) -6 >Emitted(90, 42) Source(95, 21) + SourceIndex(0) -7 >Emitted(90, 46) Source(95, 25) + SourceIndex(0) -8 >Emitted(90, 47) Source(95, 26) + SourceIndex(0) -9 >Emitted(90, 48) Source(95, 27) + SourceIndex(0) +1 >Emitted(94, 25) Source(95, 4) + SourceIndex(0) +2 >Emitted(94, 31) Source(95, 10) + SourceIndex(0) +3 >Emitted(94, 32) Source(95, 11) + SourceIndex(0) +4 >Emitted(94, 36) Source(95, 15) + SourceIndex(0) +5 >Emitted(94, 41) Source(95, 20) + SourceIndex(0) +6 >Emitted(94, 42) Source(95, 21) + SourceIndex(0) +7 >Emitted(94, 46) Source(95, 25) + SourceIndex(0) +8 >Emitted(94, 47) Source(95, 26) + SourceIndex(0) +9 >Emitted(94, 48) Source(95, 27) + SourceIndex(0) --- >>> }; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -1698,8 +1702,8 @@ sourceFile:recursiveClassReferenceTest.ts 1 > > 2 > } -1 >Emitted(91, 21) Source(96, 3) + SourceIndex(0) -2 >Emitted(91, 22) Source(96, 4) + SourceIndex(0) +1 >Emitted(95, 21) Source(96, 3) + SourceIndex(0) +2 >Emitted(95, 22) Source(96, 4) + SourceIndex(0) --- >>> return Mode; 1->^^^^^^^^^^^^^^^^^^^^ @@ -1710,8 +1714,8 @@ sourceFile:recursiveClassReferenceTest.ts > > 2 > } -1->Emitted(92, 21) Source(99, 2) + SourceIndex(0) -2 >Emitted(92, 32) Source(99, 3) + SourceIndex(0) +1->Emitted(96, 21) Source(99, 2) + SourceIndex(0) +2 >Emitted(96, 32) Source(99, 3) + SourceIndex(0) --- >>> }(AbstractMode)); 1->^^^^^^^^^^^^^^^^ @@ -1735,12 +1739,12 @@ sourceFile:recursiveClassReferenceTest.ts > > > } -1->Emitted(93, 17) Source(99, 2) + SourceIndex(0) -2 >Emitted(93, 18) Source(99, 3) + SourceIndex(0) -3 >Emitted(93, 18) Source(91, 2) + SourceIndex(0) -4 >Emitted(93, 19) Source(91, 28) + SourceIndex(0) -5 >Emitted(93, 31) Source(91, 40) + SourceIndex(0) -6 >Emitted(93, 34) Source(99, 3) + SourceIndex(0) +1->Emitted(97, 17) Source(99, 2) + SourceIndex(0) +2 >Emitted(97, 18) Source(99, 3) + SourceIndex(0) +3 >Emitted(97, 18) Source(91, 2) + SourceIndex(0) +4 >Emitted(97, 19) Source(91, 28) + SourceIndex(0) +5 >Emitted(97, 31) Source(91, 40) + SourceIndex(0) +6 >Emitted(97, 34) Source(99, 3) + SourceIndex(0) --- >>> PlainText.Mode = Mode; 1->^^^^^^^^^^^^^^^^ @@ -1760,10 +1764,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } 4 > -1->Emitted(94, 17) Source(91, 15) + SourceIndex(0) -2 >Emitted(94, 31) Source(91, 19) + SourceIndex(0) -3 >Emitted(94, 38) Source(99, 3) + SourceIndex(0) -4 >Emitted(94, 39) Source(99, 3) + SourceIndex(0) +1->Emitted(98, 17) Source(91, 15) + SourceIndex(0) +2 >Emitted(98, 31) Source(91, 19) + SourceIndex(0) +3 >Emitted(98, 38) Source(99, 3) + SourceIndex(0) +4 >Emitted(98, 39) Source(99, 3) + SourceIndex(0) --- >>> })(PlainText = Languages.PlainText || (Languages.PlainText = {})); 1->^^^^^^^^^^^^ @@ -1809,15 +1813,15 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1->Emitted(95, 13) Source(100, 1) + SourceIndex(0) -2 >Emitted(95, 14) Source(100, 2) + SourceIndex(0) -3 >Emitted(95, 16) Source(76, 31) + SourceIndex(0) -4 >Emitted(95, 25) Source(76, 40) + SourceIndex(0) -5 >Emitted(95, 28) Source(76, 31) + SourceIndex(0) -6 >Emitted(95, 47) Source(76, 40) + SourceIndex(0) -7 >Emitted(95, 52) Source(76, 31) + SourceIndex(0) -8 >Emitted(95, 71) Source(76, 40) + SourceIndex(0) -9 >Emitted(95, 79) Source(100, 2) + SourceIndex(0) +1->Emitted(99, 13) Source(100, 1) + SourceIndex(0) +2 >Emitted(99, 14) Source(100, 2) + SourceIndex(0) +3 >Emitted(99, 16) Source(76, 31) + SourceIndex(0) +4 >Emitted(99, 25) Source(76, 40) + SourceIndex(0) +5 >Emitted(99, 28) Source(76, 31) + SourceIndex(0) +6 >Emitted(99, 47) Source(76, 40) + SourceIndex(0) +7 >Emitted(99, 52) Source(76, 31) + SourceIndex(0) +8 >Emitted(99, 71) Source(76, 40) + SourceIndex(0) +9 >Emitted(99, 79) Source(100, 2) + SourceIndex(0) --- >>> })(Languages = Thing.Languages || (Thing.Languages = {})); 1 >^^^^^^^^ @@ -1862,15 +1866,15 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(96, 9) Source(100, 1) + SourceIndex(0) -2 >Emitted(96, 10) Source(100, 2) + SourceIndex(0) -3 >Emitted(96, 12) Source(76, 21) + SourceIndex(0) -4 >Emitted(96, 21) Source(76, 30) + SourceIndex(0) -5 >Emitted(96, 24) Source(76, 21) + SourceIndex(0) -6 >Emitted(96, 39) Source(76, 30) + SourceIndex(0) -7 >Emitted(96, 44) Source(76, 21) + SourceIndex(0) -8 >Emitted(96, 59) Source(76, 30) + SourceIndex(0) -9 >Emitted(96, 67) Source(100, 2) + SourceIndex(0) +1 >Emitted(100, 9) Source(100, 1) + SourceIndex(0) +2 >Emitted(100, 10) Source(100, 2) + SourceIndex(0) +3 >Emitted(100, 12) Source(76, 21) + SourceIndex(0) +4 >Emitted(100, 21) Source(76, 30) + SourceIndex(0) +5 >Emitted(100, 24) Source(76, 21) + SourceIndex(0) +6 >Emitted(100, 39) Source(76, 30) + SourceIndex(0) +7 >Emitted(100, 44) Source(76, 21) + SourceIndex(0) +8 >Emitted(100, 59) Source(76, 30) + SourceIndex(0) +9 >Emitted(100, 67) Source(100, 2) + SourceIndex(0) --- >>> })(Thing = Sample.Thing || (Sample.Thing = {})); 1 >^^^^ @@ -1915,15 +1919,15 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(97, 5) Source(100, 1) + SourceIndex(0) -2 >Emitted(97, 6) Source(100, 2) + SourceIndex(0) -3 >Emitted(97, 8) Source(76, 15) + SourceIndex(0) -4 >Emitted(97, 13) Source(76, 20) + SourceIndex(0) -5 >Emitted(97, 16) Source(76, 15) + SourceIndex(0) -6 >Emitted(97, 28) Source(76, 20) + SourceIndex(0) -7 >Emitted(97, 33) Source(76, 15) + SourceIndex(0) -8 >Emitted(97, 45) Source(76, 20) + SourceIndex(0) -9 >Emitted(97, 53) Source(100, 2) + SourceIndex(0) +1 >Emitted(101, 5) Source(100, 1) + SourceIndex(0) +2 >Emitted(101, 6) Source(100, 2) + SourceIndex(0) +3 >Emitted(101, 8) Source(76, 15) + SourceIndex(0) +4 >Emitted(101, 13) Source(76, 20) + SourceIndex(0) +5 >Emitted(101, 16) Source(76, 15) + SourceIndex(0) +6 >Emitted(101, 28) Source(76, 20) + SourceIndex(0) +7 >Emitted(101, 33) Source(76, 15) + SourceIndex(0) +8 >Emitted(101, 45) Source(76, 20) + SourceIndex(0) +9 >Emitted(101, 53) Source(100, 2) + SourceIndex(0) --- >>>})(Sample || (Sample = {})); 1 > @@ -1965,12 +1969,12 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(98, 1) Source(100, 1) + SourceIndex(0) -2 >Emitted(98, 2) Source(100, 2) + SourceIndex(0) -3 >Emitted(98, 4) Source(76, 8) + SourceIndex(0) -4 >Emitted(98, 10) Source(76, 14) + SourceIndex(0) -5 >Emitted(98, 15) Source(76, 8) + SourceIndex(0) -6 >Emitted(98, 21) Source(76, 14) + SourceIndex(0) -7 >Emitted(98, 29) Source(100, 2) + SourceIndex(0) +1 >Emitted(102, 1) Source(100, 1) + SourceIndex(0) +2 >Emitted(102, 2) Source(100, 2) + SourceIndex(0) +3 >Emitted(102, 4) Source(76, 8) + SourceIndex(0) +4 >Emitted(102, 10) Source(76, 14) + SourceIndex(0) +5 >Emitted(102, 15) Source(76, 8) + SourceIndex(0) +6 >Emitted(102, 21) Source(76, 14) + SourceIndex(0) +7 >Emitted(102, 29) Source(100, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=recursiveClassReferenceTest.js.map \ No newline at end of file diff --git a/tests/baselines/reference/recursiveComplicatedClasses.js b/tests/baselines/reference/recursiveComplicatedClasses.js index 57000180db467..c9b3dfb6d7a96 100644 --- a/tests/baselines/reference/recursiveComplicatedClasses.js +++ b/tests/baselines/reference/recursiveComplicatedClasses.js @@ -26,7 +26,11 @@ class TypeSymbol extends InferenceSymbol { //// [recursiveComplicatedClasses.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/recursivelySpecializedConstructorDeclaration.js b/tests/baselines/reference/recursivelySpecializedConstructorDeclaration.js index 5f6e3ab0b06fd..e7ce63794fd57 100644 --- a/tests/baselines/reference/recursivelySpecializedConstructorDeclaration.js +++ b/tests/baselines/reference/recursivelySpecializedConstructorDeclaration.js @@ -31,7 +31,11 @@ declare module MsPortal.Controls.Base.ItemList { //// [recursivelySpecializedConstructorDeclaration.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/reexportClassDefinition.js b/tests/baselines/reference/reexportClassDefinition.js index d7b644514cc58..37ba6aab5d444 100644 --- a/tests/baselines/reference/reexportClassDefinition.js +++ b/tests/baselines/reference/reexportClassDefinition.js @@ -34,7 +34,11 @@ module.exports = { //// [foo3.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js b/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js index 77417da53f367..d81c9a0e2a75c 100644 --- a/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js +++ b/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js @@ -1021,7 +1021,11 @@ module caurinus { //// [resolvingClassDeclarationWhenInBaseTypeResolution.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/returnInConstructor1.js b/tests/baselines/reference/returnInConstructor1.js index cd56b78f0a3e4..2f2c4a3fdb5ca 100644 --- a/tests/baselines/reference/returnInConstructor1.js +++ b/tests/baselines/reference/returnInConstructor1.js @@ -68,7 +68,11 @@ class I extends G { //// [returnInConstructor1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/returnStatements.js b/tests/baselines/reference/returnStatements.js index 783ffb5899e2f..3488ebd8ac0bb 100644 --- a/tests/baselines/reference/returnStatements.js +++ b/tests/baselines/reference/returnStatements.js @@ -26,7 +26,11 @@ function fn13(): C { return null; } //// [returnStatements.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.js b/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.js index 1ab4b160e7ca7..67013c3922e03 100644 --- a/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.js +++ b/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.js @@ -10,7 +10,11 @@ class D extends C { //// [scopeCheckExtendedClassInsidePublicMethod2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.js b/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.js index 9d1fafea4c9da..7bb90a136ba8e 100644 --- a/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.js +++ b/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.js @@ -10,7 +10,11 @@ class D extends C { //// [scopeCheckExtendedClassInsideStaticMethod1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/scopeTests.js b/tests/baselines/reference/scopeTests.js index 0ab152adf1198..d2061241cac26 100644 --- a/tests/baselines/reference/scopeTests.js +++ b/tests/baselines/reference/scopeTests.js @@ -13,7 +13,11 @@ class D extends C { //// [scopeTests.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/shadowPrivateMembers.js b/tests/baselines/reference/shadowPrivateMembers.js index 305c758195929..251622f13085d 100644 --- a/tests/baselines/reference/shadowPrivateMembers.js +++ b/tests/baselines/reference/shadowPrivateMembers.js @@ -5,7 +5,11 @@ class derived extends base { private n() {} } //// [shadowPrivateMembers.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js index d3ac854d4dd69..07be64891413f 100644 --- a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js +++ b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js @@ -9,7 +9,11 @@ class Greeter extends AbstractGreeter { //// [sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js.map b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js.map index 6b18a783dfa1c..27577a7e338cd 100644 --- a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js.map +++ b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js.map] -{"version":3,"file":"sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js","sourceRoot":"","sources":["sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts"],"names":[],"mappings":";;;;;AAAA;IAAA;IACA,CAAC;IAAD,sBAAC;AAAD,CAAC,AADD,IACC;AAED;IAAsB,2BAAe;IAArC;QAAA,kDAGC;QAFU,OAAC,GAAG,EAAE,CAAC;QACP,WAAK,GAAG,KAAK,CAAC;;IACzB,CAAC;IAAD,cAAC;AAAD,CAAC,AAHD,CAAsB,eAAe,GAGpC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js","sourceRoot":"","sources":["sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts"],"names":[],"mappings":";;;;;;;;;AAAA;IAAA;IACA,CAAC;IAAD,sBAAC;AAAD,CAAC,AADD,IACC;AAED;IAAsB,2BAAe;IAArC;QAAA,kDAGC;QAFU,OAAC,GAAG,EAAE,CAAC;QACP,WAAK,GAAG,KAAK,CAAC;;IACzB,CAAC;IAAD,cAAC;AAAD,CAAC,AAHD,CAAsB,eAAe,GAGpC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt index 68dea53e96b33..cb083f766e867 100644 --- a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt @@ -9,7 +9,11 @@ emittedFile:tests/cases/compiler/sourceMapValidationClassWithDefaultConstructorA sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts ------------------------------------------------------------------- >>>var __extends = (this && this.__extends) || function (d, b) { ->>> Object.setPrototypeOf(d, b); +>>> if (typeof Object.setPrototypeOf === "function") { +>>> Object.setPrototypeOf(d, b); +>>> } else { +>>> d.__proto__ = b; +>>> } >>> function __() { this.constructor = d; } >>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); >>>}; @@ -17,13 +21,13 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > -1 >Emitted(6, 1) Source(1, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(1, 1) + SourceIndex(0) --- >>> function AbstractGreeter() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(7, 5) Source(1, 1) + SourceIndex(0) +1->Emitted(11, 5) Source(1, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -32,16 +36,16 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts 1->class AbstractGreeter { > 2 > } -1->Emitted(8, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(8, 6) Source(2, 2) + SourceIndex(0) +1->Emitted(12, 5) Source(2, 1) + SourceIndex(0) +2 >Emitted(12, 6) Source(2, 2) + SourceIndex(0) --- >>> return AbstractGreeter; 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(9, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(9, 27) Source(2, 2) + SourceIndex(0) +1->Emitted(13, 5) Source(2, 1) + SourceIndex(0) +2 >Emitted(13, 27) Source(2, 2) + SourceIndex(0) --- >>>}()); 1 > @@ -54,10 +58,10 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts 3 > 4 > class AbstractGreeter { > } -1 >Emitted(10, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(10, 2) Source(2, 2) + SourceIndex(0) -3 >Emitted(10, 2) Source(1, 1) + SourceIndex(0) -4 >Emitted(10, 6) Source(2, 2) + SourceIndex(0) +1 >Emitted(14, 1) Source(2, 1) + SourceIndex(0) +2 >Emitted(14, 2) Source(2, 2) + SourceIndex(0) +3 >Emitted(14, 2) Source(1, 1) + SourceIndex(0) +4 >Emitted(14, 6) Source(2, 2) + SourceIndex(0) --- >>>var Greeter = (function (_super) { 1-> @@ -65,21 +69,21 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts 1-> > > -1->Emitted(11, 1) Source(4, 1) + SourceIndex(0) +1->Emitted(15, 1) Source(4, 1) + SourceIndex(0) --- >>> __extends(Greeter, _super); 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1->class Greeter extends 2 > AbstractGreeter -1->Emitted(12, 5) Source(4, 23) + SourceIndex(0) -2 >Emitted(12, 32) Source(4, 38) + SourceIndex(0) +1->Emitted(16, 5) Source(4, 23) + SourceIndex(0) +2 >Emitted(16, 32) Source(4, 38) + SourceIndex(0) --- >>> function Greeter() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > -1 >Emitted(13, 5) Source(4, 1) + SourceIndex(0) +1 >Emitted(17, 5) Source(4, 1) + SourceIndex(0) --- >>> var _this = _super.apply(this, arguments) || this; 1->^^^^^^^^ @@ -89,8 +93,8 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts > public a = 10; > public nameA = "Ten"; > } -1->Emitted(14, 9) Source(4, 1) + SourceIndex(0) -2 >Emitted(14, 59) Source(7, 2) + SourceIndex(0) +1->Emitted(18, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(18, 59) Source(7, 2) + SourceIndex(0) --- >>> _this.a = 10; 1 >^^^^^^^^ @@ -104,11 +108,11 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts 3 > = 4 > 10 5 > ; -1 >Emitted(15, 9) Source(5, 12) + SourceIndex(0) -2 >Emitted(15, 16) Source(5, 13) + SourceIndex(0) -3 >Emitted(15, 19) Source(5, 16) + SourceIndex(0) -4 >Emitted(15, 21) Source(5, 18) + SourceIndex(0) -5 >Emitted(15, 22) Source(5, 19) + SourceIndex(0) +1 >Emitted(19, 9) Source(5, 12) + SourceIndex(0) +2 >Emitted(19, 16) Source(5, 13) + SourceIndex(0) +3 >Emitted(19, 19) Source(5, 16) + SourceIndex(0) +4 >Emitted(19, 21) Source(5, 18) + SourceIndex(0) +5 >Emitted(19, 22) Source(5, 19) + SourceIndex(0) --- >>> _this.nameA = "Ten"; 1->^^^^^^^^ @@ -122,11 +126,11 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts 3 > = 4 > "Ten" 5 > ; -1->Emitted(16, 9) Source(6, 12) + SourceIndex(0) -2 >Emitted(16, 20) Source(6, 17) + SourceIndex(0) -3 >Emitted(16, 23) Source(6, 20) + SourceIndex(0) -4 >Emitted(16, 28) Source(6, 25) + SourceIndex(0) -5 >Emitted(16, 29) Source(6, 26) + SourceIndex(0) +1->Emitted(20, 9) Source(6, 12) + SourceIndex(0) +2 >Emitted(20, 20) Source(6, 17) + SourceIndex(0) +3 >Emitted(20, 23) Source(6, 20) + SourceIndex(0) +4 >Emitted(20, 28) Source(6, 25) + SourceIndex(0) +5 >Emitted(20, 29) Source(6, 26) + SourceIndex(0) --- >>> return _this; >>> } @@ -136,8 +140,8 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts 1 > > 2 > } -1 >Emitted(18, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(18, 6) Source(7, 2) + SourceIndex(0) +1 >Emitted(22, 5) Source(7, 1) + SourceIndex(0) +2 >Emitted(22, 6) Source(7, 2) + SourceIndex(0) --- >>> return Greeter; 1->^^^^ @@ -145,8 +149,8 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts 3 > ^^^-> 1-> 2 > } -1->Emitted(19, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(19, 19) Source(7, 2) + SourceIndex(0) +1->Emitted(23, 5) Source(7, 1) + SourceIndex(0) +2 >Emitted(23, 19) Source(7, 2) + SourceIndex(0) --- >>>}(AbstractGreeter)); 1-> @@ -165,11 +169,11 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts > public a = 10; > public nameA = "Ten"; > } -1->Emitted(20, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(20, 2) Source(7, 2) + SourceIndex(0) -3 >Emitted(20, 2) Source(4, 1) + SourceIndex(0) -4 >Emitted(20, 3) Source(4, 23) + SourceIndex(0) -5 >Emitted(20, 18) Source(4, 38) + SourceIndex(0) -6 >Emitted(20, 21) Source(7, 2) + SourceIndex(0) +1->Emitted(24, 1) Source(7, 1) + SourceIndex(0) +2 >Emitted(24, 2) Source(7, 2) + SourceIndex(0) +3 >Emitted(24, 2) Source(4, 1) + SourceIndex(0) +4 >Emitted(24, 3) Source(4, 23) + SourceIndex(0) +5 >Emitted(24, 18) Source(4, 38) + SourceIndex(0) +6 >Emitted(24, 21) Source(7, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js.map \ No newline at end of file diff --git a/tests/baselines/reference/specializedInheritedConstructors1.js b/tests/baselines/reference/specializedInheritedConstructors1.js index 56fd271bb3477..2560437b43d4e 100644 --- a/tests/baselines/reference/specializedInheritedConstructors1.js +++ b/tests/baselines/reference/specializedInheritedConstructors1.js @@ -19,7 +19,11 @@ var myView = new MyView(m); // was error //// [specializedInheritedConstructors1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/specializedOverloadWithRestParameters.js b/tests/baselines/reference/specializedOverloadWithRestParameters.js index 3f31e7f61df8a..0ea23b1b850ca 100644 --- a/tests/baselines/reference/specializedOverloadWithRestParameters.js +++ b/tests/baselines/reference/specializedOverloadWithRestParameters.js @@ -14,7 +14,11 @@ function g(tagName: any): Base { //// [specializedOverloadWithRestParameters.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/staticFactory1.js b/tests/baselines/reference/staticFactory1.js index d8c53470b813a..e9e4a286eb6d3 100644 --- a/tests/baselines/reference/staticFactory1.js +++ b/tests/baselines/reference/staticFactory1.js @@ -15,7 +15,11 @@ d.foo(); //// [staticFactory1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/staticInheritance.js b/tests/baselines/reference/staticInheritance.js index c6c95c1e6bf45..181c8aa9659ef 100644 --- a/tests/baselines/reference/staticInheritance.js +++ b/tests/baselines/reference/staticInheritance.js @@ -13,7 +13,11 @@ doThing(B); //OK //// [staticInheritance.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/staticMemberAccessOffDerivedType1.js b/tests/baselines/reference/staticMemberAccessOffDerivedType1.js index ededeec9c5c6a..6634d3c351902 100644 --- a/tests/baselines/reference/staticMemberAccessOffDerivedType1.js +++ b/tests/baselines/reference/staticMemberAccessOffDerivedType1.js @@ -11,7 +11,11 @@ class P extends SomeBase { //// [staticMemberAccessOffDerivedType1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/staticPropSuper.js b/tests/baselines/reference/staticPropSuper.js index fdb63a556e022..10519dace0099 100644 --- a/tests/baselines/reference/staticPropSuper.js +++ b/tests/baselines/reference/staticPropSuper.js @@ -37,7 +37,11 @@ class E extends A { //// [staticPropSuper.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/strictModeInConstructor.js b/tests/baselines/reference/strictModeInConstructor.js index ac78decef587e..0598932c4bb22 100644 --- a/tests/baselines/reference/strictModeInConstructor.js +++ b/tests/baselines/reference/strictModeInConstructor.js @@ -62,7 +62,11 @@ class Ds extends A { //// [strictModeInConstructor.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/strictModeReservedWord.js b/tests/baselines/reference/strictModeReservedWord.js index e376167c6670d..f15efc6e7655b 100644 --- a/tests/baselines/reference/strictModeReservedWord.js +++ b/tests/baselines/reference/strictModeReservedWord.js @@ -29,7 +29,11 @@ function foo() { //// [strictModeReservedWord.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/strictModeReservedWordInClassDeclaration.js b/tests/baselines/reference/strictModeReservedWordInClassDeclaration.js index f6b864047a8df..6f13aac7608c0 100644 --- a/tests/baselines/reference/strictModeReservedWordInClassDeclaration.js +++ b/tests/baselines/reference/strictModeReservedWordInClassDeclaration.js @@ -30,7 +30,11 @@ class H extends package.A { } //// [strictModeReservedWordInClassDeclaration.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js b/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js index 6836a7adff3b9..adcc83a1841b3 100644 --- a/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js +++ b/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js @@ -42,7 +42,11 @@ var b: { [x: string]: A } = { //// [stringIndexerConstrainsPropertyDeclarations2.js] // String indexer providing a constraint of a user defined type var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypesOfTypeParameter.js b/tests/baselines/reference/subtypesOfTypeParameter.js index 4407e02a1e7ee..2d42c1e4d791c 100644 --- a/tests/baselines/reference/subtypesOfTypeParameter.js +++ b/tests/baselines/reference/subtypesOfTypeParameter.js @@ -108,7 +108,11 @@ function f2(x: T, y: U) { //// [subtypesOfTypeParameter.js] // checking whether other types are subtypes of type parameters var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints.js b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints.js index ec44364d4a47a..a3b5ecaeb2638 100644 --- a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints.js +++ b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints.js @@ -170,7 +170,11 @@ class D29 extends C3 { //// [subtypesOfTypeParameterWithConstraints.js] // checking whether other types are subtypes of type parameters with constraints var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints4.js b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints4.js index f25a43a353fd0..1aa94ba7c9984 100644 --- a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints4.js +++ b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints4.js @@ -81,7 +81,11 @@ class D9 extends B1 { //// [subtypesOfTypeParameterWithConstraints4.js] // checking whether other types are subtypes of type parameters with constraints var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypesOfTypeParameterWithRecursiveConstraints.js b/tests/baselines/reference/subtypesOfTypeParameterWithRecursiveConstraints.js index 16797d0e5b5dd..05cc496f25a0a 100644 --- a/tests/baselines/reference/subtypesOfTypeParameterWithRecursiveConstraints.js +++ b/tests/baselines/reference/subtypesOfTypeParameterWithRecursiveConstraints.js @@ -160,7 +160,11 @@ module M2 { //// [subtypesOfTypeParameterWithRecursiveConstraints.js] // checking whether other types are subtypes of type parameters with constraints var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingTransitivity.js b/tests/baselines/reference/subtypingTransitivity.js index ca52f7ed49f9b..5c06121d5a239 100644 --- a/tests/baselines/reference/subtypingTransitivity.js +++ b/tests/baselines/reference/subtypingTransitivity.js @@ -21,7 +21,11 @@ b.x = 1; // assigned number to string //// [subtypingTransitivity.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithCallSignatures2.js b/tests/baselines/reference/subtypingWithCallSignatures2.js index 8086362951fde..6b82e0d484179 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures2.js +++ b/tests/baselines/reference/subtypingWithCallSignatures2.js @@ -175,7 +175,11 @@ var r18 = foo18(r18arg1); //// [subtypingWithCallSignatures2.js] // checking subtype relations for function types as it relates to contextual signature instantiation var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithCallSignatures3.js b/tests/baselines/reference/subtypingWithCallSignatures3.js index 1fa01910cdb77..49405cbd07033 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures3.js +++ b/tests/baselines/reference/subtypingWithCallSignatures3.js @@ -122,7 +122,11 @@ module WithGenericSignaturesInBaseType { // checking subtype relations for function types as it relates to contextual signature instantiation // error cases, so function calls will all result in 'any' var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithCallSignatures4.js b/tests/baselines/reference/subtypingWithCallSignatures4.js index 5aaa139f19a3b..2e526d41fbaa5 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures4.js +++ b/tests/baselines/reference/subtypingWithCallSignatures4.js @@ -114,7 +114,11 @@ var r18 = foo18(r18arg); //// [subtypingWithCallSignatures4.js] // checking subtype relations for function types as it relates to contextual signature instantiation var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithConstructSignatures2.js b/tests/baselines/reference/subtypingWithConstructSignatures2.js index 1f7ae528b5b8e..867beb93596aa 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures2.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures2.js @@ -175,7 +175,11 @@ var r18 = foo18(r18arg1); //// [subtypingWithConstructSignatures2.js] // checking subtype relations for function types as it relates to contextual signature instantiation var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithConstructSignatures3.js b/tests/baselines/reference/subtypingWithConstructSignatures3.js index d86b0519ebe79..f13a56664ceba 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures3.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures3.js @@ -124,7 +124,11 @@ module WithGenericSignaturesInBaseType { // checking subtype relations for function types as it relates to contextual signature instantiation // error cases, so function calls will all result in 'any' var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithConstructSignatures4.js b/tests/baselines/reference/subtypingWithConstructSignatures4.js index f11d2e3c2116b..32f9b33fc7156 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures4.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures4.js @@ -114,7 +114,11 @@ var r18 = foo18(r18arg); //// [subtypingWithConstructSignatures4.js] // checking subtype relations for function types as it relates to contextual signature instantiation var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithConstructSignatures5.js b/tests/baselines/reference/subtypingWithConstructSignatures5.js index bdce522f1045e..2c17720173234 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures5.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures5.js @@ -52,7 +52,11 @@ interface I extends B { // checking subtype relations for function types as it relates to contextual signature instantiation // same as subtypingWithConstructSignatures2 just with an extra level of indirection in the inheritance chain var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithConstructSignatures6.js b/tests/baselines/reference/subtypingWithConstructSignatures6.js index 2c0b10744f25a..065d312c0860c 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures6.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures6.js @@ -55,7 +55,11 @@ interface I9 extends A { // same as subtypingWithConstructSignatures4 but using class type parameters instead of generic signatures // all are errors var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithNumericIndexer.js b/tests/baselines/reference/subtypingWithNumericIndexer.js index efe3d5927a983..1c1ade16a08af 100644 --- a/tests/baselines/reference/subtypingWithNumericIndexer.js +++ b/tests/baselines/reference/subtypingWithNumericIndexer.js @@ -42,7 +42,11 @@ module Generics { //// [subtypingWithNumericIndexer.js] // Derived type indexer must be subtype of base type indexer var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithNumericIndexer3.js b/tests/baselines/reference/subtypingWithNumericIndexer3.js index a3b1034d6a8e7..2c0da66f8c920 100644 --- a/tests/baselines/reference/subtypingWithNumericIndexer3.js +++ b/tests/baselines/reference/subtypingWithNumericIndexer3.js @@ -46,7 +46,11 @@ module Generics { //// [subtypingWithNumericIndexer3.js] // Derived type indexer must be subtype of base type indexer var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithNumericIndexer4.js b/tests/baselines/reference/subtypingWithNumericIndexer4.js index f2657654c8b6f..1881825eb24c8 100644 --- a/tests/baselines/reference/subtypingWithNumericIndexer4.js +++ b/tests/baselines/reference/subtypingWithNumericIndexer4.js @@ -30,7 +30,11 @@ module Generics { //// [subtypingWithNumericIndexer4.js] // Derived type indexer must be subtype of base type indexer var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithObjectMembers.js b/tests/baselines/reference/subtypingWithObjectMembers.js index 04f05b81cefdc..263bb117d3406 100644 --- a/tests/baselines/reference/subtypingWithObjectMembers.js +++ b/tests/baselines/reference/subtypingWithObjectMembers.js @@ -69,7 +69,11 @@ module TwoLevels { //// [subtypingWithObjectMembers.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithObjectMembers4.js b/tests/baselines/reference/subtypingWithObjectMembers4.js index 2cdf1b4401b40..03d7228b2f9d4 100644 --- a/tests/baselines/reference/subtypingWithObjectMembers4.js +++ b/tests/baselines/reference/subtypingWithObjectMembers4.js @@ -36,7 +36,11 @@ class B3 extends A3 { //// [subtypingWithObjectMembers4.js] // subtyping when property names do not match var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithObjectMembersAccessibility.js b/tests/baselines/reference/subtypingWithObjectMembersAccessibility.js index 386ce78167547..0eb506d32107f 100644 --- a/tests/baselines/reference/subtypingWithObjectMembersAccessibility.js +++ b/tests/baselines/reference/subtypingWithObjectMembersAccessibility.js @@ -36,7 +36,11 @@ class B3 extends A3 { //// [subtypingWithObjectMembersAccessibility.js] // Derived member is private, base member is not causes errors var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.js b/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.js index 5227eac7db425..f171736911bae 100644 --- a/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.js +++ b/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.js @@ -64,7 +64,11 @@ module ImplicitPublic { //// [subtypingWithObjectMembersAccessibility2.js] // Derived member is private, base member is not causes errors var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithStringIndexer.js b/tests/baselines/reference/subtypingWithStringIndexer.js index a1ec5e1f46f8a..bffca920982c5 100644 --- a/tests/baselines/reference/subtypingWithStringIndexer.js +++ b/tests/baselines/reference/subtypingWithStringIndexer.js @@ -43,7 +43,11 @@ module Generics { //// [subtypingWithStringIndexer.js] // Derived type indexer must be subtype of base type indexer var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithStringIndexer3.js b/tests/baselines/reference/subtypingWithStringIndexer3.js index ea193a206ede7..0ff4b73c84896 100644 --- a/tests/baselines/reference/subtypingWithStringIndexer3.js +++ b/tests/baselines/reference/subtypingWithStringIndexer3.js @@ -46,7 +46,11 @@ module Generics { //// [subtypingWithStringIndexer3.js] // Derived type indexer must be subtype of base type indexer var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithStringIndexer4.js b/tests/baselines/reference/subtypingWithStringIndexer4.js index b5a8c75a03e44..347df7c17200f 100644 --- a/tests/baselines/reference/subtypingWithStringIndexer4.js +++ b/tests/baselines/reference/subtypingWithStringIndexer4.js @@ -30,7 +30,11 @@ module Generics { //// [subtypingWithStringIndexer4.js] // Derived type indexer must be subtype of base type indexer var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/super.js b/tests/baselines/reference/super.js index 6607c7897dd94..bbf1862bd0f19 100644 --- a/tests/baselines/reference/super.js +++ b/tests/baselines/reference/super.js @@ -39,7 +39,11 @@ s.foo() + ss.foo(); //// [super.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/super1.js b/tests/baselines/reference/super1.js index 44a48adab77e3..d437c923fe6af 100644 --- a/tests/baselines/reference/super1.js +++ b/tests/baselines/reference/super1.js @@ -68,7 +68,11 @@ module Base4 { //// [super1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/super2.js b/tests/baselines/reference/super2.js index e46b28254816a..b8a679c4c8dc3 100644 --- a/tests/baselines/reference/super2.js +++ b/tests/baselines/reference/super2.js @@ -52,7 +52,11 @@ results1.x() + results1.y() + results2.y(); //// [super2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superAccess.js b/tests/baselines/reference/superAccess.js index b300f75b5fa7d..f2f6ccbaf4a85 100644 --- a/tests/baselines/reference/superAccess.js +++ b/tests/baselines/reference/superAccess.js @@ -15,7 +15,11 @@ class MyDerived extends MyBase { //// [superAccess.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superAccess2.js b/tests/baselines/reference/superAccess2.js index 0388b8d7f108a..021589c1e79cb 100644 --- a/tests/baselines/reference/superAccess2.js +++ b/tests/baselines/reference/superAccess2.js @@ -26,7 +26,11 @@ class Q extends P { //// [superAccess2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superAccessInFatArrow1.js b/tests/baselines/reference/superAccessInFatArrow1.js index ec8488f0dadab..e62db8c823b17 100644 --- a/tests/baselines/reference/superAccessInFatArrow1.js +++ b/tests/baselines/reference/superAccessInFatArrow1.js @@ -17,7 +17,11 @@ module test { //// [superAccessInFatArrow1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallArgsMustMatch.js b/tests/baselines/reference/superCallArgsMustMatch.js index 7ca13891555a0..ec83550a9f033 100644 --- a/tests/baselines/reference/superCallArgsMustMatch.js +++ b/tests/baselines/reference/superCallArgsMustMatch.js @@ -27,7 +27,11 @@ class T6 extends T5{ //// [superCallArgsMustMatch.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallAssignResult.js b/tests/baselines/reference/superCallAssignResult.js index d7ad39fc7a673..f1407cac10706 100644 --- a/tests/baselines/reference/superCallAssignResult.js +++ b/tests/baselines/reference/superCallAssignResult.js @@ -12,7 +12,11 @@ class H extends E { //// [superCallAssignResult.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing1.js b/tests/baselines/reference/superCallBeforeThisAccessing1.js index 916d15682326e..151e9da2f158c 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing1.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing1.js @@ -18,7 +18,11 @@ class D extends Base { //// [superCallBeforeThisAccessing1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing2.js b/tests/baselines/reference/superCallBeforeThisAccessing2.js index c5a8d293fff10..7655b2df83b27 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing2.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing2.js @@ -12,7 +12,11 @@ class D extends Base { //// [superCallBeforeThisAccessing2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing3.js b/tests/baselines/reference/superCallBeforeThisAccessing3.js index 8a59226d1d682..34555c677ba9e 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing3.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing3.js @@ -15,7 +15,11 @@ class D extends Base { //// [superCallBeforeThisAccessing3.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing4.js b/tests/baselines/reference/superCallBeforeThisAccessing4.js index 6870662435e4c..9fc2987e96e32 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing4.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing4.js @@ -17,7 +17,11 @@ class E extends null { //// [superCallBeforeThisAccessing4.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing5.js b/tests/baselines/reference/superCallBeforeThisAccessing5.js index 0c2f3aa1c2d2a..1f3b0040e4996 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing5.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing5.js @@ -9,7 +9,11 @@ class D extends null { //// [superCallBeforeThisAccessing5.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing6.js b/tests/baselines/reference/superCallBeforeThisAccessing6.js index 2fe03ab52b5a6..740f90d2e2bbf 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing6.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing6.js @@ -12,7 +12,11 @@ class D extends Base { //// [superCallBeforeThisAccessing6.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing7.js b/tests/baselines/reference/superCallBeforeThisAccessing7.js index a843456be7698..65d95769c4072 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing7.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing7.js @@ -15,7 +15,11 @@ class D extends Base { //// [superCallBeforeThisAccessing7.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing8.js b/tests/baselines/reference/superCallBeforeThisAccessing8.js index 3b23949584fbe..b5e454139c06b 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing8.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing8.js @@ -15,7 +15,11 @@ class D extends Base { //// [superCallBeforeThisAccessing8.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType1.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType1.js index e4f1d4ed105db..464c879212e8c 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType1.js @@ -13,7 +13,11 @@ class D extends B { //// [superCallFromClassThatDerivesFromGenericType1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType2.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType2.js index 47d1b5007fe92..6ebe47532c8f2 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType2.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType2.js @@ -12,7 +12,11 @@ class D extends B { //// [superCallFromClassThatDerivesFromGenericType2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js index d29377ed2469e..19e480378a42d 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js @@ -12,7 +12,11 @@ class B extends A { //// [superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js index 844b24a0698b9..48855cb0d1139 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js @@ -12,7 +12,11 @@ class B extends A { //// [superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js b/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js index 71587371fa032..abfe5294a939f 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js @@ -12,7 +12,11 @@ class B extends A { //// [superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallInNonStaticMethod.js b/tests/baselines/reference/superCallInNonStaticMethod.js index 99a026a38fde9..dbea09ebcedfc 100644 --- a/tests/baselines/reference/superCallInNonStaticMethod.js +++ b/tests/baselines/reference/superCallInNonStaticMethod.js @@ -52,7 +52,11 @@ class Other extends Doing { //// [superCallInNonStaticMethod.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallInStaticMethod.js b/tests/baselines/reference/superCallInStaticMethod.js index b65b2b270c569..104f8821dcab2 100644 --- a/tests/baselines/reference/superCallInStaticMethod.js +++ b/tests/baselines/reference/superCallInStaticMethod.js @@ -48,7 +48,11 @@ class Other extends Doing { //// [superCallInStaticMethod.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallInsideClassDeclaration.js b/tests/baselines/reference/superCallInsideClassDeclaration.js index 0b6c768c86f5a..4f7a0087ab173 100644 --- a/tests/baselines/reference/superCallInsideClassDeclaration.js +++ b/tests/baselines/reference/superCallInsideClassDeclaration.js @@ -18,7 +18,11 @@ class B extends A { //// [superCallInsideClassDeclaration.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallInsideClassExpression.js b/tests/baselines/reference/superCallInsideClassExpression.js index c3bd2425dd4fc..01bce40d20408 100644 --- a/tests/baselines/reference/superCallInsideClassExpression.js +++ b/tests/baselines/reference/superCallInsideClassExpression.js @@ -18,7 +18,11 @@ class B extends A { //// [superCallInsideClassExpression.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallInsideObjectLiteralExpression.js b/tests/baselines/reference/superCallInsideObjectLiteralExpression.js index 45b6301a871e2..613997e789f38 100644 --- a/tests/baselines/reference/superCallInsideObjectLiteralExpression.js +++ b/tests/baselines/reference/superCallInsideObjectLiteralExpression.js @@ -14,7 +14,11 @@ class B extends A { //// [superCallInsideObjectLiteralExpression.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallOutsideConstructor.js b/tests/baselines/reference/superCallOutsideConstructor.js index a98a9b3a32259..0e1f3fbd83777 100644 --- a/tests/baselines/reference/superCallOutsideConstructor.js +++ b/tests/baselines/reference/superCallOutsideConstructor.js @@ -24,7 +24,11 @@ var d = new D(); //// [superCallOutsideConstructor.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallParameterContextualTyping1.js b/tests/baselines/reference/superCallParameterContextualTyping1.js index 46aeb97698795..132cb003921da 100644 --- a/tests/baselines/reference/superCallParameterContextualTyping1.js +++ b/tests/baselines/reference/superCallParameterContextualTyping1.js @@ -14,7 +14,11 @@ class B extends A { //// [superCallParameterContextualTyping1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallParameterContextualTyping2.js b/tests/baselines/reference/superCallParameterContextualTyping2.js index a6aed2d1caef5..bbb0871d385ac 100644 --- a/tests/baselines/reference/superCallParameterContextualTyping2.js +++ b/tests/baselines/reference/superCallParameterContextualTyping2.js @@ -13,7 +13,11 @@ class C extends A { //// [superCallParameterContextualTyping2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallParameterContextualTyping3.js b/tests/baselines/reference/superCallParameterContextualTyping3.js index 8445e86cfce5f..4469c918b317d 100644 --- a/tests/baselines/reference/superCallParameterContextualTyping3.js +++ b/tests/baselines/reference/superCallParameterContextualTyping3.js @@ -33,7 +33,11 @@ class C extends CBase { //// [superCallParameterContextualTyping3.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallWithCommentEmit01.js b/tests/baselines/reference/superCallWithCommentEmit01.js index ea23eb3be03c3..ae7f053e5d4cf 100644 --- a/tests/baselines/reference/superCallWithCommentEmit01.js +++ b/tests/baselines/reference/superCallWithCommentEmit01.js @@ -12,7 +12,11 @@ class B extends A { //// [superCallWithCommentEmit01.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallWithMissingBaseClass.js b/tests/baselines/reference/superCallWithMissingBaseClass.js index 9dff2bc4c5640..766c121d42b2b 100644 --- a/tests/baselines/reference/superCallWithMissingBaseClass.js +++ b/tests/baselines/reference/superCallWithMissingBaseClass.js @@ -11,7 +11,11 @@ class Foo extends Bar { //// [superCallWithMissingBaseClass.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCalls.js b/tests/baselines/reference/superCalls.js index d5a9af8e06a3d..47292405faf87 100644 --- a/tests/baselines/reference/superCalls.js +++ b/tests/baselines/reference/superCalls.js @@ -32,7 +32,11 @@ class OtherDerived extends OtherBase { //// [superCalls.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallsInConstructor.js b/tests/baselines/reference/superCallsInConstructor.js index 540eef9984086..707757b37b6b8 100644 --- a/tests/baselines/reference/superCallsInConstructor.js +++ b/tests/baselines/reference/superCallsInConstructor.js @@ -22,7 +22,11 @@ class Derived extends Base { //// [superCallsInConstructor.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superErrors.js b/tests/baselines/reference/superErrors.js index c52b2a22173c4..9b9681b2deee0 100644 --- a/tests/baselines/reference/superErrors.js +++ b/tests/baselines/reference/superErrors.js @@ -53,7 +53,11 @@ class RegisteredUser extends User { //// [superErrors.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superInCatchBlock1.js b/tests/baselines/reference/superInCatchBlock1.js index 17ac62b8491c5..bf8f9bd5e0263 100644 --- a/tests/baselines/reference/superInCatchBlock1.js +++ b/tests/baselines/reference/superInCatchBlock1.js @@ -15,7 +15,11 @@ class B extends A { //// [superInCatchBlock1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superInConstructorParam1.js b/tests/baselines/reference/superInConstructorParam1.js index 7f53128e99ed0..869dfde8e5133 100644 --- a/tests/baselines/reference/superInConstructorParam1.js +++ b/tests/baselines/reference/superInConstructorParam1.js @@ -12,7 +12,11 @@ class C extends B { //// [superInConstructorParam1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superInLambdas.js b/tests/baselines/reference/superInLambdas.js index 8c3d37efb3432..1e040f627c8f6 100644 --- a/tests/baselines/reference/superInLambdas.js +++ b/tests/baselines/reference/superInLambdas.js @@ -69,7 +69,11 @@ class RegisteredUser4 extends User { //// [superInLambdas.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superInObjectLiterals_ES5.js b/tests/baselines/reference/superInObjectLiterals_ES5.js index f31a2492f3d20..77f55772b6968 100644 --- a/tests/baselines/reference/superInObjectLiterals_ES5.js +++ b/tests/baselines/reference/superInObjectLiterals_ES5.js @@ -61,7 +61,11 @@ class B extends A { //// [superInObjectLiterals_ES5.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superNewCall1.js b/tests/baselines/reference/superNewCall1.js index 2b6231691b2e3..c532b4556c887 100644 --- a/tests/baselines/reference/superNewCall1.js +++ b/tests/baselines/reference/superNewCall1.js @@ -14,7 +14,11 @@ class B extends A { //// [superNewCall1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superPropertyAccess.js b/tests/baselines/reference/superPropertyAccess.js index 72353c27624a2..eb92e66a131ea 100644 --- a/tests/baselines/reference/superPropertyAccess.js +++ b/tests/baselines/reference/superPropertyAccess.js @@ -38,7 +38,11 @@ class MyDerived extends MyBase { //// [superPropertyAccess.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superPropertyAccess1.js b/tests/baselines/reference/superPropertyAccess1.js index 7e07c236eecf4..f15bdde29e27c 100644 --- a/tests/baselines/reference/superPropertyAccess1.js +++ b/tests/baselines/reference/superPropertyAccess1.js @@ -29,7 +29,11 @@ class D extends C { //// [superPropertyAccess1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superPropertyAccess2.js b/tests/baselines/reference/superPropertyAccess2.js index f07769923120d..98f1d0a190cb6 100644 --- a/tests/baselines/reference/superPropertyAccess2.js +++ b/tests/baselines/reference/superPropertyAccess2.js @@ -29,7 +29,11 @@ class D extends C { //// [superPropertyAccess2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superPropertyAccessInComputedPropertiesOfNestedType_ES5.js b/tests/baselines/reference/superPropertyAccessInComputedPropertiesOfNestedType_ES5.js index cb5e98ee2d2a7..d60310be5e7ed 100644 --- a/tests/baselines/reference/superPropertyAccessInComputedPropertiesOfNestedType_ES5.js +++ b/tests/baselines/reference/superPropertyAccessInComputedPropertiesOfNestedType_ES5.js @@ -16,7 +16,11 @@ class B extends A { //// [superPropertyAccessInComputedPropertiesOfNestedType_ES5.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superPropertyAccessNoError.js b/tests/baselines/reference/superPropertyAccessNoError.js index 0f4efbc719f34..d2829eba56154 100644 --- a/tests/baselines/reference/superPropertyAccessNoError.js +++ b/tests/baselines/reference/superPropertyAccessNoError.js @@ -78,7 +78,11 @@ instance.returnThis().fn(); //super.publicStaticMemberFunction in static member function of derived class //super.publicStaticMemberFunction in static member accessor(get and set) of derived class var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superPropertyAccess_ES5.js b/tests/baselines/reference/superPropertyAccess_ES5.js index 159b3b86c4c20..e8f4dd3f8725a 100644 --- a/tests/baselines/reference/superPropertyAccess_ES5.js +++ b/tests/baselines/reference/superPropertyAccess_ES5.js @@ -31,7 +31,11 @@ class B extends A { //// [superPropertyAccess_ES5.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superSymbolIndexedAccess5.js b/tests/baselines/reference/superSymbolIndexedAccess5.js index 43565251f792c..3c5aaf9b843bc 100644 --- a/tests/baselines/reference/superSymbolIndexedAccess5.js +++ b/tests/baselines/reference/superSymbolIndexedAccess5.js @@ -15,7 +15,11 @@ class Bar extends Foo { //// [superSymbolIndexedAccess5.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superSymbolIndexedAccess6.js b/tests/baselines/reference/superSymbolIndexedAccess6.js index 2f47d38660e60..ff11a4c1b6532 100644 --- a/tests/baselines/reference/superSymbolIndexedAccess6.js +++ b/tests/baselines/reference/superSymbolIndexedAccess6.js @@ -15,7 +15,11 @@ class Bar extends Foo { //// [superSymbolIndexedAccess6.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superWithGenericSpecialization.js b/tests/baselines/reference/superWithGenericSpecialization.js index e024285dc9ed3..8e23bfb25c4de 100644 --- a/tests/baselines/reference/superWithGenericSpecialization.js +++ b/tests/baselines/reference/superWithGenericSpecialization.js @@ -16,7 +16,11 @@ var r2: number = d.y; //// [superWithGenericSpecialization.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superWithGenerics.js b/tests/baselines/reference/superWithGenerics.js index c8c99ef56cfb7..5e83df296d25e 100644 --- a/tests/baselines/reference/superWithGenerics.js +++ b/tests/baselines/reference/superWithGenerics.js @@ -13,7 +13,11 @@ class D extends B { //// [superWithGenerics.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superWithTypeArgument.js b/tests/baselines/reference/superWithTypeArgument.js index 638b970d7ffef..51a4f93a4e402 100644 --- a/tests/baselines/reference/superWithTypeArgument.js +++ b/tests/baselines/reference/superWithTypeArgument.js @@ -11,7 +11,11 @@ class D extends C { //// [superWithTypeArgument.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superWithTypeArgument2.js b/tests/baselines/reference/superWithTypeArgument2.js index 4241cc6a699f3..3744e79761521 100644 --- a/tests/baselines/reference/superWithTypeArgument2.js +++ b/tests/baselines/reference/superWithTypeArgument2.js @@ -11,7 +11,11 @@ class D extends C { //// [superWithTypeArgument2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superWithTypeArgument3.js b/tests/baselines/reference/superWithTypeArgument3.js index 8f9d6252a873c..9f76cc1ecff6c 100644 --- a/tests/baselines/reference/superWithTypeArgument3.js +++ b/tests/baselines/reference/superWithTypeArgument3.js @@ -15,7 +15,11 @@ class D extends C { //// [superWithTypeArgument3.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/super_inside-object-literal-getters-and-setters.js b/tests/baselines/reference/super_inside-object-literal-getters-and-setters.js index e244f31832812..077affd0eda0b 100644 --- a/tests/baselines/reference/super_inside-object-literal-getters-and-setters.js +++ b/tests/baselines/reference/super_inside-object-literal-getters-and-setters.js @@ -29,7 +29,11 @@ class SuperObjectTest extends F { //// [super_inside-object-literal-getters-and-setters.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/switchStatements.js b/tests/baselines/reference/switchStatements.js index 20a9271267033..05a7fafb0465f 100644 --- a/tests/baselines/reference/switchStatements.js +++ b/tests/baselines/reference/switchStatements.js @@ -57,7 +57,11 @@ switch (((x: T) => '')(1)) { } //// [switchStatements.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/systemModuleWithSuperClass.js b/tests/baselines/reference/systemModuleWithSuperClass.js index cbb2b5d05dd09..e31370d0acd28 100644 --- a/tests/baselines/reference/systemModuleWithSuperClass.js +++ b/tests/baselines/reference/systemModuleWithSuperClass.js @@ -33,7 +33,11 @@ System.register([], function (exports_1, context_1) { System.register(["./foo"], function (exports_1, context_1) { "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/targetTypeBaseCalls.js b/tests/baselines/reference/targetTypeBaseCalls.js index 3c1daae5d31a2..d359aa916285f 100644 --- a/tests/baselines/reference/targetTypeBaseCalls.js +++ b/tests/baselines/reference/targetTypeBaseCalls.js @@ -20,7 +20,11 @@ class Bar extends Foo { constructor() { super(function(s) { s = 5 }) } } // err //// [targetTypeBaseCalls.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/thisInInvalidContexts.js b/tests/baselines/reference/thisInInvalidContexts.js index 5eaac48383c0c..6b16742cca21a 100644 --- a/tests/baselines/reference/thisInInvalidContexts.js +++ b/tests/baselines/reference/thisInInvalidContexts.js @@ -50,7 +50,11 @@ enum SomeEnum { //// [thisInInvalidContexts.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/thisInInvalidContextsExternalModule.js b/tests/baselines/reference/thisInInvalidContextsExternalModule.js index 788eb974e895a..68579bb23681b 100644 --- a/tests/baselines/reference/thisInInvalidContextsExternalModule.js +++ b/tests/baselines/reference/thisInInvalidContextsExternalModule.js @@ -51,7 +51,11 @@ export = this; // Should be an error //// [thisInInvalidContextsExternalModule.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/thisInSuperCall.js b/tests/baselines/reference/thisInSuperCall.js index f49a0b8eb6533..b8120fe732c26 100644 --- a/tests/baselines/reference/thisInSuperCall.js +++ b/tests/baselines/reference/thisInSuperCall.js @@ -24,7 +24,11 @@ class Foo3 extends Base { //// [thisInSuperCall.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/thisInSuperCall1.js b/tests/baselines/reference/thisInSuperCall1.js index bfc9d8b4f17b6..3adc1c2a5b3e5 100644 --- a/tests/baselines/reference/thisInSuperCall1.js +++ b/tests/baselines/reference/thisInSuperCall1.js @@ -12,7 +12,11 @@ class Foo extends Base { //// [thisInSuperCall1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/thisInSuperCall2.js b/tests/baselines/reference/thisInSuperCall2.js index df5dee1a3217e..f310654acaee4 100644 --- a/tests/baselines/reference/thisInSuperCall2.js +++ b/tests/baselines/reference/thisInSuperCall2.js @@ -21,7 +21,11 @@ class Foo2 extends Base { //// [thisInSuperCall2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/thisInSuperCall3.js b/tests/baselines/reference/thisInSuperCall3.js index ac47e685c3800..b0f4d62c746f9 100644 --- a/tests/baselines/reference/thisInSuperCall3.js +++ b/tests/baselines/reference/thisInSuperCall3.js @@ -14,7 +14,11 @@ class Foo extends Base { //// [thisInSuperCall3.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/thisTypeInFunctions.js b/tests/baselines/reference/thisTypeInFunctions.js index 3169e0cd06b22..ae95aac22b597 100644 --- a/tests/baselines/reference/thisTypeInFunctions.js +++ b/tests/baselines/reference/thisTypeInFunctions.js @@ -196,7 +196,11 @@ function missingTypeIsImplicitAny(this, a: number) { return this.anything + a; } //// [thisTypeInFunctions.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/thisTypeInFunctionsNegative.js b/tests/baselines/reference/thisTypeInFunctionsNegative.js index 4b936e0198fce..2591f9fe01936 100644 --- a/tests/baselines/reference/thisTypeInFunctionsNegative.js +++ b/tests/baselines/reference/thisTypeInFunctionsNegative.js @@ -178,7 +178,11 @@ c.explicitProperty = (this, m) => m + this.n; //// [thisTypeInFunctionsNegative.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/tsxCorrectlyParseLessThanComparison1.js b/tests/baselines/reference/tsxCorrectlyParseLessThanComparison1.js index 6cfb957dd39c8..b6c5295b48224 100644 --- a/tests/baselines/reference/tsxCorrectlyParseLessThanComparison1.js +++ b/tests/baselines/reference/tsxCorrectlyParseLessThanComparison1.js @@ -22,7 +22,11 @@ export class ShortDetails extends React.Component<{ id: number }, {}> { //// [tsxCorrectlyParseLessThanComparison1.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/tsxDynamicTagName5.js b/tests/baselines/reference/tsxDynamicTagName5.js index 200a8e2d78d04..3a1ac6d2246af 100644 --- a/tests/baselines/reference/tsxDynamicTagName5.js +++ b/tests/baselines/reference/tsxDynamicTagName5.js @@ -22,7 +22,11 @@ export class Text extends React.Component<{}, {}> { //// [app.jsx] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/tsxDynamicTagName7.js b/tests/baselines/reference/tsxDynamicTagName7.js index 717caa83310ec..f584dbf960a55 100644 --- a/tests/baselines/reference/tsxDynamicTagName7.js +++ b/tests/baselines/reference/tsxDynamicTagName7.js @@ -22,7 +22,11 @@ export class Text extends React.Component<{}, {}> { //// [app.jsx] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/tsxDynamicTagName8.js b/tests/baselines/reference/tsxDynamicTagName8.js index 725eeec032625..bf3ab5d4a6982 100644 --- a/tests/baselines/reference/tsxDynamicTagName8.js +++ b/tests/baselines/reference/tsxDynamicTagName8.js @@ -22,7 +22,11 @@ export class Text extends React.Component<{}, {}> { //// [app.jsx] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/tsxDynamicTagName9.js b/tests/baselines/reference/tsxDynamicTagName9.js index ff7e4a9a7e204..fefa118d704f7 100644 --- a/tests/baselines/reference/tsxDynamicTagName9.js +++ b/tests/baselines/reference/tsxDynamicTagName9.js @@ -22,7 +22,11 @@ export class Text extends React.Component<{}, {}> { //// [app.jsx] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/tsxExternalModuleEmit1.js b/tests/baselines/reference/tsxExternalModuleEmit1.js index 0d515ac211465..29f4e78100ee9 100644 --- a/tests/baselines/reference/tsxExternalModuleEmit1.js +++ b/tests/baselines/reference/tsxExternalModuleEmit1.js @@ -34,7 +34,11 @@ export class Button extends React.Component { //// [button.jsx] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -53,7 +57,11 @@ exports.Button = Button; //// [app.jsx] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/tsxStatelessFunctionComponents2.js b/tests/baselines/reference/tsxStatelessFunctionComponents2.js index 7352f7edef7eb..75284a28702cb 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponents2.js +++ b/tests/baselines/reference/tsxStatelessFunctionComponents2.js @@ -41,7 +41,11 @@ let i =
x.propertyNotOnHtmlDivElement} />; //// [file.jsx] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/tsxUnionTypeComponent1.js b/tests/baselines/reference/tsxUnionTypeComponent1.js index a832e26806e88..215046ba2b6ad 100644 --- a/tests/baselines/reference/tsxUnionTypeComponent1.js +++ b/tests/baselines/reference/tsxUnionTypeComponent1.js @@ -27,7 +27,11 @@ class MyButtonComponent extends React.Component<{},{}> { //// [file.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeAssertions.js b/tests/baselines/reference/typeAssertions.js index 9e7e39be71068..e3cf89b080052 100644 --- a/tests/baselines/reference/typeAssertions.js +++ b/tests/baselines/reference/typeAssertions.js @@ -53,7 +53,11 @@ if((numOrStr === undefined) as numOrStr is string) { // Error //// [typeAssertions.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardFunction.js b/tests/baselines/reference/typeGuardFunction.js index e261492d35f52..f16b6d1ce5af3 100644 --- a/tests/baselines/reference/typeGuardFunction.js +++ b/tests/baselines/reference/typeGuardFunction.js @@ -85,7 +85,11 @@ let union3: boolean | B = isA(union2) || union2; //// [typeGuardFunction.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardFunctionErrors.js b/tests/baselines/reference/typeGuardFunctionErrors.js index 2ceec7e12e2d3..3e9b8f08cd422 100644 --- a/tests/baselines/reference/typeGuardFunctionErrors.js +++ b/tests/baselines/reference/typeGuardFunctionErrors.js @@ -147,7 +147,11 @@ if (hasMissingParameter()) { //// [typeGuardFunctionErrors.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardFunctionGenerics.js b/tests/baselines/reference/typeGuardFunctionGenerics.js index a2b9df419ad7c..ffe263f998571 100644 --- a/tests/baselines/reference/typeGuardFunctionGenerics.js +++ b/tests/baselines/reference/typeGuardFunctionGenerics.js @@ -35,7 +35,11 @@ let test3: B = funE(isB, 1); //// [typeGuardFunctionGenerics.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardFunctionOfFormThis.js b/tests/baselines/reference/typeGuardFunctionOfFormThis.js index f9f102e06ae27..a1d1b7842d4d1 100644 --- a/tests/baselines/reference/typeGuardFunctionOfFormThis.js +++ b/tests/baselines/reference/typeGuardFunctionOfFormThis.js @@ -143,7 +143,11 @@ interface MimicGuardInterface { //// [typeGuardFunctionOfFormThis.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.js b/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.js index c1e5b6b0af1e3..7ec705bdc2d2e 100644 --- a/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.js +++ b/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.js @@ -61,7 +61,11 @@ else { //// [typeGuardFunctionOfFormThisErrors.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardOfFormInstanceOf.js b/tests/baselines/reference/typeGuardOfFormInstanceOf.js index 75f0ccdf49228..67d216d0f58d8 100644 --- a/tests/baselines/reference/typeGuardOfFormInstanceOf.js +++ b/tests/baselines/reference/typeGuardOfFormInstanceOf.js @@ -74,7 +74,11 @@ else { // it is a subtype of the type of x, or // - when false, has no effect on the type of x. var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardOfFormIsType.js b/tests/baselines/reference/typeGuardOfFormIsType.js index c48034dfc3676..88d0ac11a0907 100644 --- a/tests/baselines/reference/typeGuardOfFormIsType.js +++ b/tests/baselines/reference/typeGuardOfFormIsType.js @@ -39,7 +39,11 @@ var r2: C2 | D1 = isC1(c2Ord1) && c2Ord1; // C2 | D1 //// [typeGuardOfFormIsType.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardOfFormThisMember.js b/tests/baselines/reference/typeGuardOfFormThisMember.js index eaaa656a08ec9..6dc97fb0152d2 100644 --- a/tests/baselines/reference/typeGuardOfFormThisMember.js +++ b/tests/baselines/reference/typeGuardOfFormThisMember.js @@ -84,7 +84,11 @@ namespace Test { //// [typeGuardOfFormThisMember.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js b/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js index cb7fa087fe189..fbc2f23e547d0 100644 --- a/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js +++ b/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js @@ -34,7 +34,11 @@ namespace Test { //// [typeGuardOfFormThisMemberErrors.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeMatch2.js b/tests/baselines/reference/typeMatch2.js index 9721d17aac488..e4c7925a90bd7 100644 --- a/tests/baselines/reference/typeMatch2.js +++ b/tests/baselines/reference/typeMatch2.js @@ -46,7 +46,11 @@ function f4() { //// [typeMatch2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeOfSuperCall.js b/tests/baselines/reference/typeOfSuperCall.js index 7bad868e33c1a..9ac69544460f9 100644 --- a/tests/baselines/reference/typeOfSuperCall.js +++ b/tests/baselines/reference/typeOfSuperCall.js @@ -10,7 +10,11 @@ class D extends C { //// [typeOfSuperCall.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeParameterAsBaseClass.js b/tests/baselines/reference/typeParameterAsBaseClass.js index 4629854dd37c0..062ac61fd519c 100644 --- a/tests/baselines/reference/typeParameterAsBaseClass.js +++ b/tests/baselines/reference/typeParameterAsBaseClass.js @@ -4,7 +4,11 @@ class C2 implements T {} //// [typeParameterAsBaseClass.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeParameterAsBaseType.js b/tests/baselines/reference/typeParameterAsBaseType.js index 64d0f20c2f04f..e77c3b6e0d483 100644 --- a/tests/baselines/reference/typeParameterAsBaseType.js +++ b/tests/baselines/reference/typeParameterAsBaseType.js @@ -14,7 +14,11 @@ interface I2 extends U { } // type parameters cannot be used as base types // these are all errors var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeParameterExtendingUnion1.js b/tests/baselines/reference/typeParameterExtendingUnion1.js index 73efba3f0d7d3..5d15b09720fdc 100644 --- a/tests/baselines/reference/typeParameterExtendingUnion1.js +++ b/tests/baselines/reference/typeParameterExtendingUnion1.js @@ -14,7 +14,11 @@ function f(a: T) { //// [typeParameterExtendingUnion1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeParameterExtendingUnion2.js b/tests/baselines/reference/typeParameterExtendingUnion2.js index 17d8d02cd9a4d..d274169391f69 100644 --- a/tests/baselines/reference/typeParameterExtendingUnion2.js +++ b/tests/baselines/reference/typeParameterExtendingUnion2.js @@ -14,7 +14,11 @@ function f(a: T) { //// [typeParameterExtendingUnion2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeRelationships.js b/tests/baselines/reference/typeRelationships.js index 0d30916767e24..745e2dffe0035 100644 --- a/tests/baselines/reference/typeRelationships.js +++ b/tests/baselines/reference/typeRelationships.js @@ -42,7 +42,11 @@ class D extends C { //// [typeRelationships.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeValueConflict1.js b/tests/baselines/reference/typeValueConflict1.js index 3abbb5cd21b2d..c66ed5fbfd449 100644 --- a/tests/baselines/reference/typeValueConflict1.js +++ b/tests/baselines/reference/typeValueConflict1.js @@ -13,7 +13,11 @@ module M2 { //// [typeValueConflict1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeValueConflict2.js b/tests/baselines/reference/typeValueConflict2.js index 604acf71d1576..c72115d0dfcc6 100644 --- a/tests/baselines/reference/typeValueConflict2.js +++ b/tests/baselines/reference/typeValueConflict2.js @@ -20,7 +20,11 @@ module M3 { //// [typeValueConflict2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeofClass2.js b/tests/baselines/reference/typeofClass2.js index fb04510e23f74..46f9d7dc7f94a 100644 --- a/tests/baselines/reference/typeofClass2.js +++ b/tests/baselines/reference/typeofClass2.js @@ -23,7 +23,11 @@ var r2: typeof d; //// [typeofClass2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typesWithSpecializedCallSignatures.js b/tests/baselines/reference/typesWithSpecializedCallSignatures.js index e46c2a3c267b6..d011126edeb51 100644 --- a/tests/baselines/reference/typesWithSpecializedCallSignatures.js +++ b/tests/baselines/reference/typesWithSpecializedCallSignatures.js @@ -44,7 +44,11 @@ var r3: Base = c.foo('hm'); //// [typesWithSpecializedCallSignatures.js] // basic uses of specialized signatures without errors var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typesWithSpecializedConstructSignatures.js b/tests/baselines/reference/typesWithSpecializedConstructSignatures.js index 37fc51c3f3a3d..79cd99f249d32 100644 --- a/tests/baselines/reference/typesWithSpecializedConstructSignatures.js +++ b/tests/baselines/reference/typesWithSpecializedConstructSignatures.js @@ -42,7 +42,11 @@ var r3: Base = new a('hm'); //// [typesWithSpecializedConstructSignatures.js] // basic uses of specialized signatures without errors var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/undeclaredBase.js b/tests/baselines/reference/undeclaredBase.js index 3d07bc895717f..a96a892e9a27b 100644 --- a/tests/baselines/reference/undeclaredBase.js +++ b/tests/baselines/reference/undeclaredBase.js @@ -5,7 +5,11 @@ module M { export class C extends M.I { } } //// [undeclaredBase.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/undefinedIsSubtypeOfEverything.js b/tests/baselines/reference/undefinedIsSubtypeOfEverything.js index 393c5e24544e9..aa4fac8d6eb6a 100644 --- a/tests/baselines/reference/undefinedIsSubtypeOfEverything.js +++ b/tests/baselines/reference/undefinedIsSubtypeOfEverything.js @@ -124,7 +124,11 @@ class D17 extends Base { //// [undefinedIsSubtypeOfEverything.js] // undefined is a subtype of every other types, no errors expected below var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/underscoreMapFirst.js b/tests/baselines/reference/underscoreMapFirst.js index 3edb48cd2d1bf..4f3990b7b578b 100644 --- a/tests/baselines/reference/underscoreMapFirst.js +++ b/tests/baselines/reference/underscoreMapFirst.js @@ -50,7 +50,11 @@ class MyView extends View { //// [underscoreMapFirst.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/underscoreThisInDerivedClass01.js b/tests/baselines/reference/underscoreThisInDerivedClass01.js index c7f30f0ec87cf..439c33df0ec2c 100644 --- a/tests/baselines/reference/underscoreThisInDerivedClass01.js +++ b/tests/baselines/reference/underscoreThisInDerivedClass01.js @@ -26,7 +26,11 @@ class D extends C { //// [underscoreThisInDerivedClass01.js] // @target es5 var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/underscoreThisInDerivedClass02.js b/tests/baselines/reference/underscoreThisInDerivedClass02.js index 89d3bf5a4f9f6..26f2796e4b082 100644 --- a/tests/baselines/reference/underscoreThisInDerivedClass02.js +++ b/tests/baselines/reference/underscoreThisInDerivedClass02.js @@ -20,7 +20,11 @@ class D extends C { //// [underscoreThisInDerivedClass02.js] // @target es5 var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/unionTypeEquivalence.js b/tests/baselines/reference/unionTypeEquivalence.js index bcb1f28f12b08..1cafbc8d65ca5 100644 --- a/tests/baselines/reference/unionTypeEquivalence.js +++ b/tests/baselines/reference/unionTypeEquivalence.js @@ -21,7 +21,11 @@ var z1: string | typeof BC; //// [unionTypeEquivalence.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/unionTypeFromArrayLiteral.js b/tests/baselines/reference/unionTypeFromArrayLiteral.js index a908067574f95..12d524f8616c4 100644 --- a/tests/baselines/reference/unionTypeFromArrayLiteral.js +++ b/tests/baselines/reference/unionTypeFromArrayLiteral.js @@ -29,7 +29,11 @@ var arr9 = [e, f]; // (E|F)[] // Otherwise, if the array literal is contextually typed by a type that has a property with the numeric name ‘0’, the resulting type is a tuple type constructed from the types of the element expressions. // Otherwise, the resulting type is an array type with an element type that is the union of the types of the element expressions. var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/unionTypesAssignability.js b/tests/baselines/reference/unionTypesAssignability.js index 38c991bed6155..bf5c69f93e97e 100644 --- a/tests/baselines/reference/unionTypesAssignability.js +++ b/tests/baselines/reference/unionTypesAssignability.js @@ -75,7 +75,11 @@ function foo(t: T, u: U) { //// [unionTypesAssignability.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/unknownSymbols1.js b/tests/baselines/reference/unknownSymbols1.js index 9fed0f3a716f5..3768213892aad 100644 --- a/tests/baselines/reference/unknownSymbols1.js +++ b/tests/baselines/reference/unknownSymbols1.js @@ -34,7 +34,11 @@ class C5 { //// [unknownSymbols1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/unspecializedConstraints.js b/tests/baselines/reference/unspecializedConstraints.js index e4c102d882d8f..fbb4c157665e9 100644 --- a/tests/baselines/reference/unspecializedConstraints.js +++ b/tests/baselines/reference/unspecializedConstraints.js @@ -155,7 +155,11 @@ module ts { //// [unspecializedConstraints.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js b/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js index a651fdf7e8ef6..67e3d579dc429 100644 --- a/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js +++ b/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js @@ -45,7 +45,11 @@ c5(1); // error //// [untypedFunctionCallsWithTypeParameters1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/unusedClassesinNamespace4.js b/tests/baselines/reference/unusedClassesinNamespace4.js index bf5e996d2d24d..af2c9d96f52db 100644 --- a/tests/baselines/reference/unusedClassesinNamespace4.js +++ b/tests/baselines/reference/unusedClassesinNamespace4.js @@ -16,7 +16,11 @@ namespace Validation { //// [unusedClassesinNamespace4.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/unusedIdentifiersConsolidated1.js b/tests/baselines/reference/unusedIdentifiersConsolidated1.js index 6419fbe250bcd..7bea43688ad4e 100644 --- a/tests/baselines/reference/unusedIdentifiersConsolidated1.js +++ b/tests/baselines/reference/unusedIdentifiersConsolidated1.js @@ -104,7 +104,11 @@ namespace Greeter { //// [unusedIdentifiersConsolidated1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/validUseOfThisInSuper.js b/tests/baselines/reference/validUseOfThisInSuper.js index b5eecf1720df0..b32d9413bdf6a 100644 --- a/tests/baselines/reference/validUseOfThisInSuper.js +++ b/tests/baselines/reference/validUseOfThisInSuper.js @@ -11,7 +11,11 @@ class Super extends Base { //// [validUseOfThisInSuper.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/varArgsOnConstructorTypes.js b/tests/baselines/reference/varArgsOnConstructorTypes.js index 547260c619785..f9674ceb32880 100644 --- a/tests/baselines/reference/varArgsOnConstructorTypes.js +++ b/tests/baselines/reference/varArgsOnConstructorTypes.js @@ -26,7 +26,11 @@ reg.register(B); //// [varArgsOnConstructorTypes.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; From 570575ad43678509f94ce6cbc49b292be6440e9e Mon Sep 17 00:00:00 2001 From: vvakame Date: Sat, 3 Dec 2016 11:30:36 +0900 Subject: [PATCH 3/7] address #12622 --- src/compiler/transformers/es2015.ts | 10 ++-- ...sClassHeritageListMemberTypeAnnotations.js | 10 ++-- ...accessibleTypeInTypeParameterConstraint.js | 10 ++-- .../reference/abstractClassInLocalScope.js | 10 ++-- .../abstractClassInLocalScopeIsAbstract.js | 10 ++-- tests/baselines/reference/abstractProperty.js | 10 ++-- .../reference/abstractPropertyNegative.js | 10 ++-- .../accessOverriddenBaseClassMember1.js | 10 ++-- .../accessors_spec_section-4.5_inference.js | 10 ++-- .../reference/aliasUsageInAccessorsOfClass.js | 10 ++-- .../baselines/reference/aliasUsageInArray.js | 10 ++-- .../aliasUsageInFunctionExpression.js | 10 ++-- .../reference/aliasUsageInGenericFunction.js | 10 ++-- .../reference/aliasUsageInIndexerOfClass.js | 10 ++-- .../reference/aliasUsageInObjectLiteral.js | 10 ++-- .../reference/aliasUsageInOrExpression.js | 10 ++-- ...aliasUsageInTypeArgumentOfExtendsClause.js | 20 +++---- .../reference/aliasUsageInVarAssignment.js | 10 ++-- .../reference/ambiguousOverloadResolution.js | 10 ++-- .../reference/apparentTypeSubtyping.js | 10 ++-- .../reference/apparentTypeSupertype.js | 10 ++-- .../reference/arrayAssignmentTest1.js | 10 ++-- .../reference/arrayAssignmentTest2.js | 10 ++-- .../reference/arrayBestCommonTypes.js | 10 ++-- .../reference/arrayLiteralTypeInference.js | 10 ++-- tests/baselines/reference/arrayLiterals.js | 10 ++-- .../arrayLiteralsWithRecursiveGenerics.js | 10 ++-- ...rayOfSubtypeIsAssignableToReadonlyArray.js | 10 ++-- .../reference/arrowFunctionContexts.js | 10 ++-- .../assignmentCompatWithCallSignatures3.js | 10 ++-- .../assignmentCompatWithCallSignatures4.js | 10 ++-- .../assignmentCompatWithCallSignatures5.js | 10 ++-- .../assignmentCompatWithCallSignatures6.js | 10 ++-- ...ssignmentCompatWithConstructSignatures3.js | 10 ++-- ...ssignmentCompatWithConstructSignatures4.js | 10 ++-- ...ssignmentCompatWithConstructSignatures5.js | 10 ++-- ...ssignmentCompatWithConstructSignatures6.js | 10 ++-- .../assignmentCompatWithNumericIndexer.js | 10 ++-- .../assignmentCompatWithNumericIndexer3.js | 10 ++-- .../assignmentCompatWithObjectMembers4.js | 10 ++-- ...nmentCompatWithObjectMembersOptionality.js | 10 ++-- ...mentCompatWithObjectMembersOptionality2.js | 10 ++-- .../assignmentCompatWithStringIndexer.js | 10 ++-- .../reference/assignmentLHSIsValue.js | 10 ++-- .../reference/asyncImportedPromise_es5.js | 10 ++-- tests/baselines/reference/autolift4.js | 10 ++-- tests/baselines/reference/baseCheck.js | 10 ++-- .../reference/baseIndexSignatureResolution.js | 10 ++-- .../reference/baseTypeOrderChecking.js | 10 ++-- .../baseTypeWrappingInstantiationChain.js | 10 ++-- tests/baselines/reference/bases.js | 10 ++-- .../bestCommonTypeOfConditionalExpressions.js | 10 ++-- ...bestCommonTypeOfConditionalExpressions2.js | 10 ++-- .../reference/bestCommonTypeOfTuple2.js | 10 ++-- ...allSignatureAssignabilityInInheritance2.js | 10 ++-- ...allSignatureAssignabilityInInheritance3.js | 10 ++-- ...allSignatureAssignabilityInInheritance4.js | 10 ++-- ...allSignatureAssignabilityInInheritance5.js | 10 ++-- ...allSignatureAssignabilityInInheritance6.js | 10 ++-- tests/baselines/reference/callWithSpread.js | 10 ++-- .../reference/captureThisInSuperCall.js | 10 ++-- tests/baselines/reference/castingTuple.js | 10 ++-- .../baselines/reference/chainedAssignment3.js | 10 ++-- ...arameterConstrainedToOtherTypeParameter.js | 10 ++-- .../reference/checkForObjectTooStrict.js | 10 ++-- .../checkSuperCallBeforeThisAccessing1.js | 10 ++-- .../checkSuperCallBeforeThisAccessing2.js | 10 ++-- .../checkSuperCallBeforeThisAccessing3.js | 10 ++-- .../checkSuperCallBeforeThisAccessing4.js | 10 ++-- .../checkSuperCallBeforeThisAccessing5.js | 10 ++-- .../checkSuperCallBeforeThisAccessing6.js | 10 ++-- .../checkSuperCallBeforeThisAccessing7.js | 10 ++-- .../checkSuperCallBeforeThisAccessing8.js | 10 ++-- .../reference/circularImportAlias.js | 10 ++-- .../circularTypeofWithFunctionModule.js | 10 ++-- .../classAbstractConstructorAssignability.js | 10 ++-- .../reference/classAbstractCrashedOnce.js | 10 ++-- .../reference/classAbstractExtends.js | 10 ++-- .../reference/classAbstractFactoryFunction.js | 10 ++-- .../reference/classAbstractGeneric.js | 10 ++-- .../reference/classAbstractInAModule.js | 10 ++-- .../reference/classAbstractInheritance.js | 10 ++-- .../reference/classAbstractInstantiations1.js | 10 ++-- .../reference/classAbstractInstantiations2.js | 10 ++-- .../classAbstractOverrideWithAbstract.js | 10 ++-- .../reference/classAbstractSuperCalls.js | 10 ++-- .../classAbstractUsingAbstractMethod1.js | 10 ++-- .../classAbstractUsingAbstractMethods2.js | 10 ++-- .../classConstructorAccessibility2.js | 10 ++-- .../classConstructorAccessibility4.js | 10 ++-- .../classConstructorAccessibility5.js | 10 ++-- ...classConstructorParametersAccessibility.js | 10 ++-- ...lassConstructorParametersAccessibility2.js | 10 ++-- ...lassConstructorParametersAccessibility3.js | 10 ++-- ...clarationMergedInModuleWithContinuation.js | 10 ++-- .../classDeclaredBeforeClassFactory.js | 10 ++-- .../classDoesNotDependOnBaseTypes.js | 10 ++-- tests/baselines/reference/classExpression2.js | 10 ++-- tests/baselines/reference/classExpression3.js | 10 ++-- .../classExpressionExtendingAbstractClass.js | 10 ++-- .../reference/classExtendingBuiltinType.js | 10 ++-- .../reference/classExtendingClass.js | 10 ++-- .../reference/classExtendingClassLikeType.js | 10 ++-- .../reference/classExtendingNonConstructor.js | 10 ++-- .../baselines/reference/classExtendingNull.js | 10 ++-- .../reference/classExtendingPrimitive.js | 10 ++-- .../reference/classExtendingPrimitive2.js | 10 ++-- .../reference/classExtendingQualifiedName.js | 10 ++-- .../reference/classExtendingQualifiedName2.js | 10 ++-- .../reference/classExtendsAcrossFiles.js | 20 +++---- ...sMergedWithModuleNotReferingConstructor.js | 10 ++-- ...tendsClauseClassNotReferringConstructor.js | 10 ++-- .../reference/classExtendsEveryObjectType.js | 10 ++-- .../reference/classExtendsEveryObjectType2.js | 10 ++-- .../reference/classExtendsInterface.js | 10 ++-- .../classExtendsInterfaceInExpression.js | 10 ++-- .../classExtendsInterfaceInModule.js | 10 ++-- .../baselines/reference/classExtendsItself.js | 10 ++-- .../reference/classExtendsItselfIndirectly.js | 10 ++-- .../classExtendsItselfIndirectly2.js | 10 ++-- .../classExtendsItselfIndirectly3.js | 60 +++++++++---------- .../classExtendsMultipleBaseClasses.js | 10 ++-- tests/baselines/reference/classExtendsNull.js | 10 ++-- ...classExtendsShadowedConstructorFunction.js | 10 ++-- .../classExtendsValidConstructorFunction.js | 10 ++-- .../classHeritageWithTrailingSeparator.js | 10 ++-- .../reference/classImplementsClass2.js | 10 ++-- .../reference/classImplementsClass3.js | 10 ++-- .../reference/classImplementsClass4.js | 10 ++-- .../reference/classImplementsClass5.js | 10 ++-- .../reference/classImplementsClass6.js | 10 ++-- tests/baselines/reference/classIndexer3.js | 10 ++-- tests/baselines/reference/classInheritence.js | 10 ++-- .../reference/classIsSubtypeOfBaseType.js | 10 ++-- tests/baselines/reference/classOrder2.js | 10 ++-- tests/baselines/reference/classOrderBug.js | 10 ++-- .../reference/classSideInheritance1.js | 10 ++-- .../reference/classSideInheritance2.js | 10 ++-- .../reference/classSideInheritance3.js | 10 ++-- tests/baselines/reference/classUpdateTests.js | 10 ++-- .../classWithBaseClassButNoConstructor.js | 10 ++-- .../reference/classWithConstructors.js | 10 ++-- .../reference/classWithProtectedProperty.js | 10 ++-- .../reference/classWithStaticMembers.js | 10 ++-- tests/baselines/reference/classdecl.js | 10 ++-- .../reference/clodulesDerivedClasses.js | 10 ++-- ...llisionSuperAndLocalFunctionInAccessors.js | 10 ++-- ...isionSuperAndLocalFunctionInConstructor.js | 10 ++-- .../collisionSuperAndLocalFunctionInMethod.js | 10 ++-- ...ollisionSuperAndLocalFunctionInProperty.js | 10 ++-- .../collisionSuperAndLocalVarInAccessors.js | 10 ++-- .../collisionSuperAndLocalVarInConstructor.js | 10 ++-- .../collisionSuperAndLocalVarInMethod.js | 10 ++-- .../collisionSuperAndLocalVarInProperty.js | 10 ++-- .../collisionSuperAndNameResolution.js | 10 ++-- .../reference/collisionSuperAndParameter.js | 10 ++-- .../reference/collisionSuperAndParameter1.js | 10 ++-- ...perAndPropertyNameAsConstuctorParameter.js | 10 ++-- ...xpressionAndLocalVarWithSuperExperssion.js | 10 ++-- .../reference/commentsInheritance.js | 10 ++-- .../comparisonOperatorWithIdenticalObjects.js | 10 ++-- ...ithNoRelationshipObjectsOnCallSignature.js | 10 ++-- ...lationshipObjectsOnConstructorSignature.js | 10 ++-- ...thNoRelationshipObjectsOnIndexSignature.js | 10 ++-- ...nshipObjectsOnInstantiatedCallSignature.js | 10 ++-- ...jectsOnInstantiatedConstructorSignature.js | 10 ++-- ...peratorWithSubtypeObjectOnCallSignature.js | 10 ++-- ...WithSubtypeObjectOnConstructorSignature.js | 10 ++-- ...eratorWithSubtypeObjectOnIndexSignature.js | 10 ++-- ...ubtypeObjectOnInstantiatedCallSignature.js | 10 ++-- ...bjectOnInstantiatedConstructorSignature.js | 10 ++-- ...isonOperatorWithSubtypeObjectOnProperty.js | 10 ++-- .../reference/complexClassRelationships.js | 10 ++-- ...catedGenericRecursiveBaseClassReference.js | 10 ++-- .../reference/compoundAssignmentLHSIsValue.js | 10 ++-- ...poundExponentiationAssignmentLHSIsValue.js | 10 ++-- .../reference/computedPropertyNames24_ES5.js | 10 ++-- .../reference/computedPropertyNames25_ES5.js | 10 ++-- .../reference/computedPropertyNames26_ES5.js | 10 ++-- .../reference/computedPropertyNames27_ES5.js | 10 ++-- .../reference/computedPropertyNames28_ES5.js | 10 ++-- .../reference/computedPropertyNames30_ES5.js | 10 ++-- .../reference/computedPropertyNames31_ES5.js | 10 ++-- .../reference/computedPropertyNames43_ES5.js | 10 ++-- .../reference/computedPropertyNames44_ES5.js | 10 ++-- .../reference/computedPropertyNames45_ES5.js | 10 ++-- .../conditionalOperatorWithIdenticalBCT.js | 10 ++-- .../conditionalOperatorWithoutIdenticalBCT.js | 10 ++-- .../reference/constantOverloadFunction.js | 10 ++-- .../constantOverloadFunctionNoSubtypeError.js | 10 ++-- ...nstraintCheckInGenericBaseTypeReference.js | 10 ++-- ...uctSignatureAssignabilityInInheritance2.js | 10 ++-- ...uctSignatureAssignabilityInInheritance3.js | 10 ++-- ...uctSignatureAssignabilityInInheritance4.js | 10 ++-- ...uctSignatureAssignabilityInInheritance5.js | 10 ++-- ...uctSignatureAssignabilityInInheritance6.js | 10 ++-- tests/baselines/reference/constructorArgs.js | 10 ++-- ...uctorFunctionTypeIsAssignableToBaseType.js | 10 ++-- ...ctorFunctionTypeIsAssignableToBaseType2.js | 10 ++-- .../constructorHasPrototypeProperty.js | 10 ++-- .../reference/constructorOverloads2.js | 10 ++-- .../reference/constructorOverloads3.js | 10 ++-- .../reference/constructorWithCapturedSuper.js | 10 ++-- ...constructorWithIncompleteTypeAnnotation.js | 10 ++-- .../contextualTypingArrayOfLambdas.js | 10 ++-- ...contextualTypingOfConditionalExpression.js | 10 ++-- ...ontextualTypingOfConditionalExpression2.js | 10 ++-- ...urcePropertyIsRelatableToTargetProperty.js | 10 ++-- .../reference/declFileClassExtendsNull.js | 10 ++-- .../declFileForFunctionTypeAsTypeParameter.js | 10 ++-- ...ileGenericClassWithGenericExtendedClass.js | 10 ++-- .../reference/declFileGenericType.js | 10 ++-- .../reference/declFileGenericType2.js | 10 ++-- ...lictingWithClassReferredByExtendsClause.js | 10 ++-- ...dsClauseThatHasItsContainerNameConflict.js | 10 ++-- .../declarationEmitExpressionInExtends.js | 10 ++-- .../declarationEmitExpressionInExtends2.js | 10 ++-- .../declarationEmitExpressionInExtends3.js | 10 ++-- .../declarationEmitExpressionInExtends4.js | 10 ++-- .../declarationEmitNameConflicts3.js | 10 ++-- .../declarationEmitProtectedMembers.js | 10 ++-- .../declarationEmitThisPredicates01.js | 10 ++-- ...tionEmitThisPredicatesWithPrivateName01.js | 10 ++-- .../reference/declareDottedExtend.js | 10 ++-- .../reference/decoratorOnClassConstructor2.js | 10 ++-- .../reference/decoratorOnClassConstructor3.js | 10 ++-- .../reference/decoratorOnClassMethod12.js | 10 ++-- ...edClassConstructorWithExplicitReturns01.js | 10 ++-- ...tructorWithExplicitReturns01.sourcemap.txt | 10 ++-- ...derivedClassConstructorWithoutSuperCall.js | 10 ++-- ...ClassFunctionOverridesBaseClassAccessor.js | 10 ++-- .../derivedClassIncludesInheritedMembers.js | 10 ++-- ...idesIndexersWithAssignmentCompatibility.js | 10 ++-- .../derivedClassOverridesPrivateFunction1.js | 10 ++-- .../derivedClassOverridesPrivates.js | 10 ++-- .../derivedClassOverridesProtectedMembers.js | 10 ++-- .../derivedClassOverridesProtectedMembers2.js | 10 ++-- .../derivedClassOverridesProtectedMembers3.js | 10 ++-- .../derivedClassOverridesProtectedMembers4.js | 10 ++-- .../derivedClassOverridesPublicMembers.js | 10 ++-- .../derivedClassOverridesWithoutSubtype.js | 10 ++-- .../derivedClassParameterProperties.js | 10 ++-- ...dClassSuperCallsInNonConstructorMembers.js | 10 ++-- .../derivedClassSuperCallsWithThisArg.js | 10 ++-- .../reference/derivedClassTransitivity.js | 10 ++-- .../reference/derivedClassTransitivity2.js | 10 ++-- .../reference/derivedClassTransitivity3.js | 10 ++-- .../reference/derivedClassTransitivity4.js | 10 ++-- .../reference/derivedClassWithAny.js | 10 ++-- ...ivateInstanceShadowingProtectedInstance.js | 10 ++-- ...hPrivateInstanceShadowingPublicInstance.js | 10 ++-- ...thPrivateStaticShadowingProtectedStatic.js | 10 ++-- ...sWithPrivateStaticShadowingPublicStatic.js | 10 ++-- .../derivedClassWithoutExplicitConstructor.js | 10 ++-- ...derivedClassWithoutExplicitConstructor2.js | 10 ++-- ...derivedClassWithoutExplicitConstructor3.js | 10 ++-- tests/baselines/reference/derivedClasses.js | 10 ++-- .../reference/derivedGenericClassWithAny.js | 10 ++-- ...sesHiddenBaseCallViaSuperPropertyAccess.js | 10 ++-- .../derivedTypeDoesNotRequireExtendsClause.js | 10 ++-- .../destructuringParameterDeclaration5.js | 10 ++-- ...BeforeEmitParameterPropertyDeclaration1.js | 10 ++-- ...SuperCallBeforeEmitPropertyDeclaration1.js | 10 ++-- ...arationAndParameterPropertyDeclaration1.js | 10 ++-- .../reference/emitThisInSuperMethodCall.js | 10 ++-- tests/baselines/reference/emptyModuleName.js | 10 ++-- ...rorForwardReferenceForwadingConstructor.js | 10 ++-- tests/baselines/reference/errorSuperCalls.js | 10 ++-- .../reference/errorSuperPropertyAccess.js | 10 ++-- .../reference/errorsInGenericTypeReference.js | 10 ++-- .../reference/es6ClassSuperCodegenBug.js | 10 ++-- tests/baselines/reference/es6ClassTest.js | 10 ++-- tests/baselines/reference/es6ClassTest2.js | 10 ++-- tests/baselines/reference/es6ClassTest7.js | 10 ++-- .../exportAssignmentOfGenericType1.js | 10 ++-- .../exportDeclarationInInternalModule.js | 10 ++-- tests/baselines/reference/extBaseClass1.js | 10 ++-- tests/baselines/reference/extBaseClass2.js | 10 ++-- .../extendAndImplementTheSameBaseType.js | 10 ++-- .../extendAndImplementTheSameBaseType2.js | 10 ++-- .../extendBaseClassBeforeItsDeclared.js | 10 ++-- .../extendClassExpressionFromModule.js | 10 ++-- .../extendConstructSignatureInInterface.js | 10 ++-- .../reference/extendNonClassSymbol1.js | 10 ++-- .../reference/extendNonClassSymbol2.js | 10 ++-- .../extendPrivateConstructorClass.js | 10 ++-- ...xtendingClassFromAliasAndUsageInIndexer.js | 20 +++---- .../reference/extendsClauseAlreadySeen.js | 10 ++-- .../reference/extendsClauseAlreadySeen2.js | 10 ++-- tests/baselines/reference/fluentClasses.js | 10 ++-- tests/baselines/reference/for-inStatements.js | 10 ++-- .../reference/for-inStatementsInvalid.js | 10 ++-- .../forStatementsMultipleInvalidDecl.js | 10 ++-- .../reference/functionImplementationErrors.js | 10 ++-- .../reference/functionImplementations.js | 10 ++-- .../reference/functionSubtypingOfVarArgs.js | 10 ++-- .../reference/functionSubtypingOfVarArgs2.js | 10 ++-- .../reference/generatedContextualTyping.js | 10 ++-- .../genericBaseClassLiteralProperty.js | 10 ++-- .../genericBaseClassLiteralProperty2.js | 10 ++-- ...allWithConstraintsTypeArgumentInference.js | 10 ++-- .../genericCallWithObjectTypeArgs2.js | 10 ++-- ...icCallWithObjectTypeArgsAndConstraints2.js | 10 ++-- ...icCallWithObjectTypeArgsAndConstraints3.js | 10 ++-- .../genericCallbacksAndClassHierarchy.js | 10 ++-- .../genericClassExpressionInFunction.js | 10 ++-- ...sInheritsConstructorFromNonGenericClass.js | 10 ++-- ...cClassPropertyInheritanceSpecialization.js | 10 ++-- .../reference/genericClassStaticMethod.js | 10 ++-- tests/baselines/reference/genericClasses3.js | 10 ++-- ...genericConstraintOnExtendedBuiltinTypes.js | 10 ++-- ...enericConstraintOnExtendedBuiltinTypes2.js | 10 ++-- .../genericDerivedTypeWithSpecializedBase.js | 10 ++-- .../genericDerivedTypeWithSpecializedBase2.js | 10 ++-- .../genericInheritedDefaultConstructors.js | 10 ++-- .../reference/genericPrototypeProperty2.js | 10 ++-- .../reference/genericPrototypeProperty3.js | 10 ++-- ...ericRecursiveImplicitConstructorErrors2.js | 10 ++-- ...ericRecursiveImplicitConstructorErrors3.js | 10 ++-- .../reference/genericTypeAssertions2.js | 10 ++-- .../reference/genericTypeAssertions4.js | 10 ++-- .../reference/genericTypeAssertions6.js | 10 ++-- .../reference/genericTypeConstraints.js | 10 ++-- ...genericTypeReferenceWithoutTypeArgument.js | 10 ++-- ...enericTypeReferenceWithoutTypeArgument2.js | 10 ++-- .../genericWithIndexerOfTypeParameterType2.js | 10 ++-- .../reference/heterogeneousArrayLiterals.js | 10 ++-- .../reference/ifDoWhileStatements.js | 10 ++-- .../illegalSuperCallsInConstructor.js | 10 ++-- .../implementClausePrecedingExtends.js | 10 ++-- ...gAnInterfaceExtendingClassWithPrivates2.js | 10 ++-- ...AnInterfaceExtendingClassWithProtecteds.js | 10 ++-- .../baselines/reference/importAsBaseClass.js | 10 ++-- tests/baselines/reference/importHelpers.js | 10 ++-- .../reference/importHelpersNoHelpers.js | 10 ++-- .../reference/importHelpersNoModule.js | 10 ++-- .../reference/importShadowsGlobalName.js | 10 ++-- .../reference/importUsedInExtendsList1.js | 10 ++-- .../reference/indexerConstraints2.js | 10 ++-- .../reference/indirectSelfReference.js | 10 ++-- .../reference/indirectSelfReferenceGeneric.js | 10 ++-- .../infinitelyExpandingTypesNonGenericBase.js | 10 ++-- .../inheritFromGenericTypeParameter.js | 10 ++-- ...SameNamePrivatePropertiesFromSameOrigin.js | 10 ++-- tests/baselines/reference/inheritance.js | 10 ++-- tests/baselines/reference/inheritance1.js | 10 ++-- ...itanceGrandParentPrivateMemberCollision.js | 10 ++-- ...tPrivateMemberCollisionWithPublicMember.js | 10 ++-- ...tPublicMemberCollisionWithPrivateMember.js | 10 ++-- ...ritanceMemberAccessorOverridingAccessor.js | 10 ++-- ...heritanceMemberAccessorOverridingMethod.js | 10 ++-- ...ritanceMemberAccessorOverridingProperty.js | 10 ++-- ...inheritanceMemberFuncOverridingAccessor.js | 10 ++-- .../inheritanceMemberFuncOverridingMethod.js | 10 ++-- ...inheritanceMemberFuncOverridingProperty.js | 10 ++-- ...ritanceMemberPropertyOverridingAccessor.js | 10 ++-- ...heritanceMemberPropertyOverridingMethod.js | 10 ++-- ...ritanceMemberPropertyOverridingProperty.js | 10 ++-- .../inheritanceOfGenericConstructorMethod1.js | 10 ++-- .../inheritanceOfGenericConstructorMethod2.js | 10 ++-- ...ritanceStaticAccessorOverridingAccessor.js | 10 ++-- ...heritanceStaticAccessorOverridingMethod.js | 10 ++-- ...ritanceStaticAccessorOverridingProperty.js | 10 ++-- ...inheritanceStaticFuncOverridingAccessor.js | 10 ++-- ...eStaticFuncOverridingAccessorOfFuncType.js | 10 ++-- .../inheritanceStaticFuncOverridingMethod.js | 10 ++-- ...inheritanceStaticFuncOverridingProperty.js | 10 ++-- ...eStaticFuncOverridingPropertyOfFuncType.js | 10 ++-- ...taticFunctionOverridingInstanceProperty.js | 10 ++-- .../inheritanceStaticMembersCompatible.js | 10 ++-- .../inheritanceStaticMembersIncompatible.js | 10 ++-- ...ritanceStaticPropertyOverridingAccessor.js | 10 ++-- ...heritanceStaticPropertyOverridingMethod.js | 10 ++-- ...ritanceStaticPropertyOverridingProperty.js | 10 ++-- .../inheritedConstructorWithRestParams.js | 10 ++-- .../inheritedConstructorWithRestParams2.js | 10 ++-- .../inheritedModuleMembersForClodule.js | 10 ++-- .../reference/instanceOfAssignability.js | 10 ++-- ...nstancePropertiesInheritedIntoClassType.js | 10 ++-- .../reference/instanceSubtypeCheck2.js | 10 ++-- ...nstanceofWithStructurallyIdenticalTypes.js | 10 ++-- .../instantiatedReturnTypeContravariance.js | 10 ++-- .../reference/interfaceClassMerging.js | 10 ++-- .../reference/interfaceClassMerging2.js | 10 ++-- .../reference/interfaceExtendsClass1.js | 10 ++-- .../interfaceExtendsClassWithPrivate1.js | 10 ++-- .../interfaceExtendsClassWithPrivate2.js | 10 ++-- .../reference/interfaceImplementation8.js | 10 ++-- .../invalidModuleWithStatementsOfEveryKind.js | 10 ++-- .../invalidMultipleVariableDeclarations.js | 10 ++-- .../reference/invalidReturnStatements.js | 10 ++-- .../isolatedModulesImportExportElision.js | 10 ++-- tests/baselines/reference/jsxViaImport.js | 10 ++-- .../reference/keyofAndIndexedAccess.js | 10 ++-- tests/baselines/reference/lambdaArgCrash.js | 10 ++-- tests/baselines/reference/lift.js | 10 ++-- tests/baselines/reference/localTypes1.js | 10 ++-- tests/baselines/reference/m7Bugs.js | 10 ++-- .../reference/mergedDeclarations5.js | 10 ++-- .../reference/mergedDeclarations6.js | 10 ++-- .../mergedInheritedClassInterface.js | 10 ++-- .../mergedInterfacesWithInheritedPrivates2.js | 10 ++-- .../mergedInterfacesWithInheritedPrivates3.js | 10 ++-- .../missingPropertiesOfClassExpression.js | 10 ++-- tests/baselines/reference/moduleAsBaseType.js | 10 ++-- .../moduleImportedForTypeArgumentPosition.js | 10 ++-- .../moduleWithStatementsOfEveryKind.js | 10 ++-- .../reference/multipleInheritance.js | 10 ++-- .../mutuallyRecursiveGenericBaseTypes2.js | 10 ++-- .../noImplicitAnyMissingGetAccessor.js | 10 ++-- .../noImplicitAnyMissingSetAccessor.js | 10 ++-- ...enericClassExtendingGenericClassWithAny.js | 10 ++-- ...cIndexerConstrainsPropertyDeclarations2.js | 10 ++-- .../reference/numericIndexerConstraint3.js | 10 ++-- .../reference/numericIndexerConstraint4.js | 10 ++-- .../reference/numericIndexerTyping2.js | 10 ++-- ...objectCreationOfElementAccessExpression.js | 10 ++-- ...objectTypeHidingMembersOfExtendedObject.js | 10 ++-- ...objectTypesIdentityWithNumericIndexers1.js | 10 ++-- ...objectTypesIdentityWithNumericIndexers2.js | 10 ++-- ...objectTypesIdentityWithNumericIndexers3.js | 10 ++-- .../objectTypesIdentityWithPrivates.js | 10 ++-- .../objectTypesIdentityWithPrivates2.js | 10 ++-- .../objectTypesIdentityWithPrivates3.js | 10 ++-- .../objectTypesIdentityWithStringIndexers.js | 10 ++-- .../objectTypesIdentityWithStringIndexers2.js | 10 ++-- .../optionalConstructorArgInSuper.js | 10 ++-- tests/baselines/reference/optionalMethods.js | 10 ++-- .../reference/optionalParamArgsTest.js | 10 ++-- .../reference/optionalParamInOverride.js | 10 ++-- .../reference/optionalParameterProperty.js | 10 ++-- .../baselines/reference/outModuleConcatAmd.js | 10 ++-- .../outModuleConcatAmd.sourcemap.txt | 10 ++-- .../reference/outModuleConcatSystem.js | 10 ++-- .../outModuleConcatSystem.sourcemap.txt | 10 ++-- .../reference/outModuleTripleSlashRefs.js | 10 ++-- .../outModuleTripleSlashRefs.sourcemap.txt | 10 ++-- tests/baselines/reference/overload1.js | 10 ++-- .../overloadOnConstConstraintChecks1.js | 10 ++-- .../overloadOnConstConstraintChecks2.js | 10 ++-- .../overloadOnConstConstraintChecks3.js | 10 ++-- .../overloadOnConstConstraintChecks4.js | 10 ++-- .../overloadOnConstantsInvalidOverload1.js | 10 ++-- .../baselines/reference/overloadResolution.js | 10 ++-- .../overloadResolutionClassConstructors.js | 10 ++-- .../overloadResolutionConstructors.js | 10 ++-- .../reference/overloadingOnConstants1.js | 10 ++-- .../reference/overloadingOnConstants2.js | 10 ++-- .../overridingPrivateStaticMembers.js | 10 ++-- .../reference/parseErrorInHeritageClause1.js | 10 ++-- tests/baselines/reference/parser509630.js | 10 ++-- tests/baselines/reference/parserAstSpans1.js | 10 ++-- .../reference/parserClassDeclaration1.js | 10 ++-- .../reference/parserClassDeclaration3.js | 10 ++-- .../reference/parserClassDeclaration4.js | 10 ++-- .../reference/parserClassDeclaration5.js | 10 ++-- .../reference/parserClassDeclaration6.js | 10 ++-- ...rrorRecovery_ExtendsOrImplementsClause2.js | 10 ++-- ...rrorRecovery_ExtendsOrImplementsClause4.js | 10 ++-- ...rrorRecovery_ExtendsOrImplementsClause5.js | 10 ++-- .../parserGenericsInTypeContexts1.js | 10 ++-- .../parserGenericsInTypeContexts2.js | 10 ++-- .../baselines/reference/parserRealSource10.js | 10 ++-- .../baselines/reference/parserRealSource11.js | 10 ++-- tests/baselines/reference/parserharness.js | 10 ++-- ...artiallyAnnotatedFunctionInferenceError.js | 10 ++-- ...tatedFunctionInferenceWithTypeParameter.js | 10 ++-- tests/baselines/reference/primitiveMembers.js | 10 ++-- tests/baselines/reference/privacyClass.js | 10 ++-- .../privacyClassExtendsClauseDeclFile.js | 20 +++---- tests/baselines/reference/privacyGloClass.js | 10 ++-- .../reference/privateAccessInSubclass1.js | 10 ++-- .../privateInstanceMemberAccessibility.js | 10 ++-- ...tedMembersAreNotAccessibleDestructuring.js | 10 ++-- .../privateStaticMemberAccessibility.js | 10 ++-- .../privateStaticNotAccessibleInClodule2.js | 10 ++-- .../amd/testGlo.js | 10 ++-- .../node/testGlo.js | 10 ++-- .../reference/project/prologueEmit/amd/out.js | 10 ++-- .../project/prologueEmit/node/out.js | 10 ++-- .../amd/m'ain.js | 10 ++-- .../node/m'ain.js | 10 ++-- .../reference/propertiesAndIndexers.js | 10 ++-- tests/baselines/reference/propertyAccess.js | 10 ++-- ...tyAccessOnTypeParameterWithConstraints2.js | 10 ++-- ...tyAccessOnTypeParameterWithConstraints3.js | 10 ++-- ...tyAccessOnTypeParameterWithConstraints5.js | 10 ++-- ...sPropertyAccessibleWithinNestedSubclass.js | 10 ++-- ...PropertyAccessibleWithinNestedSubclass1.js | 10 ++-- ...edClassPropertyAccessibleWithinSubclass.js | 10 ++-- ...dClassPropertyAccessibleWithinSubclass2.js | 10 ++-- ...dClassPropertyAccessibleWithinSubclass3.js | 10 ++-- .../protectedInstanceMemberAccessibility.js | 10 ++-- tests/baselines/reference/protectedMembers.js | 10 ++-- ...icClassPropertyAccessibleWithinSubclass.js | 10 ++-- ...cClassPropertyAccessibleWithinSubclass2.js | 10 ++-- ...solution-does-not-affect-class-heritage.js | 10 ++-- .../readonlyConstructorAssignment.js | 10 ++-- .../reference/recursiveBaseCheck3.js | 10 ++-- .../reference/recursiveBaseCheck4.js | 10 ++-- .../reference/recursiveBaseCheck6.js | 10 ++-- .../recursiveBaseConstructorCreation1.js | 10 ++-- ...ssInstantiationsWithDefaultConstructors.js | 10 ++-- .../reference/recursiveClassReferenceTest.js | 10 ++-- .../recursiveClassReferenceTest.sourcemap.txt | 10 ++-- .../reference/recursiveComplicatedClasses.js | 10 ++-- ...sivelySpecializedConstructorDeclaration.js | 10 ++-- .../reference/reexportClassDefinition.js | 10 ++-- ...lassDeclarationWhenInBaseTypeResolution.js | 10 ++-- .../reference/returnInConstructor1.js | 10 ++-- tests/baselines/reference/returnStatements.js | 10 ++-- ...peCheckExtendedClassInsidePublicMethod2.js | 10 ++-- ...peCheckExtendedClassInsideStaticMethod1.js | 10 ++-- tests/baselines/reference/scopeTests.js | 10 ++-- .../reference/shadowPrivateMembers.js | 10 ++-- ...sWithDefaultConstructorAndExtendsClause.js | 10 ++-- ...tConstructorAndExtendsClause.sourcemap.txt | 10 ++-- .../specializedInheritedConstructors1.js | 10 ++-- .../specializedOverloadWithRestParameters.js | 10 ++-- tests/baselines/reference/staticFactory1.js | 10 ++-- .../baselines/reference/staticInheritance.js | 10 ++-- .../staticMemberAccessOffDerivedType1.js | 10 ++-- tests/baselines/reference/staticPropSuper.js | 10 ++-- .../reference/strictModeInConstructor.js | 10 ++-- .../reference/strictModeReservedWord.js | 10 ++-- ...trictModeReservedWordInClassDeclaration.js | 10 ++-- ...gIndexerConstrainsPropertyDeclarations2.js | 10 ++-- .../reference/subtypesOfTypeParameter.js | 10 ++-- .../subtypesOfTypeParameterWithConstraints.js | 10 ++-- ...subtypesOfTypeParameterWithConstraints4.js | 10 ++-- ...OfTypeParameterWithRecursiveConstraints.js | 10 ++-- .../reference/subtypingTransitivity.js | 10 ++-- .../reference/subtypingWithCallSignatures2.js | 10 ++-- .../reference/subtypingWithCallSignatures3.js | 10 ++-- .../reference/subtypingWithCallSignatures4.js | 10 ++-- .../subtypingWithConstructSignatures2.js | 10 ++-- .../subtypingWithConstructSignatures3.js | 10 ++-- .../subtypingWithConstructSignatures4.js | 10 ++-- .../subtypingWithConstructSignatures5.js | 10 ++-- .../subtypingWithConstructSignatures6.js | 10 ++-- .../reference/subtypingWithNumericIndexer.js | 10 ++-- .../reference/subtypingWithNumericIndexer3.js | 10 ++-- .../reference/subtypingWithNumericIndexer4.js | 10 ++-- .../reference/subtypingWithObjectMembers.js | 10 ++-- .../reference/subtypingWithObjectMembers4.js | 10 ++-- ...subtypingWithObjectMembersAccessibility.js | 10 ++-- ...ubtypingWithObjectMembersAccessibility2.js | 10 ++-- .../reference/subtypingWithStringIndexer.js | 10 ++-- .../reference/subtypingWithStringIndexer3.js | 10 ++-- .../reference/subtypingWithStringIndexer4.js | 10 ++-- tests/baselines/reference/super.js | 10 ++-- tests/baselines/reference/super1.js | 10 ++-- tests/baselines/reference/super2.js | 10 ++-- tests/baselines/reference/superAccess.js | 10 ++-- tests/baselines/reference/superAccess2.js | 10 ++-- .../reference/superAccessInFatArrow1.js | 10 ++-- .../reference/superCallArgsMustMatch.js | 10 ++-- .../reference/superCallAssignResult.js | 10 ++-- .../superCallBeforeThisAccessing1.js | 10 ++-- .../superCallBeforeThisAccessing2.js | 10 ++-- .../superCallBeforeThisAccessing3.js | 10 ++-- .../superCallBeforeThisAccessing4.js | 10 ++-- .../superCallBeforeThisAccessing5.js | 10 ++-- .../superCallBeforeThisAccessing6.js | 10 ++-- .../superCallBeforeThisAccessing7.js | 10 ++-- .../superCallBeforeThisAccessing8.js | 10 ++-- ...allFromClassThatDerivesFromGenericType1.js | 10 ++-- ...allFromClassThatDerivesFromGenericType2.js | 10 ++-- ...eButWithIncorrectNumberOfTypeArguments1.js | 10 ++-- ...sFromGenericTypeButWithNoTypeArguments1.js | 10 ++-- ...ivesNonGenericTypeButWithTypeArguments1.js | 10 ++-- .../reference/superCallInNonStaticMethod.js | 10 ++-- .../reference/superCallInStaticMethod.js | 10 ++-- .../superCallInsideClassDeclaration.js | 10 ++-- .../superCallInsideClassExpression.js | 10 ++-- .../superCallInsideObjectLiteralExpression.js | 10 ++-- .../reference/superCallOutsideConstructor.js | 10 ++-- .../superCallParameterContextualTyping1.js | 10 ++-- .../superCallParameterContextualTyping2.js | 10 ++-- .../superCallParameterContextualTyping3.js | 10 ++-- .../reference/superCallWithCommentEmit01.js | 10 ++-- .../superCallWithMissingBaseClass.js | 10 ++-- tests/baselines/reference/superCalls.js | 10 ++-- .../reference/superCallsInConstructor.js | 10 ++-- tests/baselines/reference/superErrors.js | 10 ++-- .../baselines/reference/superInCatchBlock1.js | 10 ++-- .../reference/superInConstructorParam1.js | 10 ++-- tests/baselines/reference/superInLambdas.js | 10 ++-- .../reference/superInObjectLiterals_ES5.js | 10 ++-- tests/baselines/reference/superNewCall1.js | 10 ++-- .../reference/superPropertyAccess.js | 10 ++-- .../reference/superPropertyAccess1.js | 10 ++-- .../reference/superPropertyAccess2.js | 10 ++-- ...essInComputedPropertiesOfNestedType_ES5.js | 10 ++-- .../reference/superPropertyAccessNoError.js | 10 ++-- .../reference/superPropertyAccess_ES5.js | 10 ++-- .../reference/superSymbolIndexedAccess5.js | 10 ++-- .../reference/superSymbolIndexedAccess6.js | 10 ++-- .../superWithGenericSpecialization.js | 10 ++-- .../baselines/reference/superWithGenerics.js | 10 ++-- .../reference/superWithTypeArgument.js | 10 ++-- .../reference/superWithTypeArgument2.js | 10 ++-- .../reference/superWithTypeArgument3.js | 10 ++-- ...side-object-literal-getters-and-setters.js | 10 ++-- tests/baselines/reference/switchStatements.js | 10 ++-- .../reference/systemModuleWithSuperClass.js | 10 ++-- .../reference/targetTypeBaseCalls.js | 10 ++-- .../reference/thisInInvalidContexts.js | 10 ++-- .../thisInInvalidContextsExternalModule.js | 10 ++-- tests/baselines/reference/thisInSuperCall.js | 10 ++-- tests/baselines/reference/thisInSuperCall1.js | 10 ++-- tests/baselines/reference/thisInSuperCall2.js | 10 ++-- tests/baselines/reference/thisInSuperCall3.js | 10 ++-- .../reference/thisTypeInFunctions.js | 10 ++-- .../reference/thisTypeInFunctionsNegative.js | 10 ++-- .../tsxCorrectlyParseLessThanComparison1.js | 10 ++-- .../baselines/reference/tsxDynamicTagName5.js | 10 ++-- .../baselines/reference/tsxDynamicTagName7.js | 10 ++-- .../baselines/reference/tsxDynamicTagName8.js | 10 ++-- .../baselines/reference/tsxDynamicTagName9.js | 10 ++-- .../reference/tsxExternalModuleEmit1.js | 20 +++---- .../tsxStatelessFunctionComponents2.js | 10 ++-- .../reference/tsxUnionTypeComponent1.js | 10 ++-- tests/baselines/reference/typeAssertions.js | 10 ++-- .../baselines/reference/typeGuardFunction.js | 10 ++-- .../reference/typeGuardFunctionErrors.js | 10 ++-- .../reference/typeGuardFunctionGenerics.js | 10 ++-- .../reference/typeGuardFunctionOfFormThis.js | 10 ++-- .../typeGuardFunctionOfFormThisErrors.js | 10 ++-- .../reference/typeGuardOfFormInstanceOf.js | 10 ++-- .../reference/typeGuardOfFormIsType.js | 10 ++-- .../reference/typeGuardOfFormThisMember.js | 10 ++-- .../typeGuardOfFormThisMemberErrors.js | 10 ++-- tests/baselines/reference/typeMatch2.js | 10 ++-- tests/baselines/reference/typeOfSuperCall.js | 10 ++-- .../reference/typeParameterAsBaseClass.js | 10 ++-- .../reference/typeParameterAsBaseType.js | 10 ++-- .../reference/typeParameterExtendingUnion1.js | 10 ++-- .../reference/typeParameterExtendingUnion2.js | 10 ++-- .../baselines/reference/typeRelationships.js | 10 ++-- .../baselines/reference/typeValueConflict1.js | 10 ++-- .../baselines/reference/typeValueConflict2.js | 10 ++-- tests/baselines/reference/typeofClass2.js | 10 ++-- .../typesWithSpecializedCallSignatures.js | 10 ++-- ...typesWithSpecializedConstructSignatures.js | 10 ++-- tests/baselines/reference/undeclaredBase.js | 10 ++-- .../undefinedIsSubtypeOfEverything.js | 10 ++-- .../baselines/reference/underscoreMapFirst.js | 10 ++-- .../underscoreThisInDerivedClass01.js | 10 ++-- .../underscoreThisInDerivedClass02.js | 10 ++-- .../reference/unionTypeEquivalence.js | 10 ++-- .../reference/unionTypeFromArrayLiteral.js | 10 ++-- .../reference/unionTypesAssignability.js | 10 ++-- tests/baselines/reference/unknownSymbols1.js | 10 ++-- .../reference/unspecializedConstraints.js | 10 ++-- ...untypedFunctionCallsWithTypeParameters1.js | 10 ++-- .../reference/unusedClassesinNamespace4.js | 10 ++-- .../unusedIdentifiersConsolidated1.js | 10 ++-- .../reference/validUseOfThisInSuper.js | 10 ++-- .../reference/varArgsOnConstructorTypes.js | 10 ++-- 660 files changed, 3350 insertions(+), 3350 deletions(-) diff --git a/src/compiler/transformers/es2015.ts b/src/compiler/transformers/es2015.ts index fff52a8705e65..727703074003a 100644 --- a/src/compiler/transformers/es2015.ts +++ b/src/compiler/transformers/es2015.ts @@ -3337,12 +3337,12 @@ namespace ts { scoped: false, priority: 0, text: ` + var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); };` diff --git a/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js b/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js index fb158c687ba69..e244964048a82 100644 --- a/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js +++ b/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js @@ -21,12 +21,12 @@ module A { //// [ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js b/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js index ec67e66bd3f1b..9df25d0ba4cb9 100644 --- a/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js +++ b/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js @@ -25,12 +25,12 @@ module A { //// [ExportClassWithInaccessibleTypeInTypeParameterConstraint.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/abstractClassInLocalScope.js b/tests/baselines/reference/abstractClassInLocalScope.js index 8e16f9ccc2967..f2b1a7e50070b 100644 --- a/tests/baselines/reference/abstractClassInLocalScope.js +++ b/tests/baselines/reference/abstractClassInLocalScope.js @@ -8,12 +8,12 @@ //// [abstractClassInLocalScope.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js b/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js index 40eae697b445c..612d1b4723022 100644 --- a/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js +++ b/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js @@ -8,12 +8,12 @@ //// [abstractClassInLocalScopeIsAbstract.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/abstractProperty.js b/tests/baselines/reference/abstractProperty.js index 900f7aebcdd55..f559b3c61234c 100644 --- a/tests/baselines/reference/abstractProperty.js +++ b/tests/baselines/reference/abstractProperty.js @@ -22,12 +22,12 @@ class C extends B { } //// [abstractProperty.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/abstractPropertyNegative.js b/tests/baselines/reference/abstractPropertyNegative.js index fa137057be457..73ae1427571d4 100644 --- a/tests/baselines/reference/abstractPropertyNegative.js +++ b/tests/baselines/reference/abstractPropertyNegative.js @@ -44,12 +44,12 @@ abstract class AbstractAccessorMismatch { //// [abstractPropertyNegative.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/accessOverriddenBaseClassMember1.js b/tests/baselines/reference/accessOverriddenBaseClassMember1.js index b468f1307df1e..5fdaacd464c53 100644 --- a/tests/baselines/reference/accessOverriddenBaseClassMember1.js +++ b/tests/baselines/reference/accessOverriddenBaseClassMember1.js @@ -16,12 +16,12 @@ class ColoredPoint extends Point { //// [accessOverriddenBaseClassMember1.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; 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 aacadd6589f9c..024c25a909f0c 100644 --- a/tests/baselines/reference/accessors_spec_section-4.5_inference.js +++ b/tests/baselines/reference/accessors_spec_section-4.5_inference.js @@ -25,12 +25,12 @@ class LanguageSpec_section_4_5_inference { } //// [accessors_spec_section-4.5_inference.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInAccessorsOfClass.js b/tests/baselines/reference/aliasUsageInAccessorsOfClass.js index df8662ac8cf3b..d84a03277ebfc 100644 --- a/tests/baselines/reference/aliasUsageInAccessorsOfClass.js +++ b/tests/baselines/reference/aliasUsageInAccessorsOfClass.js @@ -37,12 +37,12 @@ var Model = (function () { exports.Model = Model; //// [aliasUsage1_moduleA.js] "use strict"; +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInArray.js b/tests/baselines/reference/aliasUsageInArray.js index a8606050394f8..031be503cffa7 100644 --- a/tests/baselines/reference/aliasUsageInArray.js +++ b/tests/baselines/reference/aliasUsageInArray.js @@ -31,12 +31,12 @@ var Model = (function () { exports.Model = Model; //// [aliasUsageInArray_moduleA.js] "use strict"; +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInFunctionExpression.js b/tests/baselines/reference/aliasUsageInFunctionExpression.js index 2ce51261eaa77..f0207e82c867c 100644 --- a/tests/baselines/reference/aliasUsageInFunctionExpression.js +++ b/tests/baselines/reference/aliasUsageInFunctionExpression.js @@ -30,12 +30,12 @@ var Model = (function () { exports.Model = Model; //// [aliasUsageInFunctionExpression_moduleA.js] "use strict"; +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInGenericFunction.js b/tests/baselines/reference/aliasUsageInGenericFunction.js index 8e69665b03cf6..20b2028bbb1ec 100644 --- a/tests/baselines/reference/aliasUsageInGenericFunction.js +++ b/tests/baselines/reference/aliasUsageInGenericFunction.js @@ -34,12 +34,12 @@ var Model = (function () { exports.Model = Model; //// [aliasUsageInGenericFunction_moduleA.js] "use strict"; +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInIndexerOfClass.js b/tests/baselines/reference/aliasUsageInIndexerOfClass.js index cf96549def6a8..a8b77a8e6cb30 100644 --- a/tests/baselines/reference/aliasUsageInIndexerOfClass.js +++ b/tests/baselines/reference/aliasUsageInIndexerOfClass.js @@ -36,12 +36,12 @@ var Model = (function () { exports.Model = Model; //// [aliasUsageInIndexerOfClass_moduleA.js] "use strict"; +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInObjectLiteral.js b/tests/baselines/reference/aliasUsageInObjectLiteral.js index d660bf2db67cd..00b7a231897f4 100644 --- a/tests/baselines/reference/aliasUsageInObjectLiteral.js +++ b/tests/baselines/reference/aliasUsageInObjectLiteral.js @@ -31,12 +31,12 @@ var Model = (function () { exports.Model = Model; //// [aliasUsageInObjectLiteral_moduleA.js] "use strict"; +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInOrExpression.js b/tests/baselines/reference/aliasUsageInOrExpression.js index e81917ed8a326..fe73404e8b458 100644 --- a/tests/baselines/reference/aliasUsageInOrExpression.js +++ b/tests/baselines/reference/aliasUsageInOrExpression.js @@ -34,12 +34,12 @@ var Model = (function () { exports.Model = Model; //// [aliasUsageInOrExpression_moduleA.js] "use strict"; +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js b/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js index ee4a62008b156..17b73079f001a 100644 --- a/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js +++ b/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js @@ -34,12 +34,12 @@ var Model = (function () { exports.Model = Model; //// [aliasUsageInTypeArgumentOfExtendsClause_moduleA.js] "use strict"; +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -54,12 +54,12 @@ var VisualizationModel = (function (_super) { exports.VisualizationModel = VisualizationModel; //// [aliasUsageInTypeArgumentOfExtendsClause_main.js] "use strict"; +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInVarAssignment.js b/tests/baselines/reference/aliasUsageInVarAssignment.js index 83c9bf080be38..9a88c68421f2c 100644 --- a/tests/baselines/reference/aliasUsageInVarAssignment.js +++ b/tests/baselines/reference/aliasUsageInVarAssignment.js @@ -30,12 +30,12 @@ var Model = (function () { exports.Model = Model; //// [aliasUsageInVarAssignment_moduleA.js] "use strict"; +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/ambiguousOverloadResolution.js b/tests/baselines/reference/ambiguousOverloadResolution.js index 319d3a75d01e2..3af1905dc03ec 100644 --- a/tests/baselines/reference/ambiguousOverloadResolution.js +++ b/tests/baselines/reference/ambiguousOverloadResolution.js @@ -9,12 +9,12 @@ var x: B; var t: number = f(x, x); // Not an error //// [ambiguousOverloadResolution.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/apparentTypeSubtyping.js b/tests/baselines/reference/apparentTypeSubtyping.js index 8cc81a46cd71a..2f5a3f8147eaf 100644 --- a/tests/baselines/reference/apparentTypeSubtyping.js +++ b/tests/baselines/reference/apparentTypeSubtyping.js @@ -24,12 +24,12 @@ class Derived2 extends Base2 { // error because of the prototy //// [apparentTypeSubtyping.js] // subtype checks use the apparent type of the target type // S is a subtype of a type T, and T is a supertype of S, if one of the following is true, where S' denotes the apparent type (section 3.8.1) of S: +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/apparentTypeSupertype.js b/tests/baselines/reference/apparentTypeSupertype.js index ba5d63e357903..dfc3414aef1cb 100644 --- a/tests/baselines/reference/apparentTypeSupertype.js +++ b/tests/baselines/reference/apparentTypeSupertype.js @@ -14,12 +14,12 @@ class Derived extends Base { // error //// [apparentTypeSupertype.js] // subtype checks use the apparent type of the target type // S is a subtype of a type T, and T is a supertype of S, if one of the following is true, where S' denotes the apparent type (section 3.8.1) of S: +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/arrayAssignmentTest1.js b/tests/baselines/reference/arrayAssignmentTest1.js index ac8ada2d86f1f..f2254fea5308f 100644 --- a/tests/baselines/reference/arrayAssignmentTest1.js +++ b/tests/baselines/reference/arrayAssignmentTest1.js @@ -86,12 +86,12 @@ arr_any = c3; // should be an error - is arr_any = i1; // should be an error - is //// [arrayAssignmentTest1.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/arrayAssignmentTest2.js b/tests/baselines/reference/arrayAssignmentTest2.js index a112a5a7a908c..90aa6740f4bc7 100644 --- a/tests/baselines/reference/arrayAssignmentTest2.js +++ b/tests/baselines/reference/arrayAssignmentTest2.js @@ -60,12 +60,12 @@ arr_any = i1; // should be an error - is //// [arrayAssignmentTest2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/arrayBestCommonTypes.js b/tests/baselines/reference/arrayBestCommonTypes.js index 9ce41a2563aab..8d2fe2376a36a 100644 --- a/tests/baselines/reference/arrayBestCommonTypes.js +++ b/tests/baselines/reference/arrayBestCommonTypes.js @@ -108,12 +108,12 @@ module NonEmptyTypes { //// [arrayBestCommonTypes.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/arrayLiteralTypeInference.js b/tests/baselines/reference/arrayLiteralTypeInference.js index a14277c795b68..37d0d1084f7b9 100644 --- a/tests/baselines/reference/arrayLiteralTypeInference.js +++ b/tests/baselines/reference/arrayLiteralTypeInference.js @@ -52,12 +52,12 @@ var z3: { id: number }[] = //// [arrayLiteralTypeInference.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/arrayLiterals.js b/tests/baselines/reference/arrayLiterals.js index 1e5dcd2e45e8c..d43db0f637686 100644 --- a/tests/baselines/reference/arrayLiterals.js +++ b/tests/baselines/reference/arrayLiterals.js @@ -38,12 +38,12 @@ var context4: Base[] = [new Derived1(), new Derived1()]; //// [arrayLiterals.js] // Empty array literal with no contextual type has type Undefined[] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js b/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js index e6e097c8b44d2..939878aa0863b 100644 --- a/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js +++ b/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js @@ -26,12 +26,12 @@ var myDerivedList: DerivedList; var as = [list, myDerivedList]; // List[] //// [arrayLiteralsWithRecursiveGenerics.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js b/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js index 701811e33de63..352e31d085125 100644 --- a/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js +++ b/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js @@ -20,12 +20,12 @@ rrb = cra; // error: 'A' is not assignable to 'B' //// [arrayOfSubtypeIsAssignableToReadonlyArray.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/arrowFunctionContexts.js b/tests/baselines/reference/arrowFunctionContexts.js index e425ebf93377e..b5e2cde6760d2 100644 --- a/tests/baselines/reference/arrowFunctionContexts.js +++ b/tests/baselines/reference/arrowFunctionContexts.js @@ -97,12 +97,12 @@ var asserted2: any; //// [arrowFunctionContexts.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures3.js b/tests/baselines/reference/assignmentCompatWithCallSignatures3.js index f241b28597da1..fcc7e402296e0 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures3.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures3.js @@ -101,12 +101,12 @@ b18 = a18; // ok //// [assignmentCompatWithCallSignatures3.js] // these are all permitted with the current rules, since we do not do contextual signature instantiation +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures4.js b/tests/baselines/reference/assignmentCompatWithCallSignatures4.js index eade43f4dc8a8..066f2e5ead2ff 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures4.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures4.js @@ -100,12 +100,12 @@ module Errors { //// [assignmentCompatWithCallSignatures4.js] // These are mostly permitted with the current loose rules. All ok unless otherwise noted. +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures5.js b/tests/baselines/reference/assignmentCompatWithCallSignatures5.js index 36a024cbd3fbb..2d1d545bb429e 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures5.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures5.js @@ -67,12 +67,12 @@ b18 = a18; // ok //// [assignmentCompatWithCallSignatures5.js] // checking assignment compat for function types. No errors in this file +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures6.js b/tests/baselines/reference/assignmentCompatWithCallSignatures6.js index eb727863c77d9..83f2834021018 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures6.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures6.js @@ -44,12 +44,12 @@ b16 = x.a16; //// [assignmentCompatWithCallSignatures6.js] // checking assignment compatibility relations for function types. All valid +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js index bff2b84f273d6..d0349f1734f21 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js @@ -101,12 +101,12 @@ b18 = a18; // ok //// [assignmentCompatWithConstructSignatures3.js] // checking assignment compatibility relations for function types. All of these are valid. +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js index 8aefc846d9b0f..b5d1804c1da05 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js @@ -100,12 +100,12 @@ module Errors { //// [assignmentCompatWithConstructSignatures4.js] // checking assignment compatibility relations for function types. +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js index b21074b8ff34b..ecec65f380f68 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js @@ -67,12 +67,12 @@ b18 = a18; // ok //// [assignmentCompatWithConstructSignatures5.js] // checking assignment compat for function types. All valid +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js index 95f585e892969..610d893c36909 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js @@ -44,12 +44,12 @@ b16 = x.a16; //// [assignmentCompatWithConstructSignatures6.js] // checking assignment compatibility relations for function types. All valid. +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer.js b/tests/baselines/reference/assignmentCompatWithNumericIndexer.js index 05dce80507d8b..5380e982fead1 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer.js +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer.js @@ -45,12 +45,12 @@ module Generics { //// [assignmentCompatWithNumericIndexer.js] // Derived type indexer must be subtype of base type indexer +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js b/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js index 7785aa2b01f4f..e2346a740552c 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js @@ -42,12 +42,12 @@ module Generics { //// [assignmentCompatWithNumericIndexer3.js] // Derived type indexer must be subtype of base type indexer +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers4.js b/tests/baselines/reference/assignmentCompatWithObjectMembers4.js index dbc0612153f95..39faa9a62c474 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers4.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers4.js @@ -93,12 +93,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 __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js index fcbea350773b9..2fb80642d9e20 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js @@ -90,12 +90,12 @@ module SourceHasOptional { //// [assignmentCompatWithObjectMembersOptionality.js] // Derived member is not optional but base member is, should be ok +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js index 91f212c9fd9e6..82a90a3c4de79 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js @@ -92,12 +92,12 @@ module SourceHasOptional { //// [assignmentCompatWithObjectMembersOptionality2.js] // M is optional and S contains no property with the same name as M // N is optional and T contains no property with the same name as N +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithStringIndexer.js b/tests/baselines/reference/assignmentCompatWithStringIndexer.js index a0fb08df8d2c9..b59fa359b8e78 100644 --- a/tests/baselines/reference/assignmentCompatWithStringIndexer.js +++ b/tests/baselines/reference/assignmentCompatWithStringIndexer.js @@ -55,12 +55,12 @@ module Generics { //// [assignmentCompatWithStringIndexer.js] // index signatures must be compatible in assignments +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentLHSIsValue.js b/tests/baselines/reference/assignmentLHSIsValue.js index e4fa0fcc6b7bf..84dbed907d733 100644 --- a/tests/baselines/reference/assignmentLHSIsValue.js +++ b/tests/baselines/reference/assignmentLHSIsValue.js @@ -71,12 +71,12 @@ foo() = value; (foo()) = value; //// [assignmentLHSIsValue.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/asyncImportedPromise_es5.js b/tests/baselines/reference/asyncImportedPromise_es5.js index a90d4254c6166..55bff7302db49 100644 --- a/tests/baselines/reference/asyncImportedPromise_es5.js +++ b/tests/baselines/reference/asyncImportedPromise_es5.js @@ -11,12 +11,12 @@ class Test { //// [task.js] "use strict"; +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/autolift4.js b/tests/baselines/reference/autolift4.js index d516e1e9b7b68..9d7dcaefd2904 100644 --- a/tests/baselines/reference/autolift4.js +++ b/tests/baselines/reference/autolift4.js @@ -24,12 +24,12 @@ class Point3D extends Point { //// [autolift4.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/baseCheck.js b/tests/baselines/reference/baseCheck.js index 9684189d565be..29e4c9fdc4d62 100644 --- a/tests/baselines/reference/baseCheck.js +++ b/tests/baselines/reference/baseCheck.js @@ -30,12 +30,12 @@ function f() { //// [baseCheck.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/baseIndexSignatureResolution.js b/tests/baselines/reference/baseIndexSignatureResolution.js index b1cb7c05ffc30..8ccd2e5f335db 100644 --- a/tests/baselines/reference/baseIndexSignatureResolution.js +++ b/tests/baselines/reference/baseIndexSignatureResolution.js @@ -25,12 +25,12 @@ var z: Derived = b.foo(); */ //// [baseIndexSignatureResolution.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/baseTypeOrderChecking.js b/tests/baselines/reference/baseTypeOrderChecking.js index 5f7f6550ab927..e408805edb837 100644 --- a/tests/baselines/reference/baseTypeOrderChecking.js +++ b/tests/baselines/reference/baseTypeOrderChecking.js @@ -37,12 +37,12 @@ class Class4 extends Class3 //// [baseTypeOrderChecking.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/baseTypeWrappingInstantiationChain.js b/tests/baselines/reference/baseTypeWrappingInstantiationChain.js index 822c9584e1f81..bb55cc0f9a450 100644 --- a/tests/baselines/reference/baseTypeWrappingInstantiationChain.js +++ b/tests/baselines/reference/baseTypeWrappingInstantiationChain.js @@ -28,12 +28,12 @@ class C extends CBase { //// [baseTypeWrappingInstantiationChain.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/bases.js b/tests/baselines/reference/bases.js index e45b934f1ade8..1962e4d824468 100644 --- a/tests/baselines/reference/bases.js +++ b/tests/baselines/reference/bases.js @@ -21,12 +21,12 @@ new C().y; //// [bases.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js index c5e124e638a7d..c43bfc7177f2d 100644 --- a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js +++ b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js @@ -29,12 +29,12 @@ function foo5(t: T, u: U): Object { //// [bestCommonTypeOfConditionalExpressions.js] // conditional expressions return the best common type of the branches plus contextual type (using the first candidate if multiple BCTs exist) // no errors expected here +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js index 1390eeb5a5dc4..0df9198a447e1 100644 --- a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js +++ b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js @@ -27,12 +27,12 @@ function foo3(t: T, u: U) { //// [bestCommonTypeOfConditionalExpressions2.js] // conditional expressions return the best common type of the branches plus contextual type (using the first candidate if multiple BCTs exist) // these are errors +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/bestCommonTypeOfTuple2.js b/tests/baselines/reference/bestCommonTypeOfTuple2.js index 17c9242e6aa78..18b903bea7058 100644 --- a/tests/baselines/reference/bestCommonTypeOfTuple2.js +++ b/tests/baselines/reference/bestCommonTypeOfTuple2.js @@ -23,12 +23,12 @@ var e51 = t5[2]; // {} //// [bestCommonTypeOfTuple2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js index 3d7d1167db531..1bf31ad90280b 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js @@ -71,12 +71,12 @@ interface I extends A { //// [callSignatureAssignabilityInInheritance2.js] // checking subtype relations for function types as it relates to contextual signature instantiation +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js index 8674a9def64c7..704ddfe5adf77 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js @@ -116,12 +116,12 @@ module Errors { //// [callSignatureAssignabilityInInheritance3.js] // checking subtype relations for function types as it relates to contextual signature instantiation // error cases +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js index 3173b6bd6615f..db8c0fa0b52bb 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js @@ -51,12 +51,12 @@ interface I extends A { //// [callSignatureAssignabilityInInheritance4.js] // checking subtype relations for function types as it relates to contextual signature instantiation +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js index b1c387fb3e7a3..eca44c3c59fdd 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js @@ -51,12 +51,12 @@ interface I extends B { //// [callSignatureAssignabilityInInheritance5.js] // checking subtype relations for function types as it relates to contextual signature instantiation // same as subtypingWithCallSignatures2 just with an extra level of indirection in the inheritance chain +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js index 1b7688262cb40..c17b84f859464 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js @@ -54,12 +54,12 @@ interface I9 extends A { // checking subtype relations for function types as it relates to contextual signature instantiation // same as subtypingWithCallSignatures4 but using class type parameters instead of generic signatures // all are errors +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/callWithSpread.js b/tests/baselines/reference/callWithSpread.js index c5d6bbf2401d8..00bf93a092d81 100644 --- a/tests/baselines/reference/callWithSpread.js +++ b/tests/baselines/reference/callWithSpread.js @@ -59,12 +59,12 @@ class D extends C { //// [callWithSpread.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/captureThisInSuperCall.js b/tests/baselines/reference/captureThisInSuperCall.js index 062d50e8ad95d..43f8e8964dff0 100644 --- a/tests/baselines/reference/captureThisInSuperCall.js +++ b/tests/baselines/reference/captureThisInSuperCall.js @@ -9,12 +9,12 @@ class B extends A { } //// [captureThisInSuperCall.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/castingTuple.js b/tests/baselines/reference/castingTuple.js index 4b45f444f5449..b4916cdbd654e 100644 --- a/tests/baselines/reference/castingTuple.js +++ b/tests/baselines/reference/castingTuple.js @@ -33,12 +33,12 @@ t4[2] = 10; //// [castingTuple.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/chainedAssignment3.js b/tests/baselines/reference/chainedAssignment3.js index 6c8453c23488d..cb313122a9a12 100644 --- a/tests/baselines/reference/chainedAssignment3.js +++ b/tests/baselines/reference/chainedAssignment3.js @@ -23,12 +23,12 @@ a = b = new A(); //// [chainedAssignment3.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js index 769f74d39ae04..b56e5a9320600 100644 --- a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js +++ b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js @@ -20,12 +20,12 @@ class C extends B { (new Chain(new A)).then(a => new B).then(b => new C).then(c => new B).then(b => new A); //// [chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkForObjectTooStrict.js b/tests/baselines/reference/checkForObjectTooStrict.js index cd65885b1522f..243022a81c294 100644 --- a/tests/baselines/reference/checkForObjectTooStrict.js +++ b/tests/baselines/reference/checkForObjectTooStrict.js @@ -32,12 +32,12 @@ class Baz extends Object { //// [checkForObjectTooStrict.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js index fece927ea9c8b..d1dc6839b8ffe 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js @@ -11,12 +11,12 @@ class Derived extends Based { } //// [checkSuperCallBeforeThisAccessing1.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js index 143514be551f9..6fe42a6993462 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js @@ -11,12 +11,12 @@ class Derived extends Based { } //// [checkSuperCallBeforeThisAccessing2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js index a080d62434fdd..642ded30216d7 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js @@ -16,12 +16,12 @@ class Derived extends Based { } //// [checkSuperCallBeforeThisAccessing3.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js index 2309600b2b814..1b9b1fd2b03b5 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js @@ -20,12 +20,12 @@ class Derived extends Based { } //// [checkSuperCallBeforeThisAccessing4.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js index cc3838fd40d87..76853f4a210b4 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js @@ -8,12 +8,12 @@ class Derived extends Based { } //// [checkSuperCallBeforeThisAccessing5.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js index e6183330d97e8..4c2e04c46df8b 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js @@ -11,12 +11,12 @@ class Super extends Base { } //// [checkSuperCallBeforeThisAccessing6.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js index 3040a118a757e..d67fb3451f095 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js @@ -10,12 +10,12 @@ class Super extends Base { } //// [checkSuperCallBeforeThisAccessing7.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js index 899128b6836b2..9bcf0ba166806 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js @@ -11,12 +11,12 @@ class Super extends Base { } //// [checkSuperCallBeforeThisAccessing8.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/circularImportAlias.js b/tests/baselines/reference/circularImportAlias.js index 6f2d3213aeb2c..154b0c8c68dca 100644 --- a/tests/baselines/reference/circularImportAlias.js +++ b/tests/baselines/reference/circularImportAlias.js @@ -21,12 +21,12 @@ var c = new B.a.C(); //// [circularImportAlias.js] // expected no error +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/circularTypeofWithFunctionModule.js b/tests/baselines/reference/circularTypeofWithFunctionModule.js index 92403f0cb6b65..357ce10188c53 100644 --- a/tests/baselines/reference/circularTypeofWithFunctionModule.js +++ b/tests/baselines/reference/circularTypeofWithFunctionModule.js @@ -14,12 +14,12 @@ namespace maker { //// [circularTypeofWithFunctionModule.js] // Repro from #6072 +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractConstructorAssignability.js b/tests/baselines/reference/classAbstractConstructorAssignability.js index 704ff554a008c..915055bc991cf 100644 --- a/tests/baselines/reference/classAbstractConstructorAssignability.js +++ b/tests/baselines/reference/classAbstractConstructorAssignability.js @@ -15,12 +15,12 @@ new BB; new CC; //// [classAbstractConstructorAssignability.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractCrashedOnce.js b/tests/baselines/reference/classAbstractCrashedOnce.js index 107d827436977..e9a60f8c713e1 100644 --- a/tests/baselines/reference/classAbstractCrashedOnce.js +++ b/tests/baselines/reference/classAbstractCrashedOnce.js @@ -11,12 +11,12 @@ class bar extends foo { var x = new bar(); //// [classAbstractCrashedOnce.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractExtends.js b/tests/baselines/reference/classAbstractExtends.js index f9fa0ba2b3242..1d5967b96a928 100644 --- a/tests/baselines/reference/classAbstractExtends.js +++ b/tests/baselines/reference/classAbstractExtends.js @@ -17,12 +17,12 @@ class E extends B { } //// [classAbstractExtends.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractFactoryFunction.js b/tests/baselines/reference/classAbstractFactoryFunction.js index addb71da71712..c07390da7dd6b 100644 --- a/tests/baselines/reference/classAbstractFactoryFunction.js +++ b/tests/baselines/reference/classAbstractFactoryFunction.js @@ -18,12 +18,12 @@ NewB(A); NewB(B); //// [classAbstractFactoryFunction.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractGeneric.js b/tests/baselines/reference/classAbstractGeneric.js index 486fe97f83820..46406731e59ec 100644 --- a/tests/baselines/reference/classAbstractGeneric.js +++ b/tests/baselines/reference/classAbstractGeneric.js @@ -26,12 +26,12 @@ class G extends A { } //// [classAbstractGeneric.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractInAModule.js b/tests/baselines/reference/classAbstractInAModule.js index 4681a422c8d2b..1c76bd43fb535 100644 --- a/tests/baselines/reference/classAbstractInAModule.js +++ b/tests/baselines/reference/classAbstractInAModule.js @@ -8,12 +8,12 @@ new M.A; new M.B; //// [classAbstractInAModule.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractInheritance.js b/tests/baselines/reference/classAbstractInheritance.js index ebaef77181a5e..dbf585c86d295 100644 --- a/tests/baselines/reference/classAbstractInheritance.js +++ b/tests/baselines/reference/classAbstractInheritance.js @@ -22,12 +22,12 @@ class FF extends CC {} abstract class GG extends CC {} //// [classAbstractInheritance.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractInstantiations1.js b/tests/baselines/reference/classAbstractInstantiations1.js index 96a0c1207be71..22732bdc2b487 100644 --- a/tests/baselines/reference/classAbstractInstantiations1.js +++ b/tests/baselines/reference/classAbstractInstantiations1.js @@ -28,12 +28,12 @@ c = new B; // // Calling new with (non)abstract classes. // +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractInstantiations2.js b/tests/baselines/reference/classAbstractInstantiations2.js index 3b93e78aebd0c..13dd7957aeb13 100644 --- a/tests/baselines/reference/classAbstractInstantiations2.js +++ b/tests/baselines/reference/classAbstractInstantiations2.js @@ -52,12 +52,12 @@ class H { // error -- not declared abstract } //// [classAbstractInstantiations2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractOverrideWithAbstract.js b/tests/baselines/reference/classAbstractOverrideWithAbstract.js index 59cd1186ef9d9..c8b1d61aa9ebe 100644 --- a/tests/baselines/reference/classAbstractOverrideWithAbstract.js +++ b/tests/baselines/reference/classAbstractOverrideWithAbstract.js @@ -24,12 +24,12 @@ class DD extends BB { } //// [classAbstractOverrideWithAbstract.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractSuperCalls.js b/tests/baselines/reference/classAbstractSuperCalls.js index c63b2673713bc..9d46086bc70ff 100644 --- a/tests/baselines/reference/classAbstractSuperCalls.js +++ b/tests/baselines/reference/classAbstractSuperCalls.js @@ -28,12 +28,12 @@ abstract class BB extends AA { //// [classAbstractSuperCalls.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractUsingAbstractMethod1.js b/tests/baselines/reference/classAbstractUsingAbstractMethod1.js index 421f3278489d7..56644d06a79d9 100644 --- a/tests/baselines/reference/classAbstractUsingAbstractMethod1.js +++ b/tests/baselines/reference/classAbstractUsingAbstractMethod1.js @@ -18,12 +18,12 @@ a = new C; // error, cannot instantiate abstract class. a.foo(); //// [classAbstractUsingAbstractMethod1.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractUsingAbstractMethods2.js b/tests/baselines/reference/classAbstractUsingAbstractMethods2.js index 397d5a3a411e1..011df09e258b3 100644 --- a/tests/baselines/reference/classAbstractUsingAbstractMethods2.js +++ b/tests/baselines/reference/classAbstractUsingAbstractMethods2.js @@ -28,12 +28,12 @@ class DD extends AA { } //// [classAbstractUsingAbstractMethods2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classConstructorAccessibility2.js b/tests/baselines/reference/classConstructorAccessibility2.js index 6cbf33cddffc8..c4e4b15bf3cdf 100644 --- a/tests/baselines/reference/classConstructorAccessibility2.js +++ b/tests/baselines/reference/classConstructorAccessibility2.js @@ -47,12 +47,12 @@ var dc = new DerivedC(1); //// [classConstructorAccessibility2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classConstructorAccessibility4.js b/tests/baselines/reference/classConstructorAccessibility4.js index 61ce64ef19bde..3946dcb82de77 100644 --- a/tests/baselines/reference/classConstructorAccessibility4.js +++ b/tests/baselines/reference/classConstructorAccessibility4.js @@ -31,12 +31,12 @@ class D { } //// [classConstructorAccessibility4.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classConstructorAccessibility5.js b/tests/baselines/reference/classConstructorAccessibility5.js index 8d0f9ad40699d..6226c80750ef3 100644 --- a/tests/baselines/reference/classConstructorAccessibility5.js +++ b/tests/baselines/reference/classConstructorAccessibility5.js @@ -12,12 +12,12 @@ class Unrelated { //// [classConstructorAccessibility5.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classConstructorParametersAccessibility.js b/tests/baselines/reference/classConstructorParametersAccessibility.js index 2433a6d39347c..26fc8fcfe3d6a 100644 --- a/tests/baselines/reference/classConstructorParametersAccessibility.js +++ b/tests/baselines/reference/classConstructorParametersAccessibility.js @@ -27,12 +27,12 @@ class Derived extends C3 { //// [classConstructorParametersAccessibility.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classConstructorParametersAccessibility2.js b/tests/baselines/reference/classConstructorParametersAccessibility2.js index b29e3f0650376..6d4806414843c 100644 --- a/tests/baselines/reference/classConstructorParametersAccessibility2.js +++ b/tests/baselines/reference/classConstructorParametersAccessibility2.js @@ -27,12 +27,12 @@ class Derived extends C3 { //// [classConstructorParametersAccessibility2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classConstructorParametersAccessibility3.js b/tests/baselines/reference/classConstructorParametersAccessibility3.js index 10031b9c74e02..898b475f5ff4b 100644 --- a/tests/baselines/reference/classConstructorParametersAccessibility3.js +++ b/tests/baselines/reference/classConstructorParametersAccessibility3.js @@ -14,12 +14,12 @@ var d: Derived; d.p; // public, OK //// [classConstructorParametersAccessibility3.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js b/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js index 1521745f9510b..e9208d7d78367 100644 --- a/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js +++ b/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js @@ -12,12 +12,12 @@ module M { } //// [classDeclarationMergedInModuleWithContinuation.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classDeclaredBeforeClassFactory.js b/tests/baselines/reference/classDeclaredBeforeClassFactory.js index 24df98a089f40..ca548e2ecd7df 100644 --- a/tests/baselines/reference/classDeclaredBeforeClassFactory.js +++ b/tests/baselines/reference/classDeclaredBeforeClassFactory.js @@ -8,12 +8,12 @@ function makeBaseClass() { //// [classDeclaredBeforeClassFactory.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classDoesNotDependOnBaseTypes.js b/tests/baselines/reference/classDoesNotDependOnBaseTypes.js index 88a1ab19d141b..b154c47f70c10 100644 --- a/tests/baselines/reference/classDoesNotDependOnBaseTypes.js +++ b/tests/baselines/reference/classDoesNotDependOnBaseTypes.js @@ -13,12 +13,12 @@ class StringTreeCollectionBase { class StringTreeCollection extends StringTreeCollectionBase { } //// [classDoesNotDependOnBaseTypes.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExpression2.js b/tests/baselines/reference/classExpression2.js index 86d4509310de4..1243b96721924 100644 --- a/tests/baselines/reference/classExpression2.js +++ b/tests/baselines/reference/classExpression2.js @@ -3,12 +3,12 @@ class D { } var v = class C extends D {}; //// [classExpression2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExpression3.js b/tests/baselines/reference/classExpression3.js index 0d999b57a1a48..7564c6274b357 100644 --- a/tests/baselines/reference/classExpression3.js +++ b/tests/baselines/reference/classExpression3.js @@ -7,12 +7,12 @@ c.c; //// [classExpression3.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExpressionExtendingAbstractClass.js b/tests/baselines/reference/classExpressionExtendingAbstractClass.js index 3c9db5e28ac3a..b44fb0a1dc871 100644 --- a/tests/baselines/reference/classExpressionExtendingAbstractClass.js +++ b/tests/baselines/reference/classExpressionExtendingAbstractClass.js @@ -9,12 +9,12 @@ var C = class extends A { // no error reported! //// [classExpressionExtendingAbstractClass.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingBuiltinType.js b/tests/baselines/reference/classExtendingBuiltinType.js index d2be7a12da2a6..b492f64c68076 100644 --- a/tests/baselines/reference/classExtendingBuiltinType.js +++ b/tests/baselines/reference/classExtendingBuiltinType.js @@ -12,12 +12,12 @@ class C10 extends Array { } //// [classExtendingBuiltinType.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingClass.js b/tests/baselines/reference/classExtendingClass.js index a81efb38bd037..c00c6ead988f2 100644 --- a/tests/baselines/reference/classExtendingClass.js +++ b/tests/baselines/reference/classExtendingClass.js @@ -32,12 +32,12 @@ var r7 = d2.thing(''); var r8 = D2.other(1); //// [classExtendingClass.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingClassLikeType.js b/tests/baselines/reference/classExtendingClassLikeType.js index 7760490a2442b..e1f083888489f 100644 --- a/tests/baselines/reference/classExtendingClassLikeType.js +++ b/tests/baselines/reference/classExtendingClassLikeType.js @@ -59,12 +59,12 @@ class D5 extends getBadBase() { //// [classExtendingClassLikeType.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingNonConstructor.js b/tests/baselines/reference/classExtendingNonConstructor.js index d14663b4edcb5..5cdf91d1b2062 100644 --- a/tests/baselines/reference/classExtendingNonConstructor.js +++ b/tests/baselines/reference/classExtendingNonConstructor.js @@ -15,12 +15,12 @@ class C7 extends foo { } //// [classExtendingNonConstructor.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingNull.js b/tests/baselines/reference/classExtendingNull.js index 9ce3714c1bd2b..087a16b352516 100644 --- a/tests/baselines/reference/classExtendingNull.js +++ b/tests/baselines/reference/classExtendingNull.js @@ -4,12 +4,12 @@ class C2 extends (null) { } //// [classExtendingNull.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingPrimitive.js b/tests/baselines/reference/classExtendingPrimitive.js index 9e1a855379cac..642ab4671afa9 100644 --- a/tests/baselines/reference/classExtendingPrimitive.js +++ b/tests/baselines/reference/classExtendingPrimitive.js @@ -16,12 +16,12 @@ class C8 extends E { } //// [classExtendingPrimitive.js] // classes cannot extend primitives +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingPrimitive2.js b/tests/baselines/reference/classExtendingPrimitive2.js index ff7f19fc68d76..6b56f16547f03 100644 --- a/tests/baselines/reference/classExtendingPrimitive2.js +++ b/tests/baselines/reference/classExtendingPrimitive2.js @@ -6,12 +6,12 @@ class C5a extends null { } //// [classExtendingPrimitive2.js] // classes cannot extend primitives +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingQualifiedName.js b/tests/baselines/reference/classExtendingQualifiedName.js index 9a7d4551cf3a2..f144f13c5b8ef 100644 --- a/tests/baselines/reference/classExtendingQualifiedName.js +++ b/tests/baselines/reference/classExtendingQualifiedName.js @@ -8,12 +8,12 @@ module M { } //// [classExtendingQualifiedName.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingQualifiedName2.js b/tests/baselines/reference/classExtendingQualifiedName2.js index adf590b680425..6c07a40580421 100644 --- a/tests/baselines/reference/classExtendingQualifiedName2.js +++ b/tests/baselines/reference/classExtendingQualifiedName2.js @@ -8,12 +8,12 @@ module M { } //// [classExtendingQualifiedName2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsAcrossFiles.js b/tests/baselines/reference/classExtendsAcrossFiles.js index 4559814254932..b3584f425114b 100644 --- a/tests/baselines/reference/classExtendsAcrossFiles.js +++ b/tests/baselines/reference/classExtendsAcrossFiles.js @@ -21,12 +21,12 @@ export const b = { //// [b.js] "use strict"; +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -50,12 +50,12 @@ exports.b = { }; //// [a.js] "use strict"; +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js b/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js index 187108fcf5465..56d13af039d59 100644 --- a/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js +++ b/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js @@ -14,12 +14,12 @@ module Foo { } //// [classExtendsClauseClassMergedWithModuleNotReferingConstructor.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.js b/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.js index 4d63c45f2c9cb..7f529967cda89 100644 --- a/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.js +++ b/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.js @@ -7,12 +7,12 @@ module Foo { //// [classExtendsClauseClassNotReferringConstructor.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsEveryObjectType.js b/tests/baselines/reference/classExtendsEveryObjectType.js index e5b5651153c5d..6babd7fb0b38e 100644 --- a/tests/baselines/reference/classExtendsEveryObjectType.js +++ b/tests/baselines/reference/classExtendsEveryObjectType.js @@ -17,12 +17,12 @@ class C5 extends foo { } // error class C6 extends []{ } // error //// [classExtendsEveryObjectType.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsEveryObjectType2.js b/tests/baselines/reference/classExtendsEveryObjectType2.js index 9e935e789e4bc..9777735d4a964 100644 --- a/tests/baselines/reference/classExtendsEveryObjectType2.js +++ b/tests/baselines/reference/classExtendsEveryObjectType2.js @@ -4,12 +4,12 @@ class C2 extends { foo: string; } { } // error class C6 extends []{ } // error //// [classExtendsEveryObjectType2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsInterface.js b/tests/baselines/reference/classExtendsInterface.js index 6816708202126..b432989752827 100644 --- a/tests/baselines/reference/classExtendsInterface.js +++ b/tests/baselines/reference/classExtendsInterface.js @@ -9,12 +9,12 @@ class B2 implements Comparable2 {} //// [classExtendsInterface.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsInterfaceInExpression.js b/tests/baselines/reference/classExtendsInterfaceInExpression.js index fa433e139c7a6..2d6b25bea3730 100644 --- a/tests/baselines/reference/classExtendsInterfaceInExpression.js +++ b/tests/baselines/reference/classExtendsInterfaceInExpression.js @@ -9,12 +9,12 @@ class C extends factory(A) {} //// [classExtendsInterfaceInExpression.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsInterfaceInModule.js b/tests/baselines/reference/classExtendsInterfaceInModule.js index 933c5162477cb..89ed504296449 100644 --- a/tests/baselines/reference/classExtendsInterfaceInModule.js +++ b/tests/baselines/reference/classExtendsInterfaceInModule.js @@ -16,12 +16,12 @@ class D extends Mod.Nested.I {} //// [classExtendsInterfaceInModule.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsItself.js b/tests/baselines/reference/classExtendsItself.js index e13cd6dee6e81..29f029bd62659 100644 --- a/tests/baselines/reference/classExtendsItself.js +++ b/tests/baselines/reference/classExtendsItself.js @@ -6,12 +6,12 @@ class D extends D { } // error class E extends E { } // error //// [classExtendsItself.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsItselfIndirectly.js b/tests/baselines/reference/classExtendsItselfIndirectly.js index bef7ca9f8cfbb..a12b90dce44c4 100644 --- a/tests/baselines/reference/classExtendsItselfIndirectly.js +++ b/tests/baselines/reference/classExtendsItselfIndirectly.js @@ -12,12 +12,12 @@ class D2 extends C2 { bar: T; } class E2 extends D2 { baz: T; } //// [classExtendsItselfIndirectly.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsItselfIndirectly2.js b/tests/baselines/reference/classExtendsItselfIndirectly2.js index e9df1ddf908d7..1a073528bad5d 100644 --- a/tests/baselines/reference/classExtendsItselfIndirectly2.js +++ b/tests/baselines/reference/classExtendsItselfIndirectly2.js @@ -23,12 +23,12 @@ module O { } //// [classExtendsItselfIndirectly2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsItselfIndirectly3.js b/tests/baselines/reference/classExtendsItselfIndirectly3.js index a324fa1ce724d..c42b937a85c92 100644 --- a/tests/baselines/reference/classExtendsItselfIndirectly3.js +++ b/tests/baselines/reference/classExtendsItselfIndirectly3.js @@ -19,12 +19,12 @@ class D2 extends C2 { bar: T; } class E2 extends D2 { baz: T; } //// [classExtendsItselfIndirectly_file1.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -36,12 +36,12 @@ var C = (function (_super) { return C; }(E)); // error //// [classExtendsItselfIndirectly_file2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -53,12 +53,12 @@ var D = (function (_super) { return D; }(C)); //// [classExtendsItselfIndirectly_file3.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -70,12 +70,12 @@ var E = (function (_super) { return E; }(D)); //// [classExtendsItselfIndirectly_file4.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -87,12 +87,12 @@ var C2 = (function (_super) { return C2; }(E2)); // error //// [classExtendsItselfIndirectly_file5.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -104,12 +104,12 @@ var D2 = (function (_super) { return D2; }(C2)); //// [classExtendsItselfIndirectly_file6.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsMultipleBaseClasses.js b/tests/baselines/reference/classExtendsMultipleBaseClasses.js index 7cef2b247ccc3..7028383c34975 100644 --- a/tests/baselines/reference/classExtendsMultipleBaseClasses.js +++ b/tests/baselines/reference/classExtendsMultipleBaseClasses.js @@ -4,12 +4,12 @@ class B { } class C extends A,B { } //// [classExtendsMultipleBaseClasses.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsNull.js b/tests/baselines/reference/classExtendsNull.js index 5171dbc0085ed..d68d39a1acba0 100644 --- a/tests/baselines/reference/classExtendsNull.js +++ b/tests/baselines/reference/classExtendsNull.js @@ -13,12 +13,12 @@ class D extends null { } //// [classExtendsNull.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsShadowedConstructorFunction.js b/tests/baselines/reference/classExtendsShadowedConstructorFunction.js index ad16e0aacaa0f..9dd314f8c1dda 100644 --- a/tests/baselines/reference/classExtendsShadowedConstructorFunction.js +++ b/tests/baselines/reference/classExtendsShadowedConstructorFunction.js @@ -9,12 +9,12 @@ module M { } //// [classExtendsShadowedConstructorFunction.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsValidConstructorFunction.js b/tests/baselines/reference/classExtendsValidConstructorFunction.js index 4e284b0c64c79..603fd5d6997d9 100644 --- a/tests/baselines/reference/classExtendsValidConstructorFunction.js +++ b/tests/baselines/reference/classExtendsValidConstructorFunction.js @@ -6,12 +6,12 @@ var x = new foo(); // can be used as a constructor function class C extends foo { } // error, cannot extend it though //// [classExtendsValidConstructorFunction.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classHeritageWithTrailingSeparator.js b/tests/baselines/reference/classHeritageWithTrailingSeparator.js index 3314583f338c4..087696113d4f0 100644 --- a/tests/baselines/reference/classHeritageWithTrailingSeparator.js +++ b/tests/baselines/reference/classHeritageWithTrailingSeparator.js @@ -4,12 +4,12 @@ class D extends C, { } //// [classHeritageWithTrailingSeparator.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classImplementsClass2.js b/tests/baselines/reference/classImplementsClass2.js index 0aeda35463f7a..756e5df939a4c 100644 --- a/tests/baselines/reference/classImplementsClass2.js +++ b/tests/baselines/reference/classImplementsClass2.js @@ -14,12 +14,12 @@ c = c2; c2 = c; //// [classImplementsClass2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classImplementsClass3.js b/tests/baselines/reference/classImplementsClass3.js index 40fd20005e127..c6e50df32b057 100644 --- a/tests/baselines/reference/classImplementsClass3.js +++ b/tests/baselines/reference/classImplementsClass3.js @@ -15,12 +15,12 @@ c = c2; c2 = c; //// [classImplementsClass3.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classImplementsClass4.js b/tests/baselines/reference/classImplementsClass4.js index 631b5b38560da..0b19e3d3aa76e 100644 --- a/tests/baselines/reference/classImplementsClass4.js +++ b/tests/baselines/reference/classImplementsClass4.js @@ -17,12 +17,12 @@ c = c2; c2 = c; //// [classImplementsClass4.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classImplementsClass5.js b/tests/baselines/reference/classImplementsClass5.js index a54c02f4b6b02..941fc02a1ce25 100644 --- a/tests/baselines/reference/classImplementsClass5.js +++ b/tests/baselines/reference/classImplementsClass5.js @@ -18,12 +18,12 @@ c = c2; c2 = c; //// [classImplementsClass5.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classImplementsClass6.js b/tests/baselines/reference/classImplementsClass6.js index c2987ac066e69..1e2eb13419ac9 100644 --- a/tests/baselines/reference/classImplementsClass6.js +++ b/tests/baselines/reference/classImplementsClass6.js @@ -22,12 +22,12 @@ c.bar(); // error c2.bar(); // should error //// [classImplementsClass6.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classIndexer3.js b/tests/baselines/reference/classIndexer3.js index 8bce923689929..5c65f63cc034c 100644 --- a/tests/baselines/reference/classIndexer3.js +++ b/tests/baselines/reference/classIndexer3.js @@ -11,12 +11,12 @@ class D123 extends C123 { } //// [classIndexer3.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classInheritence.js b/tests/baselines/reference/classInheritence.js index 23506947e9b06..509433205e90c 100644 --- a/tests/baselines/reference/classInheritence.js +++ b/tests/baselines/reference/classInheritence.js @@ -3,12 +3,12 @@ class B extends A { } class A extends A { } //// [classInheritence.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classIsSubtypeOfBaseType.js b/tests/baselines/reference/classIsSubtypeOfBaseType.js index df822eff3126b..861d84ebbac6f 100644 --- a/tests/baselines/reference/classIsSubtypeOfBaseType.js +++ b/tests/baselines/reference/classIsSubtypeOfBaseType.js @@ -16,12 +16,12 @@ class Derived2 extends Base<{ bar: string; }> { } //// [classIsSubtypeOfBaseType.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classOrder2.js b/tests/baselines/reference/classOrder2.js index d05dd72e24532..a80e58fe3cda3 100644 --- a/tests/baselines/reference/classOrder2.js +++ b/tests/baselines/reference/classOrder2.js @@ -20,12 +20,12 @@ a.foo(); //// [classOrder2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classOrderBug.js b/tests/baselines/reference/classOrderBug.js index 22596246d645d..a872fe3165f20 100644 --- a/tests/baselines/reference/classOrderBug.js +++ b/tests/baselines/reference/classOrderBug.js @@ -16,12 +16,12 @@ class foo extends baz {} //// [classOrderBug.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classSideInheritance1.js b/tests/baselines/reference/classSideInheritance1.js index bdaaec468f88f..09bddc4b22bb4 100644 --- a/tests/baselines/reference/classSideInheritance1.js +++ b/tests/baselines/reference/classSideInheritance1.js @@ -16,12 +16,12 @@ A.bar(); // valid C2.bar(); // valid //// [classSideInheritance1.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classSideInheritance2.js b/tests/baselines/reference/classSideInheritance2.js index 34c7467a8649c..49ddf4daa723b 100644 --- a/tests/baselines/reference/classSideInheritance2.js +++ b/tests/baselines/reference/classSideInheritance2.js @@ -21,12 +21,12 @@ class TextBase implements IText { } //// [classSideInheritance2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classSideInheritance3.js b/tests/baselines/reference/classSideInheritance3.js index a9fb09199301c..55f5b6863aa99 100644 --- a/tests/baselines/reference/classSideInheritance3.js +++ b/tests/baselines/reference/classSideInheritance3.js @@ -19,12 +19,12 @@ var r2: new (x: string) => A = B; // error var r3: typeof A = C; // ok //// [classSideInheritance3.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classUpdateTests.js b/tests/baselines/reference/classUpdateTests.js index 89dd0bded249b..1cb5c51e963e5 100644 --- a/tests/baselines/reference/classUpdateTests.js +++ b/tests/baselines/reference/classUpdateTests.js @@ -114,12 +114,12 @@ class R { } //// [classUpdateTests.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classWithBaseClassButNoConstructor.js b/tests/baselines/reference/classWithBaseClassButNoConstructor.js index b23e0a13ba131..9bc92274b4760 100644 --- a/tests/baselines/reference/classWithBaseClassButNoConstructor.js +++ b/tests/baselines/reference/classWithBaseClassButNoConstructor.js @@ -41,12 +41,12 @@ var d5 = new D(); // error var d6 = new D(1); // ok //// [classWithBaseClassButNoConstructor.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classWithConstructors.js b/tests/baselines/reference/classWithConstructors.js index c3609f99b8609..96dc9dea8c581 100644 --- a/tests/baselines/reference/classWithConstructors.js +++ b/tests/baselines/reference/classWithConstructors.js @@ -50,12 +50,12 @@ module Generics { } //// [classWithConstructors.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classWithProtectedProperty.js b/tests/baselines/reference/classWithProtectedProperty.js index 4a1b09ff35069..aee0b38fef81c 100644 --- a/tests/baselines/reference/classWithProtectedProperty.js +++ b/tests/baselines/reference/classWithProtectedProperty.js @@ -29,12 +29,12 @@ class D extends C { //// [classWithProtectedProperty.js] // accessing any protected outside the class is an error +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classWithStaticMembers.js b/tests/baselines/reference/classWithStaticMembers.js index 5563e859c6a0b..e327c76afcfc2 100644 --- a/tests/baselines/reference/classWithStaticMembers.js +++ b/tests/baselines/reference/classWithStaticMembers.js @@ -20,12 +20,12 @@ var r2 = r.x; var r3 = r.foo; //// [classWithStaticMembers.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classdecl.js b/tests/baselines/reference/classdecl.js index c88b0ccae0e2b..57ab3282526cd 100644 --- a/tests/baselines/reference/classdecl.js +++ b/tests/baselines/reference/classdecl.js @@ -94,12 +94,12 @@ class e { } //// [classdecl.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/clodulesDerivedClasses.js b/tests/baselines/reference/clodulesDerivedClasses.js index 1bb3fc7b705ed..88a39a0700352 100644 --- a/tests/baselines/reference/clodulesDerivedClasses.js +++ b/tests/baselines/reference/clodulesDerivedClasses.js @@ -23,12 +23,12 @@ module Path.Utils { //// [clodulesDerivedClasses.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js index 2242c6667a686..d7bf933004d08 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js @@ -40,12 +40,12 @@ class c extends Foo { } //// [collisionSuperAndLocalFunctionInAccessors.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.js index e761534649e93..c725285a36858 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.js +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.js @@ -25,12 +25,12 @@ class c extends Foo { } //// [collisionSuperAndLocalFunctionInConstructor.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.js index 70a9b22ddbdab..b9bbd23c538c9 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.js +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.js @@ -29,12 +29,12 @@ class c extends Foo { } //// [collisionSuperAndLocalFunctionInMethod.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js index 258ad86c096bb..69beacb953b1a 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js @@ -19,12 +19,12 @@ class b extends Foo { } //// [collisionSuperAndLocalFunctionInProperty.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js b/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js index 81ef63068e683..adf4a62a9b8e5 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js +++ b/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js @@ -33,12 +33,12 @@ class c extends Foo { } //// [collisionSuperAndLocalVarInAccessors.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js b/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js index 355bf0af8af80..d6909c50783c1 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js +++ b/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js @@ -21,12 +21,12 @@ class c extends Foo { } //// [collisionSuperAndLocalVarInConstructor.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js b/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js index 33512c6065873..e63bf4d9ac5e1 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js +++ b/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js @@ -19,12 +19,12 @@ class c extends Foo { } //// [collisionSuperAndLocalVarInMethod.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js b/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js index ee582bddbc5fe..48b1298a5457e 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js +++ b/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js @@ -18,12 +18,12 @@ class b extends Foo { } //// [collisionSuperAndLocalVarInProperty.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndNameResolution.js b/tests/baselines/reference/collisionSuperAndNameResolution.js index e36a2a3cbad18..6c8f5a8fe3491 100644 --- a/tests/baselines/reference/collisionSuperAndNameResolution.js +++ b/tests/baselines/reference/collisionSuperAndNameResolution.js @@ -12,12 +12,12 @@ class Foo extends base { } //// [collisionSuperAndNameResolution.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndParameter.js b/tests/baselines/reference/collisionSuperAndParameter.js index 7413002635d4d..ccc2d90f5f310 100644 --- a/tests/baselines/reference/collisionSuperAndParameter.js +++ b/tests/baselines/reference/collisionSuperAndParameter.js @@ -63,12 +63,12 @@ class Foo4 extends Foo { } //// [collisionSuperAndParameter.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndParameter1.js b/tests/baselines/reference/collisionSuperAndParameter1.js index 0a7e21e8ca280..554148becf8a3 100644 --- a/tests/baselines/reference/collisionSuperAndParameter1.js +++ b/tests/baselines/reference/collisionSuperAndParameter1.js @@ -10,12 +10,12 @@ class Foo2 extends Foo { } //// [collisionSuperAndParameter1.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js b/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js index 5b12a0f9a9d2f..211602b2c1471 100644 --- a/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js +++ b/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js @@ -31,12 +31,12 @@ class b4 extends a { } //// [collisionSuperAndPropertyNameAsConstuctorParameter.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js b/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js index d3270d4db5734..e80dc2b8ebbb2 100644 --- a/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js +++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js @@ -19,12 +19,12 @@ class b2 extends a { } //// [collisionThisExpressionAndLocalVarWithSuperExperssion.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/commentsInheritance.js b/tests/baselines/reference/commentsInheritance.js index 691854bffb0ae..cba27b5f2e8c3 100644 --- a/tests/baselines/reference/commentsInheritance.js +++ b/tests/baselines/reference/commentsInheritance.js @@ -152,12 +152,12 @@ i2_i = i3_i; //// [commentsInheritance.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.js b/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.js index 3053f86f345ec..afaf71ca9b2d5 100644 --- a/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.js +++ b/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.js @@ -195,12 +195,12 @@ var r8b6 = b5 !== a5; var r8b7 = b6 !== a6; //// [comparisonOperatorWithIdenticalObjects.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js index bf522a88367ee..236804898c343 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js @@ -169,12 +169,12 @@ var r8b6 = b6 !== a6; var r8b7 = b7 !== a7; //// [comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js index 50e31f1d79c26..0408116f8cfc5 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js @@ -169,12 +169,12 @@ var r8b6 = b6 !== a6; var r8b7 = b7 !== a7; //// [comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js index 8e4e7e7840df2..44fceec00045c 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js @@ -112,12 +112,12 @@ var r8b3 = b3 !== a3; var r8b4 = b4 !== a4; //// [comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js index f208bd500cd35..641b75e8688b8 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js @@ -150,12 +150,12 @@ var r8b5 = b5 !== a5; var r8b6 = b6 !== a6; //// [comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js index 4cff1bf058468..cc75533ef97c8 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js @@ -150,12 +150,12 @@ var r8b5 = b5 !== a5; var r8b6 = b6 !== a6; //// [comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnCallSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnCallSignature.js index 0a7cbce0c3279..5fa26a6446971 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnCallSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnCallSignature.js @@ -260,12 +260,12 @@ var r8b11 = b11 !== a11; //var r8b12 = b12 !== a12; //// [comparisonOperatorWithSubtypeObjectOnCallSignature.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnConstructorSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnConstructorSignature.js index bf8a6024faa2b..0a9a731428d0a 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnConstructorSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnConstructorSignature.js @@ -222,12 +222,12 @@ var r8b9 = b9 !== a9; //var r8b10 = b10 !== a10; //// [comparisonOperatorWithSubtypeObjectOnConstructorSignature.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnIndexSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnIndexSignature.js index f1e06f733e417..669202334b8ca 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnIndexSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnIndexSignature.js @@ -108,12 +108,12 @@ var r8b1 = b3 !== a3; var r8b1 = b4 !== a4; //// [comparisonOperatorWithSubtypeObjectOnIndexSignature.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js index 78a7b45692499..983d756c8c0cc 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js @@ -165,12 +165,12 @@ var r8b6 = b6 !== a6; //var r8b7 = b7 !== a7; //// [comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js index d08b7fbf11b5d..f7cc1cd02c7c2 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js @@ -165,12 +165,12 @@ var r8b6 = b6 !== a6; //var r8b7 = b7 !== a7; //// [comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.js index d1f29b650c6a0..f39f869018b77 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.js @@ -79,12 +79,12 @@ var rh3 = b1 !== a1; var rh4 = b2 !== a2; //// [comparisonOperatorWithSubtypeObjectOnProperty.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/complexClassRelationships.js b/tests/baselines/reference/complexClassRelationships.js index 34cc2754746bc..fb481259bd3e2 100644 --- a/tests/baselines/reference/complexClassRelationships.js +++ b/tests/baselines/reference/complexClassRelationships.js @@ -48,12 +48,12 @@ class FooBase { } //// [complexClassRelationships.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.js b/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.js index 0e3dc9f3d3199..c63df9b0c9b49 100644 --- a/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.js +++ b/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.js @@ -6,12 +6,12 @@ class S18 extends S18 //// [complicatedGenericRecursiveBaseClassReference.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/compoundAssignmentLHSIsValue.js b/tests/baselines/reference/compoundAssignmentLHSIsValue.js index 8d17fcbfe10fa..b918701f5a152 100644 --- a/tests/baselines/reference/compoundAssignmentLHSIsValue.js +++ b/tests/baselines/reference/compoundAssignmentLHSIsValue.js @@ -124,12 +124,12 @@ foo() += value; (foo()) += value; //// [compoundAssignmentLHSIsValue.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js b/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js index e7d1bef436e3f..a4812a00cc62a 100644 --- a/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js +++ b/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js @@ -86,12 +86,12 @@ foo() **= value; (foo()) **= value; //// [compoundExponentiationAssignmentLHSIsValue.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames24_ES5.js b/tests/baselines/reference/computedPropertyNames24_ES5.js index 426b7cbaa65cf..8ac5c5be0b895 100644 --- a/tests/baselines/reference/computedPropertyNames24_ES5.js +++ b/tests/baselines/reference/computedPropertyNames24_ES5.js @@ -9,12 +9,12 @@ class C extends Base { } //// [computedPropertyNames24_ES5.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames25_ES5.js b/tests/baselines/reference/computedPropertyNames25_ES5.js index 239a5cada1a8a..12f3c1e301db4 100644 --- a/tests/baselines/reference/computedPropertyNames25_ES5.js +++ b/tests/baselines/reference/computedPropertyNames25_ES5.js @@ -14,12 +14,12 @@ class C extends Base { } //// [computedPropertyNames25_ES5.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames26_ES5.js b/tests/baselines/reference/computedPropertyNames26_ES5.js index 89e8dd391693c..f4a9d79af0f51 100644 --- a/tests/baselines/reference/computedPropertyNames26_ES5.js +++ b/tests/baselines/reference/computedPropertyNames26_ES5.js @@ -11,12 +11,12 @@ class C extends Base { } //// [computedPropertyNames26_ES5.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames27_ES5.js b/tests/baselines/reference/computedPropertyNames27_ES5.js index 7438ea49fd281..88319039ee627 100644 --- a/tests/baselines/reference/computedPropertyNames27_ES5.js +++ b/tests/baselines/reference/computedPropertyNames27_ES5.js @@ -6,12 +6,12 @@ class C extends Base { } //// [computedPropertyNames27_ES5.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames28_ES5.js b/tests/baselines/reference/computedPropertyNames28_ES5.js index 132f811b49ebf..696da70eb9312 100644 --- a/tests/baselines/reference/computedPropertyNames28_ES5.js +++ b/tests/baselines/reference/computedPropertyNames28_ES5.js @@ -11,12 +11,12 @@ class C extends Base { } //// [computedPropertyNames28_ES5.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames30_ES5.js b/tests/baselines/reference/computedPropertyNames30_ES5.js index 63e448df3c1c3..3b4c663602d24 100644 --- a/tests/baselines/reference/computedPropertyNames30_ES5.js +++ b/tests/baselines/reference/computedPropertyNames30_ES5.js @@ -16,12 +16,12 @@ class C extends Base { } //// [computedPropertyNames30_ES5.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames31_ES5.js b/tests/baselines/reference/computedPropertyNames31_ES5.js index e3145b8c0a189..a727f47860389 100644 --- a/tests/baselines/reference/computedPropertyNames31_ES5.js +++ b/tests/baselines/reference/computedPropertyNames31_ES5.js @@ -16,12 +16,12 @@ class C extends Base { } //// [computedPropertyNames31_ES5.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames43_ES5.js b/tests/baselines/reference/computedPropertyNames43_ES5.js index 383da77c55042..d2bde183b8bc8 100644 --- a/tests/baselines/reference/computedPropertyNames43_ES5.js +++ b/tests/baselines/reference/computedPropertyNames43_ES5.js @@ -13,12 +13,12 @@ class D extends C { } //// [computedPropertyNames43_ES5.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames44_ES5.js b/tests/baselines/reference/computedPropertyNames44_ES5.js index 43bf2849333e7..b39e2375cb583 100644 --- a/tests/baselines/reference/computedPropertyNames44_ES5.js +++ b/tests/baselines/reference/computedPropertyNames44_ES5.js @@ -12,12 +12,12 @@ class D extends C { } //// [computedPropertyNames44_ES5.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames45_ES5.js b/tests/baselines/reference/computedPropertyNames45_ES5.js index 933e6ea66ffcf..a74e87bbfd5b5 100644 --- a/tests/baselines/reference/computedPropertyNames45_ES5.js +++ b/tests/baselines/reference/computedPropertyNames45_ES5.js @@ -13,12 +13,12 @@ class D extends C { } //// [computedPropertyNames45_ES5.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js b/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js index c3a197e2a6402..aa8b62c16e773 100644 --- a/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js +++ b/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js @@ -48,12 +48,12 @@ var result11: any = true ? 1 : 'string'; //// [conditionalOperatorWithIdenticalBCT.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js b/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js index 0a1e2be65e96d..8f4f4b20a5671 100644 --- a/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js +++ b/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js @@ -24,12 +24,12 @@ var result61: (t: X) => number| string = true ? (m) => m.propertyX1 : (n) => n.p //// [conditionalOperatorWithoutIdenticalBCT.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constantOverloadFunction.js b/tests/baselines/reference/constantOverloadFunction.js index 05cb517f9e0bf..170f5ba5daed2 100644 --- a/tests/baselines/reference/constantOverloadFunction.js +++ b/tests/baselines/reference/constantOverloadFunction.js @@ -14,12 +14,12 @@ function foo(tagName: any): Base { //// [constantOverloadFunction.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js b/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js index 754abfd106e0e..e104a1f8e89ee 100644 --- a/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js +++ b/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js @@ -15,12 +15,12 @@ function foo(tagName: any): Base { //// [constantOverloadFunctionNoSubtypeError.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js b/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js index c1747ba54ff22..fddad13713661 100644 --- a/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js +++ b/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js @@ -20,12 +20,12 @@ class Container { } //// [constraintCheckInGenericBaseTypeReference.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.js index 9b6d759951664..06b273e9801cb 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.js @@ -71,12 +71,12 @@ interface I extends A { //// [constructSignatureAssignabilityInInheritance2.js] // checking subtype relations for function types as it relates to contextual signature instantiation +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.js index c7b62f9521f3a..6ca8645ee9e62 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.js @@ -114,12 +114,12 @@ module Errors { //// [constructSignatureAssignabilityInInheritance3.js] // checking subtype relations for function types as it relates to contextual signature instantiation // error cases +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance4.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance4.js index c328a70455fe8..41ad9ead84983 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance4.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance4.js @@ -61,12 +61,12 @@ interface I extends A { //// [constructSignatureAssignabilityInInheritance4.js] // checking subtype relations for function types as it relates to contextual signature instantiation +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.js index 4f2addd338bd0..cb5e254d6b26d 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.js @@ -51,12 +51,12 @@ interface I extends B { //// [constructSignatureAssignabilityInInheritance5.js] // checking subtype relations for function types as it relates to contextual signature instantiation // same as subtypingWithConstructSignatures2 just with an extra level of indirection in the inheritance chain +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.js index a8bac464ac3e1..b9389d26fc814 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.js @@ -54,12 +54,12 @@ interface I9 extends A { // checking subtype relations for function types as it relates to contextual signature instantiation // same as subtypingWithConstructSignatures4 but using class type parameters instead of generic signatures // all are errors +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructorArgs.js b/tests/baselines/reference/constructorArgs.js index 001a0656c9118..5f5a3d7b5655a 100644 --- a/tests/baselines/reference/constructorArgs.js +++ b/tests/baselines/reference/constructorArgs.js @@ -16,12 +16,12 @@ class Sub extends Super { //// [constructorArgs.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType.js b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType.js index 4132399c97035..13e2317bb6fba 100644 --- a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType.js +++ b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType.js @@ -20,12 +20,12 @@ class Derived2 extends Base { } //// [constructorFunctionTypeIsAssignableToBaseType.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js index 339edd29823cf..e8c04ace7ef39 100644 --- a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js +++ b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js @@ -34,12 +34,12 @@ class Derived2 extends Base { //// [constructorFunctionTypeIsAssignableToBaseType2.js] // the constructor function itself does not need to be a subtype of the base type constructor function +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructorHasPrototypeProperty.js b/tests/baselines/reference/constructorHasPrototypeProperty.js index 551b2644518f3..76d260f780dcf 100644 --- a/tests/baselines/reference/constructorHasPrototypeProperty.js +++ b/tests/baselines/reference/constructorHasPrototypeProperty.js @@ -32,12 +32,12 @@ module Generic { } //// [constructorHasPrototypeProperty.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructorOverloads2.js b/tests/baselines/reference/constructorOverloads2.js index 5aca4c6583a24..a3302dc70f910 100644 --- a/tests/baselines/reference/constructorOverloads2.js +++ b/tests/baselines/reference/constructorOverloads2.js @@ -26,12 +26,12 @@ f1.bar1(); //// [constructorOverloads2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructorOverloads3.js b/tests/baselines/reference/constructorOverloads3.js index 063f4c72443f3..e202486ececff 100644 --- a/tests/baselines/reference/constructorOverloads3.js +++ b/tests/baselines/reference/constructorOverloads3.js @@ -23,12 +23,12 @@ f1.bar1(); //// [constructorOverloads3.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructorWithCapturedSuper.js b/tests/baselines/reference/constructorWithCapturedSuper.js index 706d2522cfb14..be129d5f1ec2e 100644 --- a/tests/baselines/reference/constructorWithCapturedSuper.js +++ b/tests/baselines/reference/constructorWithCapturedSuper.js @@ -53,12 +53,12 @@ class D extends A { } //// [constructorWithCapturedSuper.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js index 6c670b245c56c..2f481a58bea6c 100644 --- a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js +++ b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js @@ -281,12 +281,12 @@ TypeScriptAllInOne.Program.Main(); //// [constructorWithIncompleteTypeAnnotation.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/contextualTypingArrayOfLambdas.js b/tests/baselines/reference/contextualTypingArrayOfLambdas.js index 9a172c202b2ca..39cbbe78c0034 100644 --- a/tests/baselines/reference/contextualTypingArrayOfLambdas.js +++ b/tests/baselines/reference/contextualTypingArrayOfLambdas.js @@ -15,12 +15,12 @@ var xs = [(x: A) => { }, (x: B) => { }, (x: C) => { }]; //// [contextualTypingArrayOfLambdas.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/contextualTypingOfConditionalExpression.js b/tests/baselines/reference/contextualTypingOfConditionalExpression.js index c573962825b09..0a6794472a155 100644 --- a/tests/baselines/reference/contextualTypingOfConditionalExpression.js +++ b/tests/baselines/reference/contextualTypingOfConditionalExpression.js @@ -15,12 +15,12 @@ var x2: (a: A) => void = true ? (a) => a.foo : (b) => b.foo; //// [contextualTypingOfConditionalExpression.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/contextualTypingOfConditionalExpression2.js b/tests/baselines/reference/contextualTypingOfConditionalExpression2.js index 9ee11aeb985cf..7788ee4438201 100644 --- a/tests/baselines/reference/contextualTypingOfConditionalExpression2.js +++ b/tests/baselines/reference/contextualTypingOfConditionalExpression2.js @@ -13,12 +13,12 @@ var x2: (a: A) => void = true ? (a: C) => a.foo : (b: number) => { }; //// [contextualTypingOfConditionalExpression2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.js b/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.js index 2d7ca989a81f8..2e2bdd009d248 100644 --- a/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.js +++ b/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.js @@ -11,12 +11,12 @@ var a: D = foo("hi", []); //// [crashInsourcePropertyIsRelatableToTargetProperty.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declFileClassExtendsNull.js b/tests/baselines/reference/declFileClassExtendsNull.js index 483c1ca448123..d362a5f04d948 100644 --- a/tests/baselines/reference/declFileClassExtendsNull.js +++ b/tests/baselines/reference/declFileClassExtendsNull.js @@ -4,12 +4,12 @@ class ExtendsNull extends null { } //// [declFileClassExtendsNull.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declFileForFunctionTypeAsTypeParameter.js b/tests/baselines/reference/declFileForFunctionTypeAsTypeParameter.js index f7465149b923f..f0805f9617faa 100644 --- a/tests/baselines/reference/declFileForFunctionTypeAsTypeParameter.js +++ b/tests/baselines/reference/declFileForFunctionTypeAsTypeParameter.js @@ -10,12 +10,12 @@ interface I extends X<() => number> { //// [declFileForFunctionTypeAsTypeParameter.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declFileGenericClassWithGenericExtendedClass.js b/tests/baselines/reference/declFileGenericClassWithGenericExtendedClass.js index 8d0e10f73f9d9..c1be3af34e179 100644 --- a/tests/baselines/reference/declFileGenericClassWithGenericExtendedClass.js +++ b/tests/baselines/reference/declFileGenericClassWithGenericExtendedClass.js @@ -13,12 +13,12 @@ class Baz implements IBar { //// [declFileGenericClassWithGenericExtendedClass.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declFileGenericType.js b/tests/baselines/reference/declFileGenericType.js index f579968df06f4..402b19c0ff3ec 100644 --- a/tests/baselines/reference/declFileGenericType.js +++ b/tests/baselines/reference/declFileGenericType.js @@ -41,12 +41,12 @@ export var j = C.F6; //// [declFileGenericType.js] "use strict"; +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declFileGenericType2.js b/tests/baselines/reference/declFileGenericType2.js index 4f01f058b190e..2d0bb3ce50099 100644 --- a/tests/baselines/reference/declFileGenericType2.js +++ b/tests/baselines/reference/declFileGenericType2.js @@ -43,12 +43,12 @@ module templa.dom.mvc.composite { //// [declFileGenericType2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js b/tests/baselines/reference/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js index 8f38d09160f81..65fee8c91e422 100644 --- a/tests/baselines/reference/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js +++ b/tests/baselines/reference/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js @@ -21,12 +21,12 @@ module X.Y.base.Z { //// [declFileWithClassNameConflictingWithClassReferredByExtendsClause.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declFileWithExtendsClauseThatHasItsContainerNameConflict.js b/tests/baselines/reference/declFileWithExtendsClauseThatHasItsContainerNameConflict.js index cacaa58760963..0a79b9be3bc72 100644 --- a/tests/baselines/reference/declFileWithExtendsClauseThatHasItsContainerNameConflict.js +++ b/tests/baselines/reference/declFileWithExtendsClauseThatHasItsContainerNameConflict.js @@ -19,12 +19,12 @@ module A.B.C { } //// [declFileWithExtendsClauseThatHasItsContainerNameConflict.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declarationEmitExpressionInExtends.js b/tests/baselines/reference/declarationEmitExpressionInExtends.js index acda258919593..4fb5b585c9992 100644 --- a/tests/baselines/reference/declarationEmitExpressionInExtends.js +++ b/tests/baselines/reference/declarationEmitExpressionInExtends.js @@ -15,12 +15,12 @@ var q: B; q.s; //// [declarationEmitExpressionInExtends.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declarationEmitExpressionInExtends2.js b/tests/baselines/reference/declarationEmitExpressionInExtends2.js index 8f0c53f66ac64..e059e44f1402b 100644 --- a/tests/baselines/reference/declarationEmitExpressionInExtends2.js +++ b/tests/baselines/reference/declarationEmitExpressionInExtends2.js @@ -13,12 +13,12 @@ class MyClass extends getClass(2) { } //// [declarationEmitExpressionInExtends2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declarationEmitExpressionInExtends3.js b/tests/baselines/reference/declarationEmitExpressionInExtends3.js index 902ddc08bc001..19d5952948668 100644 --- a/tests/baselines/reference/declarationEmitExpressionInExtends3.js +++ b/tests/baselines/reference/declarationEmitExpressionInExtends3.js @@ -45,12 +45,12 @@ export class MyClass4 extends getExportedClass(undefined)>>var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { ->>> if (typeof Object.setPrototypeOf === "function") { ->>> Object.setPrototypeOf(d, b); ->>> } else { ->>> d.__proto__ = b; ->>> } +>>> __extendStatics(d, b); >>> function __() { this.constructor = d; } >>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); >>>}; diff --git a/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js b/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js index 31c8c3f722c3a..f92b9ab7c99ca 100644 --- a/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js +++ b/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js @@ -34,12 +34,12 @@ class Derived4 extends Base2 { //// [derivedClassConstructorWithoutSuperCall.js] // derived class constructors must contain a super call +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.js b/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.js index b948302a2d542..2fa9323295a2e 100644 --- a/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.js +++ b/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.js @@ -15,12 +15,12 @@ class Derived extends Base { } //// [derivedClassFunctionOverridesBaseClassAccessor.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassIncludesInheritedMembers.js b/tests/baselines/reference/derivedClassIncludesInheritedMembers.js index cf5454d704f29..3fe81a587af5f 100644 --- a/tests/baselines/reference/derivedClassIncludesInheritedMembers.js +++ b/tests/baselines/reference/derivedClassIncludesInheritedMembers.js @@ -41,12 +41,12 @@ var r8 = d2[1]; //// [derivedClassIncludesInheritedMembers.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesIndexersWithAssignmentCompatibility.js b/tests/baselines/reference/derivedClassOverridesIndexersWithAssignmentCompatibility.js index 0d483a3eff6f0..da2abf23166d9 100644 --- a/tests/baselines/reference/derivedClassOverridesIndexersWithAssignmentCompatibility.js +++ b/tests/baselines/reference/derivedClassOverridesIndexersWithAssignmentCompatibility.js @@ -18,12 +18,12 @@ class Derived2 extends Base2 { } //// [derivedClassOverridesIndexersWithAssignmentCompatibility.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesPrivateFunction1.js b/tests/baselines/reference/derivedClassOverridesPrivateFunction1.js index 8306e702cb123..14549e8d9c470 100644 --- a/tests/baselines/reference/derivedClassOverridesPrivateFunction1.js +++ b/tests/baselines/reference/derivedClassOverridesPrivateFunction1.js @@ -16,12 +16,12 @@ class DerivedClass extends BaseClass { new DerivedClass(); //// [derivedClassOverridesPrivateFunction1.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesPrivates.js b/tests/baselines/reference/derivedClassOverridesPrivates.js index c32560eca59f7..b88ce8d37ee94 100644 --- a/tests/baselines/reference/derivedClassOverridesPrivates.js +++ b/tests/baselines/reference/derivedClassOverridesPrivates.js @@ -16,12 +16,12 @@ class Derived2 extends Base2 { } //// [derivedClassOverridesPrivates.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers.js index 03addf8ace5db..d44fc6a483d59 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers.js @@ -37,12 +37,12 @@ class Derived extends Base { //// [derivedClassOverridesProtectedMembers.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js index 0cfe6f3dd9d84..8f8e913c82b77 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js @@ -64,12 +64,12 @@ var r8 = d2[1]; //// [derivedClassOverridesProtectedMembers2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js index d18fd9d1a30be..2825524d22478 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js @@ -72,12 +72,12 @@ class Derived10 extends Base { } //// [derivedClassOverridesProtectedMembers3.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers4.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers4.js index 2d89040ff13ce..9d4c76a8384d6 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers4.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers4.js @@ -15,12 +15,12 @@ class Derived2 extends Derived1 { } //// [derivedClassOverridesProtectedMembers4.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesPublicMembers.js b/tests/baselines/reference/derivedClassOverridesPublicMembers.js index 2ef057082bdcb..6390636e09f87 100644 --- a/tests/baselines/reference/derivedClassOverridesPublicMembers.js +++ b/tests/baselines/reference/derivedClassOverridesPublicMembers.js @@ -63,12 +63,12 @@ var r8 = d2[1]; //// [derivedClassOverridesPublicMembers.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesWithoutSubtype.js b/tests/baselines/reference/derivedClassOverridesWithoutSubtype.js index 4a1f7c0cbebf9..3ce6c5d196645 100644 --- a/tests/baselines/reference/derivedClassOverridesWithoutSubtype.js +++ b/tests/baselines/reference/derivedClassOverridesWithoutSubtype.js @@ -24,12 +24,12 @@ class Derived2 extends Base2 { } //// [derivedClassOverridesWithoutSubtype.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassParameterProperties.js b/tests/baselines/reference/derivedClassParameterProperties.js index cdf1ab4cbbd09..340aa0f570939 100644 --- a/tests/baselines/reference/derivedClassParameterProperties.js +++ b/tests/baselines/reference/derivedClassParameterProperties.js @@ -96,12 +96,12 @@ class Derived10 extends Base2 { //// [derivedClassParameterProperties.js] // ordering of super calls in derived constructors matters depending on other class contents +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js b/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js index c7a90e31dfe35..7238b7d1af300 100644 --- a/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js +++ b/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js @@ -33,12 +33,12 @@ class Derived extends Base { //// [derivedClassSuperCallsInNonConstructorMembers.js] // error to use super calls outside a constructor +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js b/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js index 3d3aacdf55b57..6a79fd2d2a2be 100644 --- a/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js +++ b/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js @@ -29,12 +29,12 @@ class Derived4 extends Base { } //// [derivedClassSuperCallsWithThisArg.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassTransitivity.js b/tests/baselines/reference/derivedClassTransitivity.js index c5ea3722feb81..b6cd5a284e460 100644 --- a/tests/baselines/reference/derivedClassTransitivity.js +++ b/tests/baselines/reference/derivedClassTransitivity.js @@ -22,12 +22,12 @@ var r2 = e.foo(''); //// [derivedClassTransitivity.js] // subclassing is not transitive when you can remove required parameters and add optional parameters +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassTransitivity2.js b/tests/baselines/reference/derivedClassTransitivity2.js index bf9f1dbb5746e..05648a0050736 100644 --- a/tests/baselines/reference/derivedClassTransitivity2.js +++ b/tests/baselines/reference/derivedClassTransitivity2.js @@ -22,12 +22,12 @@ var r2 = e.foo(1, ''); //// [derivedClassTransitivity2.js] // subclassing is not transitive when you can remove required parameters and add optional parameters +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassTransitivity3.js b/tests/baselines/reference/derivedClassTransitivity3.js index d149d9f5aa9e1..a280316b63920 100644 --- a/tests/baselines/reference/derivedClassTransitivity3.js +++ b/tests/baselines/reference/derivedClassTransitivity3.js @@ -22,12 +22,12 @@ var r2 = e.foo('', 1); //// [derivedClassTransitivity3.js] // subclassing is not transitive when you can remove required parameters and add optional parameters +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassTransitivity4.js b/tests/baselines/reference/derivedClassTransitivity4.js index 2d48cf287285b..2d32ece137529 100644 --- a/tests/baselines/reference/derivedClassTransitivity4.js +++ b/tests/baselines/reference/derivedClassTransitivity4.js @@ -22,12 +22,12 @@ var r2 = e.foo(''); //// [derivedClassTransitivity4.js] // subclassing is not transitive when you can remove required parameters and add optional parameters on protected members +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassWithAny.js b/tests/baselines/reference/derivedClassWithAny.js index b376364e542be..64b6a1c995a58 100644 --- a/tests/baselines/reference/derivedClassWithAny.js +++ b/tests/baselines/reference/derivedClassWithAny.js @@ -60,12 +60,12 @@ var r = c.foo(); // e.foo would return string //// [derivedClassWithAny.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js index e5fe6eb2560de..6c9ff2f36e7b8 100644 --- a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js +++ b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js @@ -23,12 +23,12 @@ class Derived extends Base { //// [derivedClassWithPrivateInstanceShadowingProtectedInstance.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js index 5ac36e99b5749..924526923f8d3 100644 --- a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js +++ b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js @@ -33,12 +33,12 @@ var r6 = Derived.a; // error Derived.a = 2; // error //// [derivedClassWithPrivateInstanceShadowingPublicInstance.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js index 9994c1bfb05ea..9705b1e8d038f 100644 --- a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js +++ b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js @@ -22,12 +22,12 @@ class Derived extends Base { } //// [derivedClassWithPrivateStaticShadowingProtectedStatic.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js index 4183017f378fd..dd15ec7e66dcf 100644 --- a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js +++ b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js @@ -34,12 +34,12 @@ var r6 = Derived.a; // error Derived.a = 2; // error //// [derivedClassWithPrivateStaticShadowingPublicStatic.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js b/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js index d21cb14bcc440..7a145b763c08c 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js @@ -26,12 +26,12 @@ var d = new D(); // error var d2 = new D(new Date()); // ok //// [derivedClassWithoutExplicitConstructor.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js b/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js index 0acf65cd177cb..29cb878de4689 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js @@ -34,12 +34,12 @@ var d3 = new D(new Date(), new Date()); var d4 = new D(new Date(), new Date(), new Date()); //// [derivedClassWithoutExplicitConstructor2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js b/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js index 696ebcc1f9e4c..79d26767df63a 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js @@ -48,12 +48,12 @@ var d3 = new D2(new Date(), new Date()); // ok //// [derivedClassWithoutExplicitConstructor3.js] // automatic constructors with a class hieararchy of depth > 2 +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClasses.js b/tests/baselines/reference/derivedClasses.js index 36f1dcc799b01..38af357d6c3f2 100644 --- a/tests/baselines/reference/derivedClasses.js +++ b/tests/baselines/reference/derivedClasses.js @@ -31,12 +31,12 @@ b.hue(); //// [derivedClasses.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedGenericClassWithAny.js b/tests/baselines/reference/derivedGenericClassWithAny.js index afba93ccac67b..6644fefcac4ea 100644 --- a/tests/baselines/reference/derivedGenericClassWithAny.js +++ b/tests/baselines/reference/derivedGenericClassWithAny.js @@ -43,12 +43,12 @@ c = e; var r = c.foo(); // e.foo would return string //// [derivedGenericClassWithAny.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js b/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js index c33bd3713fc62..91224f98a5d5d 100644 --- a/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js +++ b/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js @@ -18,12 +18,12 @@ class Derived extends Base { } //// [derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js b/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js index 3e28aece101cf..926ca09274d66 100644 --- a/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js +++ b/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js @@ -21,12 +21,12 @@ b = d2; var r: Base[] = [d1, d2]; //// [derivedTypeDoesNotRequireExtendsClause.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/destructuringParameterDeclaration5.js b/tests/baselines/reference/destructuringParameterDeclaration5.js index 0c27e9b7f8580..831cf209995fc 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration5.js +++ b/tests/baselines/reference/destructuringParameterDeclaration5.js @@ -52,12 +52,12 @@ d3({ y: "world" }); //// [destructuringParameterDeclaration5.js] // Parameter Declaration with generic +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js b/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js index 80613c66be877..79babde83e272 100644 --- a/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js +++ b/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js @@ -14,12 +14,12 @@ class B extends A { //// [emitSuperCallBeforeEmitParameterPropertyDeclaration1.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js index c0478a993c40e..d798856231550 100644 --- a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js +++ b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js @@ -16,12 +16,12 @@ class B extends A { } //// [emitSuperCallBeforeEmitPropertyDeclaration1.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js index 5d63f4f32afe2..fdec4c4e7be27 100644 --- a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js +++ b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js @@ -14,12 +14,12 @@ class B extends A { } //// [emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/emitThisInSuperMethodCall.js b/tests/baselines/reference/emitThisInSuperMethodCall.js index 22d641e3414da..c87ad7d418914 100644 --- a/tests/baselines/reference/emitThisInSuperMethodCall.js +++ b/tests/baselines/reference/emitThisInSuperMethodCall.js @@ -28,12 +28,12 @@ class RegisteredUser extends User { //// [emitThisInSuperMethodCall.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/emptyModuleName.js b/tests/baselines/reference/emptyModuleName.js index f6f4ea759a68b..e4ad120250f7a 100644 --- a/tests/baselines/reference/emptyModuleName.js +++ b/tests/baselines/reference/emptyModuleName.js @@ -5,12 +5,12 @@ class B extends A { //// [emptyModuleName.js] "use strict"; +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/errorForwardReferenceForwadingConstructor.js b/tests/baselines/reference/errorForwardReferenceForwadingConstructor.js index 3320b144f11c1..851a97663de70 100644 --- a/tests/baselines/reference/errorForwardReferenceForwadingConstructor.js +++ b/tests/baselines/reference/errorForwardReferenceForwadingConstructor.js @@ -12,12 +12,12 @@ class derived extends base { } //// [errorForwardReferenceForwadingConstructor.js] // Error forward referencing derived class with forwarding constructor +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/errorSuperCalls.js b/tests/baselines/reference/errorSuperCalls.js index 69691a62bb7ac..43d89076ade01 100644 --- a/tests/baselines/reference/errorSuperCalls.js +++ b/tests/baselines/reference/errorSuperCalls.js @@ -75,12 +75,12 @@ class OtherDerived extends OtherBase { //// [errorSuperCalls.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/errorSuperPropertyAccess.js b/tests/baselines/reference/errorSuperPropertyAccess.js index ed9ac2d8dd534..42a2acf431705 100644 --- a/tests/baselines/reference/errorSuperPropertyAccess.js +++ b/tests/baselines/reference/errorSuperPropertyAccess.js @@ -129,12 +129,12 @@ var obj = { n: super.wat, p: super.foo() }; //// [errorSuperPropertyAccess.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/errorsInGenericTypeReference.js b/tests/baselines/reference/errorsInGenericTypeReference.js index e63005bfe1a60..64227abe6b253 100644 --- a/tests/baselines/reference/errorsInGenericTypeReference.js +++ b/tests/baselines/reference/errorsInGenericTypeReference.js @@ -73,12 +73,12 @@ interface testInterface2 { //// [errorsInGenericTypeReference.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/es6ClassSuperCodegenBug.js b/tests/baselines/reference/es6ClassSuperCodegenBug.js index af87c3db8216b..68fa43fd64b54 100644 --- a/tests/baselines/reference/es6ClassSuperCodegenBug.js +++ b/tests/baselines/reference/es6ClassSuperCodegenBug.js @@ -15,12 +15,12 @@ class B extends A { //// [es6ClassSuperCodegenBug.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/es6ClassTest.js b/tests/baselines/reference/es6ClassTest.js index a20d939a794b1..e433f19ece344 100644 --- a/tests/baselines/reference/es6ClassTest.js +++ b/tests/baselines/reference/es6ClassTest.js @@ -85,12 +85,12 @@ declare module AmbientMod { //// [es6ClassTest.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/es6ClassTest2.js b/tests/baselines/reference/es6ClassTest2.js index 11d494c6291ef..491bec40e742e 100644 --- a/tests/baselines/reference/es6ClassTest2.js +++ b/tests/baselines/reference/es6ClassTest2.js @@ -159,12 +159,12 @@ var ccwc = new ChildClassWithoutConstructor(1, "s"); //// [es6ClassTest2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/es6ClassTest7.js b/tests/baselines/reference/es6ClassTest7.js index 9cd21f4468547..d8f7f688ec078 100644 --- a/tests/baselines/reference/es6ClassTest7.js +++ b/tests/baselines/reference/es6ClassTest7.js @@ -9,12 +9,12 @@ class Bar extends M.Foo { //// [es6ClassTest7.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/exportAssignmentOfGenericType1.js b/tests/baselines/reference/exportAssignmentOfGenericType1.js index e5d43bfaa9ea3..76485e8d91e5b 100644 --- a/tests/baselines/reference/exportAssignmentOfGenericType1.js +++ b/tests/baselines/reference/exportAssignmentOfGenericType1.js @@ -24,12 +24,12 @@ define(["require", "exports"], function (require, exports) { return T; }); //// [exportAssignmentOfGenericType1_1.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/exportDeclarationInInternalModule.js b/tests/baselines/reference/exportDeclarationInInternalModule.js index 934b3bb6ef021..e83c10b59fd31 100644 --- a/tests/baselines/reference/exportDeclarationInInternalModule.js +++ b/tests/baselines/reference/exportDeclarationInInternalModule.js @@ -19,12 +19,12 @@ var a: Bbb.SomeType; //// [exportDeclarationInInternalModule.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extBaseClass1.js b/tests/baselines/reference/extBaseClass1.js index 4603ff26320f8..f144fbdbca84b 100644 --- a/tests/baselines/reference/extBaseClass1.js +++ b/tests/baselines/reference/extBaseClass1.js @@ -20,12 +20,12 @@ module N { //// [extBaseClass1.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extBaseClass2.js b/tests/baselines/reference/extBaseClass2.js index 285c96551b547..f453255379bff 100644 --- a/tests/baselines/reference/extBaseClass2.js +++ b/tests/baselines/reference/extBaseClass2.js @@ -11,12 +11,12 @@ module M { //// [extBaseClass2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendAndImplementTheSameBaseType.js b/tests/baselines/reference/extendAndImplementTheSameBaseType.js index b3150a12bde7a..5242430513a48 100644 --- a/tests/baselines/reference/extendAndImplementTheSameBaseType.js +++ b/tests/baselines/reference/extendAndImplementTheSameBaseType.js @@ -14,12 +14,12 @@ d.baz(); d.foo; //// [extendAndImplementTheSameBaseType.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendAndImplementTheSameBaseType2.js b/tests/baselines/reference/extendAndImplementTheSameBaseType2.js index 1ecd77668d3b8..d670758f32446 100644 --- a/tests/baselines/reference/extendAndImplementTheSameBaseType2.js +++ b/tests/baselines/reference/extendAndImplementTheSameBaseType2.js @@ -17,12 +17,12 @@ var r3: string = d.bar(); var r4: number = d.bar(); //// [extendAndImplementTheSameBaseType2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendBaseClassBeforeItsDeclared.js b/tests/baselines/reference/extendBaseClassBeforeItsDeclared.js index 73c19b7256571..a2e55deaa2683 100644 --- a/tests/baselines/reference/extendBaseClassBeforeItsDeclared.js +++ b/tests/baselines/reference/extendBaseClassBeforeItsDeclared.js @@ -4,12 +4,12 @@ class derived extends base { } class base { constructor (public n: number) { } } //// [extendBaseClassBeforeItsDeclared.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendClassExpressionFromModule.js b/tests/baselines/reference/extendClassExpressionFromModule.js index bd3e01a7b296c..08ad33d619b72 100644 --- a/tests/baselines/reference/extendClassExpressionFromModule.js +++ b/tests/baselines/reference/extendClassExpressionFromModule.js @@ -21,12 +21,12 @@ var x = (function () { module.exports = x; //// [foo2.js] "use strict"; +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendConstructSignatureInInterface.js b/tests/baselines/reference/extendConstructSignatureInInterface.js index 28c5108f23810..dc721dc343a32 100644 --- a/tests/baselines/reference/extendConstructSignatureInInterface.js +++ b/tests/baselines/reference/extendConstructSignatureInInterface.js @@ -11,12 +11,12 @@ var e: E = new E(1); //// [extendConstructSignatureInInterface.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendNonClassSymbol1.js b/tests/baselines/reference/extendNonClassSymbol1.js index 8a6da5f4fa773..f52b0382827af 100644 --- a/tests/baselines/reference/extendNonClassSymbol1.js +++ b/tests/baselines/reference/extendNonClassSymbol1.js @@ -4,12 +4,12 @@ var x = A; class C extends x { } // error, could not find symbol xs //// [extendNonClassSymbol1.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendNonClassSymbol2.js b/tests/baselines/reference/extendNonClassSymbol2.js index 60f7a46a14fb9..57695fb5fcf73 100644 --- a/tests/baselines/reference/extendNonClassSymbol2.js +++ b/tests/baselines/reference/extendNonClassSymbol2.js @@ -6,12 +6,12 @@ var x = new Foo(); // legal, considered a constructor function class C extends Foo {} // error, could not find symbol Foo //// [extendNonClassSymbol2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendPrivateConstructorClass.js b/tests/baselines/reference/extendPrivateConstructorClass.js index 983c72203978d..6578c4c9ce343 100644 --- a/tests/baselines/reference/extendPrivateConstructorClass.js +++ b/tests/baselines/reference/extendPrivateConstructorClass.js @@ -10,12 +10,12 @@ class C extends abc.XYZ { //// [extendPrivateConstructorClass.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js b/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js index af5f78dfcecb2..f979a820f6374 100644 --- a/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js +++ b/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js @@ -42,12 +42,12 @@ var Model = (function () { exports.Model = Model; //// [extendingClassFromAliasAndUsageInIndexer_moduleA.js] "use strict"; +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -62,12 +62,12 @@ var VisualizationModel = (function (_super) { exports.VisualizationModel = VisualizationModel; //// [extendingClassFromAliasAndUsageInIndexer_moduleB.js] "use strict"; +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendsClauseAlreadySeen.js b/tests/baselines/reference/extendsClauseAlreadySeen.js index 06326b5428292..1e9681a0d3cf2 100644 --- a/tests/baselines/reference/extendsClauseAlreadySeen.js +++ b/tests/baselines/reference/extendsClauseAlreadySeen.js @@ -7,12 +7,12 @@ class D extends C extends C { } //// [extendsClauseAlreadySeen.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendsClauseAlreadySeen2.js b/tests/baselines/reference/extendsClauseAlreadySeen2.js index 7155524855662..502618d78cebf 100644 --- a/tests/baselines/reference/extendsClauseAlreadySeen2.js +++ b/tests/baselines/reference/extendsClauseAlreadySeen2.js @@ -7,12 +7,12 @@ class D extends C extends C { } //// [extendsClauseAlreadySeen2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/fluentClasses.js b/tests/baselines/reference/fluentClasses.js index 360c7775d3597..887cb9c1febbd 100644 --- a/tests/baselines/reference/fluentClasses.js +++ b/tests/baselines/reference/fluentClasses.js @@ -19,12 +19,12 @@ var z = c.foo().bar().baz(); // Fluent pattern //// [fluentClasses.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/for-inStatements.js b/tests/baselines/reference/for-inStatements.js index 90ab9a3f96ba4..d03972b9f175d 100644 --- a/tests/baselines/reference/for-inStatements.js +++ b/tests/baselines/reference/for-inStatements.js @@ -81,12 +81,12 @@ for (var x in Color.Blue) { } //// [for-inStatements.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/for-inStatementsInvalid.js b/tests/baselines/reference/for-inStatementsInvalid.js index 2ba55110f2e0e..938ab4daf8749 100644 --- a/tests/baselines/reference/for-inStatementsInvalid.js +++ b/tests/baselines/reference/for-inStatementsInvalid.js @@ -64,12 +64,12 @@ for (var x in i[42]) { } //// [for-inStatementsInvalid.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/forStatementsMultipleInvalidDecl.js b/tests/baselines/reference/forStatementsMultipleInvalidDecl.js index 31398cb2af9f7..5bb0709c13c5b 100644 --- a/tests/baselines/reference/forStatementsMultipleInvalidDecl.js +++ b/tests/baselines/reference/forStatementsMultipleInvalidDecl.js @@ -55,12 +55,12 @@ for(var m: typeof M;;){} for( var m = M.A;;){} //// [forStatementsMultipleInvalidDecl.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/functionImplementationErrors.js b/tests/baselines/reference/functionImplementationErrors.js index a91b1b78f07f1..94335364ec865 100644 --- a/tests/baselines/reference/functionImplementationErrors.js +++ b/tests/baselines/reference/functionImplementationErrors.js @@ -75,12 +75,12 @@ var f13 = () => { //// [functionImplementationErrors.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/functionImplementations.js b/tests/baselines/reference/functionImplementations.js index 4854d715c32f6..2a19b4b841f4f 100644 --- a/tests/baselines/reference/functionImplementations.js +++ b/tests/baselines/reference/functionImplementations.js @@ -158,12 +158,12 @@ var f12: (x: number) => any = x => { // should be (x: number) => Base | AnotherC } //// [functionImplementations.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/functionSubtypingOfVarArgs.js b/tests/baselines/reference/functionSubtypingOfVarArgs.js index 4cd1f1096f380..01a6a130823d4 100644 --- a/tests/baselines/reference/functionSubtypingOfVarArgs.js +++ b/tests/baselines/reference/functionSubtypingOfVarArgs.js @@ -15,12 +15,12 @@ class StringEvent extends EventBase { // should work //// [functionSubtypingOfVarArgs.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/functionSubtypingOfVarArgs2.js b/tests/baselines/reference/functionSubtypingOfVarArgs2.js index fc3562ca339ac..a1aaf35748a02 100644 --- a/tests/baselines/reference/functionSubtypingOfVarArgs2.js +++ b/tests/baselines/reference/functionSubtypingOfVarArgs2.js @@ -15,12 +15,12 @@ class StringEvent extends EventBase { //// [functionSubtypingOfVarArgs2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/generatedContextualTyping.js b/tests/baselines/reference/generatedContextualTyping.js index 0cf8767aa5858..1551b671b6203 100644 --- a/tests/baselines/reference/generatedContextualTyping.js +++ b/tests/baselines/reference/generatedContextualTyping.js @@ -356,12 +356,12 @@ var x355 = function(n: (s: Base[]) => any) { }; x355(n => { var n: Base[]; retur var x356 = function(n: Genric) { }; x356({ func: n => { return [d1, d2]; } }); //// [generatedContextualTyping.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericBaseClassLiteralProperty.js b/tests/baselines/reference/genericBaseClassLiteralProperty.js index 753aa2f07339c..c0ef8541ad7d9 100644 --- a/tests/baselines/reference/genericBaseClassLiteralProperty.js +++ b/tests/baselines/reference/genericBaseClassLiteralProperty.js @@ -13,12 +13,12 @@ class SubClass extends BaseClass { } //// [genericBaseClassLiteralProperty.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericBaseClassLiteralProperty2.js b/tests/baselines/reference/genericBaseClassLiteralProperty2.js index 131fc2d36abc6..53fb2472d05c4 100644 --- a/tests/baselines/reference/genericBaseClassLiteralProperty2.js +++ b/tests/baselines/reference/genericBaseClassLiteralProperty2.js @@ -16,12 +16,12 @@ class DataView2 extends BaseCollection2 { //// [genericBaseClassLiteralProperty2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.js b/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.js index 055ef9d2f8626..318f5aa149400 100644 --- a/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.js +++ b/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.js @@ -109,12 +109,12 @@ var r11 = i.foo8(); // Base //// [genericCallWithConstraintsTypeArgumentInference.js] // Basic type inference with generic calls and constraints, no errors expected +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgs2.js b/tests/baselines/reference/genericCallWithObjectTypeArgs2.js index e4399d1903757..dc5bf22658dd8 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgs2.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgs2.js @@ -33,12 +33,12 @@ var i: I; var r4 = f2(i); // Base => Derived //// [genericCallWithObjectTypeArgs2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js index f86cc2da29322..ce39f51d49c43 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js @@ -41,12 +41,12 @@ var r7 = f3(null, x => x); // any //// [genericCallWithObjectTypeArgsAndConstraints2.js] // Generic call with constraints infering type parameter from object member properties // No errors expected +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js index 01a11c7f90ba1..76d0f0854eab8 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js @@ -39,12 +39,12 @@ var r6 = f3(x => x, null); //// [genericCallWithObjectTypeArgsAndConstraints3.js] // Generic call with constraints infering type parameter from object member properties +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericCallbacksAndClassHierarchy.js b/tests/baselines/reference/genericCallbacksAndClassHierarchy.js index d4303fa2037c1..645929e2c141d 100644 --- a/tests/baselines/reference/genericCallbacksAndClassHierarchy.js +++ b/tests/baselines/reference/genericCallbacksAndClassHierarchy.js @@ -24,12 +24,12 @@ module M { } //// [genericCallbacksAndClassHierarchy.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericClassExpressionInFunction.js b/tests/baselines/reference/genericClassExpressionInFunction.js index ab826e2916dc8..8d7098ba4f256 100644 --- a/tests/baselines/reference/genericClassExpressionInFunction.js +++ b/tests/baselines/reference/genericClassExpressionInFunction.js @@ -32,12 +32,12 @@ s.genericVar = 12; //// [genericClassExpressionInFunction.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericClassInheritsConstructorFromNonGenericClass.js b/tests/baselines/reference/genericClassInheritsConstructorFromNonGenericClass.js index dbd654576ecf5..8219bf91c3830 100644 --- a/tests/baselines/reference/genericClassInheritsConstructorFromNonGenericClass.js +++ b/tests/baselines/reference/genericClassInheritsConstructorFromNonGenericClass.js @@ -6,12 +6,12 @@ class C { } //// [genericClassInheritsConstructorFromNonGenericClass.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js b/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js index fa64843f29fad..8563581f95354 100644 --- a/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js +++ b/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js @@ -76,12 +76,12 @@ class ViewModel implements Contract { //// [genericClassPropertyInheritanceSpecialization.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericClassStaticMethod.js b/tests/baselines/reference/genericClassStaticMethod.js index 8345b3d93a7fe..85b09999c6ada 100644 --- a/tests/baselines/reference/genericClassStaticMethod.js +++ b/tests/baselines/reference/genericClassStaticMethod.js @@ -11,12 +11,12 @@ class Bar extends Foo { //// [genericClassStaticMethod.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericClasses3.js b/tests/baselines/reference/genericClasses3.js index 2f8d09eae03e1..0097132b1e45c 100644 --- a/tests/baselines/reference/genericClasses3.js +++ b/tests/baselines/reference/genericClasses3.js @@ -18,12 +18,12 @@ var z = v2.b; //// [genericClasses3.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js index 73fed8b3ea238..a956f444aec97 100644 --- a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js +++ b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js @@ -27,12 +27,12 @@ module EndGate.Tweening { } //// [genericConstraintOnExtendedBuiltinTypes.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js index 8ec4552b70d12..b51acfd80b43c 100644 --- a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js +++ b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js @@ -26,12 +26,12 @@ module EndGate.Tweening { } //// [genericConstraintOnExtendedBuiltinTypes2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.js b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.js index 9da46a15ef7b0..d17f3992c4634 100644 --- a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.js +++ b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.js @@ -13,12 +13,12 @@ x = y; // error //// [genericDerivedTypeWithSpecializedBase.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.js b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.js index df9c113ceb515..3387beda5c45d 100644 --- a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.js +++ b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.js @@ -13,12 +13,12 @@ x = y; // error //// [genericDerivedTypeWithSpecializedBase2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericInheritedDefaultConstructors.js b/tests/baselines/reference/genericInheritedDefaultConstructors.js index f287a5f934cea..f9d4979fb2ab0 100644 --- a/tests/baselines/reference/genericInheritedDefaultConstructors.js +++ b/tests/baselines/reference/genericInheritedDefaultConstructors.js @@ -11,12 +11,12 @@ var c:Constructor> = B; // shouldn't error here //// [genericInheritedDefaultConstructors.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericPrototypeProperty2.js b/tests/baselines/reference/genericPrototypeProperty2.js index 892e6cc0217ee..f07c1f305949e 100644 --- a/tests/baselines/reference/genericPrototypeProperty2.js +++ b/tests/baselines/reference/genericPrototypeProperty2.js @@ -16,12 +16,12 @@ class MyEventWrapper extends BaseEventWrapper { } //// [genericPrototypeProperty2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericPrototypeProperty3.js b/tests/baselines/reference/genericPrototypeProperty3.js index 03755b2868303..a594644df6a67 100644 --- a/tests/baselines/reference/genericPrototypeProperty3.js +++ b/tests/baselines/reference/genericPrototypeProperty3.js @@ -15,12 +15,12 @@ class MyEventWrapper extends BaseEventWrapper { } //// [genericPrototypeProperty3.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js index f5c12bacce83e..d60d4c960bdae 100644 --- a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js +++ b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js @@ -27,12 +27,12 @@ module TypeScript2 { //// [genericRecursiveImplicitConstructorErrors2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js index 3c68033735100..6ecbdcf8dae2c 100644 --- a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js +++ b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js @@ -31,12 +31,12 @@ module TypeScript { //// [genericRecursiveImplicitConstructorErrors3.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericTypeAssertions2.js b/tests/baselines/reference/genericTypeAssertions2.js index d13e06a8dddbb..df70516ad34f9 100644 --- a/tests/baselines/reference/genericTypeAssertions2.js +++ b/tests/baselines/reference/genericTypeAssertions2.js @@ -14,12 +14,12 @@ var r4: A = >new A(); var r5: A = >[]; // error //// [genericTypeAssertions2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericTypeAssertions4.js b/tests/baselines/reference/genericTypeAssertions4.js index e1c4cab059c2c..f65447822c9e1 100644 --- a/tests/baselines/reference/genericTypeAssertions4.js +++ b/tests/baselines/reference/genericTypeAssertions4.js @@ -26,12 +26,12 @@ function foo2(x: T) { } //// [genericTypeAssertions4.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericTypeAssertions6.js b/tests/baselines/reference/genericTypeAssertions6.js index 20a13d5718e0b..362625133192b 100644 --- a/tests/baselines/reference/genericTypeAssertions6.js +++ b/tests/baselines/reference/genericTypeAssertions6.js @@ -25,12 +25,12 @@ var b: B; var c: A = >b; //// [genericTypeAssertions6.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericTypeConstraints.js b/tests/baselines/reference/genericTypeConstraints.js index b2332451507fb..fae7f381616bd 100644 --- a/tests/baselines/reference/genericTypeConstraints.js +++ b/tests/baselines/reference/genericTypeConstraints.js @@ -14,12 +14,12 @@ class BarExtended extends Bar { } //// [genericTypeConstraints.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js index 267666439b102..3d0e940eaa999 100644 --- a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js +++ b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js @@ -40,12 +40,12 @@ var k = null; //// [genericTypeReferenceWithoutTypeArgument.js] // it is an error to use a generic type without type arguments // all of these are errors +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js index 7fce4984d9c5e..552edc1f13429 100644 --- a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js +++ b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js @@ -40,12 +40,12 @@ var k = null; //// [genericTypeReferenceWithoutTypeArgument2.js] // it is an error to use a generic type without type arguments // all of these are errors +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js b/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js index 444043fbeacfb..c12bec69ba682 100644 --- a/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js +++ b/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js @@ -15,12 +15,12 @@ export class ListItem extends CollectionItem { //// [genericWithIndexerOfTypeParameterType2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/heterogeneousArrayLiterals.js b/tests/baselines/reference/heterogeneousArrayLiterals.js index 6a9f8ae1453ca..afb3477111fa6 100644 --- a/tests/baselines/reference/heterogeneousArrayLiterals.js +++ b/tests/baselines/reference/heterogeneousArrayLiterals.js @@ -133,12 +133,12 @@ function foo4(t: T, u: U) { //// [heterogeneousArrayLiterals.js] // type of an array is the best common type of its elements (plus its contextual type if it exists) +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/ifDoWhileStatements.js b/tests/baselines/reference/ifDoWhileStatements.js index fea4eee36fa5f..909b52ad0d65d 100644 --- a/tests/baselines/reference/ifDoWhileStatements.js +++ b/tests/baselines/reference/ifDoWhileStatements.js @@ -164,12 +164,12 @@ do { }while(fn) //// [ifDoWhileStatements.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/illegalSuperCallsInConstructor.js b/tests/baselines/reference/illegalSuperCallsInConstructor.js index 3de32da45c056..1ddb27788d85c 100644 --- a/tests/baselines/reference/illegalSuperCallsInConstructor.js +++ b/tests/baselines/reference/illegalSuperCallsInConstructor.js @@ -21,12 +21,12 @@ class Derived extends Base { } //// [illegalSuperCallsInConstructor.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/implementClausePrecedingExtends.js b/tests/baselines/reference/implementClausePrecedingExtends.js index 5d7173588636f..6aa751d7b5454 100644 --- a/tests/baselines/reference/implementClausePrecedingExtends.js +++ b/tests/baselines/reference/implementClausePrecedingExtends.js @@ -3,12 +3,12 @@ class C { foo: number } class D implements C extends C { } //// [implementClausePrecedingExtends.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.js b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.js index 87b22c74f6bb2..4ab1c3add2378 100644 --- a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.js +++ b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.js @@ -86,12 +86,12 @@ module M2 { } //// [implementingAnInterfaceExtendingClassWithPrivates2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.js b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.js index 68ecf9ede2ba0..21e99dfa07ba2 100644 --- a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.js +++ b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.js @@ -42,12 +42,12 @@ class Bar8 extends Foo implements I { //// [implementingAnInterfaceExtendingClassWithProtecteds.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/importAsBaseClass.js b/tests/baselines/reference/importAsBaseClass.js index ea7c757e035f3..0f95c2d3dbbdc 100644 --- a/tests/baselines/reference/importAsBaseClass.js +++ b/tests/baselines/reference/importAsBaseClass.js @@ -21,12 +21,12 @@ var Greeter = (function () { exports.Greeter = Greeter; //// [importAsBaseClass_1.js] "use strict"; +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/importHelpers.js b/tests/baselines/reference/importHelpers.js index 0a9dcd4a78044..06360b221b6e8 100644 --- a/tests/baselines/reference/importHelpers.js +++ b/tests/baselines/reference/importHelpers.js @@ -68,12 +68,12 @@ C = tslib_1.__decorate([ tslib_1.__metadata("design:paramtypes", []) ], C); //// [script.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/importHelpersNoHelpers.js b/tests/baselines/reference/importHelpersNoHelpers.js index c7c575f5402b1..e48e51de44b0d 100644 --- a/tests/baselines/reference/importHelpersNoHelpers.js +++ b/tests/baselines/reference/importHelpersNoHelpers.js @@ -70,12 +70,12 @@ var o = { a: 1 }; var y = tslib_1.__assign({}, o); var x = tslib_1.__rest(y, []); //// [script.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/importHelpersNoModule.js b/tests/baselines/reference/importHelpersNoModule.js index 212bc7a54f778..9d655f401c7d2 100644 --- a/tests/baselines/reference/importHelpersNoModule.js +++ b/tests/baselines/reference/importHelpersNoModule.js @@ -60,12 +60,12 @@ C = tslib_1.__decorate([ tslib_1.__metadata("design:paramtypes", []) ], C); //// [script.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/importShadowsGlobalName.js b/tests/baselines/reference/importShadowsGlobalName.js index 8431a87ce03c7..61f715a2194cf 100644 --- a/tests/baselines/reference/importShadowsGlobalName.js +++ b/tests/baselines/reference/importShadowsGlobalName.js @@ -21,12 +21,12 @@ define(["require", "exports"], function (require, exports) { return Foo; }); //// [Bar.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/importUsedInExtendsList1.js b/tests/baselines/reference/importUsedInExtendsList1.js index f44a0fcfce49c..b4bc18ddb7fd3 100644 --- a/tests/baselines/reference/importUsedInExtendsList1.js +++ b/tests/baselines/reference/importUsedInExtendsList1.js @@ -21,12 +21,12 @@ var Super = (function () { exports.Super = Super; //// [importUsedInExtendsList1_1.js] "use strict"; +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/indexerConstraints2.js b/tests/baselines/reference/indexerConstraints2.js index 45980beb09c78..2fdfe55d22d72 100644 --- a/tests/baselines/reference/indexerConstraints2.js +++ b/tests/baselines/reference/indexerConstraints2.js @@ -29,12 +29,12 @@ class K extends J { } //// [indexerConstraints2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/indirectSelfReference.js b/tests/baselines/reference/indirectSelfReference.js index 931525d4b6bc5..9a3c5e3cfeb53 100644 --- a/tests/baselines/reference/indirectSelfReference.js +++ b/tests/baselines/reference/indirectSelfReference.js @@ -3,12 +3,12 @@ class a extends b{ } class b extends a{ } //// [indirectSelfReference.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/indirectSelfReferenceGeneric.js b/tests/baselines/reference/indirectSelfReferenceGeneric.js index e7d2bdf2a2b32..f9ba7ccc940fa 100644 --- a/tests/baselines/reference/indirectSelfReferenceGeneric.js +++ b/tests/baselines/reference/indirectSelfReferenceGeneric.js @@ -3,12 +3,12 @@ class a extends b { } class b extends a { } //// [indirectSelfReferenceGeneric.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/infinitelyExpandingTypesNonGenericBase.js b/tests/baselines/reference/infinitelyExpandingTypesNonGenericBase.js index 96a8e84ff600a..bbcedbfa6b818 100644 --- a/tests/baselines/reference/infinitelyExpandingTypesNonGenericBase.js +++ b/tests/baselines/reference/infinitelyExpandingTypesNonGenericBase.js @@ -25,12 +25,12 @@ o(A); //// [infinitelyExpandingTypesNonGenericBase.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritFromGenericTypeParameter.js b/tests/baselines/reference/inheritFromGenericTypeParameter.js index d95150bbccc61..b8ffd010380ee 100644 --- a/tests/baselines/reference/inheritFromGenericTypeParameter.js +++ b/tests/baselines/reference/inheritFromGenericTypeParameter.js @@ -3,12 +3,12 @@ class C extends T { } interface I extends T { } //// [inheritFromGenericTypeParameter.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritSameNamePrivatePropertiesFromSameOrigin.js b/tests/baselines/reference/inheritSameNamePrivatePropertiesFromSameOrigin.js index b1224117edea2..b63252a44496d 100644 --- a/tests/baselines/reference/inheritSameNamePrivatePropertiesFromSameOrigin.js +++ b/tests/baselines/reference/inheritSameNamePrivatePropertiesFromSameOrigin.js @@ -11,12 +11,12 @@ interface A extends C, C2 { // ok } //// [inheritSameNamePrivatePropertiesFromSameOrigin.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritance.js b/tests/baselines/reference/inheritance.js index b9a7c5a336f42..7cb4b76c740ac 100644 --- a/tests/baselines/reference/inheritance.js +++ b/tests/baselines/reference/inheritance.js @@ -35,12 +35,12 @@ class Baad extends Good { //// [inheritance.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritance1.js b/tests/baselines/reference/inheritance1.js index 0e5bff48a3bcb..4ad5c55dc6268 100644 --- a/tests/baselines/reference/inheritance1.js +++ b/tests/baselines/reference/inheritance1.js @@ -62,12 +62,12 @@ l1 = sc; l1 = c; //// [inheritance1.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js index bd4b70f793850..2fd7aa913d04f 100644 --- a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js +++ b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js @@ -11,12 +11,12 @@ class C extends B { //// [inheritanceGrandParentPrivateMemberCollision.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js index d72f85cf599d5..8f436ffd35379 100644 --- a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js +++ b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js @@ -11,12 +11,12 @@ class C extends B { //// [inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js b/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js index c6b32f6bc5dfe..e13c592eccbaf 100644 --- a/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js +++ b/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js @@ -11,12 +11,12 @@ class C extends B { //// [inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js b/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js index fdc53cc7e9c69..b593654036b84 100644 --- a/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js @@ -18,12 +18,12 @@ class b extends a { } //// [inheritanceMemberAccessorOverridingAccessor.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.js b/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.js index 13e624a9d5788..84c1f0d3a4c53 100644 --- a/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.js +++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.js @@ -15,12 +15,12 @@ class b extends a { } //// [inheritanceMemberAccessorOverridingMethod.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js b/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js index 243992d5bd31e..b8cec2486d727 100644 --- a/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js +++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js @@ -13,12 +13,12 @@ class b extends a { } //// [inheritanceMemberAccessorOverridingProperty.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js b/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js index 001f7b888e3e3..158c89d092e06 100644 --- a/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js @@ -15,12 +15,12 @@ class b extends a { } //// [inheritanceMemberFuncOverridingAccessor.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.js b/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.js index 33a35428b8ec1..a2c8a6b690e90 100644 --- a/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.js +++ b/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.js @@ -12,12 +12,12 @@ class b extends a { } //// [inheritanceMemberFuncOverridingMethod.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.js b/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.js index 0675aead22243..bd0a9e55ba19c 100644 --- a/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.js +++ b/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.js @@ -10,12 +10,12 @@ class b extends a { } //// [inheritanceMemberFuncOverridingProperty.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js b/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js index ec3e8519e62d0..2c7ae4fb6b64a 100644 --- a/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js @@ -14,12 +14,12 @@ class b extends a { } //// [inheritanceMemberPropertyOverridingAccessor.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.js b/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.js index e2e1d7340012f..0b604adae2a85 100644 --- a/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.js +++ b/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.js @@ -10,12 +10,12 @@ class b extends a { } //// [inheritanceMemberPropertyOverridingMethod.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberPropertyOverridingProperty.js b/tests/baselines/reference/inheritanceMemberPropertyOverridingProperty.js index 50d6b108588a4..71a9731e82857 100644 --- a/tests/baselines/reference/inheritanceMemberPropertyOverridingProperty.js +++ b/tests/baselines/reference/inheritanceMemberPropertyOverridingProperty.js @@ -8,12 +8,12 @@ class b extends a { } //// [inheritanceMemberPropertyOverridingProperty.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js b/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js index 871acd1d62446..4c243028296ec 100644 --- a/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js +++ b/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js @@ -8,12 +8,12 @@ var b3 = new B(); // error, could not select overload for 'new' expression //// [inheritanceOfGenericConstructorMethod1.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js b/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js index 72f12c8f81fa8..1bf2fd4eed79a 100644 --- a/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js +++ b/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js @@ -15,12 +15,12 @@ var n3 = new N.D2(); // no error, D2 //// [inheritanceOfGenericConstructorMethod2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js b/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js index c58a0643a06ec..e35b3f24a5dc5 100644 --- a/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js @@ -18,12 +18,12 @@ class b extends a { } //// [inheritanceStaticAccessorOverridingAccessor.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js b/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js index beba3dbdf5e61..d1035ae3d480c 100644 --- a/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js +++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js @@ -15,12 +15,12 @@ class b extends a { } //// [inheritanceStaticAccessorOverridingMethod.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js b/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js index d3f4b177e951e..c51f321020dcd 100644 --- a/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js +++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js @@ -13,12 +13,12 @@ class b extends a { } //// [inheritanceStaticAccessorOverridingProperty.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js index d86d08e7add3b..778e7987f2746 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js @@ -15,12 +15,12 @@ class b extends a { } //// [inheritanceStaticFuncOverridingAccessor.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js index 1decf45e015ae..a6afadefb3a84 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js @@ -12,12 +12,12 @@ class b extends a { } //// [inheritanceStaticFuncOverridingAccessorOfFuncType.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.js b/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.js index e9ea5d2f6a10b..37b3113b855a8 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.js @@ -12,12 +12,12 @@ class b extends a { } //// [inheritanceStaticFuncOverridingMethod.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.js b/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.js index dd2260ecf3175..0d328df7c53b8 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.js @@ -10,12 +10,12 @@ class b extends a { } //// [inheritanceStaticFuncOverridingProperty.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.js b/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.js index 9a555ce218ff2..541cda8e1b25a 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.js @@ -10,12 +10,12 @@ class b extends a { } //// [inheritanceStaticFuncOverridingPropertyOfFuncType.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticFunctionOverridingInstanceProperty.js b/tests/baselines/reference/inheritanceStaticFunctionOverridingInstanceProperty.js index e357eb6e01f55..4ec01a1dc36fc 100644 --- a/tests/baselines/reference/inheritanceStaticFunctionOverridingInstanceProperty.js +++ b/tests/baselines/reference/inheritanceStaticFunctionOverridingInstanceProperty.js @@ -10,12 +10,12 @@ class b extends a { } //// [inheritanceStaticFunctionOverridingInstanceProperty.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticMembersCompatible.js b/tests/baselines/reference/inheritanceStaticMembersCompatible.js index 044db517290c9..74a86c64f8c28 100644 --- a/tests/baselines/reference/inheritanceStaticMembersCompatible.js +++ b/tests/baselines/reference/inheritanceStaticMembersCompatible.js @@ -8,12 +8,12 @@ class b extends a { } //// [inheritanceStaticMembersCompatible.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticMembersIncompatible.js b/tests/baselines/reference/inheritanceStaticMembersIncompatible.js index 0c21f4a1af5ee..e1ac5204119ee 100644 --- a/tests/baselines/reference/inheritanceStaticMembersIncompatible.js +++ b/tests/baselines/reference/inheritanceStaticMembersIncompatible.js @@ -8,12 +8,12 @@ class b extends a { } //// [inheritanceStaticMembersIncompatible.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js b/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js index de05071c11675..48cb36812a290 100644 --- a/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js @@ -13,12 +13,12 @@ class b extends a { } //// [inheritanceStaticPropertyOverridingAccessor.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.js b/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.js index 4c1ca7e00cb29..f5130abe8bd51 100644 --- a/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.js +++ b/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.js @@ -10,12 +10,12 @@ class b extends a { } //// [inheritanceStaticPropertyOverridingMethod.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticPropertyOverridingProperty.js b/tests/baselines/reference/inheritanceStaticPropertyOverridingProperty.js index a351a84d98b48..e60108ca25b12 100644 --- a/tests/baselines/reference/inheritanceStaticPropertyOverridingProperty.js +++ b/tests/baselines/reference/inheritanceStaticPropertyOverridingProperty.js @@ -8,12 +8,12 @@ class b extends a { } //// [inheritanceStaticPropertyOverridingProperty.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritedConstructorWithRestParams.js b/tests/baselines/reference/inheritedConstructorWithRestParams.js index e9f362ead4223..9abc3a38497ef 100644 --- a/tests/baselines/reference/inheritedConstructorWithRestParams.js +++ b/tests/baselines/reference/inheritedConstructorWithRestParams.js @@ -15,12 +15,12 @@ new Derived("", 3); new Derived(3); //// [inheritedConstructorWithRestParams.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritedConstructorWithRestParams2.js b/tests/baselines/reference/inheritedConstructorWithRestParams2.js index 3d89d237ad538..925f5124753ac 100644 --- a/tests/baselines/reference/inheritedConstructorWithRestParams2.js +++ b/tests/baselines/reference/inheritedConstructorWithRestParams2.js @@ -35,12 +35,12 @@ new Derived("", 3, "", 3); new Derived("", 3, "", ""); //// [inheritedConstructorWithRestParams2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritedModuleMembersForClodule.js b/tests/baselines/reference/inheritedModuleMembersForClodule.js index 512d8bbca57d2..f919c354e5e60 100644 --- a/tests/baselines/reference/inheritedModuleMembersForClodule.js +++ b/tests/baselines/reference/inheritedModuleMembersForClodule.js @@ -22,12 +22,12 @@ class E extends D { //// [inheritedModuleMembersForClodule.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/instanceOfAssignability.js b/tests/baselines/reference/instanceOfAssignability.js index 4f7b0bead561b..d6581fbfd094d 100644 --- a/tests/baselines/reference/instanceOfAssignability.js +++ b/tests/baselines/reference/instanceOfAssignability.js @@ -90,12 +90,12 @@ function fn8(x: Alpha|Beta|Gamma) { //// [instanceOfAssignability.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js b/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js index 57c7e5161b2dc..bf304bc0aabd4 100644 --- a/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js +++ b/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js @@ -43,12 +43,12 @@ module Generic { } //// [instancePropertiesInheritedIntoClassType.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/instanceSubtypeCheck2.js b/tests/baselines/reference/instanceSubtypeCheck2.js index 7f4b0803382c9..791e72a6b4ebd 100644 --- a/tests/baselines/reference/instanceSubtypeCheck2.js +++ b/tests/baselines/reference/instanceSubtypeCheck2.js @@ -8,12 +8,12 @@ class C2 extends C1 { } //// [instanceSubtypeCheck2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/instanceofWithStructurallyIdenticalTypes.js b/tests/baselines/reference/instanceofWithStructurallyIdenticalTypes.js index 59ea127015560..938bf26dc44a3 100644 --- a/tests/baselines/reference/instanceofWithStructurallyIdenticalTypes.js +++ b/tests/baselines/reference/instanceofWithStructurallyIdenticalTypes.js @@ -72,12 +72,12 @@ function goo(x: A) { //// [instanceofWithStructurallyIdenticalTypes.js] // Repro from #7271 +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/instantiatedReturnTypeContravariance.js b/tests/baselines/reference/instantiatedReturnTypeContravariance.js index 338a60610a05b..62de511b4c899 100644 --- a/tests/baselines/reference/instantiatedReturnTypeContravariance.js +++ b/tests/baselines/reference/instantiatedReturnTypeContravariance.js @@ -31,12 +31,12 @@ return null; //// [instantiatedReturnTypeContravariance.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/interfaceClassMerging.js b/tests/baselines/reference/interfaceClassMerging.js index 36e4719549a07..d3d7b257465fd 100644 --- a/tests/baselines/reference/interfaceClassMerging.js +++ b/tests/baselines/reference/interfaceClassMerging.js @@ -41,12 +41,12 @@ obj = bar; //// [interfaceClassMerging.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/interfaceClassMerging2.js b/tests/baselines/reference/interfaceClassMerging2.js index f230544e492eb..9f7037048bd6a 100644 --- a/tests/baselines/reference/interfaceClassMerging2.js +++ b/tests/baselines/reference/interfaceClassMerging2.js @@ -37,12 +37,12 @@ foo = bar; //// [interfaceClassMerging2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/interfaceExtendsClass1.js b/tests/baselines/reference/interfaceExtendsClass1.js index 0afae83d4b9df..7b0865b0018f2 100644 --- a/tests/baselines/reference/interfaceExtendsClass1.js +++ b/tests/baselines/reference/interfaceExtendsClass1.js @@ -19,12 +19,12 @@ class Location { //// [interfaceExtendsClass1.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js b/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js index 0b493aded807c..a560df2598656 100644 --- a/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js +++ b/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js @@ -28,12 +28,12 @@ c = d; d = c; // error //// [interfaceExtendsClassWithPrivate1.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js b/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js index 699b924a85483..3aa5f800d9c8f 100644 --- a/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js +++ b/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js @@ -24,12 +24,12 @@ class D2 extends C implements I { // error } //// [interfaceExtendsClassWithPrivate2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/interfaceImplementation8.js b/tests/baselines/reference/interfaceImplementation8.js index 04f341d1f0646..c8a739a3a1f82 100644 --- a/tests/baselines/reference/interfaceImplementation8.js +++ b/tests/baselines/reference/interfaceImplementation8.js @@ -41,12 +41,12 @@ class C8 extends C7 implements i2{ //// [interfaceImplementation8.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.js b/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.js index 8fa200638e490..9ed7be8e0f223 100644 --- a/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.js +++ b/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.js @@ -80,12 +80,12 @@ module YYY4 { //// [invalidModuleWithStatementsOfEveryKind.js] // All of these should be an error +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/invalidMultipleVariableDeclarations.js b/tests/baselines/reference/invalidMultipleVariableDeclarations.js index 3380d5847a9a8..788b91f13c5f7 100644 --- a/tests/baselines/reference/invalidMultipleVariableDeclarations.js +++ b/tests/baselines/reference/invalidMultipleVariableDeclarations.js @@ -54,12 +54,12 @@ var m: typeof M; var m = M.A; //// [invalidMultipleVariableDeclarations.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/invalidReturnStatements.js b/tests/baselines/reference/invalidReturnStatements.js index 01982b322bb75..ca25cdc98703c 100644 --- a/tests/baselines/reference/invalidReturnStatements.js +++ b/tests/baselines/reference/invalidReturnStatements.js @@ -21,12 +21,12 @@ function fn11(): D { return new C(); } //// [invalidReturnStatements.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/isolatedModulesImportExportElision.js b/tests/baselines/reference/isolatedModulesImportExportElision.js index 747e69d7c5945..dddc8d5633953 100644 --- a/tests/baselines/reference/isolatedModulesImportExportElision.js +++ b/tests/baselines/reference/isolatedModulesImportExportElision.js @@ -15,12 +15,12 @@ export var z = x; //// [file1.js] "use strict"; +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/jsxViaImport.js b/tests/baselines/reference/jsxViaImport.js index 61e196daaa4bc..110cbba1ef60e 100644 --- a/tests/baselines/reference/jsxViaImport.js +++ b/tests/baselines/reference/jsxViaImport.js @@ -25,12 +25,12 @@ class TestComponent extends React.Component { //// [consumer.jsx] "use strict"; +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/keyofAndIndexedAccess.js b/tests/baselines/reference/keyofAndIndexedAccess.js index 319875eef2cce..58092783f6ebe 100644 --- a/tests/baselines/reference/keyofAndIndexedAccess.js +++ b/tests/baselines/reference/keyofAndIndexedAccess.js @@ -294,12 +294,12 @@ var hashOfEmpty1 = on({ test: () => {} }); // {} var hashOfEmpty2 = on({ test: (x: boolean) => {} }); // { test: boolean } //// [keyofAndIndexedAccess.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/lambdaArgCrash.js b/tests/baselines/reference/lambdaArgCrash.js index c4343a67452a6..8fbe9a407283b 100644 --- a/tests/baselines/reference/lambdaArgCrash.js +++ b/tests/baselines/reference/lambdaArgCrash.js @@ -35,12 +35,12 @@ class ItemSetEvent extends Event { //// [lambdaArgCrash.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/lift.js b/tests/baselines/reference/lift.js index 44932a3ad14d5..a9f3b4b17ac97 100644 --- a/tests/baselines/reference/lift.js +++ b/tests/baselines/reference/lift.js @@ -18,12 +18,12 @@ class C extends B { //// [lift.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/localTypes1.js b/tests/baselines/reference/localTypes1.js index 2a3510860ef44..503a34c528c45 100644 --- a/tests/baselines/reference/localTypes1.js +++ b/tests/baselines/reference/localTypes1.js @@ -142,12 +142,12 @@ function f6() { //// [localTypes1.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/m7Bugs.js b/tests/baselines/reference/m7Bugs.js index 0ae1f77a62a04..b48fb3bbb3e25 100644 --- a/tests/baselines/reference/m7Bugs.js +++ b/tests/baselines/reference/m7Bugs.js @@ -27,12 +27,12 @@ var y3: C1 = {}; //// [m7Bugs.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/mergedDeclarations5.js b/tests/baselines/reference/mergedDeclarations5.js index d8426a5ce2832..e3273fd811598 100644 --- a/tests/baselines/reference/mergedDeclarations5.js +++ b/tests/baselines/reference/mergedDeclarations5.js @@ -19,12 +19,12 @@ var A = (function () { return A; }()); //// [b.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/mergedDeclarations6.js b/tests/baselines/reference/mergedDeclarations6.js index c573190dc8b32..d4f013e4eccce 100644 --- a/tests/baselines/reference/mergedDeclarations6.js +++ b/tests/baselines/reference/mergedDeclarations6.js @@ -37,12 +37,12 @@ define(["require", "exports"], function (require, exports) { exports.A = A; }); //// [b.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/mergedInheritedClassInterface.js b/tests/baselines/reference/mergedInheritedClassInterface.js index ec1b72bf5d75c..4b6457fe1ddd9 100644 --- a/tests/baselines/reference/mergedInheritedClassInterface.js +++ b/tests/baselines/reference/mergedInheritedClassInterface.js @@ -47,12 +47,12 @@ grandchild.method2(); //// [mergedInheritedClassInterface.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.js b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.js index ac82060f270dc..3207ae8f8c5dc 100644 --- a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.js +++ b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.js @@ -32,12 +32,12 @@ var r = a.x; // error var r2 = a.w; // error //// [mergedInterfacesWithInheritedPrivates2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.js b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.js index 31c3deff6d1c0..6a01a6cdd7871 100644 --- a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.js +++ b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.js @@ -39,12 +39,12 @@ module M { } //// [mergedInterfacesWithInheritedPrivates3.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/missingPropertiesOfClassExpression.js b/tests/baselines/reference/missingPropertiesOfClassExpression.js index aa832f39416e0..54016af34afef 100644 --- a/tests/baselines/reference/missingPropertiesOfClassExpression.js +++ b/tests/baselines/reference/missingPropertiesOfClassExpression.js @@ -7,12 +7,12 @@ class George extends class { reset() { return this.y; } } { //// [missingPropertiesOfClassExpression.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/moduleAsBaseType.js b/tests/baselines/reference/moduleAsBaseType.js index 00a4f4178043d..5a421d7d3f410 100644 --- a/tests/baselines/reference/moduleAsBaseType.js +++ b/tests/baselines/reference/moduleAsBaseType.js @@ -5,12 +5,12 @@ interface I extends M { } class C2 implements M { } //// [moduleAsBaseType.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/moduleImportedForTypeArgumentPosition.js b/tests/baselines/reference/moduleImportedForTypeArgumentPosition.js index a12c2af9439db..c57f7af6579c7 100644 --- a/tests/baselines/reference/moduleImportedForTypeArgumentPosition.js +++ b/tests/baselines/reference/moduleImportedForTypeArgumentPosition.js @@ -16,12 +16,12 @@ define(["require", "exports"], function (require, exports) { "use strict"; }); //// [moduleImportedForTypeArgumentPosition_1.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/moduleWithStatementsOfEveryKind.js b/tests/baselines/reference/moduleWithStatementsOfEveryKind.js index 7a36ad10376af..6fda8588f4383 100644 --- a/tests/baselines/reference/moduleWithStatementsOfEveryKind.js +++ b/tests/baselines/reference/moduleWithStatementsOfEveryKind.js @@ -59,12 +59,12 @@ module Y { //// [moduleWithStatementsOfEveryKind.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/multipleInheritance.js b/tests/baselines/reference/multipleInheritance.js index 4122bcb40ee87..2036f81bf925a 100644 --- a/tests/baselines/reference/multipleInheritance.js +++ b/tests/baselines/reference/multipleInheritance.js @@ -39,12 +39,12 @@ class Baad extends Good { //// [multipleInheritance.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/mutuallyRecursiveGenericBaseTypes2.js b/tests/baselines/reference/mutuallyRecursiveGenericBaseTypes2.js index 1ac0e7db55ddc..0f86ca802a651 100644 --- a/tests/baselines/reference/mutuallyRecursiveGenericBaseTypes2.js +++ b/tests/baselines/reference/mutuallyRecursiveGenericBaseTypes2.js @@ -11,12 +11,12 @@ var test = new foo(); //// [mutuallyRecursiveGenericBaseTypes2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/noImplicitAnyMissingGetAccessor.js b/tests/baselines/reference/noImplicitAnyMissingGetAccessor.js index e08985796c378..1253860daa6df 100644 --- a/tests/baselines/reference/noImplicitAnyMissingGetAccessor.js +++ b/tests/baselines/reference/noImplicitAnyMissingGetAccessor.js @@ -13,12 +13,12 @@ class Child extends Parent { } //// [noImplicitAnyMissingGetAccessor.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/noImplicitAnyMissingSetAccessor.js b/tests/baselines/reference/noImplicitAnyMissingSetAccessor.js index 45cf29fd567a0..76011cee44213 100644 --- a/tests/baselines/reference/noImplicitAnyMissingSetAccessor.js +++ b/tests/baselines/reference/noImplicitAnyMissingSetAccessor.js @@ -12,12 +12,12 @@ class Child extends Parent { } //// [noImplicitAnyMissingSetAccessor.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/nonGenericClassExtendingGenericClassWithAny.js b/tests/baselines/reference/nonGenericClassExtendingGenericClassWithAny.js index 270ea7f3bfc41..1dab2ae6fb8ea 100644 --- a/tests/baselines/reference/nonGenericClassExtendingGenericClassWithAny.js +++ b/tests/baselines/reference/nonGenericClassExtendingGenericClassWithAny.js @@ -6,12 +6,12 @@ class Foo { class Bar extends Foo { } // Valid //// [nonGenericClassExtendingGenericClassWithAny.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js index 2f2be923f1718..b571573c18f44 100644 --- a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js +++ b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js @@ -47,12 +47,12 @@ var b: { [x: number]: A } = { //// [numericIndexerConstrainsPropertyDeclarations2.js] // String indexer providing a constraint of a user defined type +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/numericIndexerConstraint3.js b/tests/baselines/reference/numericIndexerConstraint3.js index 85556b4c83d3c..0dbcc5308c80c 100644 --- a/tests/baselines/reference/numericIndexerConstraint3.js +++ b/tests/baselines/reference/numericIndexerConstraint3.js @@ -13,12 +13,12 @@ class C { } //// [numericIndexerConstraint3.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/numericIndexerConstraint4.js b/tests/baselines/reference/numericIndexerConstraint4.js index 8958392fe78be..0b4f1be536134 100644 --- a/tests/baselines/reference/numericIndexerConstraint4.js +++ b/tests/baselines/reference/numericIndexerConstraint4.js @@ -13,12 +13,12 @@ var x: { //// [numericIndexerConstraint4.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/numericIndexerTyping2.js b/tests/baselines/reference/numericIndexerTyping2.js index 5ce85e4c5eb02..d4e12eddd27dd 100644 --- a/tests/baselines/reference/numericIndexerTyping2.js +++ b/tests/baselines/reference/numericIndexerTyping2.js @@ -13,12 +13,12 @@ var i2: I2; var r2: string = i2[1]; // error: numeric indexer returns the type of the string indexere //// [numericIndexerTyping2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectCreationOfElementAccessExpression.js b/tests/baselines/reference/objectCreationOfElementAccessExpression.js index 3f251e470290d..0d6589f09e3ff 100644 --- a/tests/baselines/reference/objectCreationOfElementAccessExpression.js +++ b/tests/baselines/reference/objectCreationOfElementAccessExpression.js @@ -56,12 +56,12 @@ var foods2: MonsterFood[] = new PetFood[new IceCream('Mint chocolate chip') , Co //// [objectCreationOfElementAccessExpression.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js b/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js index 05dfd4bc818d8..8f9acd3615cf7 100644 --- a/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js +++ b/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js @@ -55,12 +55,12 @@ var b: { var r4: void = b.valueOf(); //// [objectTypeHidingMembersOfExtendedObject.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js index 9518317f2300d..e995999e04b55 100644 --- a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js +++ b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js @@ -124,12 +124,12 @@ function foo16(x: any) { } //// [objectTypesIdentityWithNumericIndexers1.js] // object types are identical structurally +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js index a5b93a32853a7..81521fccedf92 100644 --- a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js +++ b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js @@ -127,12 +127,12 @@ function foo16(x: any) { } //// [objectTypesIdentityWithNumericIndexers2.js] // object types are identical structurally +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js index 14a70059adc11..c66084b049fcb 100644 --- a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js +++ b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js @@ -124,12 +124,12 @@ function foo16(x: any) { } //// [objectTypesIdentityWithNumericIndexers3.js] // object types are identical structurally +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypesIdentityWithPrivates.js b/tests/baselines/reference/objectTypesIdentityWithPrivates.js index 0d3ebae0bb853..e0cfd4b3be182 100644 --- a/tests/baselines/reference/objectTypesIdentityWithPrivates.js +++ b/tests/baselines/reference/objectTypesIdentityWithPrivates.js @@ -122,12 +122,12 @@ function foo16(x: any) { } //// [objectTypesIdentityWithPrivates.js] // object types are identical structurally +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypesIdentityWithPrivates2.js b/tests/baselines/reference/objectTypesIdentityWithPrivates2.js index 4fa90889d8177..97f8179bfb1fb 100644 --- a/tests/baselines/reference/objectTypesIdentityWithPrivates2.js +++ b/tests/baselines/reference/objectTypesIdentityWithPrivates2.js @@ -40,12 +40,12 @@ function foo6(x: any): any { } //// [objectTypesIdentityWithPrivates2.js] // object types are identical structurally +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypesIdentityWithPrivates3.js b/tests/baselines/reference/objectTypesIdentityWithPrivates3.js index 6ca413637f537..740c9af666b12 100644 --- a/tests/baselines/reference/objectTypesIdentityWithPrivates3.js +++ b/tests/baselines/reference/objectTypesIdentityWithPrivates3.js @@ -26,12 +26,12 @@ var c3: C3; c3; // Should fail (private x originates in the same declaration, but different types) //// [objectTypesIdentityWithPrivates3.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js b/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js index 6758afd5cb3e2..fe72b6d409a86 100644 --- a/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js +++ b/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js @@ -124,12 +124,12 @@ function foo16(x: any) { } //// [objectTypesIdentityWithStringIndexers.js] // object types are identical structurally +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js b/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js index 370c71533fb94..9cd95ea962900 100644 --- a/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js +++ b/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js @@ -127,12 +127,12 @@ function foo16(x: any) { } //// [objectTypesIdentityWithStringIndexers2.js] // object types are identical structurally +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/optionalConstructorArgInSuper.js b/tests/baselines/reference/optionalConstructorArgInSuper.js index e13ea6a702d2c..927fbd25854d4 100644 --- a/tests/baselines/reference/optionalConstructorArgInSuper.js +++ b/tests/baselines/reference/optionalConstructorArgInSuper.js @@ -11,12 +11,12 @@ d2.foo(); //// [optionalConstructorArgInSuper.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/optionalMethods.js b/tests/baselines/reference/optionalMethods.js index b0af91c92f857..4d89325803d20 100644 --- a/tests/baselines/reference/optionalMethods.js +++ b/tests/baselines/reference/optionalMethods.js @@ -58,12 +58,12 @@ class Derived extends Base { //// [optionalMethods.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/optionalParamArgsTest.js b/tests/baselines/reference/optionalParamArgsTest.js index 91507916a55d6..7f606887baa88 100644 --- a/tests/baselines/reference/optionalParamArgsTest.js +++ b/tests/baselines/reference/optionalParamArgsTest.js @@ -125,12 +125,12 @@ fnOpt2(1, [2, 3], [1], true); //// [optionalParamArgsTest.js] // Optional parameter and default argument tests +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/optionalParamInOverride.js b/tests/baselines/reference/optionalParamInOverride.js index bc60d2507b063..cfa9364bb68bc 100644 --- a/tests/baselines/reference/optionalParamInOverride.js +++ b/tests/baselines/reference/optionalParamInOverride.js @@ -8,12 +8,12 @@ class Y extends Z { //// [optionalParamInOverride.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/optionalParameterProperty.js b/tests/baselines/reference/optionalParameterProperty.js index 62058c1ecb3fb..5a7bb5441ddad 100644 --- a/tests/baselines/reference/optionalParameterProperty.js +++ b/tests/baselines/reference/optionalParameterProperty.js @@ -12,12 +12,12 @@ class D extends C { //// [optionalParameterProperty.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/outModuleConcatAmd.js b/tests/baselines/reference/outModuleConcatAmd.js index 8a28677dbbf84..867360fc49ee2 100644 --- a/tests/baselines/reference/outModuleConcatAmd.js +++ b/tests/baselines/reference/outModuleConcatAmd.js @@ -9,12 +9,12 @@ import {A} from "./ref/a"; export class B extends A { } //// [all.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt b/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt index 75af3bb54ace2..ef5e9e9dcab82 100644 --- a/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt +++ b/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt @@ -8,12 +8,12 @@ sources: tests/cases/compiler/ref/a.ts,tests/cases/compiler/b.ts emittedFile:all.js sourceFile:tests/cases/compiler/ref/a.ts ------------------------------------------------------------------- +>>>var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { ->>> if (typeof Object.setPrototypeOf === "function") { ->>> Object.setPrototypeOf(d, b); ->>> } else { ->>> d.__proto__ = b; ->>> } +>>> __extendStatics(d, b); >>> function __() { this.constructor = d; } >>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); >>>}; diff --git a/tests/baselines/reference/outModuleConcatSystem.js b/tests/baselines/reference/outModuleConcatSystem.js index 4a7552bcde8cf..db9191cedf738 100644 --- a/tests/baselines/reference/outModuleConcatSystem.js +++ b/tests/baselines/reference/outModuleConcatSystem.js @@ -9,12 +9,12 @@ import {A} from "./ref/a"; export class B extends A { } //// [all.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt b/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt index e5a439aea1a6f..fa08e14d1351e 100644 --- a/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt +++ b/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt @@ -8,12 +8,12 @@ sources: tests/cases/compiler/ref/a.ts,tests/cases/compiler/b.ts emittedFile:all.js sourceFile:tests/cases/compiler/ref/a.ts ------------------------------------------------------------------- +>>>var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { ->>> if (typeof Object.setPrototypeOf === "function") { ->>> Object.setPrototypeOf(d, b); ->>> } else { ->>> d.__proto__ = b; ->>> } +>>> __extendStatics(d, b); >>> function __() { this.constructor = d; } >>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); >>>}; diff --git a/tests/baselines/reference/outModuleTripleSlashRefs.js b/tests/baselines/reference/outModuleTripleSlashRefs.js index c5f6da0fdf53e..d8b543ef72720 100644 --- a/tests/baselines/reference/outModuleTripleSlashRefs.js +++ b/tests/baselines/reference/outModuleTripleSlashRefs.js @@ -31,12 +31,12 @@ export class B extends A { } //// [all.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt b/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt index c3e619a4c2dba..f035719a690b4 100644 --- a/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt +++ b/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt @@ -8,12 +8,12 @@ sources: tests/cases/compiler/ref/b.ts,tests/cases/compiler/ref/a.ts,tests/cases emittedFile:all.js sourceFile:tests/cases/compiler/ref/b.ts ------------------------------------------------------------------- +>>>var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { ->>> if (typeof Object.setPrototypeOf === "function") { ->>> Object.setPrototypeOf(d, b); ->>> } else { ->>> d.__proto__ = b; ->>> } +>>> __extendStatics(d, b); >>> function __() { this.constructor = d; } >>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); >>>}; diff --git a/tests/baselines/reference/overload1.js b/tests/baselines/reference/overload1.js index 8377a62f2c7fe..c4f19ef0ed70a 100644 --- a/tests/baselines/reference/overload1.js +++ b/tests/baselines/reference/overload1.js @@ -40,12 +40,12 @@ var v=x.g; //// [overload1.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks1.js b/tests/baselines/reference/overloadOnConstConstraintChecks1.js index ae8e1178be53e..0888083df4205 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks1.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks1.js @@ -23,12 +23,12 @@ class D implements MyDoc { } //// [overloadOnConstConstraintChecks1.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks2.js b/tests/baselines/reference/overloadOnConstConstraintChecks2.js index 43468e15fd850..ab91c99f6ff1a 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks2.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks2.js @@ -12,12 +12,12 @@ function foo(name: any): A { } //// [overloadOnConstConstraintChecks2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks3.js b/tests/baselines/reference/overloadOnConstConstraintChecks3.js index 5e8d70d3d6e32..d6d4ce137e670 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks3.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks3.js @@ -13,12 +13,12 @@ function foo(name: any): A { //// [overloadOnConstConstraintChecks3.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks4.js b/tests/baselines/reference/overloadOnConstConstraintChecks4.js index c4ac235a6717e..53b6b9049978b 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks4.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks4.js @@ -14,12 +14,12 @@ function foo(name: any): Z { //// [overloadOnConstConstraintChecks4.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js b/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js index 58807808f5c31..0400ee2bb8836 100644 --- a/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js +++ b/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js @@ -12,12 +12,12 @@ function foo(name: "DIV"): Derived2 { foo("HI"); //// [overloadOnConstantsInvalidOverload1.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadResolution.js b/tests/baselines/reference/overloadResolution.js index bb1fce13a0a1b..4b026d8c062d7 100644 --- a/tests/baselines/reference/overloadResolution.js +++ b/tests/baselines/reference/overloadResolution.js @@ -95,12 +95,12 @@ var s = fn5((n) => n.substr(0)); //// [overloadResolution.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadResolutionClassConstructors.js b/tests/baselines/reference/overloadResolutionClassConstructors.js index 16bdd16eaa2bc..dcacbc4f9ecde 100644 --- a/tests/baselines/reference/overloadResolutionClassConstructors.js +++ b/tests/baselines/reference/overloadResolutionClassConstructors.js @@ -102,12 +102,12 @@ new fn5((n) => n.blah); // Error //// [overloadResolutionClassConstructors.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadResolutionConstructors.js b/tests/baselines/reference/overloadResolutionConstructors.js index 4b7e487466cc6..89953cb378a4e 100644 --- a/tests/baselines/reference/overloadResolutionConstructors.js +++ b/tests/baselines/reference/overloadResolutionConstructors.js @@ -103,12 +103,12 @@ var s = new fn5((n) => n.substr(0)); //// [overloadResolutionConstructors.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadingOnConstants1.js b/tests/baselines/reference/overloadingOnConstants1.js index d52d97cefc78a..981ad6358a0cb 100644 --- a/tests/baselines/reference/overloadingOnConstants1.js +++ b/tests/baselines/reference/overloadingOnConstants1.js @@ -26,12 +26,12 @@ var htmlDivElement2: Derived1 = d2.createElement("div"); var htmlSpanElement2: Derived1 = d2.createElement("span"); //// [overloadingOnConstants1.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadingOnConstants2.js b/tests/baselines/reference/overloadingOnConstants2.js index 3b666b2351bc2..4afdf483f2a83 100644 --- a/tests/baselines/reference/overloadingOnConstants2.js +++ b/tests/baselines/reference/overloadingOnConstants2.js @@ -28,12 +28,12 @@ var e: E = bar("bye", []); // E var f: C = bar("um", []); // C //// [overloadingOnConstants2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overridingPrivateStaticMembers.js b/tests/baselines/reference/overridingPrivateStaticMembers.js index f1cc4b05a4052..8372f54c40c48 100644 --- a/tests/baselines/reference/overridingPrivateStaticMembers.js +++ b/tests/baselines/reference/overridingPrivateStaticMembers.js @@ -8,12 +8,12 @@ class Derived2 extends Base2 { } //// [overridingPrivateStaticMembers.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parseErrorInHeritageClause1.js b/tests/baselines/reference/parseErrorInHeritageClause1.js index a82e4eb8ea71b..7a29c55629ad9 100644 --- a/tests/baselines/reference/parseErrorInHeritageClause1.js +++ b/tests/baselines/reference/parseErrorInHeritageClause1.js @@ -3,12 +3,12 @@ class C extends A # { } //// [parseErrorInHeritageClause1.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parser509630.js b/tests/baselines/reference/parser509630.js index 3c80c2bfd163e..d95819d1e4595 100644 --- a/tests/baselines/reference/parser509630.js +++ b/tests/baselines/reference/parser509630.js @@ -7,12 +7,12 @@ class Any extends Type { //// [parser509630.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserAstSpans1.js b/tests/baselines/reference/parserAstSpans1.js index 5ba4ba4d96d29..de26b5b2b3bd4 100644 --- a/tests/baselines/reference/parserAstSpans1.js +++ b/tests/baselines/reference/parserAstSpans1.js @@ -220,12 +220,12 @@ class c6 extends c5 { } //// [parserAstSpans1.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserClassDeclaration1.js b/tests/baselines/reference/parserClassDeclaration1.js index 4ce80bdec21e3..47c15c9f6bf59 100644 --- a/tests/baselines/reference/parserClassDeclaration1.js +++ b/tests/baselines/reference/parserClassDeclaration1.js @@ -3,12 +3,12 @@ class C extends A extends B { } //// [parserClassDeclaration1.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserClassDeclaration3.js b/tests/baselines/reference/parserClassDeclaration3.js index ac58fb2334267..4dd54e974cb00 100644 --- a/tests/baselines/reference/parserClassDeclaration3.js +++ b/tests/baselines/reference/parserClassDeclaration3.js @@ -3,12 +3,12 @@ class C implements A extends B { } //// [parserClassDeclaration3.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserClassDeclaration4.js b/tests/baselines/reference/parserClassDeclaration4.js index fa85ee2659c2e..4e3c3e8424352 100644 --- a/tests/baselines/reference/parserClassDeclaration4.js +++ b/tests/baselines/reference/parserClassDeclaration4.js @@ -3,12 +3,12 @@ class C extends A implements B extends C { } //// [parserClassDeclaration4.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserClassDeclaration5.js b/tests/baselines/reference/parserClassDeclaration5.js index a77e0867d5935..e5ae42ec1ebdf 100644 --- a/tests/baselines/reference/parserClassDeclaration5.js +++ b/tests/baselines/reference/parserClassDeclaration5.js @@ -3,12 +3,12 @@ class C extends A implements B implements C { } //// [parserClassDeclaration5.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserClassDeclaration6.js b/tests/baselines/reference/parserClassDeclaration6.js index 23820f706df58..eb698fd236f21 100644 --- a/tests/baselines/reference/parserClassDeclaration6.js +++ b/tests/baselines/reference/parserClassDeclaration6.js @@ -3,12 +3,12 @@ class C extends A, B { } //// [parserClassDeclaration6.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause2.js b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause2.js index d81e0e7cf6513..d45ef8894b086 100644 --- a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause2.js +++ b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause2.js @@ -3,12 +3,12 @@ class C extends A, { } //// [parserErrorRecovery_ExtendsOrImplementsClause2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause4.js b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause4.js index 34f0bce2d1ca9..f69ce2ad6000e 100644 --- a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause4.js +++ b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause4.js @@ -3,12 +3,12 @@ class C extends A implements { } //// [parserErrorRecovery_ExtendsOrImplementsClause4.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause5.js b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause5.js index 9eb5a99563725..ec6a047916951 100644 --- a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause5.js +++ b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause5.js @@ -3,12 +3,12 @@ class C extends A, implements B, { } //// [parserErrorRecovery_ExtendsOrImplementsClause5.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserGenericsInTypeContexts1.js b/tests/baselines/reference/parserGenericsInTypeContexts1.js index 99cfeb0c61f18..69e53b2974d4d 100644 --- a/tests/baselines/reference/parserGenericsInTypeContexts1.js +++ b/tests/baselines/reference/parserGenericsInTypeContexts1.js @@ -18,12 +18,12 @@ function f2(): F { //// [parserGenericsInTypeContexts1.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserGenericsInTypeContexts2.js b/tests/baselines/reference/parserGenericsInTypeContexts2.js index b34364d5b9e9a..ac24d025b8403 100644 --- a/tests/baselines/reference/parserGenericsInTypeContexts2.js +++ b/tests/baselines/reference/parserGenericsInTypeContexts2.js @@ -18,12 +18,12 @@ function f2(): F, Y>> { //// [parserGenericsInTypeContexts2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserRealSource10.js b/tests/baselines/reference/parserRealSource10.js index 25112efe2317b..ea095e52c6990 100644 --- a/tests/baselines/reference/parserRealSource10.js +++ b/tests/baselines/reference/parserRealSource10.js @@ -458,12 +458,12 @@ module TypeScript { //// [parserRealSource10.js] // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. // See LICENSE.txt in the project root for complete license information. +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserRealSource11.js b/tests/baselines/reference/parserRealSource11.js index 23ea8da3d5ccc..9f4f4fc2f7062 100644 --- a/tests/baselines/reference/parserRealSource11.js +++ b/tests/baselines/reference/parserRealSource11.js @@ -2367,12 +2367,12 @@ module TypeScript { //// [parserRealSource11.js] // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. // See LICENSE.txt in the project root for complete license information. +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserharness.js b/tests/baselines/reference/parserharness.js index ac60a5b18adba..16fe9508c2a19 100644 --- a/tests/baselines/reference/parserharness.js +++ b/tests/baselines/reference/parserharness.js @@ -2096,12 +2096,12 @@ module Harness { // See the License for the specific language governing permissions and // limitations under the License. // +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/partiallyAnnotatedFunctionInferenceError.js b/tests/baselines/reference/partiallyAnnotatedFunctionInferenceError.js index b57b3a8bff691..1c666d92c9d5b 100644 --- a/tests/baselines/reference/partiallyAnnotatedFunctionInferenceError.js +++ b/tests/baselines/reference/partiallyAnnotatedFunctionInferenceError.js @@ -16,12 +16,12 @@ testError((t1, t2, t3: D) => {}) //// [partiallyAnnotatedFunctionInferenceError.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/partiallyAnnotatedFunctionInferenceWithTypeParameter.js b/tests/baselines/reference/partiallyAnnotatedFunctionInferenceWithTypeParameter.js index f8bd04cde38c2..b43a5a5a2c92f 100644 --- a/tests/baselines/reference/partiallyAnnotatedFunctionInferenceWithTypeParameter.js +++ b/tests/baselines/reference/partiallyAnnotatedFunctionInferenceWithTypeParameter.js @@ -35,12 +35,12 @@ testRest((t2, ...t3: D[]) => {}) //// [partiallyAnnotatedFunctionInferenceWithTypeParameter.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/primitiveMembers.js b/tests/baselines/reference/primitiveMembers.js index 2aa2efbba10da..4c00a4fb3ead2 100644 --- a/tests/baselines/reference/primitiveMembers.js +++ b/tests/baselines/reference/primitiveMembers.js @@ -32,12 +32,12 @@ class foo extends baz { public bar(){ return undefined}; } //// [primitiveMembers.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/privacyClass.js b/tests/baselines/reference/privacyClass.js index c310bf6e77d0b..be90775cf0bc1 100644 --- a/tests/baselines/reference/privacyClass.js +++ b/tests/baselines/reference/privacyClass.js @@ -129,12 +129,12 @@ export class glo_C12_public extends glo_c_private implements glo_i_private, glo //// [privacyClass.js] "use strict"; +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js b/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js index 68feed955d3d9..1802f61717cb7 100644 --- a/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js +++ b/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js @@ -99,12 +99,12 @@ class publicClassExtendingPublicClassInGlobal extends publicClassInGlobal { //// [privacyClassExtendsClauseDeclFile_externalModule.js] "use strict"; +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -289,12 +289,12 @@ var publicClassExtendingFromPrivateModuleClass = (function (_super) { }(privateModule.publicClassInPrivateModule)); exports.publicClassExtendingFromPrivateModuleClass = publicClassExtendingFromPrivateModuleClass; //// [privacyClassExtendsClauseDeclFile_GlobalFile.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/privacyGloClass.js b/tests/baselines/reference/privacyGloClass.js index 4824da462ad92..d74a59d5ac262 100644 --- a/tests/baselines/reference/privacyGloClass.js +++ b/tests/baselines/reference/privacyGloClass.js @@ -61,12 +61,12 @@ class glo_C11_public extends glo_c_public implements glo_i_public { //// [privacyGloClass.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/privateAccessInSubclass1.js b/tests/baselines/reference/privateAccessInSubclass1.js index 63e8172576a3c..bbdcd5a433834 100644 --- a/tests/baselines/reference/privateAccessInSubclass1.js +++ b/tests/baselines/reference/privateAccessInSubclass1.js @@ -10,12 +10,12 @@ class D extends Base { } //// [privateAccessInSubclass1.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/privateInstanceMemberAccessibility.js b/tests/baselines/reference/privateInstanceMemberAccessibility.js index 3df2708569c91..d1efc894fc351 100644 --- a/tests/baselines/reference/privateInstanceMemberAccessibility.js +++ b/tests/baselines/reference/privateInstanceMemberAccessibility.js @@ -14,12 +14,12 @@ class Derived extends Base { } //// [privateInstanceMemberAccessibility.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/privateProtectedMembersAreNotAccessibleDestructuring.js b/tests/baselines/reference/privateProtectedMembersAreNotAccessibleDestructuring.js index 239d0a4281b1f..6f9b717888d3e 100644 --- a/tests/baselines/reference/privateProtectedMembersAreNotAccessibleDestructuring.js +++ b/tests/baselines/reference/privateProtectedMembersAreNotAccessibleDestructuring.js @@ -22,12 +22,12 @@ let { priv: a, prot: b, privateMethod: f } = k; // error //// [privateProtectedMembersAreNotAccessibleDestructuring.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/privateStaticMemberAccessibility.js b/tests/baselines/reference/privateStaticMemberAccessibility.js index d21d13070d8a0..319f4fac001a0 100644 --- a/tests/baselines/reference/privateStaticMemberAccessibility.js +++ b/tests/baselines/reference/privateStaticMemberAccessibility.js @@ -9,12 +9,12 @@ class Derived extends Base { } //// [privateStaticMemberAccessibility.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/privateStaticNotAccessibleInClodule2.js b/tests/baselines/reference/privateStaticNotAccessibleInClodule2.js index e7e1e468aed7a..974dcb477f567 100644 --- a/tests/baselines/reference/privateStaticNotAccessibleInClodule2.js +++ b/tests/baselines/reference/privateStaticNotAccessibleInClodule2.js @@ -16,12 +16,12 @@ module D { //// [privateStaticNotAccessibleInClodule2.js] // Any attempt to access a private property member outside the class body that contains its declaration results in a compile-time error. +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/amd/testGlo.js b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/amd/testGlo.js index 93d8685224bc4..3ab7685aec496 100644 --- a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/amd/testGlo.js +++ b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/amd/testGlo.js @@ -1,9 +1,9 @@ +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/node/testGlo.js b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/node/testGlo.js index 93d8685224bc4..3ab7685aec496 100644 --- a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/node/testGlo.js +++ b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/node/testGlo.js @@ -1,9 +1,9 @@ +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/project/prologueEmit/amd/out.js b/tests/baselines/reference/project/prologueEmit/amd/out.js index f80f316d3c86b..08697664279e1 100644 --- a/tests/baselines/reference/project/prologueEmit/amd/out.js +++ b/tests/baselines/reference/project/prologueEmit/amd/out.js @@ -1,9 +1,9 @@ +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/project/prologueEmit/node/out.js b/tests/baselines/reference/project/prologueEmit/node/out.js index f80f316d3c86b..08697664279e1 100644 --- a/tests/baselines/reference/project/prologueEmit/node/out.js +++ b/tests/baselines/reference/project/prologueEmit/node/out.js @@ -1,9 +1,9 @@ +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/project/quotesInFileAndDirectoryNames/amd/m'ain.js b/tests/baselines/reference/project/quotesInFileAndDirectoryNames/amd/m'ain.js index 65483bd492ad3..dd192c408635d 100644 --- a/tests/baselines/reference/project/quotesInFileAndDirectoryNames/amd/m'ain.js +++ b/tests/baselines/reference/project/quotesInFileAndDirectoryNames/amd/m'ain.js @@ -1,10 +1,10 @@ /// +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/project/quotesInFileAndDirectoryNames/node/m'ain.js b/tests/baselines/reference/project/quotesInFileAndDirectoryNames/node/m'ain.js index 65483bd492ad3..dd192c408635d 100644 --- a/tests/baselines/reference/project/quotesInFileAndDirectoryNames/node/m'ain.js +++ b/tests/baselines/reference/project/quotesInFileAndDirectoryNames/node/m'ain.js @@ -1,10 +1,10 @@ /// +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/propertiesAndIndexers.js b/tests/baselines/reference/propertiesAndIndexers.js index 9d65b48702eaa..87f12dd7242b5 100644 --- a/tests/baselines/reference/propertiesAndIndexers.js +++ b/tests/baselines/reference/propertiesAndIndexers.js @@ -52,12 +52,12 @@ var c: { }; //// [propertiesAndIndexers.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/propertyAccess.js b/tests/baselines/reference/propertyAccess.js index 3da9b5cc64702..89c6ed0efe9fc 100644 --- a/tests/baselines/reference/propertyAccess.js +++ b/tests/baselines/reference/propertyAccess.js @@ -151,12 +151,12 @@ var x3: A; //// [propertyAccess.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js index cc874197c3c73..346024cf47065 100644 --- a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js @@ -83,12 +83,12 @@ var r4 = b.foo(aB, aB); // no inferences for T so constraint isn't satisfied, er //// [propertyAccessOnTypeParameterWithConstraints2.js] // generic types should behave as if they have properties of their constraint type +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js index bcaa145832515..c4d0a8e8ac403 100644 --- a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js @@ -58,12 +58,12 @@ var r4 = b.foo(new B()); // valid call to an invalid function //// [propertyAccessOnTypeParameterWithConstraints3.js] // generic types should behave as if they have properties of their constraint type +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js index 8cc85faa10037..4d677b85396a8 100644 --- a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js @@ -45,12 +45,12 @@ var b = { var r4 = b.foo(new B()); // error after constraints above made illegal, doesn't matter //// [propertyAccessOnTypeParameterWithConstraints5.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass.js index babef969a107c..e0a051b309603 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass.js @@ -39,12 +39,12 @@ class E extends C { } //// [protectedClassPropertyAccessibleWithinNestedSubclass.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass1.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass1.js index 3a3013d670455..26d42b7b65840 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass1.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass1.js @@ -115,12 +115,12 @@ d3.x; // Error, neither within their declaring class nor class d4.x; // Error, neither within their declaring class nor classes derived from their declaring class //// [protectedClassPropertyAccessibleWithinNestedSubclass1.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js index 3c59a316d71e7..af3440f9fb8e8 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js @@ -21,12 +21,12 @@ class C extends B { //// [protectedClassPropertyAccessibleWithinSubclass.js] // no errors +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass2.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass2.js index fb818c42c7e10..ba4c9f079f8fc 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass2.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass2.js @@ -95,12 +95,12 @@ d3.x; // Error, neither within their declaring class nor class d4.x; // Error, neither within their declaring class nor classes derived from their declaring class //// [protectedClassPropertyAccessibleWithinSubclass2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass3.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass3.js index 20984b107b91e..8b45c46ec8393 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass3.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass3.js @@ -14,12 +14,12 @@ class Derived extends Base { } //// [protectedClassPropertyAccessibleWithinSubclass3.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedInstanceMemberAccessibility.js b/tests/baselines/reference/protectedInstanceMemberAccessibility.js index c906f456d67b8..682ff897e522f 100644 --- a/tests/baselines/reference/protectedInstanceMemberAccessibility.js +++ b/tests/baselines/reference/protectedInstanceMemberAccessibility.js @@ -45,12 +45,12 @@ class C extends A { //// [protectedInstanceMemberAccessibility.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedMembers.js b/tests/baselines/reference/protectedMembers.js index d2e8bfe47cecc..f0553d721841f 100644 --- a/tests/baselines/reference/protectedMembers.js +++ b/tests/baselines/reference/protectedMembers.js @@ -116,12 +116,12 @@ class B3 extends A3 { //// [protectedMembers.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass.js b/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass.js index e0ad17934c3a3..76bb5d10455f2 100644 --- a/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass.js +++ b/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass.js @@ -44,12 +44,12 @@ Derived2.x; // Error, neither within their declaring class nor classes deriv Derived3.x; // Error, neither within their declaring class nor classes derived from their declaring class //// [protectedStaticClassPropertyAccessibleWithinSubclass.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass2.js b/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass2.js index 37ddb2b0d2c0a..f694c9f301d87 100644 --- a/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass2.js +++ b/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass2.js @@ -22,12 +22,12 @@ class Derived2 extends Derived1 { } //// [protectedStaticClassPropertyAccessibleWithinSubclass2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/qualifiedName_entity-name-resolution-does-not-affect-class-heritage.js b/tests/baselines/reference/qualifiedName_entity-name-resolution-does-not-affect-class-heritage.js index 3fc3b29ff45ac..11c49dbb28ddd 100644 --- a/tests/baselines/reference/qualifiedName_entity-name-resolution-does-not-affect-class-heritage.js +++ b/tests/baselines/reference/qualifiedName_entity-name-resolution-does-not-affect-class-heritage.js @@ -7,12 +7,12 @@ class Beta extends Alpha.x { } //// [qualifiedName_entity-name-resolution-does-not-affect-class-heritage.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/readonlyConstructorAssignment.js b/tests/baselines/reference/readonlyConstructorAssignment.js index a3a46c4e14fcc..eb268d9aafe0e 100644 --- a/tests/baselines/reference/readonlyConstructorAssignment.js +++ b/tests/baselines/reference/readonlyConstructorAssignment.js @@ -41,12 +41,12 @@ class E extends D { //// [readonlyConstructorAssignment.js] // Tests that readonly parameter properties behave like regular readonly properties +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/recursiveBaseCheck3.js b/tests/baselines/reference/recursiveBaseCheck3.js index bd89b8c65749a..435f87a6b1a96 100644 --- a/tests/baselines/reference/recursiveBaseCheck3.js +++ b/tests/baselines/reference/recursiveBaseCheck3.js @@ -5,12 +5,12 @@ class C extends A { } (new C).blah; //// [recursiveBaseCheck3.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/recursiveBaseCheck4.js b/tests/baselines/reference/recursiveBaseCheck4.js index f89b52e719fa0..5790cabf7d8a8 100644 --- a/tests/baselines/reference/recursiveBaseCheck4.js +++ b/tests/baselines/reference/recursiveBaseCheck4.js @@ -3,12 +3,12 @@ class M extends M { } (new M).blah; //// [recursiveBaseCheck4.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/recursiveBaseCheck6.js b/tests/baselines/reference/recursiveBaseCheck6.js index 05a72e1121333..c9a7d68532266 100644 --- a/tests/baselines/reference/recursiveBaseCheck6.js +++ b/tests/baselines/reference/recursiveBaseCheck6.js @@ -3,12 +3,12 @@ class S18 extends S18<{ S19: A; }>{ } (new S18()).blah; //// [recursiveBaseCheck6.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/recursiveBaseConstructorCreation1.js b/tests/baselines/reference/recursiveBaseConstructorCreation1.js index b0a11841dd89e..b62f9f6622f80 100644 --- a/tests/baselines/reference/recursiveBaseConstructorCreation1.js +++ b/tests/baselines/reference/recursiveBaseConstructorCreation1.js @@ -7,12 +7,12 @@ var x = new C2(); // Valid //// [recursiveBaseConstructorCreation1.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/recursiveClassInstantiationsWithDefaultConstructors.js b/tests/baselines/reference/recursiveClassInstantiationsWithDefaultConstructors.js index bfd014a3fe11c..5c5d01c453d72 100644 --- a/tests/baselines/reference/recursiveClassInstantiationsWithDefaultConstructors.js +++ b/tests/baselines/reference/recursiveClassInstantiationsWithDefaultConstructors.js @@ -10,12 +10,12 @@ export class MemberNameArray extends MemberName { //// [recursiveClassInstantiationsWithDefaultConstructors.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/recursiveClassReferenceTest.js b/tests/baselines/reference/recursiveClassReferenceTest.js index 11eb4f8ba8f5b..e03965b23ea82 100644 --- a/tests/baselines/reference/recursiveClassReferenceTest.js +++ b/tests/baselines/reference/recursiveClassReferenceTest.js @@ -105,12 +105,12 @@ module Sample.Thing.Languages.PlainText { //// [recursiveClassReferenceTest.js] // Scenario 1: Test reqursive function call with "this" parameter // Scenario 2: Test recursive function call with cast and "this" parameter +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt b/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt index 5bb43de1b9f19..d8a6d74f0a875 100644 --- a/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt +++ b/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt @@ -26,12 +26,12 @@ sourceFile:recursiveClassReferenceTest.ts 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) 2 >Emitted(2, 75) Source(2, 75) + SourceIndex(0) --- +>>>var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { ->>> if (typeof Object.setPrototypeOf === "function") { ->>> Object.setPrototypeOf(d, b); ->>> } else { ->>> d.__proto__ = b; ->>> } +>>> __extendStatics(d, b); >>> function __() { this.constructor = d; } >>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); >>>}; diff --git a/tests/baselines/reference/recursiveComplicatedClasses.js b/tests/baselines/reference/recursiveComplicatedClasses.js index c9b3dfb6d7a96..9544c60b9f5e5 100644 --- a/tests/baselines/reference/recursiveComplicatedClasses.js +++ b/tests/baselines/reference/recursiveComplicatedClasses.js @@ -25,12 +25,12 @@ class TypeSymbol extends InferenceSymbol { } //// [recursiveComplicatedClasses.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/recursivelySpecializedConstructorDeclaration.js b/tests/baselines/reference/recursivelySpecializedConstructorDeclaration.js index e7ce63794fd57..e7c3ce7a3ce42 100644 --- a/tests/baselines/reference/recursivelySpecializedConstructorDeclaration.js +++ b/tests/baselines/reference/recursivelySpecializedConstructorDeclaration.js @@ -30,12 +30,12 @@ declare module MsPortal.Controls.Base.ItemList { */ //// [recursivelySpecializedConstructorDeclaration.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/reexportClassDefinition.js b/tests/baselines/reference/reexportClassDefinition.js index 37ba6aab5d444..db5486b1af71b 100644 --- a/tests/baselines/reference/reexportClassDefinition.js +++ b/tests/baselines/reference/reexportClassDefinition.js @@ -33,12 +33,12 @@ module.exports = { }; //// [foo3.js] "use strict"; +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js b/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js index d81c9a0e2a75c..bdea9b287bbc1 100644 --- a/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js +++ b/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js @@ -1020,12 +1020,12 @@ module caurinus { //// [resolvingClassDeclarationWhenInBaseTypeResolution.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/returnInConstructor1.js b/tests/baselines/reference/returnInConstructor1.js index 2f2c4a3fdb5ca..625028055b4ea 100644 --- a/tests/baselines/reference/returnInConstructor1.js +++ b/tests/baselines/reference/returnInConstructor1.js @@ -67,12 +67,12 @@ class I extends G { //// [returnInConstructor1.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/returnStatements.js b/tests/baselines/reference/returnStatements.js index 3488ebd8ac0bb..b62ef87dadcc2 100644 --- a/tests/baselines/reference/returnStatements.js +++ b/tests/baselines/reference/returnStatements.js @@ -25,12 +25,12 @@ function fn13(): C { return null; } //// [returnStatements.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.js b/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.js index 67013c3922e03..3fdc1795c3292 100644 --- a/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.js +++ b/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.js @@ -9,12 +9,12 @@ class D extends C { } //// [scopeCheckExtendedClassInsidePublicMethod2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.js b/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.js index 7bb90a136ba8e..237faa00fe39c 100644 --- a/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.js +++ b/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.js @@ -9,12 +9,12 @@ class D extends C { } //// [scopeCheckExtendedClassInsideStaticMethod1.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/scopeTests.js b/tests/baselines/reference/scopeTests.js index d2061241cac26..6090536a099a3 100644 --- a/tests/baselines/reference/scopeTests.js +++ b/tests/baselines/reference/scopeTests.js @@ -12,12 +12,12 @@ class D extends C { } //// [scopeTests.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/shadowPrivateMembers.js b/tests/baselines/reference/shadowPrivateMembers.js index 251622f13085d..d842185b47cb6 100644 --- a/tests/baselines/reference/shadowPrivateMembers.js +++ b/tests/baselines/reference/shadowPrivateMembers.js @@ -4,12 +4,12 @@ class derived extends base { private n() {} } //// [shadowPrivateMembers.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js index 07be64891413f..b5216c1c16801 100644 --- a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js +++ b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js @@ -8,12 +8,12 @@ class Greeter extends AbstractGreeter { } //// [sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt index cb083f766e867..2ca29e33e91f0 100644 --- a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt @@ -8,12 +8,12 @@ sources: sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts emittedFile:tests/cases/compiler/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts ------------------------------------------------------------------- +>>>var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { ->>> if (typeof Object.setPrototypeOf === "function") { ->>> Object.setPrototypeOf(d, b); ->>> } else { ->>> d.__proto__ = b; ->>> } +>>> __extendStatics(d, b); >>> function __() { this.constructor = d; } >>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); >>>}; diff --git a/tests/baselines/reference/specializedInheritedConstructors1.js b/tests/baselines/reference/specializedInheritedConstructors1.js index 2560437b43d4e..76d6da2d5d2d5 100644 --- a/tests/baselines/reference/specializedInheritedConstructors1.js +++ b/tests/baselines/reference/specializedInheritedConstructors1.js @@ -18,12 +18,12 @@ var myView = new MyView(m); // was error //// [specializedInheritedConstructors1.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/specializedOverloadWithRestParameters.js b/tests/baselines/reference/specializedOverloadWithRestParameters.js index 0ea23b1b850ca..d1bf0a0d6368d 100644 --- a/tests/baselines/reference/specializedOverloadWithRestParameters.js +++ b/tests/baselines/reference/specializedOverloadWithRestParameters.js @@ -13,12 +13,12 @@ function g(tagName: any): Base { } //// [specializedOverloadWithRestParameters.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/staticFactory1.js b/tests/baselines/reference/staticFactory1.js index e9e4a286eb6d3..63ea3a01253d1 100644 --- a/tests/baselines/reference/staticFactory1.js +++ b/tests/baselines/reference/staticFactory1.js @@ -14,12 +14,12 @@ var d = Derived.create(); d.foo(); //// [staticFactory1.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/staticInheritance.js b/tests/baselines/reference/staticInheritance.js index 181c8aa9659ef..91fa33abd5170 100644 --- a/tests/baselines/reference/staticInheritance.js +++ b/tests/baselines/reference/staticInheritance.js @@ -12,12 +12,12 @@ doThing(B); //OK //// [staticInheritance.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/staticMemberAccessOffDerivedType1.js b/tests/baselines/reference/staticMemberAccessOffDerivedType1.js index 6634d3c351902..ee1f12df69e77 100644 --- a/tests/baselines/reference/staticMemberAccessOffDerivedType1.js +++ b/tests/baselines/reference/staticMemberAccessOffDerivedType1.js @@ -10,12 +10,12 @@ class P extends SomeBase { //// [staticMemberAccessOffDerivedType1.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/staticPropSuper.js b/tests/baselines/reference/staticPropSuper.js index 10519dace0099..241ebc529fb35 100644 --- a/tests/baselines/reference/staticPropSuper.js +++ b/tests/baselines/reference/staticPropSuper.js @@ -36,12 +36,12 @@ class E extends A { } //// [staticPropSuper.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/strictModeInConstructor.js b/tests/baselines/reference/strictModeInConstructor.js index 0598932c4bb22..71165d41360dd 100644 --- a/tests/baselines/reference/strictModeInConstructor.js +++ b/tests/baselines/reference/strictModeInConstructor.js @@ -61,12 +61,12 @@ class Ds extends A { } //// [strictModeInConstructor.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/strictModeReservedWord.js b/tests/baselines/reference/strictModeReservedWord.js index f15efc6e7655b..ec07546112939 100644 --- a/tests/baselines/reference/strictModeReservedWord.js +++ b/tests/baselines/reference/strictModeReservedWord.js @@ -28,12 +28,12 @@ function foo() { //// [strictModeReservedWord.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/strictModeReservedWordInClassDeclaration.js b/tests/baselines/reference/strictModeReservedWordInClassDeclaration.js index 6f13aac7608c0..fdf72090f2fea 100644 --- a/tests/baselines/reference/strictModeReservedWordInClassDeclaration.js +++ b/tests/baselines/reference/strictModeReservedWordInClassDeclaration.js @@ -29,12 +29,12 @@ class G extends package { } class H extends package.A { } //// [strictModeReservedWordInClassDeclaration.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js b/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js index adcc83a1841b3..dd9341b4a429d 100644 --- a/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js +++ b/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js @@ -41,12 +41,12 @@ var b: { [x: string]: A } = { //// [stringIndexerConstrainsPropertyDeclarations2.js] // String indexer providing a constraint of a user defined type +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypesOfTypeParameter.js b/tests/baselines/reference/subtypesOfTypeParameter.js index 2d42c1e4d791c..8abd40b7eb5e6 100644 --- a/tests/baselines/reference/subtypesOfTypeParameter.js +++ b/tests/baselines/reference/subtypesOfTypeParameter.js @@ -107,12 +107,12 @@ function f2(x: T, y: U) { //// [subtypesOfTypeParameter.js] // checking whether other types are subtypes of type parameters +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints.js b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints.js index a3b5ecaeb2638..034b55ee1fc27 100644 --- a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints.js +++ b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints.js @@ -169,12 +169,12 @@ class D29 extends C3 { //// [subtypesOfTypeParameterWithConstraints.js] // checking whether other types are subtypes of type parameters with constraints +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints4.js b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints4.js index 1aa94ba7c9984..b2f4f3eca493e 100644 --- a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints4.js +++ b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints4.js @@ -80,12 +80,12 @@ class D9 extends B1 { //// [subtypesOfTypeParameterWithConstraints4.js] // checking whether other types are subtypes of type parameters with constraints +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypesOfTypeParameterWithRecursiveConstraints.js b/tests/baselines/reference/subtypesOfTypeParameterWithRecursiveConstraints.js index 05cc496f25a0a..413f915a61877 100644 --- a/tests/baselines/reference/subtypesOfTypeParameterWithRecursiveConstraints.js +++ b/tests/baselines/reference/subtypesOfTypeParameterWithRecursiveConstraints.js @@ -159,12 +159,12 @@ module M2 { //// [subtypesOfTypeParameterWithRecursiveConstraints.js] // checking whether other types are subtypes of type parameters with constraints +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingTransitivity.js b/tests/baselines/reference/subtypingTransitivity.js index 5c06121d5a239..23c51619c8060 100644 --- a/tests/baselines/reference/subtypingTransitivity.js +++ b/tests/baselines/reference/subtypingTransitivity.js @@ -20,12 +20,12 @@ b.x = 1; // assigned number to string //// [subtypingTransitivity.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithCallSignatures2.js b/tests/baselines/reference/subtypingWithCallSignatures2.js index 6b82e0d484179..0e16d43f216e5 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures2.js +++ b/tests/baselines/reference/subtypingWithCallSignatures2.js @@ -174,12 +174,12 @@ var r18 = foo18(r18arg1); //// [subtypingWithCallSignatures2.js] // checking subtype relations for function types as it relates to contextual signature instantiation +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithCallSignatures3.js b/tests/baselines/reference/subtypingWithCallSignatures3.js index 49405cbd07033..f17007cba426c 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures3.js +++ b/tests/baselines/reference/subtypingWithCallSignatures3.js @@ -121,12 +121,12 @@ module WithGenericSignaturesInBaseType { //// [subtypingWithCallSignatures3.js] // checking subtype relations for function types as it relates to contextual signature instantiation // error cases, so function calls will all result in 'any' +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithCallSignatures4.js b/tests/baselines/reference/subtypingWithCallSignatures4.js index 2e526d41fbaa5..e6030bdb12d2d 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures4.js +++ b/tests/baselines/reference/subtypingWithCallSignatures4.js @@ -113,12 +113,12 @@ var r18 = foo18(r18arg); //// [subtypingWithCallSignatures4.js] // checking subtype relations for function types as it relates to contextual signature instantiation +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithConstructSignatures2.js b/tests/baselines/reference/subtypingWithConstructSignatures2.js index 867beb93596aa..24914baf2eda3 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures2.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures2.js @@ -174,12 +174,12 @@ var r18 = foo18(r18arg1); //// [subtypingWithConstructSignatures2.js] // checking subtype relations for function types as it relates to contextual signature instantiation +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithConstructSignatures3.js b/tests/baselines/reference/subtypingWithConstructSignatures3.js index f13a56664ceba..f1153675c9159 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures3.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures3.js @@ -123,12 +123,12 @@ module WithGenericSignaturesInBaseType { //// [subtypingWithConstructSignatures3.js] // checking subtype relations for function types as it relates to contextual signature instantiation // error cases, so function calls will all result in 'any' +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithConstructSignatures4.js b/tests/baselines/reference/subtypingWithConstructSignatures4.js index 32f9b33fc7156..10246582f12f2 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures4.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures4.js @@ -113,12 +113,12 @@ var r18 = foo18(r18arg); //// [subtypingWithConstructSignatures4.js] // checking subtype relations for function types as it relates to contextual signature instantiation +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithConstructSignatures5.js b/tests/baselines/reference/subtypingWithConstructSignatures5.js index 2c17720173234..7d3f9516c299f 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures5.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures5.js @@ -51,12 +51,12 @@ interface I extends B { //// [subtypingWithConstructSignatures5.js] // checking subtype relations for function types as it relates to contextual signature instantiation // same as subtypingWithConstructSignatures2 just with an extra level of indirection in the inheritance chain +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithConstructSignatures6.js b/tests/baselines/reference/subtypingWithConstructSignatures6.js index 065d312c0860c..39f4e91f01178 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures6.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures6.js @@ -54,12 +54,12 @@ interface I9 extends A { // checking subtype relations for function types as it relates to contextual signature instantiation // same as subtypingWithConstructSignatures4 but using class type parameters instead of generic signatures // all are errors +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithNumericIndexer.js b/tests/baselines/reference/subtypingWithNumericIndexer.js index 1c1ade16a08af..994c559756903 100644 --- a/tests/baselines/reference/subtypingWithNumericIndexer.js +++ b/tests/baselines/reference/subtypingWithNumericIndexer.js @@ -41,12 +41,12 @@ module Generics { //// [subtypingWithNumericIndexer.js] // Derived type indexer must be subtype of base type indexer +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithNumericIndexer3.js b/tests/baselines/reference/subtypingWithNumericIndexer3.js index 2c0da66f8c920..25963e704490e 100644 --- a/tests/baselines/reference/subtypingWithNumericIndexer3.js +++ b/tests/baselines/reference/subtypingWithNumericIndexer3.js @@ -45,12 +45,12 @@ module Generics { //// [subtypingWithNumericIndexer3.js] // Derived type indexer must be subtype of base type indexer +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithNumericIndexer4.js b/tests/baselines/reference/subtypingWithNumericIndexer4.js index 1881825eb24c8..304dbee9e6169 100644 --- a/tests/baselines/reference/subtypingWithNumericIndexer4.js +++ b/tests/baselines/reference/subtypingWithNumericIndexer4.js @@ -29,12 +29,12 @@ module Generics { //// [subtypingWithNumericIndexer4.js] // Derived type indexer must be subtype of base type indexer +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithObjectMembers.js b/tests/baselines/reference/subtypingWithObjectMembers.js index 263bb117d3406..0733679a120c6 100644 --- a/tests/baselines/reference/subtypingWithObjectMembers.js +++ b/tests/baselines/reference/subtypingWithObjectMembers.js @@ -68,12 +68,12 @@ module TwoLevels { } //// [subtypingWithObjectMembers.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithObjectMembers4.js b/tests/baselines/reference/subtypingWithObjectMembers4.js index 03d7228b2f9d4..4b41ee1aaa7f9 100644 --- a/tests/baselines/reference/subtypingWithObjectMembers4.js +++ b/tests/baselines/reference/subtypingWithObjectMembers4.js @@ -35,12 +35,12 @@ class B3 extends A3 { //// [subtypingWithObjectMembers4.js] // subtyping when property names do not match +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithObjectMembersAccessibility.js b/tests/baselines/reference/subtypingWithObjectMembersAccessibility.js index 0eb506d32107f..976a7e1b8cd12 100644 --- a/tests/baselines/reference/subtypingWithObjectMembersAccessibility.js +++ b/tests/baselines/reference/subtypingWithObjectMembersAccessibility.js @@ -35,12 +35,12 @@ class B3 extends A3 { //// [subtypingWithObjectMembersAccessibility.js] // Derived member is private, base member is not causes errors +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.js b/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.js index f171736911bae..9c2e225711299 100644 --- a/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.js +++ b/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.js @@ -63,12 +63,12 @@ module ImplicitPublic { //// [subtypingWithObjectMembersAccessibility2.js] // Derived member is private, base member is not causes errors +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithStringIndexer.js b/tests/baselines/reference/subtypingWithStringIndexer.js index bffca920982c5..042684e0c041e 100644 --- a/tests/baselines/reference/subtypingWithStringIndexer.js +++ b/tests/baselines/reference/subtypingWithStringIndexer.js @@ -42,12 +42,12 @@ module Generics { //// [subtypingWithStringIndexer.js] // Derived type indexer must be subtype of base type indexer +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithStringIndexer3.js b/tests/baselines/reference/subtypingWithStringIndexer3.js index 0ff4b73c84896..23e7dbe37b6fc 100644 --- a/tests/baselines/reference/subtypingWithStringIndexer3.js +++ b/tests/baselines/reference/subtypingWithStringIndexer3.js @@ -45,12 +45,12 @@ module Generics { //// [subtypingWithStringIndexer3.js] // Derived type indexer must be subtype of base type indexer +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithStringIndexer4.js b/tests/baselines/reference/subtypingWithStringIndexer4.js index 347df7c17200f..e17f0308609ac 100644 --- a/tests/baselines/reference/subtypingWithStringIndexer4.js +++ b/tests/baselines/reference/subtypingWithStringIndexer4.js @@ -29,12 +29,12 @@ module Generics { //// [subtypingWithStringIndexer4.js] // Derived type indexer must be subtype of base type indexer +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/super.js b/tests/baselines/reference/super.js index bbf1862bd0f19..a801d12689516 100644 --- a/tests/baselines/reference/super.js +++ b/tests/baselines/reference/super.js @@ -38,12 +38,12 @@ s.foo() + ss.foo(); //// [super.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/super1.js b/tests/baselines/reference/super1.js index d437c923fe6af..bc1160411aecc 100644 --- a/tests/baselines/reference/super1.js +++ b/tests/baselines/reference/super1.js @@ -67,12 +67,12 @@ module Base4 { //// [super1.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/super2.js b/tests/baselines/reference/super2.js index b8a679c4c8dc3..cac924a6b69b9 100644 --- a/tests/baselines/reference/super2.js +++ b/tests/baselines/reference/super2.js @@ -51,12 +51,12 @@ results1.x() + results1.y() + results2.y(); //// [super2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superAccess.js b/tests/baselines/reference/superAccess.js index f2f6ccbaf4a85..1c37353813c0c 100644 --- a/tests/baselines/reference/superAccess.js +++ b/tests/baselines/reference/superAccess.js @@ -14,12 +14,12 @@ class MyDerived extends MyBase { } //// [superAccess.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superAccess2.js b/tests/baselines/reference/superAccess2.js index 021589c1e79cb..b1476e5c8e693 100644 --- a/tests/baselines/reference/superAccess2.js +++ b/tests/baselines/reference/superAccess2.js @@ -25,12 +25,12 @@ class Q extends P { } //// [superAccess2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superAccessInFatArrow1.js b/tests/baselines/reference/superAccessInFatArrow1.js index e62db8c823b17..c9208194e374a 100644 --- a/tests/baselines/reference/superAccessInFatArrow1.js +++ b/tests/baselines/reference/superAccessInFatArrow1.js @@ -16,12 +16,12 @@ module test { } //// [superAccessInFatArrow1.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallArgsMustMatch.js b/tests/baselines/reference/superCallArgsMustMatch.js index ec83550a9f033..a37a07439bed0 100644 --- a/tests/baselines/reference/superCallArgsMustMatch.js +++ b/tests/baselines/reference/superCallArgsMustMatch.js @@ -26,12 +26,12 @@ class T6 extends T5{ //// [superCallArgsMustMatch.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallAssignResult.js b/tests/baselines/reference/superCallAssignResult.js index f1407cac10706..6fa7738269159 100644 --- a/tests/baselines/reference/superCallAssignResult.js +++ b/tests/baselines/reference/superCallAssignResult.js @@ -11,12 +11,12 @@ class H extends E { } //// [superCallAssignResult.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing1.js b/tests/baselines/reference/superCallBeforeThisAccessing1.js index 151e9da2f158c..9990b5e7e1a86 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing1.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing1.js @@ -17,12 +17,12 @@ class D extends Base { //// [superCallBeforeThisAccessing1.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing2.js b/tests/baselines/reference/superCallBeforeThisAccessing2.js index 7655b2df83b27..a7ef99d67ccea 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing2.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing2.js @@ -11,12 +11,12 @@ class D extends Base { //// [superCallBeforeThisAccessing2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing3.js b/tests/baselines/reference/superCallBeforeThisAccessing3.js index 34555c677ba9e..90156d199d581 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing3.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing3.js @@ -14,12 +14,12 @@ class D extends Base { //// [superCallBeforeThisAccessing3.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing4.js b/tests/baselines/reference/superCallBeforeThisAccessing4.js index 9fc2987e96e32..e42decf54e8ce 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing4.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing4.js @@ -16,12 +16,12 @@ class E extends null { } //// [superCallBeforeThisAccessing4.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing5.js b/tests/baselines/reference/superCallBeforeThisAccessing5.js index 1f3b0040e4996..8477c576c7728 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing5.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing5.js @@ -8,12 +8,12 @@ class D extends null { //// [superCallBeforeThisAccessing5.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing6.js b/tests/baselines/reference/superCallBeforeThisAccessing6.js index 740f90d2e2bbf..a5e291b954342 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing6.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing6.js @@ -11,12 +11,12 @@ class D extends Base { //// [superCallBeforeThisAccessing6.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing7.js b/tests/baselines/reference/superCallBeforeThisAccessing7.js index 65d95769c4072..69a54894cc426 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing7.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing7.js @@ -14,12 +14,12 @@ class D extends Base { //// [superCallBeforeThisAccessing7.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing8.js b/tests/baselines/reference/superCallBeforeThisAccessing8.js index b5e454139c06b..51c4c7277691a 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing8.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing8.js @@ -14,12 +14,12 @@ class D extends Base { //// [superCallBeforeThisAccessing8.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType1.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType1.js index 464c879212e8c..1b17766faf61f 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType1.js @@ -12,12 +12,12 @@ class D extends B { //// [superCallFromClassThatDerivesFromGenericType1.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType2.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType2.js index 6ebe47532c8f2..159fa8786b348 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType2.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType2.js @@ -11,12 +11,12 @@ class D extends B { //// [superCallFromClassThatDerivesFromGenericType2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js index 19e480378a42d..ccf1bf3746a55 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js @@ -11,12 +11,12 @@ class B extends A { } //// [superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js index 48855cb0d1139..f109d6576543e 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js @@ -11,12 +11,12 @@ class B extends A { } //// [superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js b/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js index abfe5294a939f..76fd322d519c2 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js @@ -11,12 +11,12 @@ class B extends A { } //// [superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallInNonStaticMethod.js b/tests/baselines/reference/superCallInNonStaticMethod.js index dbea09ebcedfc..737f51d9e2712 100644 --- a/tests/baselines/reference/superCallInNonStaticMethod.js +++ b/tests/baselines/reference/superCallInNonStaticMethod.js @@ -51,12 +51,12 @@ class Other extends Doing { //// [superCallInNonStaticMethod.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallInStaticMethod.js b/tests/baselines/reference/superCallInStaticMethod.js index 104f8821dcab2..cbd8398a20ad5 100644 --- a/tests/baselines/reference/superCallInStaticMethod.js +++ b/tests/baselines/reference/superCallInStaticMethod.js @@ -47,12 +47,12 @@ class Other extends Doing { //// [superCallInStaticMethod.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallInsideClassDeclaration.js b/tests/baselines/reference/superCallInsideClassDeclaration.js index 4f7a0087ab173..71ef004145208 100644 --- a/tests/baselines/reference/superCallInsideClassDeclaration.js +++ b/tests/baselines/reference/superCallInsideClassDeclaration.js @@ -17,12 +17,12 @@ class B extends A { } //// [superCallInsideClassDeclaration.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallInsideClassExpression.js b/tests/baselines/reference/superCallInsideClassExpression.js index 01bce40d20408..1d6b849ae5e54 100644 --- a/tests/baselines/reference/superCallInsideClassExpression.js +++ b/tests/baselines/reference/superCallInsideClassExpression.js @@ -17,12 +17,12 @@ class B extends A { } //// [superCallInsideClassExpression.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallInsideObjectLiteralExpression.js b/tests/baselines/reference/superCallInsideObjectLiteralExpression.js index 613997e789f38..e479206f9c50d 100644 --- a/tests/baselines/reference/superCallInsideObjectLiteralExpression.js +++ b/tests/baselines/reference/superCallInsideObjectLiteralExpression.js @@ -13,12 +13,12 @@ class B extends A { } //// [superCallInsideObjectLiteralExpression.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallOutsideConstructor.js b/tests/baselines/reference/superCallOutsideConstructor.js index 0e1f3fbd83777..9e4b98997c905 100644 --- a/tests/baselines/reference/superCallOutsideConstructor.js +++ b/tests/baselines/reference/superCallOutsideConstructor.js @@ -23,12 +23,12 @@ var d = new D(); //// [superCallOutsideConstructor.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallParameterContextualTyping1.js b/tests/baselines/reference/superCallParameterContextualTyping1.js index 132cb003921da..f71add3806acc 100644 --- a/tests/baselines/reference/superCallParameterContextualTyping1.js +++ b/tests/baselines/reference/superCallParameterContextualTyping1.js @@ -13,12 +13,12 @@ class B extends A { //// [superCallParameterContextualTyping1.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallParameterContextualTyping2.js b/tests/baselines/reference/superCallParameterContextualTyping2.js index bbb0871d385ac..5363dedff608f 100644 --- a/tests/baselines/reference/superCallParameterContextualTyping2.js +++ b/tests/baselines/reference/superCallParameterContextualTyping2.js @@ -12,12 +12,12 @@ class C extends A { } //// [superCallParameterContextualTyping2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallParameterContextualTyping3.js b/tests/baselines/reference/superCallParameterContextualTyping3.js index 4469c918b317d..c074252a69293 100644 --- a/tests/baselines/reference/superCallParameterContextualTyping3.js +++ b/tests/baselines/reference/superCallParameterContextualTyping3.js @@ -32,12 +32,12 @@ class C extends CBase { } //// [superCallParameterContextualTyping3.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallWithCommentEmit01.js b/tests/baselines/reference/superCallWithCommentEmit01.js index ae7f053e5d4cf..5cd354a24b40d 100644 --- a/tests/baselines/reference/superCallWithCommentEmit01.js +++ b/tests/baselines/reference/superCallWithCommentEmit01.js @@ -11,12 +11,12 @@ class B extends A { } //// [superCallWithCommentEmit01.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallWithMissingBaseClass.js b/tests/baselines/reference/superCallWithMissingBaseClass.js index 766c121d42b2b..27ecd48bf68dd 100644 --- a/tests/baselines/reference/superCallWithMissingBaseClass.js +++ b/tests/baselines/reference/superCallWithMissingBaseClass.js @@ -10,12 +10,12 @@ class Foo extends Bar { } //// [superCallWithMissingBaseClass.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCalls.js b/tests/baselines/reference/superCalls.js index 47292405faf87..e974d75176b2d 100644 --- a/tests/baselines/reference/superCalls.js +++ b/tests/baselines/reference/superCalls.js @@ -31,12 +31,12 @@ class OtherDerived extends OtherBase { //// [superCalls.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallsInConstructor.js b/tests/baselines/reference/superCallsInConstructor.js index 707757b37b6b8..1b02c20b7a5fa 100644 --- a/tests/baselines/reference/superCallsInConstructor.js +++ b/tests/baselines/reference/superCallsInConstructor.js @@ -21,12 +21,12 @@ class Derived extends Base { } //// [superCallsInConstructor.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superErrors.js b/tests/baselines/reference/superErrors.js index 9b9681b2deee0..86c1dae1a1c68 100644 --- a/tests/baselines/reference/superErrors.js +++ b/tests/baselines/reference/superErrors.js @@ -52,12 +52,12 @@ class RegisteredUser extends User { } //// [superErrors.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superInCatchBlock1.js b/tests/baselines/reference/superInCatchBlock1.js index bf8f9bd5e0263..30d3494689aa9 100644 --- a/tests/baselines/reference/superInCatchBlock1.js +++ b/tests/baselines/reference/superInCatchBlock1.js @@ -14,12 +14,12 @@ class B extends A { //// [superInCatchBlock1.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superInConstructorParam1.js b/tests/baselines/reference/superInConstructorParam1.js index 869dfde8e5133..a98e1fdb089ae 100644 --- a/tests/baselines/reference/superInConstructorParam1.js +++ b/tests/baselines/reference/superInConstructorParam1.js @@ -11,12 +11,12 @@ class C extends B { } //// [superInConstructorParam1.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superInLambdas.js b/tests/baselines/reference/superInLambdas.js index 1e040f627c8f6..384b83c723948 100644 --- a/tests/baselines/reference/superInLambdas.js +++ b/tests/baselines/reference/superInLambdas.js @@ -68,12 +68,12 @@ class RegisteredUser4 extends User { } //// [superInLambdas.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superInObjectLiterals_ES5.js b/tests/baselines/reference/superInObjectLiterals_ES5.js index 77f55772b6968..32369a7fc85b6 100644 --- a/tests/baselines/reference/superInObjectLiterals_ES5.js +++ b/tests/baselines/reference/superInObjectLiterals_ES5.js @@ -60,12 +60,12 @@ class B extends A { } //// [superInObjectLiterals_ES5.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superNewCall1.js b/tests/baselines/reference/superNewCall1.js index c532b4556c887..eee25fd2acccb 100644 --- a/tests/baselines/reference/superNewCall1.js +++ b/tests/baselines/reference/superNewCall1.js @@ -13,12 +13,12 @@ class B extends A { } //// [superNewCall1.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superPropertyAccess.js b/tests/baselines/reference/superPropertyAccess.js index eb92e66a131ea..39e8098407c7a 100644 --- a/tests/baselines/reference/superPropertyAccess.js +++ b/tests/baselines/reference/superPropertyAccess.js @@ -37,12 +37,12 @@ class MyDerived extends MyBase { } //// [superPropertyAccess.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superPropertyAccess1.js b/tests/baselines/reference/superPropertyAccess1.js index f15bdde29e27c..77d6a4b1c12a6 100644 --- a/tests/baselines/reference/superPropertyAccess1.js +++ b/tests/baselines/reference/superPropertyAccess1.js @@ -28,12 +28,12 @@ class D extends C { } //// [superPropertyAccess1.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superPropertyAccess2.js b/tests/baselines/reference/superPropertyAccess2.js index 98f1d0a190cb6..1b9c056d3b2f3 100644 --- a/tests/baselines/reference/superPropertyAccess2.js +++ b/tests/baselines/reference/superPropertyAccess2.js @@ -28,12 +28,12 @@ class D extends C { } //// [superPropertyAccess2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superPropertyAccessInComputedPropertiesOfNestedType_ES5.js b/tests/baselines/reference/superPropertyAccessInComputedPropertiesOfNestedType_ES5.js index d60310be5e7ed..5506bedbcb6af 100644 --- a/tests/baselines/reference/superPropertyAccessInComputedPropertiesOfNestedType_ES5.js +++ b/tests/baselines/reference/superPropertyAccessInComputedPropertiesOfNestedType_ES5.js @@ -15,12 +15,12 @@ class B extends A { } //// [superPropertyAccessInComputedPropertiesOfNestedType_ES5.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superPropertyAccessNoError.js b/tests/baselines/reference/superPropertyAccessNoError.js index d2829eba56154..e91603f20d893 100644 --- a/tests/baselines/reference/superPropertyAccessNoError.js +++ b/tests/baselines/reference/superPropertyAccessNoError.js @@ -77,12 +77,12 @@ instance.returnThis().fn(); //super.publicInstanceMemberFunction in lambda in member function //super.publicStaticMemberFunction in static member function of derived class //super.publicStaticMemberFunction in static member accessor(get and set) of derived class +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superPropertyAccess_ES5.js b/tests/baselines/reference/superPropertyAccess_ES5.js index e8f4dd3f8725a..4e67455900aaa 100644 --- a/tests/baselines/reference/superPropertyAccess_ES5.js +++ b/tests/baselines/reference/superPropertyAccess_ES5.js @@ -30,12 +30,12 @@ class B extends A { } //// [superPropertyAccess_ES5.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superSymbolIndexedAccess5.js b/tests/baselines/reference/superSymbolIndexedAccess5.js index 3c5aaf9b843bc..c933334a50673 100644 --- a/tests/baselines/reference/superSymbolIndexedAccess5.js +++ b/tests/baselines/reference/superSymbolIndexedAccess5.js @@ -14,12 +14,12 @@ class Bar extends Foo { } //// [superSymbolIndexedAccess5.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superSymbolIndexedAccess6.js b/tests/baselines/reference/superSymbolIndexedAccess6.js index ff11a4c1b6532..61f9888544371 100644 --- a/tests/baselines/reference/superSymbolIndexedAccess6.js +++ b/tests/baselines/reference/superSymbolIndexedAccess6.js @@ -14,12 +14,12 @@ class Bar extends Foo { } //// [superSymbolIndexedAccess6.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superWithGenericSpecialization.js b/tests/baselines/reference/superWithGenericSpecialization.js index 8e23bfb25c4de..645007e5a091f 100644 --- a/tests/baselines/reference/superWithGenericSpecialization.js +++ b/tests/baselines/reference/superWithGenericSpecialization.js @@ -15,12 +15,12 @@ var r: string = d.x; var r2: number = d.y; //// [superWithGenericSpecialization.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superWithGenerics.js b/tests/baselines/reference/superWithGenerics.js index 5e83df296d25e..f0e9cacf8aaef 100644 --- a/tests/baselines/reference/superWithGenerics.js +++ b/tests/baselines/reference/superWithGenerics.js @@ -12,12 +12,12 @@ class D extends B { //// [superWithGenerics.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superWithTypeArgument.js b/tests/baselines/reference/superWithTypeArgument.js index 51a4f93a4e402..8b7c07a27a527 100644 --- a/tests/baselines/reference/superWithTypeArgument.js +++ b/tests/baselines/reference/superWithTypeArgument.js @@ -10,12 +10,12 @@ class D extends C { } //// [superWithTypeArgument.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superWithTypeArgument2.js b/tests/baselines/reference/superWithTypeArgument2.js index 3744e79761521..349ead6b381de 100644 --- a/tests/baselines/reference/superWithTypeArgument2.js +++ b/tests/baselines/reference/superWithTypeArgument2.js @@ -10,12 +10,12 @@ class D extends C { } //// [superWithTypeArgument2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superWithTypeArgument3.js b/tests/baselines/reference/superWithTypeArgument3.js index 9f76cc1ecff6c..6e09952749c11 100644 --- a/tests/baselines/reference/superWithTypeArgument3.js +++ b/tests/baselines/reference/superWithTypeArgument3.js @@ -14,12 +14,12 @@ class D extends C { } //// [superWithTypeArgument3.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/super_inside-object-literal-getters-and-setters.js b/tests/baselines/reference/super_inside-object-literal-getters-and-setters.js index 077affd0eda0b..d7bab4380b4b1 100644 --- a/tests/baselines/reference/super_inside-object-literal-getters-and-setters.js +++ b/tests/baselines/reference/super_inside-object-literal-getters-and-setters.js @@ -28,12 +28,12 @@ class SuperObjectTest extends F { //// [super_inside-object-literal-getters-and-setters.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/switchStatements.js b/tests/baselines/reference/switchStatements.js index 05a7fafb0465f..d2754225e5b41 100644 --- a/tests/baselines/reference/switchStatements.js +++ b/tests/baselines/reference/switchStatements.js @@ -56,12 +56,12 @@ switch (((x: T) => '')(1)) { } //// [switchStatements.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/systemModuleWithSuperClass.js b/tests/baselines/reference/systemModuleWithSuperClass.js index e31370d0acd28..c146e495c8005 100644 --- a/tests/baselines/reference/systemModuleWithSuperClass.js +++ b/tests/baselines/reference/systemModuleWithSuperClass.js @@ -32,12 +32,12 @@ System.register([], function (exports_1, context_1) { //// [bar.js] System.register(["./foo"], function (exports_1, context_1) { "use strict"; + var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/targetTypeBaseCalls.js b/tests/baselines/reference/targetTypeBaseCalls.js index d359aa916285f..a0faadf78a647 100644 --- a/tests/baselines/reference/targetTypeBaseCalls.js +++ b/tests/baselines/reference/targetTypeBaseCalls.js @@ -19,12 +19,12 @@ class Bar extends Foo { constructor() { super(function(s) { s = 5 }) } } // err //// [targetTypeBaseCalls.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/thisInInvalidContexts.js b/tests/baselines/reference/thisInInvalidContexts.js index 6b16742cca21a..1b969e2654784 100644 --- a/tests/baselines/reference/thisInInvalidContexts.js +++ b/tests/baselines/reference/thisInInvalidContexts.js @@ -49,12 +49,12 @@ enum SomeEnum { //// [thisInInvalidContexts.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/thisInInvalidContextsExternalModule.js b/tests/baselines/reference/thisInInvalidContextsExternalModule.js index 68579bb23681b..ee517c6e36f26 100644 --- a/tests/baselines/reference/thisInInvalidContextsExternalModule.js +++ b/tests/baselines/reference/thisInInvalidContextsExternalModule.js @@ -50,12 +50,12 @@ export = this; // Should be an error //// [thisInInvalidContextsExternalModule.js] "use strict"; +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/thisInSuperCall.js b/tests/baselines/reference/thisInSuperCall.js index b8120fe732c26..80795c91e6784 100644 --- a/tests/baselines/reference/thisInSuperCall.js +++ b/tests/baselines/reference/thisInSuperCall.js @@ -23,12 +23,12 @@ class Foo3 extends Base { } //// [thisInSuperCall.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/thisInSuperCall1.js b/tests/baselines/reference/thisInSuperCall1.js index 3adc1c2a5b3e5..f5e4e131cfc4b 100644 --- a/tests/baselines/reference/thisInSuperCall1.js +++ b/tests/baselines/reference/thisInSuperCall1.js @@ -11,12 +11,12 @@ class Foo extends Base { //// [thisInSuperCall1.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/thisInSuperCall2.js b/tests/baselines/reference/thisInSuperCall2.js index f310654acaee4..663826999d377 100644 --- a/tests/baselines/reference/thisInSuperCall2.js +++ b/tests/baselines/reference/thisInSuperCall2.js @@ -20,12 +20,12 @@ class Foo2 extends Base { //// [thisInSuperCall2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/thisInSuperCall3.js b/tests/baselines/reference/thisInSuperCall3.js index b0f4d62c746f9..abba0499608cf 100644 --- a/tests/baselines/reference/thisInSuperCall3.js +++ b/tests/baselines/reference/thisInSuperCall3.js @@ -13,12 +13,12 @@ class Foo extends Base { //// [thisInSuperCall3.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/thisTypeInFunctions.js b/tests/baselines/reference/thisTypeInFunctions.js index ae95aac22b597..27aae06ccf859 100644 --- a/tests/baselines/reference/thisTypeInFunctions.js +++ b/tests/baselines/reference/thisTypeInFunctions.js @@ -195,12 +195,12 @@ function missingTypeIsImplicitAny(this, a: number) { return this.anything + a; } //// [thisTypeInFunctions.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/thisTypeInFunctionsNegative.js b/tests/baselines/reference/thisTypeInFunctionsNegative.js index 2591f9fe01936..ca9eeb60feee0 100644 --- a/tests/baselines/reference/thisTypeInFunctionsNegative.js +++ b/tests/baselines/reference/thisTypeInFunctionsNegative.js @@ -177,12 +177,12 @@ c.explicitProperty = (this, m) => m + this.n; //// [thisTypeInFunctionsNegative.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/tsxCorrectlyParseLessThanComparison1.js b/tests/baselines/reference/tsxCorrectlyParseLessThanComparison1.js index b6c5295b48224..9c5c848b78135 100644 --- a/tests/baselines/reference/tsxCorrectlyParseLessThanComparison1.js +++ b/tests/baselines/reference/tsxCorrectlyParseLessThanComparison1.js @@ -21,12 +21,12 @@ export class ShortDetails extends React.Component<{ id: number }, {}> { //// [tsxCorrectlyParseLessThanComparison1.js] "use strict"; +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/tsxDynamicTagName5.js b/tests/baselines/reference/tsxDynamicTagName5.js index 3a1ac6d2246af..a895c2ec4dded 100644 --- a/tests/baselines/reference/tsxDynamicTagName5.js +++ b/tests/baselines/reference/tsxDynamicTagName5.js @@ -21,12 +21,12 @@ export class Text extends React.Component<{}, {}> { //// [app.jsx] "use strict"; +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/tsxDynamicTagName7.js b/tests/baselines/reference/tsxDynamicTagName7.js index f584dbf960a55..845eb400818a6 100644 --- a/tests/baselines/reference/tsxDynamicTagName7.js +++ b/tests/baselines/reference/tsxDynamicTagName7.js @@ -21,12 +21,12 @@ export class Text extends React.Component<{}, {}> { //// [app.jsx] "use strict"; +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/tsxDynamicTagName8.js b/tests/baselines/reference/tsxDynamicTagName8.js index bf3ab5d4a6982..7e1511af79a53 100644 --- a/tests/baselines/reference/tsxDynamicTagName8.js +++ b/tests/baselines/reference/tsxDynamicTagName8.js @@ -21,12 +21,12 @@ export class Text extends React.Component<{}, {}> { //// [app.jsx] "use strict"; +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/tsxDynamicTagName9.js b/tests/baselines/reference/tsxDynamicTagName9.js index fefa118d704f7..7867bea3873d3 100644 --- a/tests/baselines/reference/tsxDynamicTagName9.js +++ b/tests/baselines/reference/tsxDynamicTagName9.js @@ -21,12 +21,12 @@ export class Text extends React.Component<{}, {}> { //// [app.jsx] "use strict"; +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/tsxExternalModuleEmit1.js b/tests/baselines/reference/tsxExternalModuleEmit1.js index 29f4e78100ee9..5f594b4d1d583 100644 --- a/tests/baselines/reference/tsxExternalModuleEmit1.js +++ b/tests/baselines/reference/tsxExternalModuleEmit1.js @@ -33,12 +33,12 @@ export class Button extends React.Component { //// [button.jsx] "use strict"; +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -56,12 +56,12 @@ var Button = (function (_super) { exports.Button = Button; //// [app.jsx] "use strict"; +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/tsxStatelessFunctionComponents2.js b/tests/baselines/reference/tsxStatelessFunctionComponents2.js index 75284a28702cb..c3ed400f65c97 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponents2.js +++ b/tests/baselines/reference/tsxStatelessFunctionComponents2.js @@ -40,12 +40,12 @@ let i =
x.propertyNotOnHtmlDivElement} />; //// [file.jsx] "use strict"; +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/tsxUnionTypeComponent1.js b/tests/baselines/reference/tsxUnionTypeComponent1.js index 215046ba2b6ad..93b810483b6b8 100644 --- a/tests/baselines/reference/tsxUnionTypeComponent1.js +++ b/tests/baselines/reference/tsxUnionTypeComponent1.js @@ -26,12 +26,12 @@ class MyButtonComponent extends React.Component<{},{}> { //// [file.js] "use strict"; +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeAssertions.js b/tests/baselines/reference/typeAssertions.js index e3cf89b080052..e9ab0f69449ab 100644 --- a/tests/baselines/reference/typeAssertions.js +++ b/tests/baselines/reference/typeAssertions.js @@ -52,12 +52,12 @@ if((numOrStr === undefined) as numOrStr is string) { // Error //// [typeAssertions.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardFunction.js b/tests/baselines/reference/typeGuardFunction.js index f16b6d1ce5af3..b38de5abcd297 100644 --- a/tests/baselines/reference/typeGuardFunction.js +++ b/tests/baselines/reference/typeGuardFunction.js @@ -84,12 +84,12 @@ let union2: C | B; let union3: boolean | B = isA(union2) || union2; //// [typeGuardFunction.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardFunctionErrors.js b/tests/baselines/reference/typeGuardFunctionErrors.js index 3e9b8f08cd422..4a1f85e3e7125 100644 --- a/tests/baselines/reference/typeGuardFunctionErrors.js +++ b/tests/baselines/reference/typeGuardFunctionErrors.js @@ -146,12 +146,12 @@ if (hasMissingParameter()) { } //// [typeGuardFunctionErrors.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardFunctionGenerics.js b/tests/baselines/reference/typeGuardFunctionGenerics.js index ffe263f998571..ce30137e322b6 100644 --- a/tests/baselines/reference/typeGuardFunctionGenerics.js +++ b/tests/baselines/reference/typeGuardFunctionGenerics.js @@ -34,12 +34,12 @@ if (funD(isC, a)) { let test3: B = funE(isB, 1); //// [typeGuardFunctionGenerics.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardFunctionOfFormThis.js b/tests/baselines/reference/typeGuardFunctionOfFormThis.js index a1d1b7842d4d1..c3e2d851db2ac 100644 --- a/tests/baselines/reference/typeGuardFunctionOfFormThis.js +++ b/tests/baselines/reference/typeGuardFunctionOfFormThis.js @@ -142,12 +142,12 @@ interface MimicGuardInterface { //// [typeGuardFunctionOfFormThis.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.js b/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.js index 7ec705bdc2d2e..753a41b8e4231 100644 --- a/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.js +++ b/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.js @@ -60,12 +60,12 @@ else { } //// [typeGuardFunctionOfFormThisErrors.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardOfFormInstanceOf.js b/tests/baselines/reference/typeGuardOfFormInstanceOf.js index 67d216d0f58d8..55d28ea2a58ca 100644 --- a/tests/baselines/reference/typeGuardOfFormInstanceOf.js +++ b/tests/baselines/reference/typeGuardOfFormInstanceOf.js @@ -73,12 +73,12 @@ else { // - when true, narrows the type of x to the type of the 'prototype' property in C provided // it is a subtype of the type of x, or // - when false, has no effect on the type of x. +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardOfFormIsType.js b/tests/baselines/reference/typeGuardOfFormIsType.js index 88d0ac11a0907..f9b90888a9255 100644 --- a/tests/baselines/reference/typeGuardOfFormIsType.js +++ b/tests/baselines/reference/typeGuardOfFormIsType.js @@ -38,12 +38,12 @@ str = isD1(c2Ord1) && c2Ord1.p1; // D1 var r2: C2 | D1 = isC1(c2Ord1) && c2Ord1; // C2 | D1 //// [typeGuardOfFormIsType.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardOfFormThisMember.js b/tests/baselines/reference/typeGuardOfFormThisMember.js index 6dc97fb0152d2..1e96d089f1b53 100644 --- a/tests/baselines/reference/typeGuardOfFormThisMember.js +++ b/tests/baselines/reference/typeGuardOfFormThisMember.js @@ -83,12 +83,12 @@ namespace Test { //// [typeGuardOfFormThisMember.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js b/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js index fbc2f23e547d0..0212d05c52370 100644 --- a/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js +++ b/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js @@ -33,12 +33,12 @@ namespace Test { } //// [typeGuardOfFormThisMemberErrors.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeMatch2.js b/tests/baselines/reference/typeMatch2.js index e4c7925a90bd7..9a75ed6616d58 100644 --- a/tests/baselines/reference/typeMatch2.js +++ b/tests/baselines/reference/typeMatch2.js @@ -45,12 +45,12 @@ function f4() { //// [typeMatch2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeOfSuperCall.js b/tests/baselines/reference/typeOfSuperCall.js index 9ac69544460f9..f02a7c7de79d0 100644 --- a/tests/baselines/reference/typeOfSuperCall.js +++ b/tests/baselines/reference/typeOfSuperCall.js @@ -9,12 +9,12 @@ class D extends C { } //// [typeOfSuperCall.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeParameterAsBaseClass.js b/tests/baselines/reference/typeParameterAsBaseClass.js index 062ac61fd519c..8b40f439ba2e8 100644 --- a/tests/baselines/reference/typeParameterAsBaseClass.js +++ b/tests/baselines/reference/typeParameterAsBaseClass.js @@ -3,12 +3,12 @@ class C extends T {} class C2 implements T {} //// [typeParameterAsBaseClass.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeParameterAsBaseType.js b/tests/baselines/reference/typeParameterAsBaseType.js index e77c3b6e0d483..97627b41f105c 100644 --- a/tests/baselines/reference/typeParameterAsBaseType.js +++ b/tests/baselines/reference/typeParameterAsBaseType.js @@ -13,12 +13,12 @@ interface I2 extends U { } //// [typeParameterAsBaseType.js] // type parameters cannot be used as base types // these are all errors +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeParameterExtendingUnion1.js b/tests/baselines/reference/typeParameterExtendingUnion1.js index 5d15b09720fdc..6a189dc0ace04 100644 --- a/tests/baselines/reference/typeParameterExtendingUnion1.js +++ b/tests/baselines/reference/typeParameterExtendingUnion1.js @@ -13,12 +13,12 @@ function f(a: T) { } //// [typeParameterExtendingUnion1.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeParameterExtendingUnion2.js b/tests/baselines/reference/typeParameterExtendingUnion2.js index d274169391f69..bf929f42c6aea 100644 --- a/tests/baselines/reference/typeParameterExtendingUnion2.js +++ b/tests/baselines/reference/typeParameterExtendingUnion2.js @@ -13,12 +13,12 @@ function f(a: T) { } //// [typeParameterExtendingUnion2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeRelationships.js b/tests/baselines/reference/typeRelationships.js index 745e2dffe0035..2bdb91818a2e1 100644 --- a/tests/baselines/reference/typeRelationships.js +++ b/tests/baselines/reference/typeRelationships.js @@ -41,12 +41,12 @@ class D extends C { //// [typeRelationships.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeValueConflict1.js b/tests/baselines/reference/typeValueConflict1.js index c66ed5fbfd449..467781c8c266e 100644 --- a/tests/baselines/reference/typeValueConflict1.js +++ b/tests/baselines/reference/typeValueConflict1.js @@ -12,12 +12,12 @@ module M2 { //// [typeValueConflict1.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeValueConflict2.js b/tests/baselines/reference/typeValueConflict2.js index c72115d0dfcc6..0220bda6f9bcc 100644 --- a/tests/baselines/reference/typeValueConflict2.js +++ b/tests/baselines/reference/typeValueConflict2.js @@ -19,12 +19,12 @@ module M3 { //// [typeValueConflict2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeofClass2.js b/tests/baselines/reference/typeofClass2.js index 46f9d7dc7f94a..929472aefeefb 100644 --- a/tests/baselines/reference/typeofClass2.js +++ b/tests/baselines/reference/typeofClass2.js @@ -22,12 +22,12 @@ var r1: typeof D; var r2: typeof d; //// [typeofClass2.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typesWithSpecializedCallSignatures.js b/tests/baselines/reference/typesWithSpecializedCallSignatures.js index d011126edeb51..3403dc447a693 100644 --- a/tests/baselines/reference/typesWithSpecializedCallSignatures.js +++ b/tests/baselines/reference/typesWithSpecializedCallSignatures.js @@ -43,12 +43,12 @@ var r3: Base = c.foo('hm'); //// [typesWithSpecializedCallSignatures.js] // basic uses of specialized signatures without errors +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typesWithSpecializedConstructSignatures.js b/tests/baselines/reference/typesWithSpecializedConstructSignatures.js index 79cd99f249d32..29c7eb186fa8a 100644 --- a/tests/baselines/reference/typesWithSpecializedConstructSignatures.js +++ b/tests/baselines/reference/typesWithSpecializedConstructSignatures.js @@ -41,12 +41,12 @@ var r3: Base = new a('hm'); //// [typesWithSpecializedConstructSignatures.js] // basic uses of specialized signatures without errors +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/undeclaredBase.js b/tests/baselines/reference/undeclaredBase.js index a96a892e9a27b..60fa6a01f633a 100644 --- a/tests/baselines/reference/undeclaredBase.js +++ b/tests/baselines/reference/undeclaredBase.js @@ -4,12 +4,12 @@ module M { export class C extends M.I { } } //// [undeclaredBase.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/undefinedIsSubtypeOfEverything.js b/tests/baselines/reference/undefinedIsSubtypeOfEverything.js index aa4fac8d6eb6a..fbfe9f3b46652 100644 --- a/tests/baselines/reference/undefinedIsSubtypeOfEverything.js +++ b/tests/baselines/reference/undefinedIsSubtypeOfEverything.js @@ -123,12 +123,12 @@ class D17 extends Base { //// [undefinedIsSubtypeOfEverything.js] // undefined is a subtype of every other types, no errors expected below +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/underscoreMapFirst.js b/tests/baselines/reference/underscoreMapFirst.js index 4f3990b7b578b..760cc6a1ba70d 100644 --- a/tests/baselines/reference/underscoreMapFirst.js +++ b/tests/baselines/reference/underscoreMapFirst.js @@ -49,12 +49,12 @@ class MyView extends View { //// [underscoreMapFirst.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/underscoreThisInDerivedClass01.js b/tests/baselines/reference/underscoreThisInDerivedClass01.js index 439c33df0ec2c..2828c8dc2878b 100644 --- a/tests/baselines/reference/underscoreThisInDerivedClass01.js +++ b/tests/baselines/reference/underscoreThisInDerivedClass01.js @@ -25,12 +25,12 @@ class D extends C { //// [underscoreThisInDerivedClass01.js] // @target es5 +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/underscoreThisInDerivedClass02.js b/tests/baselines/reference/underscoreThisInDerivedClass02.js index 26f2796e4b082..4d7a69b60c5a1 100644 --- a/tests/baselines/reference/underscoreThisInDerivedClass02.js +++ b/tests/baselines/reference/underscoreThisInDerivedClass02.js @@ -19,12 +19,12 @@ class D extends C { //// [underscoreThisInDerivedClass02.js] // @target es5 +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/unionTypeEquivalence.js b/tests/baselines/reference/unionTypeEquivalence.js index 1cafbc8d65ca5..9de5ad9d470c7 100644 --- a/tests/baselines/reference/unionTypeEquivalence.js +++ b/tests/baselines/reference/unionTypeEquivalence.js @@ -20,12 +20,12 @@ var z1: string | typeof BC; //// [unionTypeEquivalence.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/unionTypeFromArrayLiteral.js b/tests/baselines/reference/unionTypeFromArrayLiteral.js index 12d524f8616c4..f6c1489ceeec0 100644 --- a/tests/baselines/reference/unionTypeFromArrayLiteral.js +++ b/tests/baselines/reference/unionTypeFromArrayLiteral.js @@ -28,12 +28,12 @@ var arr9 = [e, f]; // (E|F)[] // If the array literal is empty, the resulting type is an array type with the element type Undefined. // Otherwise, if the array literal is contextually typed by a type that has a property with the numeric name ‘0’, the resulting type is a tuple type constructed from the types of the element expressions. // Otherwise, the resulting type is an array type with an element type that is the union of the types of the element expressions. +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/unionTypesAssignability.js b/tests/baselines/reference/unionTypesAssignability.js index bf5c69f93e97e..8fc5f1e8f7131 100644 --- a/tests/baselines/reference/unionTypesAssignability.js +++ b/tests/baselines/reference/unionTypesAssignability.js @@ -74,12 +74,12 @@ function foo(t: T, u: U) { //// [unionTypesAssignability.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/unknownSymbols1.js b/tests/baselines/reference/unknownSymbols1.js index 3768213892aad..c64cc7224ba8a 100644 --- a/tests/baselines/reference/unknownSymbols1.js +++ b/tests/baselines/reference/unknownSymbols1.js @@ -33,12 +33,12 @@ class C5 { } //// [unknownSymbols1.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/unspecializedConstraints.js b/tests/baselines/reference/unspecializedConstraints.js index fbb4c157665e9..ddc7d6e75986c 100644 --- a/tests/baselines/reference/unspecializedConstraints.js +++ b/tests/baselines/reference/unspecializedConstraints.js @@ -154,12 +154,12 @@ module ts { //// [unspecializedConstraints.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js b/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js index 67e3d579dc429..c46afba64404d 100644 --- a/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js +++ b/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js @@ -44,12 +44,12 @@ c5(1); // error //// [untypedFunctionCallsWithTypeParameters1.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/unusedClassesinNamespace4.js b/tests/baselines/reference/unusedClassesinNamespace4.js index af2c9d96f52db..e3af0dd85677c 100644 --- a/tests/baselines/reference/unusedClassesinNamespace4.js +++ b/tests/baselines/reference/unusedClassesinNamespace4.js @@ -15,12 +15,12 @@ namespace Validation { } //// [unusedClassesinNamespace4.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/unusedIdentifiersConsolidated1.js b/tests/baselines/reference/unusedIdentifiersConsolidated1.js index 7bea43688ad4e..37317f9fbe9ee 100644 --- a/tests/baselines/reference/unusedIdentifiersConsolidated1.js +++ b/tests/baselines/reference/unusedIdentifiersConsolidated1.js @@ -103,12 +103,12 @@ namespace Greeter { } //// [unusedIdentifiersConsolidated1.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/validUseOfThisInSuper.js b/tests/baselines/reference/validUseOfThisInSuper.js index b32d9413bdf6a..a80a72f434aeb 100644 --- a/tests/baselines/reference/validUseOfThisInSuper.js +++ b/tests/baselines/reference/validUseOfThisInSuper.js @@ -10,12 +10,12 @@ class Super extends Base { } //// [validUseOfThisInSuper.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/varArgsOnConstructorTypes.js b/tests/baselines/reference/varArgsOnConstructorTypes.js index f9674ceb32880..9cb0dc7781165 100644 --- a/tests/baselines/reference/varArgsOnConstructorTypes.js +++ b/tests/baselines/reference/varArgsOnConstructorTypes.js @@ -25,12 +25,12 @@ reg.register(B); //// [varArgsOnConstructorTypes.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; From 074f2b7636102003acfaa54cdc9a4b86dbf5e50c Mon Sep 17 00:00:00 2001 From: vvakame Date: Thu, 8 Dec 2016 23:02:59 +0900 Subject: [PATCH 4/7] catch up --- .../reference/superPropertyInConstructorBeforeSuperCall.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/baselines/reference/superPropertyInConstructorBeforeSuperCall.js b/tests/baselines/reference/superPropertyInConstructorBeforeSuperCall.js index 15bc0c40f37f5..1686be4e2e93a 100644 --- a/tests/baselines/reference/superPropertyInConstructorBeforeSuperCall.js +++ b/tests/baselines/reference/superPropertyInConstructorBeforeSuperCall.js @@ -16,8 +16,12 @@ class C2 extends B { } //// [superPropertyInConstructorBeforeSuperCall.js] +var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; From c09a8c91a29bd5788c732b7f8c486b39eb17f342 Mon Sep 17 00:00:00 2001 From: vvakame Date: Thu, 8 Dec 2016 23:33:06 +0900 Subject: [PATCH 5/7] address review comment --- src/compiler/transformers/es2015.ts | 19 +- ...sClassHeritageListMemberTypeAnnotations.js | 19 +- ...accessibleTypeInTypeParameterConstraint.js | 19 +- .../reference/abstractClassInLocalScope.js | 19 +- .../abstractClassInLocalScopeIsAbstract.js | 19 +- tests/baselines/reference/abstractProperty.js | 19 +- .../reference/abstractPropertyNegative.js | 19 +- .../accessOverriddenBaseClassMember1.js | 19 +- .../accessors_spec_section-4.5_inference.js | 19 +- .../reference/aliasUsageInAccessorsOfClass.js | 19 +- .../baselines/reference/aliasUsageInArray.js | 19 +- .../aliasUsageInFunctionExpression.js | 19 +- .../reference/aliasUsageInGenericFunction.js | 19 +- .../reference/aliasUsageInIndexerOfClass.js | 19 +- .../reference/aliasUsageInObjectLiteral.js | 19 +- .../reference/aliasUsageInOrExpression.js | 19 +- ...aliasUsageInTypeArgumentOfExtendsClause.js | 38 +- .../reference/aliasUsageInVarAssignment.js | 19 +- .../reference/ambiguousOverloadResolution.js | 19 +- .../reference/apparentTypeSubtyping.js | 19 +- .../reference/apparentTypeSupertype.js | 19 +- .../reference/arrayAssignmentTest1.js | 19 +- .../reference/arrayAssignmentTest2.js | 19 +- .../reference/arrayBestCommonTypes.js | 19 +- .../reference/arrayLiteralTypeInference.js | 19 +- tests/baselines/reference/arrayLiterals.js | 19 +- .../arrayLiteralsWithRecursiveGenerics.js | 19 +- ...rayOfSubtypeIsAssignableToReadonlyArray.js | 19 +- .../reference/arrowFunctionContexts.js | 19 +- .../assignmentCompatWithCallSignatures3.js | 19 +- .../assignmentCompatWithCallSignatures4.js | 19 +- .../assignmentCompatWithCallSignatures5.js | 19 +- .../assignmentCompatWithCallSignatures6.js | 19 +- ...ssignmentCompatWithConstructSignatures3.js | 19 +- ...ssignmentCompatWithConstructSignatures4.js | 19 +- ...ssignmentCompatWithConstructSignatures5.js | 19 +- ...ssignmentCompatWithConstructSignatures6.js | 19 +- .../assignmentCompatWithNumericIndexer.js | 19 +- .../assignmentCompatWithNumericIndexer3.js | 19 +- .../assignmentCompatWithObjectMembers4.js | 19 +- ...nmentCompatWithObjectMembersOptionality.js | 19 +- ...mentCompatWithObjectMembersOptionality2.js | 19 +- .../assignmentCompatWithStringIndexer.js | 19 +- .../reference/assignmentLHSIsValue.js | 19 +- .../reference/asyncImportedPromise_es5.js | 19 +- tests/baselines/reference/autolift4.js | 19 +- tests/baselines/reference/baseCheck.js | 19 +- .../reference/baseIndexSignatureResolution.js | 19 +- .../reference/baseTypeOrderChecking.js | 19 +- .../baseTypeWrappingInstantiationChain.js | 19 +- tests/baselines/reference/bases.js | 19 +- .../bestCommonTypeOfConditionalExpressions.js | 19 +- ...bestCommonTypeOfConditionalExpressions2.js | 19 +- .../reference/bestCommonTypeOfTuple2.js | 19 +- ...allSignatureAssignabilityInInheritance2.js | 19 +- ...allSignatureAssignabilityInInheritance3.js | 19 +- ...allSignatureAssignabilityInInheritance4.js | 19 +- ...allSignatureAssignabilityInInheritance5.js | 19 +- ...allSignatureAssignabilityInInheritance6.js | 19 +- tests/baselines/reference/callWithSpread.js | 19 +- .../reference/captureThisInSuperCall.js | 19 +- tests/baselines/reference/castingTuple.js | 19 +- .../baselines/reference/chainedAssignment3.js | 19 +- ...arameterConstrainedToOtherTypeParameter.js | 19 +- .../reference/checkForObjectTooStrict.js | 19 +- .../checkSuperCallBeforeThisAccessing1.js | 19 +- .../checkSuperCallBeforeThisAccessing2.js | 19 +- .../checkSuperCallBeforeThisAccessing3.js | 19 +- .../checkSuperCallBeforeThisAccessing4.js | 19 +- .../checkSuperCallBeforeThisAccessing5.js | 19 +- .../checkSuperCallBeforeThisAccessing6.js | 19 +- .../checkSuperCallBeforeThisAccessing7.js | 19 +- .../checkSuperCallBeforeThisAccessing8.js | 19 +- .../reference/circularImportAlias.js | 19 +- .../circularTypeofWithFunctionModule.js | 19 +- .../classAbstractConstructorAssignability.js | 19 +- .../reference/classAbstractCrashedOnce.js | 19 +- .../reference/classAbstractExtends.js | 19 +- .../reference/classAbstractFactoryFunction.js | 19 +- .../reference/classAbstractGeneric.js | 19 +- .../reference/classAbstractInAModule.js | 19 +- .../reference/classAbstractInheritance.js | 19 +- .../reference/classAbstractInstantiations1.js | 19 +- .../reference/classAbstractInstantiations2.js | 19 +- .../classAbstractOverrideWithAbstract.js | 19 +- .../reference/classAbstractSuperCalls.js | 19 +- .../classAbstractUsingAbstractMethod1.js | 19 +- .../classAbstractUsingAbstractMethods2.js | 19 +- .../classConstructorAccessibility2.js | 19 +- .../classConstructorAccessibility4.js | 19 +- .../classConstructorAccessibility5.js | 19 +- ...classConstructorParametersAccessibility.js | 19 +- ...lassConstructorParametersAccessibility2.js | 19 +- ...lassConstructorParametersAccessibility3.js | 19 +- ...clarationMergedInModuleWithContinuation.js | 19 +- .../classDeclaredBeforeClassFactory.js | 19 +- .../classDoesNotDependOnBaseTypes.js | 19 +- tests/baselines/reference/classExpression2.js | 19 +- tests/baselines/reference/classExpression3.js | 19 +- .../classExpressionExtendingAbstractClass.js | 19 +- .../reference/classExtendingBuiltinType.js | 19 +- .../reference/classExtendingClass.js | 19 +- .../reference/classExtendingClassLikeType.js | 19 +- .../reference/classExtendingNonConstructor.js | 19 +- .../baselines/reference/classExtendingNull.js | 19 +- .../reference/classExtendingPrimitive.js | 19 +- .../reference/classExtendingPrimitive2.js | 19 +- .../reference/classExtendingQualifiedName.js | 19 +- .../reference/classExtendingQualifiedName2.js | 19 +- .../reference/classExtendsAcrossFiles.js | 38 +- ...sMergedWithModuleNotReferingConstructor.js | 19 +- ...tendsClauseClassNotReferringConstructor.js | 19 +- .../reference/classExtendsEveryObjectType.js | 19 +- .../reference/classExtendsEveryObjectType2.js | 19 +- .../reference/classExtendsInterface.js | 19 +- .../classExtendsInterfaceInExpression.js | 19 +- .../classExtendsInterfaceInModule.js | 19 +- .../baselines/reference/classExtendsItself.js | 19 +- .../reference/classExtendsItselfIndirectly.js | 19 +- .../classExtendsItselfIndirectly2.js | 19 +- .../classExtendsItselfIndirectly3.js | 114 +-- .../classExtendsMultipleBaseClasses.js | 19 +- tests/baselines/reference/classExtendsNull.js | 19 +- ...classExtendsShadowedConstructorFunction.js | 19 +- .../classExtendsValidConstructorFunction.js | 19 +- .../classHeritageWithTrailingSeparator.js | 19 +- .../reference/classImplementsClass2.js | 19 +- .../reference/classImplementsClass3.js | 19 +- .../reference/classImplementsClass4.js | 19 +- .../reference/classImplementsClass5.js | 19 +- .../reference/classImplementsClass6.js | 19 +- tests/baselines/reference/classIndexer3.js | 19 +- tests/baselines/reference/classInheritence.js | 19 +- .../reference/classIsSubtypeOfBaseType.js | 19 +- tests/baselines/reference/classOrder2.js | 19 +- tests/baselines/reference/classOrderBug.js | 19 +- .../reference/classSideInheritance1.js | 19 +- .../reference/classSideInheritance2.js | 19 +- .../reference/classSideInheritance3.js | 19 +- tests/baselines/reference/classUpdateTests.js | 19 +- .../classWithBaseClassButNoConstructor.js | 19 +- .../reference/classWithConstructors.js | 19 +- .../reference/classWithProtectedProperty.js | 19 +- .../reference/classWithStaticMembers.js | 19 +- tests/baselines/reference/classdecl.js | 19 +- .../reference/clodulesDerivedClasses.js | 19 +- ...llisionSuperAndLocalFunctionInAccessors.js | 19 +- ...isionSuperAndLocalFunctionInConstructor.js | 19 +- .../collisionSuperAndLocalFunctionInMethod.js | 19 +- ...ollisionSuperAndLocalFunctionInProperty.js | 19 +- .../collisionSuperAndLocalVarInAccessors.js | 19 +- .../collisionSuperAndLocalVarInConstructor.js | 19 +- .../collisionSuperAndLocalVarInMethod.js | 19 +- .../collisionSuperAndLocalVarInProperty.js | 19 +- .../collisionSuperAndNameResolution.js | 19 +- .../reference/collisionSuperAndParameter.js | 19 +- .../reference/collisionSuperAndParameter1.js | 19 +- ...perAndPropertyNameAsConstuctorParameter.js | 19 +- ...xpressionAndLocalVarWithSuperExperssion.js | 19 +- .../reference/commentsInheritance.js | 19 +- .../comparisonOperatorWithIdenticalObjects.js | 19 +- ...ithNoRelationshipObjectsOnCallSignature.js | 19 +- ...lationshipObjectsOnConstructorSignature.js | 19 +- ...thNoRelationshipObjectsOnIndexSignature.js | 19 +- ...nshipObjectsOnInstantiatedCallSignature.js | 19 +- ...jectsOnInstantiatedConstructorSignature.js | 19 +- ...peratorWithSubtypeObjectOnCallSignature.js | 19 +- ...WithSubtypeObjectOnConstructorSignature.js | 19 +- ...eratorWithSubtypeObjectOnIndexSignature.js | 19 +- ...ubtypeObjectOnInstantiatedCallSignature.js | 19 +- ...bjectOnInstantiatedConstructorSignature.js | 19 +- ...isonOperatorWithSubtypeObjectOnProperty.js | 19 +- .../reference/complexClassRelationships.js | 19 +- ...catedGenericRecursiveBaseClassReference.js | 19 +- .../reference/compoundAssignmentLHSIsValue.js | 19 +- ...poundExponentiationAssignmentLHSIsValue.js | 19 +- .../reference/computedPropertyNames24_ES5.js | 19 +- .../reference/computedPropertyNames25_ES5.js | 19 +- .../reference/computedPropertyNames26_ES5.js | 19 +- .../reference/computedPropertyNames27_ES5.js | 19 +- .../reference/computedPropertyNames28_ES5.js | 19 +- .../reference/computedPropertyNames30_ES5.js | 19 +- .../reference/computedPropertyNames31_ES5.js | 19 +- .../reference/computedPropertyNames43_ES5.js | 19 +- .../reference/computedPropertyNames44_ES5.js | 19 +- .../reference/computedPropertyNames45_ES5.js | 19 +- .../conditionalOperatorWithIdenticalBCT.js | 19 +- .../conditionalOperatorWithoutIdenticalBCT.js | 19 +- .../reference/constantOverloadFunction.js | 19 +- .../constantOverloadFunctionNoSubtypeError.js | 19 +- ...nstraintCheckInGenericBaseTypeReference.js | 19 +- ...uctSignatureAssignabilityInInheritance2.js | 19 +- ...uctSignatureAssignabilityInInheritance3.js | 19 +- ...uctSignatureAssignabilityInInheritance4.js | 19 +- ...uctSignatureAssignabilityInInheritance5.js | 19 +- ...uctSignatureAssignabilityInInheritance6.js | 19 +- tests/baselines/reference/constructorArgs.js | 19 +- ...uctorFunctionTypeIsAssignableToBaseType.js | 19 +- ...ctorFunctionTypeIsAssignableToBaseType2.js | 19 +- .../constructorHasPrototypeProperty.js | 19 +- .../reference/constructorOverloads2.js | 19 +- .../reference/constructorOverloads3.js | 19 +- .../reference/constructorWithCapturedSuper.js | 19 +- ...constructorWithIncompleteTypeAnnotation.js | 19 +- .../contextualTypingArrayOfLambdas.js | 19 +- ...contextualTypingOfConditionalExpression.js | 19 +- ...ontextualTypingOfConditionalExpression2.js | 19 +- ...urcePropertyIsRelatableToTargetProperty.js | 19 +- .../reference/declFileClassExtendsNull.js | 19 +- .../declFileForFunctionTypeAsTypeParameter.js | 19 +- ...ileGenericClassWithGenericExtendedClass.js | 19 +- .../reference/declFileGenericType.js | 19 +- .../reference/declFileGenericType2.js | 19 +- ...lictingWithClassReferredByExtendsClause.js | 19 +- ...dsClauseThatHasItsContainerNameConflict.js | 19 +- .../declarationEmitExpressionInExtends.js | 19 +- .../declarationEmitExpressionInExtends2.js | 19 +- .../declarationEmitExpressionInExtends3.js | 19 +- .../declarationEmitExpressionInExtends4.js | 19 +- .../declarationEmitNameConflicts3.js | 19 +- .../declarationEmitProtectedMembers.js | 19 +- .../declarationEmitThisPredicates01.js | 19 +- ...tionEmitThisPredicatesWithPrivateName01.js | 19 +- .../reference/declareDottedExtend.js | 19 +- .../reference/decoratorOnClassConstructor2.js | 19 +- .../reference/decoratorOnClassConstructor3.js | 19 +- .../reference/decoratorOnClassMethod12.js | 19 +- ...edClassConstructorWithExplicitReturns01.js | 19 +- ...assConstructorWithExplicitReturns01.js.map | 2 +- ...tructorWithExplicitReturns01.sourcemap.txt | 281 +++---- ...derivedClassConstructorWithoutSuperCall.js | 19 +- ...ClassFunctionOverridesBaseClassAccessor.js | 19 +- .../derivedClassIncludesInheritedMembers.js | 19 +- ...idesIndexersWithAssignmentCompatibility.js | 19 +- .../derivedClassOverridesPrivateFunction1.js | 19 +- .../derivedClassOverridesPrivates.js | 19 +- .../derivedClassOverridesProtectedMembers.js | 19 +- .../derivedClassOverridesProtectedMembers2.js | 19 +- .../derivedClassOverridesProtectedMembers3.js | 19 +- .../derivedClassOverridesProtectedMembers4.js | 19 +- .../derivedClassOverridesPublicMembers.js | 19 +- .../derivedClassOverridesWithoutSubtype.js | 19 +- .../derivedClassParameterProperties.js | 19 +- ...dClassSuperCallsInNonConstructorMembers.js | 19 +- .../derivedClassSuperCallsWithThisArg.js | 19 +- .../reference/derivedClassTransitivity.js | 19 +- .../reference/derivedClassTransitivity2.js | 19 +- .../reference/derivedClassTransitivity3.js | 19 +- .../reference/derivedClassTransitivity4.js | 19 +- .../reference/derivedClassWithAny.js | 19 +- ...ivateInstanceShadowingProtectedInstance.js | 19 +- ...hPrivateInstanceShadowingPublicInstance.js | 19 +- ...thPrivateStaticShadowingProtectedStatic.js | 19 +- ...sWithPrivateStaticShadowingPublicStatic.js | 19 +- .../derivedClassWithoutExplicitConstructor.js | 19 +- ...derivedClassWithoutExplicitConstructor2.js | 19 +- ...derivedClassWithoutExplicitConstructor3.js | 19 +- tests/baselines/reference/derivedClasses.js | 19 +- .../reference/derivedGenericClassWithAny.js | 19 +- ...sesHiddenBaseCallViaSuperPropertyAccess.js | 19 +- .../derivedTypeDoesNotRequireExtendsClause.js | 19 +- .../destructuringParameterDeclaration5.js | 19 +- ...BeforeEmitParameterPropertyDeclaration1.js | 19 +- ...SuperCallBeforeEmitPropertyDeclaration1.js | 19 +- ...arationAndParameterPropertyDeclaration1.js | 19 +- .../reference/emitThisInSuperMethodCall.js | 19 +- tests/baselines/reference/emptyModuleName.js | 19 +- ...rorForwardReferenceForwadingConstructor.js | 19 +- tests/baselines/reference/errorSuperCalls.js | 19 +- .../reference/errorSuperPropertyAccess.js | 19 +- .../reference/errorsInGenericTypeReference.js | 19 +- .../reference/es6ClassSuperCodegenBug.js | 19 +- tests/baselines/reference/es6ClassTest.js | 19 +- tests/baselines/reference/es6ClassTest2.js | 19 +- tests/baselines/reference/es6ClassTest7.js | 19 +- .../exportAssignmentOfGenericType1.js | 19 +- .../exportDeclarationInInternalModule.js | 19 +- tests/baselines/reference/extBaseClass1.js | 19 +- tests/baselines/reference/extBaseClass2.js | 19 +- .../extendAndImplementTheSameBaseType.js | 19 +- .../extendAndImplementTheSameBaseType2.js | 19 +- .../extendBaseClassBeforeItsDeclared.js | 19 +- .../extendClassExpressionFromModule.js | 19 +- .../extendConstructSignatureInInterface.js | 19 +- .../reference/extendNonClassSymbol1.js | 19 +- .../reference/extendNonClassSymbol2.js | 19 +- .../extendPrivateConstructorClass.js | 19 +- ...xtendingClassFromAliasAndUsageInIndexer.js | 38 +- .../reference/extendsClauseAlreadySeen.js | 19 +- .../reference/extendsClauseAlreadySeen2.js | 19 +- tests/baselines/reference/fluentClasses.js | 19 +- tests/baselines/reference/for-inStatements.js | 19 +- .../reference/for-inStatementsInvalid.js | 19 +- .../forStatementsMultipleInvalidDecl.js | 19 +- .../reference/functionImplementationErrors.js | 19 +- .../reference/functionImplementations.js | 19 +- .../reference/functionSubtypingOfVarArgs.js | 19 +- .../reference/functionSubtypingOfVarArgs2.js | 19 +- .../reference/generatedContextualTyping.js | 19 +- .../genericBaseClassLiteralProperty.js | 19 +- .../genericBaseClassLiteralProperty2.js | 19 +- ...allWithConstraintsTypeArgumentInference.js | 19 +- .../genericCallWithObjectTypeArgs2.js | 19 +- ...icCallWithObjectTypeArgsAndConstraints2.js | 19 +- ...icCallWithObjectTypeArgsAndConstraints3.js | 19 +- .../genericCallbacksAndClassHierarchy.js | 19 +- .../genericClassExpressionInFunction.js | 19 +- ...sInheritsConstructorFromNonGenericClass.js | 19 +- ...cClassPropertyInheritanceSpecialization.js | 19 +- .../reference/genericClassStaticMethod.js | 19 +- tests/baselines/reference/genericClasses3.js | 19 +- ...genericConstraintOnExtendedBuiltinTypes.js | 19 +- ...enericConstraintOnExtendedBuiltinTypes2.js | 19 +- .../genericDerivedTypeWithSpecializedBase.js | 19 +- .../genericDerivedTypeWithSpecializedBase2.js | 19 +- .../genericInheritedDefaultConstructors.js | 19 +- .../reference/genericPrototypeProperty2.js | 19 +- .../reference/genericPrototypeProperty3.js | 19 +- ...ericRecursiveImplicitConstructorErrors2.js | 19 +- ...ericRecursiveImplicitConstructorErrors3.js | 19 +- .../reference/genericTypeAssertions2.js | 19 +- .../reference/genericTypeAssertions4.js | 19 +- .../reference/genericTypeAssertions6.js | 19 +- .../reference/genericTypeConstraints.js | 19 +- ...genericTypeReferenceWithoutTypeArgument.js | 19 +- ...enericTypeReferenceWithoutTypeArgument2.js | 19 +- .../genericWithIndexerOfTypeParameterType2.js | 19 +- .../reference/heterogeneousArrayLiterals.js | 19 +- .../reference/ifDoWhileStatements.js | 19 +- .../illegalSuperCallsInConstructor.js | 19 +- .../implementClausePrecedingExtends.js | 19 +- ...gAnInterfaceExtendingClassWithPrivates2.js | 19 +- ...AnInterfaceExtendingClassWithProtecteds.js | 19 +- .../baselines/reference/importAsBaseClass.js | 19 +- tests/baselines/reference/importHelpers.js | 19 +- .../reference/importHelpersNoHelpers.js | 19 +- .../reference/importHelpersNoModule.js | 19 +- .../reference/importShadowsGlobalName.js | 19 +- .../reference/importUsedInExtendsList1.js | 19 +- .../reference/indexerConstraints2.js | 19 +- .../reference/indirectSelfReference.js | 19 +- .../reference/indirectSelfReferenceGeneric.js | 19 +- .../infinitelyExpandingTypesNonGenericBase.js | 19 +- .../inheritFromGenericTypeParameter.js | 19 +- ...SameNamePrivatePropertiesFromSameOrigin.js | 19 +- tests/baselines/reference/inheritance.js | 19 +- tests/baselines/reference/inheritance1.js | 19 +- ...itanceGrandParentPrivateMemberCollision.js | 19 +- ...tPrivateMemberCollisionWithPublicMember.js | 19 +- ...tPublicMemberCollisionWithPrivateMember.js | 19 +- ...ritanceMemberAccessorOverridingAccessor.js | 19 +- ...heritanceMemberAccessorOverridingMethod.js | 19 +- ...ritanceMemberAccessorOverridingProperty.js | 19 +- ...inheritanceMemberFuncOverridingAccessor.js | 19 +- .../inheritanceMemberFuncOverridingMethod.js | 19 +- ...inheritanceMemberFuncOverridingProperty.js | 19 +- ...ritanceMemberPropertyOverridingAccessor.js | 19 +- ...heritanceMemberPropertyOverridingMethod.js | 19 +- ...ritanceMemberPropertyOverridingProperty.js | 19 +- .../inheritanceOfGenericConstructorMethod1.js | 19 +- .../inheritanceOfGenericConstructorMethod2.js | 19 +- ...ritanceStaticAccessorOverridingAccessor.js | 19 +- ...heritanceStaticAccessorOverridingMethod.js | 19 +- ...ritanceStaticAccessorOverridingProperty.js | 19 +- ...inheritanceStaticFuncOverridingAccessor.js | 19 +- ...eStaticFuncOverridingAccessorOfFuncType.js | 19 +- .../inheritanceStaticFuncOverridingMethod.js | 19 +- ...inheritanceStaticFuncOverridingProperty.js | 19 +- ...eStaticFuncOverridingPropertyOfFuncType.js | 19 +- ...taticFunctionOverridingInstanceProperty.js | 19 +- .../inheritanceStaticMembersCompatible.js | 19 +- .../inheritanceStaticMembersIncompatible.js | 19 +- ...ritanceStaticPropertyOverridingAccessor.js | 19 +- ...heritanceStaticPropertyOverridingMethod.js | 19 +- ...ritanceStaticPropertyOverridingProperty.js | 19 +- .../inheritedConstructorWithRestParams.js | 19 +- .../inheritedConstructorWithRestParams2.js | 19 +- .../inheritedModuleMembersForClodule.js | 19 +- .../reference/instanceOfAssignability.js | 19 +- ...nstancePropertiesInheritedIntoClassType.js | 19 +- .../reference/instanceSubtypeCheck2.js | 19 +- ...nstanceofWithStructurallyIdenticalTypes.js | 19 +- .../instantiatedReturnTypeContravariance.js | 19 +- .../reference/interfaceClassMerging.js | 19 +- .../reference/interfaceClassMerging2.js | 19 +- .../reference/interfaceExtendsClass1.js | 19 +- .../interfaceExtendsClassWithPrivate1.js | 19 +- .../interfaceExtendsClassWithPrivate2.js | 19 +- .../reference/interfaceImplementation8.js | 19 +- .../invalidModuleWithStatementsOfEveryKind.js | 19 +- .../invalidMultipleVariableDeclarations.js | 19 +- .../reference/invalidReturnStatements.js | 19 +- .../isolatedModulesImportExportElision.js | 19 +- tests/baselines/reference/jsxViaImport.js | 19 +- .../reference/keyofAndIndexedAccess.js | 19 +- tests/baselines/reference/lambdaArgCrash.js | 19 +- tests/baselines/reference/lift.js | 19 +- tests/baselines/reference/localTypes1.js | 19 +- tests/baselines/reference/m7Bugs.js | 19 +- .../reference/mergedDeclarations5.js | 19 +- .../reference/mergedDeclarations6.js | 19 +- .../mergedInheritedClassInterface.js | 19 +- .../mergedInterfacesWithInheritedPrivates2.js | 19 +- .../mergedInterfacesWithInheritedPrivates3.js | 19 +- .../missingPropertiesOfClassExpression.js | 19 +- tests/baselines/reference/moduleAsBaseType.js | 19 +- .../moduleImportedForTypeArgumentPosition.js | 19 +- .../moduleWithStatementsOfEveryKind.js | 19 +- .../reference/multipleInheritance.js | 19 +- .../mutuallyRecursiveGenericBaseTypes2.js | 19 +- .../noImplicitAnyMissingGetAccessor.js | 19 +- .../noImplicitAnyMissingSetAccessor.js | 19 +- ...enericClassExtendingGenericClassWithAny.js | 19 +- ...cIndexerConstrainsPropertyDeclarations2.js | 19 +- .../reference/numericIndexerConstraint3.js | 19 +- .../reference/numericIndexerConstraint4.js | 19 +- .../reference/numericIndexerTyping2.js | 19 +- ...objectCreationOfElementAccessExpression.js | 19 +- ...objectTypeHidingMembersOfExtendedObject.js | 19 +- ...objectTypesIdentityWithNumericIndexers1.js | 19 +- ...objectTypesIdentityWithNumericIndexers2.js | 19 +- ...objectTypesIdentityWithNumericIndexers3.js | 19 +- .../objectTypesIdentityWithPrivates.js | 19 +- .../objectTypesIdentityWithPrivates2.js | 19 +- .../objectTypesIdentityWithPrivates3.js | 19 +- .../objectTypesIdentityWithStringIndexers.js | 19 +- .../objectTypesIdentityWithStringIndexers2.js | 19 +- .../optionalConstructorArgInSuper.js | 19 +- tests/baselines/reference/optionalMethods.js | 19 +- .../reference/optionalParamArgsTest.js | 19 +- .../reference/optionalParamInOverride.js | 19 +- .../reference/optionalParameterProperty.js | 19 +- .../baselines/reference/outModuleConcatAmd.js | 19 +- .../reference/outModuleConcatAmd.js.map | 2 +- .../outModuleConcatAmd.sourcemap.txt | 75 +- .../reference/outModuleConcatSystem.js | 19 +- .../reference/outModuleConcatSystem.js.map | 2 +- .../outModuleConcatSystem.sourcemap.txt | 75 +- .../reference/outModuleTripleSlashRefs.js | 19 +- .../reference/outModuleTripleSlashRefs.js.map | 2 +- .../outModuleTripleSlashRefs.sourcemap.txt | 103 +-- tests/baselines/reference/overload1.js | 19 +- .../overloadOnConstConstraintChecks1.js | 19 +- .../overloadOnConstConstraintChecks2.js | 19 +- .../overloadOnConstConstraintChecks3.js | 19 +- .../overloadOnConstConstraintChecks4.js | 19 +- .../overloadOnConstantsInvalidOverload1.js | 19 +- .../baselines/reference/overloadResolution.js | 19 +- .../overloadResolutionClassConstructors.js | 19 +- .../overloadResolutionConstructors.js | 19 +- .../reference/overloadingOnConstants1.js | 19 +- .../reference/overloadingOnConstants2.js | 19 +- .../overridingPrivateStaticMembers.js | 19 +- .../reference/parseErrorInHeritageClause1.js | 19 +- tests/baselines/reference/parser509630.js | 19 +- tests/baselines/reference/parserAstSpans1.js | 19 +- .../reference/parserClassDeclaration1.js | 19 +- .../reference/parserClassDeclaration3.js | 19 +- .../reference/parserClassDeclaration4.js | 19 +- .../reference/parserClassDeclaration5.js | 19 +- .../reference/parserClassDeclaration6.js | 19 +- ...rrorRecovery_ExtendsOrImplementsClause2.js | 19 +- ...rrorRecovery_ExtendsOrImplementsClause4.js | 19 +- ...rrorRecovery_ExtendsOrImplementsClause5.js | 19 +- .../parserGenericsInTypeContexts1.js | 19 +- .../parserGenericsInTypeContexts2.js | 19 +- .../baselines/reference/parserRealSource10.js | 19 +- .../baselines/reference/parserRealSource11.js | 19 +- tests/baselines/reference/parserharness.js | 19 +- ...artiallyAnnotatedFunctionInferenceError.js | 19 +- ...tatedFunctionInferenceWithTypeParameter.js | 19 +- tests/baselines/reference/primitiveMembers.js | 19 +- tests/baselines/reference/privacyClass.js | 19 +- .../privacyClassExtendsClauseDeclFile.js | 38 +- tests/baselines/reference/privacyGloClass.js | 19 +- .../reference/privateAccessInSubclass1.js | 19 +- .../privateInstanceMemberAccessibility.js | 19 +- ...tedMembersAreNotAccessibleDestructuring.js | 19 +- .../privateStaticMemberAccessibility.js | 19 +- .../privateStaticNotAccessibleInClodule2.js | 19 +- .../amd/testGlo.js | 19 +- .../node/testGlo.js | 19 +- .../reference/project/prologueEmit/amd/out.js | 19 +- .../project/prologueEmit/node/out.js | 19 +- .../amd/m'ain.js | 19 +- .../node/m'ain.js | 19 +- .../reference/propertiesAndIndexers.js | 19 +- tests/baselines/reference/propertyAccess.js | 19 +- ...tyAccessOnTypeParameterWithConstraints2.js | 19 +- ...tyAccessOnTypeParameterWithConstraints3.js | 19 +- ...tyAccessOnTypeParameterWithConstraints5.js | 19 +- ...sPropertyAccessibleWithinNestedSubclass.js | 19 +- ...PropertyAccessibleWithinNestedSubclass1.js | 19 +- ...edClassPropertyAccessibleWithinSubclass.js | 19 +- ...dClassPropertyAccessibleWithinSubclass2.js | 19 +- ...dClassPropertyAccessibleWithinSubclass3.js | 19 +- .../protectedInstanceMemberAccessibility.js | 19 +- tests/baselines/reference/protectedMembers.js | 19 +- ...icClassPropertyAccessibleWithinSubclass.js | 19 +- ...cClassPropertyAccessibleWithinSubclass2.js | 19 +- ...solution-does-not-affect-class-heritage.js | 19 +- .../readonlyConstructorAssignment.js | 19 +- .../reference/recursiveBaseCheck3.js | 19 +- .../reference/recursiveBaseCheck4.js | 19 +- .../reference/recursiveBaseCheck6.js | 19 +- .../recursiveBaseConstructorCreation1.js | 19 +- ...ssInstantiationsWithDefaultConstructors.js | 19 +- .../reference/recursiveClassReferenceTest.js | 19 +- .../recursiveClassReferenceTest.js.map | 2 +- .../recursiveClassReferenceTest.sourcemap.txt | 789 +++++++++--------- .../reference/recursiveComplicatedClasses.js | 19 +- ...sivelySpecializedConstructorDeclaration.js | 19 +- .../reference/reexportClassDefinition.js | 19 +- ...lassDeclarationWhenInBaseTypeResolution.js | 19 +- .../reference/returnInConstructor1.js | 19 +- tests/baselines/reference/returnStatements.js | 19 +- ...peCheckExtendedClassInsidePublicMethod2.js | 19 +- ...peCheckExtendedClassInsideStaticMethod1.js | 19 +- tests/baselines/reference/scopeTests.js | 19 +- .../reference/shadowPrivateMembers.js | 19 +- ...sWithDefaultConstructorAndExtendsClause.js | 19 +- ...hDefaultConstructorAndExtendsClause.js.map | 2 +- ...tConstructorAndExtendsClause.sourcemap.txt | 91 +- .../specializedInheritedConstructors1.js | 19 +- .../specializedOverloadWithRestParameters.js | 19 +- tests/baselines/reference/staticFactory1.js | 19 +- .../baselines/reference/staticInheritance.js | 19 +- .../staticMemberAccessOffDerivedType1.js | 19 +- tests/baselines/reference/staticPropSuper.js | 19 +- .../reference/strictModeInConstructor.js | 19 +- .../reference/strictModeReservedWord.js | 19 +- ...trictModeReservedWordInClassDeclaration.js | 19 +- ...gIndexerConstrainsPropertyDeclarations2.js | 19 +- .../reference/subtypesOfTypeParameter.js | 19 +- .../subtypesOfTypeParameterWithConstraints.js | 19 +- ...subtypesOfTypeParameterWithConstraints4.js | 19 +- ...OfTypeParameterWithRecursiveConstraints.js | 19 +- .../reference/subtypingTransitivity.js | 19 +- .../reference/subtypingWithCallSignatures2.js | 19 +- .../reference/subtypingWithCallSignatures3.js | 19 +- .../reference/subtypingWithCallSignatures4.js | 19 +- .../subtypingWithConstructSignatures2.js | 19 +- .../subtypingWithConstructSignatures3.js | 19 +- .../subtypingWithConstructSignatures4.js | 19 +- .../subtypingWithConstructSignatures5.js | 19 +- .../subtypingWithConstructSignatures6.js | 19 +- .../reference/subtypingWithNumericIndexer.js | 19 +- .../reference/subtypingWithNumericIndexer3.js | 19 +- .../reference/subtypingWithNumericIndexer4.js | 19 +- .../reference/subtypingWithObjectMembers.js | 19 +- .../reference/subtypingWithObjectMembers4.js | 19 +- ...subtypingWithObjectMembersAccessibility.js | 19 +- ...ubtypingWithObjectMembersAccessibility2.js | 19 +- .../reference/subtypingWithStringIndexer.js | 19 +- .../reference/subtypingWithStringIndexer3.js | 19 +- .../reference/subtypingWithStringIndexer4.js | 19 +- tests/baselines/reference/super.js | 19 +- tests/baselines/reference/super1.js | 19 +- tests/baselines/reference/super2.js | 19 +- tests/baselines/reference/superAccess.js | 19 +- tests/baselines/reference/superAccess2.js | 19 +- .../reference/superAccessInFatArrow1.js | 19 +- .../reference/superCallArgsMustMatch.js | 19 +- .../reference/superCallAssignResult.js | 19 +- .../superCallBeforeThisAccessing1.js | 19 +- .../superCallBeforeThisAccessing2.js | 19 +- .../superCallBeforeThisAccessing3.js | 19 +- .../superCallBeforeThisAccessing4.js | 19 +- .../superCallBeforeThisAccessing5.js | 19 +- .../superCallBeforeThisAccessing6.js | 19 +- .../superCallBeforeThisAccessing7.js | 19 +- .../superCallBeforeThisAccessing8.js | 19 +- ...allFromClassThatDerivesFromGenericType1.js | 19 +- ...allFromClassThatDerivesFromGenericType2.js | 19 +- ...eButWithIncorrectNumberOfTypeArguments1.js | 19 +- ...sFromGenericTypeButWithNoTypeArguments1.js | 19 +- ...ivesNonGenericTypeButWithTypeArguments1.js | 19 +- .../reference/superCallInNonStaticMethod.js | 19 +- .../reference/superCallInStaticMethod.js | 19 +- .../superCallInsideClassDeclaration.js | 19 +- .../superCallInsideClassExpression.js | 19 +- .../superCallInsideObjectLiteralExpression.js | 19 +- .../reference/superCallOutsideConstructor.js | 19 +- .../superCallParameterContextualTyping1.js | 19 +- .../superCallParameterContextualTyping2.js | 19 +- .../superCallParameterContextualTyping3.js | 19 +- .../reference/superCallWithCommentEmit01.js | 19 +- .../superCallWithMissingBaseClass.js | 19 +- tests/baselines/reference/superCalls.js | 19 +- .../reference/superCallsInConstructor.js | 19 +- tests/baselines/reference/superErrors.js | 19 +- .../baselines/reference/superInCatchBlock1.js | 19 +- .../reference/superInConstructorParam1.js | 19 +- tests/baselines/reference/superInLambdas.js | 19 +- .../reference/superInObjectLiterals_ES5.js | 19 +- tests/baselines/reference/superNewCall1.js | 19 +- .../reference/superPropertyAccess.js | 19 +- .../reference/superPropertyAccess1.js | 19 +- .../reference/superPropertyAccess2.js | 19 +- ...essInComputedPropertiesOfNestedType_ES5.js | 19 +- .../reference/superPropertyAccessNoError.js | 19 +- .../reference/superPropertyAccess_ES5.js | 19 +- ...perPropertyInConstructorBeforeSuperCall.js | 19 +- .../reference/superSymbolIndexedAccess5.js | 19 +- .../reference/superSymbolIndexedAccess6.js | 19 +- .../superWithGenericSpecialization.js | 19 +- .../baselines/reference/superWithGenerics.js | 19 +- .../reference/superWithTypeArgument.js | 19 +- .../reference/superWithTypeArgument2.js | 19 +- .../reference/superWithTypeArgument3.js | 19 +- ...side-object-literal-getters-and-setters.js | 19 +- tests/baselines/reference/switchStatements.js | 19 +- .../reference/systemModuleWithSuperClass.js | 19 +- .../reference/targetTypeBaseCalls.js | 19 +- .../reference/thisInInvalidContexts.js | 19 +- .../thisInInvalidContextsExternalModule.js | 19 +- tests/baselines/reference/thisInSuperCall.js | 19 +- tests/baselines/reference/thisInSuperCall1.js | 19 +- tests/baselines/reference/thisInSuperCall2.js | 19 +- tests/baselines/reference/thisInSuperCall3.js | 19 +- .../reference/thisTypeInFunctions.js | 19 +- .../reference/thisTypeInFunctionsNegative.js | 19 +- .../tsxCorrectlyParseLessThanComparison1.js | 19 +- .../baselines/reference/tsxDynamicTagName5.js | 19 +- .../baselines/reference/tsxDynamicTagName7.js | 19 +- .../baselines/reference/tsxDynamicTagName8.js | 19 +- .../baselines/reference/tsxDynamicTagName9.js | 19 +- .../reference/tsxExternalModuleEmit1.js | 38 +- .../tsxStatelessFunctionComponents2.js | 19 +- .../reference/tsxUnionTypeComponent1.js | 19 +- tests/baselines/reference/typeAssertions.js | 19 +- .../baselines/reference/typeGuardFunction.js | 19 +- .../reference/typeGuardFunctionErrors.js | 19 +- .../reference/typeGuardFunctionGenerics.js | 19 +- .../reference/typeGuardFunctionOfFormThis.js | 19 +- .../typeGuardFunctionOfFormThisErrors.js | 19 +- .../reference/typeGuardOfFormInstanceOf.js | 19 +- .../reference/typeGuardOfFormIsType.js | 19 +- .../reference/typeGuardOfFormThisMember.js | 19 +- .../typeGuardOfFormThisMemberErrors.js | 19 +- tests/baselines/reference/typeMatch2.js | 19 +- tests/baselines/reference/typeOfSuperCall.js | 19 +- .../reference/typeParameterAsBaseClass.js | 19 +- .../reference/typeParameterAsBaseType.js | 19 +- .../reference/typeParameterExtendingUnion1.js | 19 +- .../reference/typeParameterExtendingUnion2.js | 19 +- .../baselines/reference/typeRelationships.js | 19 +- .../baselines/reference/typeValueConflict1.js | 19 +- .../baselines/reference/typeValueConflict2.js | 19 +- tests/baselines/reference/typeofClass2.js | 19 +- .../typesWithSpecializedCallSignatures.js | 19 +- ...typesWithSpecializedConstructSignatures.js | 19 +- tests/baselines/reference/undeclaredBase.js | 19 +- .../undefinedIsSubtypeOfEverything.js | 19 +- .../baselines/reference/underscoreMapFirst.js | 19 +- .../underscoreThisInDerivedClass01.js | 19 +- .../underscoreThisInDerivedClass02.js | 19 +- .../reference/unionTypeEquivalence.js | 19 +- .../reference/unionTypeFromArrayLiteral.js | 19 +- .../reference/unionTypesAssignability.js | 19 +- tests/baselines/reference/unknownSymbols1.js | 19 +- .../reference/unspecializedConstraints.js | 19 +- ...untypedFunctionCallsWithTypeParameters1.js | 19 +- .../reference/unusedClassesinNamespace4.js | 19 +- .../unusedIdentifiersConsolidated1.js | 19 +- .../reference/validUseOfThisInSuper.js | 19 +- .../reference/varArgsOnConstructorTypes.js | 19 +- 667 files changed, 7366 insertions(+), 6695 deletions(-) diff --git a/src/compiler/transformers/es2015.ts b/src/compiler/transformers/es2015.ts index dd7b8fe7f4760..1fb777e11f317 100644 --- a/src/compiler/transformers/es2015.ts +++ b/src/compiler/transformers/es2015.ts @@ -3336,14 +3336,15 @@ namespace ts { scoped: false, priority: 0, text: ` - var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - };` + 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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })();` }; } diff --git a/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js b/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js index e244964048a82..13af9d453226a 100644 --- a/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js +++ b/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js @@ -21,15 +21,16 @@ module A { //// [ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A; (function (A) { var Point = (function () { diff --git a/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js b/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js index 9df25d0ba4cb9..b3ff0c58e11ff 100644 --- a/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js +++ b/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js @@ -25,15 +25,16 @@ module A { //// [ExportClassWithInaccessibleTypeInTypeParameterConstraint.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A; (function (A) { var Point = (function () { diff --git a/tests/baselines/reference/abstractClassInLocalScope.js b/tests/baselines/reference/abstractClassInLocalScope.js index f2b1a7e50070b..501743c1ad71d 100644 --- a/tests/baselines/reference/abstractClassInLocalScope.js +++ b/tests/baselines/reference/abstractClassInLocalScope.js @@ -8,15 +8,16 @@ //// [abstractClassInLocalScope.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); (function () { var A = (function () { function A() { diff --git a/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js b/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js index 612d1b4723022..c63088fcbbea9 100644 --- a/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js +++ b/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js @@ -8,15 +8,16 @@ //// [abstractClassInLocalScopeIsAbstract.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); (function () { var A = (function () { function A() { diff --git a/tests/baselines/reference/abstractProperty.js b/tests/baselines/reference/abstractProperty.js index f559b3c61234c..87c67d18205f6 100644 --- a/tests/baselines/reference/abstractProperty.js +++ b/tests/baselines/reference/abstractProperty.js @@ -22,15 +22,16 @@ class C extends B { } //// [abstractProperty.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var B = (function () { function B() { } diff --git a/tests/baselines/reference/abstractPropertyNegative.js b/tests/baselines/reference/abstractPropertyNegative.js index 73ae1427571d4..9728e047bf183 100644 --- a/tests/baselines/reference/abstractPropertyNegative.js +++ b/tests/baselines/reference/abstractPropertyNegative.js @@ -44,15 +44,16 @@ abstract class AbstractAccessorMismatch { //// [abstractPropertyNegative.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var B = (function () { function B() { } diff --git a/tests/baselines/reference/accessOverriddenBaseClassMember1.js b/tests/baselines/reference/accessOverriddenBaseClassMember1.js index 5fdaacd464c53..9afff0a8ff9b8 100644 --- a/tests/baselines/reference/accessOverriddenBaseClassMember1.js +++ b/tests/baselines/reference/accessOverriddenBaseClassMember1.js @@ -16,15 +16,16 @@ class ColoredPoint extends Point { //// [accessOverriddenBaseClassMember1.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Point = (function () { function Point(x, y) { this.x = x; 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 024c25a909f0c..eec92837d9531 100644 --- a/tests/baselines/reference/accessors_spec_section-4.5_inference.js +++ b/tests/baselines/reference/accessors_spec_section-4.5_inference.js @@ -25,15 +25,16 @@ class LanguageSpec_section_4_5_inference { } //// [accessors_spec_section-4.5_inference.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/aliasUsageInAccessorsOfClass.js b/tests/baselines/reference/aliasUsageInAccessorsOfClass.js index d84a03277ebfc..9ccd5c16666db 100644 --- a/tests/baselines/reference/aliasUsageInAccessorsOfClass.js +++ b/tests/baselines/reference/aliasUsageInAccessorsOfClass.js @@ -37,15 +37,16 @@ var Model = (function () { exports.Model = Model; //// [aliasUsage1_moduleA.js] "use strict"; -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Backbone = require("./aliasUsage1_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); diff --git a/tests/baselines/reference/aliasUsageInArray.js b/tests/baselines/reference/aliasUsageInArray.js index 031be503cffa7..f08236bbf413e 100644 --- a/tests/baselines/reference/aliasUsageInArray.js +++ b/tests/baselines/reference/aliasUsageInArray.js @@ -31,15 +31,16 @@ var Model = (function () { exports.Model = Model; //// [aliasUsageInArray_moduleA.js] "use strict"; -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Backbone = require("./aliasUsageInArray_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); diff --git a/tests/baselines/reference/aliasUsageInFunctionExpression.js b/tests/baselines/reference/aliasUsageInFunctionExpression.js index f0207e82c867c..c0f537ac0dd9a 100644 --- a/tests/baselines/reference/aliasUsageInFunctionExpression.js +++ b/tests/baselines/reference/aliasUsageInFunctionExpression.js @@ -30,15 +30,16 @@ var Model = (function () { exports.Model = Model; //// [aliasUsageInFunctionExpression_moduleA.js] "use strict"; -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Backbone = require("./aliasUsageInFunctionExpression_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); diff --git a/tests/baselines/reference/aliasUsageInGenericFunction.js b/tests/baselines/reference/aliasUsageInGenericFunction.js index 20b2028bbb1ec..222c8a78643a7 100644 --- a/tests/baselines/reference/aliasUsageInGenericFunction.js +++ b/tests/baselines/reference/aliasUsageInGenericFunction.js @@ -34,15 +34,16 @@ var Model = (function () { exports.Model = Model; //// [aliasUsageInGenericFunction_moduleA.js] "use strict"; -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Backbone = require("./aliasUsageInGenericFunction_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); diff --git a/tests/baselines/reference/aliasUsageInIndexerOfClass.js b/tests/baselines/reference/aliasUsageInIndexerOfClass.js index a8b77a8e6cb30..c2ed9f345a004 100644 --- a/tests/baselines/reference/aliasUsageInIndexerOfClass.js +++ b/tests/baselines/reference/aliasUsageInIndexerOfClass.js @@ -36,15 +36,16 @@ var Model = (function () { exports.Model = Model; //// [aliasUsageInIndexerOfClass_moduleA.js] "use strict"; -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Backbone = require("./aliasUsageInIndexerOfClass_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); diff --git a/tests/baselines/reference/aliasUsageInObjectLiteral.js b/tests/baselines/reference/aliasUsageInObjectLiteral.js index 00b7a231897f4..d5ad53a981cde 100644 --- a/tests/baselines/reference/aliasUsageInObjectLiteral.js +++ b/tests/baselines/reference/aliasUsageInObjectLiteral.js @@ -31,15 +31,16 @@ var Model = (function () { exports.Model = Model; //// [aliasUsageInObjectLiteral_moduleA.js] "use strict"; -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Backbone = require("./aliasUsageInObjectLiteral_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); diff --git a/tests/baselines/reference/aliasUsageInOrExpression.js b/tests/baselines/reference/aliasUsageInOrExpression.js index fe73404e8b458..2864b71595ff4 100644 --- a/tests/baselines/reference/aliasUsageInOrExpression.js +++ b/tests/baselines/reference/aliasUsageInOrExpression.js @@ -34,15 +34,16 @@ var Model = (function () { exports.Model = Model; //// [aliasUsageInOrExpression_moduleA.js] "use strict"; -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Backbone = require("./aliasUsageInOrExpression_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); diff --git a/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js b/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js index 17b73079f001a..8fc0815fcff7e 100644 --- a/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js +++ b/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js @@ -34,15 +34,16 @@ var Model = (function () { exports.Model = Model; //// [aliasUsageInTypeArgumentOfExtendsClause_moduleA.js] "use strict"; -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Backbone = require("./aliasUsageInTypeArgumentOfExtendsClause_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); @@ -54,15 +55,16 @@ var VisualizationModel = (function (_super) { exports.VisualizationModel = VisualizationModel; //// [aliasUsageInTypeArgumentOfExtendsClause_main.js] "use strict"; -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var moduleA = require("./aliasUsageInTypeArgumentOfExtendsClause_moduleA"); var C = (function () { function C() { diff --git a/tests/baselines/reference/aliasUsageInVarAssignment.js b/tests/baselines/reference/aliasUsageInVarAssignment.js index 9a88c68421f2c..0b42447701b82 100644 --- a/tests/baselines/reference/aliasUsageInVarAssignment.js +++ b/tests/baselines/reference/aliasUsageInVarAssignment.js @@ -30,15 +30,16 @@ var Model = (function () { exports.Model = Model; //// [aliasUsageInVarAssignment_moduleA.js] "use strict"; -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Backbone = require("./aliasUsageInVarAssignment_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); diff --git a/tests/baselines/reference/ambiguousOverloadResolution.js b/tests/baselines/reference/ambiguousOverloadResolution.js index 3af1905dc03ec..7adda16b65f85 100644 --- a/tests/baselines/reference/ambiguousOverloadResolution.js +++ b/tests/baselines/reference/ambiguousOverloadResolution.js @@ -9,15 +9,16 @@ var x: B; var t: number = f(x, x); // Not an error //// [ambiguousOverloadResolution.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/apparentTypeSubtyping.js b/tests/baselines/reference/apparentTypeSubtyping.js index 2f5a3f8147eaf..2c4b343c813eb 100644 --- a/tests/baselines/reference/apparentTypeSubtyping.js +++ b/tests/baselines/reference/apparentTypeSubtyping.js @@ -24,15 +24,16 @@ class Derived2 extends Base2 { // error because of the prototy //// [apparentTypeSubtyping.js] // subtype checks use the apparent type of the target type // S is a subtype of a type T, and T is a supertype of S, if one of the following is true, where S' denotes the apparent type (section 3.8.1) of S: -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/apparentTypeSupertype.js b/tests/baselines/reference/apparentTypeSupertype.js index dfc3414aef1cb..028935c28c1cf 100644 --- a/tests/baselines/reference/apparentTypeSupertype.js +++ b/tests/baselines/reference/apparentTypeSupertype.js @@ -14,15 +14,16 @@ class Derived extends Base { // error //// [apparentTypeSupertype.js] // subtype checks use the apparent type of the target type // S is a subtype of a type T, and T is a supertype of S, if one of the following is true, where S' denotes the apparent type (section 3.8.1) of S: -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/arrayAssignmentTest1.js b/tests/baselines/reference/arrayAssignmentTest1.js index f2254fea5308f..ad1c748be75f8 100644 --- a/tests/baselines/reference/arrayAssignmentTest1.js +++ b/tests/baselines/reference/arrayAssignmentTest1.js @@ -86,15 +86,16 @@ arr_any = c3; // should be an error - is arr_any = i1; // should be an error - is //// [arrayAssignmentTest1.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C1 = (function () { function C1() { } diff --git a/tests/baselines/reference/arrayAssignmentTest2.js b/tests/baselines/reference/arrayAssignmentTest2.js index 90aa6740f4bc7..34c5c921bd381 100644 --- a/tests/baselines/reference/arrayAssignmentTest2.js +++ b/tests/baselines/reference/arrayAssignmentTest2.js @@ -60,15 +60,16 @@ arr_any = i1; // should be an error - is //// [arrayAssignmentTest2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C1 = (function () { function C1() { } diff --git a/tests/baselines/reference/arrayBestCommonTypes.js b/tests/baselines/reference/arrayBestCommonTypes.js index 8d2fe2376a36a..f232b44ce286a 100644 --- a/tests/baselines/reference/arrayBestCommonTypes.js +++ b/tests/baselines/reference/arrayBestCommonTypes.js @@ -108,15 +108,16 @@ module NonEmptyTypes { //// [arrayBestCommonTypes.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var EmptyTypes; (function (EmptyTypes) { var base = (function () { diff --git a/tests/baselines/reference/arrayLiteralTypeInference.js b/tests/baselines/reference/arrayLiteralTypeInference.js index 37d0d1084f7b9..95e4d98574dae 100644 --- a/tests/baselines/reference/arrayLiteralTypeInference.js +++ b/tests/baselines/reference/arrayLiteralTypeInference.js @@ -52,15 +52,16 @@ var z3: { id: number }[] = //// [arrayLiteralTypeInference.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Action = (function () { function Action() { } diff --git a/tests/baselines/reference/arrayLiterals.js b/tests/baselines/reference/arrayLiterals.js index d43db0f637686..001e0ff525fbc 100644 --- a/tests/baselines/reference/arrayLiterals.js +++ b/tests/baselines/reference/arrayLiterals.js @@ -38,15 +38,16 @@ var context4: Base[] = [new Derived1(), new Derived1()]; //// [arrayLiterals.js] // Empty array literal with no contextual type has type Undefined[] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var arr1 = [[], [1], ['']]; var arr2 = [[null], [1], ['']]; // Array literal with elements of only EveryType E has type E[] diff --git a/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js b/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js index 939878aa0863b..b092fe4da3298 100644 --- a/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js +++ b/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js @@ -26,15 +26,16 @@ var myDerivedList: DerivedList; var as = [list, myDerivedList]; // List[] //// [arrayLiteralsWithRecursiveGenerics.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var List = (function () { function List() { } diff --git a/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js b/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js index 352e31d085125..fcc3ab99d3c61 100644 --- a/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js +++ b/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js @@ -20,15 +20,16 @@ rrb = cra; // error: 'A' is not assignable to 'B' //// [arrayOfSubtypeIsAssignableToReadonlyArray.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/arrowFunctionContexts.js b/tests/baselines/reference/arrowFunctionContexts.js index b5e2cde6760d2..5b1daa5b594e1 100644 --- a/tests/baselines/reference/arrowFunctionContexts.js +++ b/tests/baselines/reference/arrowFunctionContexts.js @@ -97,15 +97,16 @@ var asserted2: any; //// [arrowFunctionContexts.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var _this = this; // Arrow function used in with statement with (window) { diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures3.js b/tests/baselines/reference/assignmentCompatWithCallSignatures3.js index fcc7e402296e0..a748ec873ae8b 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures3.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures3.js @@ -101,15 +101,16 @@ b18 = a18; // ok //// [assignmentCompatWithCallSignatures3.js] // these are all permitted with the current rules, since we do not do contextual signature instantiation -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures4.js b/tests/baselines/reference/assignmentCompatWithCallSignatures4.js index 066f2e5ead2ff..409a7f5ceae21 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures4.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures4.js @@ -100,15 +100,16 @@ module Errors { //// [assignmentCompatWithCallSignatures4.js] // These are mostly permitted with the current loose rules. All ok unless otherwise noted. -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Errors; (function (Errors) { var Base = (function () { diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures5.js b/tests/baselines/reference/assignmentCompatWithCallSignatures5.js index 2d1d545bb429e..00acd326ba87a 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures5.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures5.js @@ -67,15 +67,16 @@ b18 = a18; // ok //// [assignmentCompatWithCallSignatures5.js] // checking assignment compat for function types. No errors in this file -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures6.js b/tests/baselines/reference/assignmentCompatWithCallSignatures6.js index 83f2834021018..f8fbe3b0b8427 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures6.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures6.js @@ -44,15 +44,16 @@ b16 = x.a16; //// [assignmentCompatWithCallSignatures6.js] // checking assignment compatibility relations for function types. All valid -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js index d0349f1734f21..fb991a85f0564 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js @@ -101,15 +101,16 @@ b18 = a18; // ok //// [assignmentCompatWithConstructSignatures3.js] // checking assignment compatibility relations for function types. All of these are valid. -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js index b5d1804c1da05..eb406898854dd 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js @@ -100,15 +100,16 @@ module Errors { //// [assignmentCompatWithConstructSignatures4.js] // checking assignment compatibility relations for function types. -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Errors; (function (Errors) { var Base = (function () { diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js index ecec65f380f68..d246aec2509be 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js @@ -67,15 +67,16 @@ b18 = a18; // ok //// [assignmentCompatWithConstructSignatures5.js] // checking assignment compat for function types. All valid -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js index 610d893c36909..f3149664bc687 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js @@ -44,15 +44,16 @@ b16 = x.a16; //// [assignmentCompatWithConstructSignatures6.js] // checking assignment compatibility relations for function types. All valid. -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer.js b/tests/baselines/reference/assignmentCompatWithNumericIndexer.js index 5380e982fead1..127f21bbfd773 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer.js +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer.js @@ -45,15 +45,16 @@ module Generics { //// [assignmentCompatWithNumericIndexer.js] // Derived type indexer must be subtype of base type indexer -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js b/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js index e2346a740552c..704cf67ec83c0 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js @@ -42,15 +42,16 @@ module Generics { //// [assignmentCompatWithNumericIndexer3.js] // Derived type indexer must be subtype of base type indexer -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers4.js b/tests/baselines/reference/assignmentCompatWithObjectMembers4.js index 39faa9a62c474..88c77f2fb357a 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers4.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers4.js @@ -93,15 +93,16 @@ 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 __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var OnlyDerived; (function (OnlyDerived) { var Base = (function () { diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js index 2fb80642d9e20..328b5192d969d 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js @@ -90,15 +90,16 @@ module SourceHasOptional { //// [assignmentCompatWithObjectMembersOptionality.js] // Derived member is not optional but base member is, should be ok -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js index 82a90a3c4de79..730fd15be7a3e 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js @@ -92,15 +92,16 @@ module SourceHasOptional { //// [assignmentCompatWithObjectMembersOptionality2.js] // M is optional and S contains no property with the same name as M // N is optional and T contains no property with the same name as N -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/assignmentCompatWithStringIndexer.js b/tests/baselines/reference/assignmentCompatWithStringIndexer.js index b59fa359b8e78..7b871a20b3ac0 100644 --- a/tests/baselines/reference/assignmentCompatWithStringIndexer.js +++ b/tests/baselines/reference/assignmentCompatWithStringIndexer.js @@ -55,15 +55,16 @@ module Generics { //// [assignmentCompatWithStringIndexer.js] // index signatures must be compatible in assignments -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/assignmentLHSIsValue.js b/tests/baselines/reference/assignmentLHSIsValue.js index 84dbed907d733..1cf7c2ac317ef 100644 --- a/tests/baselines/reference/assignmentLHSIsValue.js +++ b/tests/baselines/reference/assignmentLHSIsValue.js @@ -71,15 +71,16 @@ foo() = value; (foo()) = value; //// [assignmentLHSIsValue.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); // expected error for all the LHS of assignments var value; // this diff --git a/tests/baselines/reference/asyncImportedPromise_es5.js b/tests/baselines/reference/asyncImportedPromise_es5.js index 55bff7302db49..9a6ef70582a5e 100644 --- a/tests/baselines/reference/asyncImportedPromise_es5.js +++ b/tests/baselines/reference/asyncImportedPromise_es5.js @@ -11,15 +11,16 @@ class Test { //// [task.js] "use strict"; -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Task = (function (_super) { __extends(Task, _super); function Task() { diff --git a/tests/baselines/reference/autolift4.js b/tests/baselines/reference/autolift4.js index 9d7dcaefd2904..aff1ce9986f46 100644 --- a/tests/baselines/reference/autolift4.js +++ b/tests/baselines/reference/autolift4.js @@ -24,15 +24,16 @@ class Point3D extends Point { //// [autolift4.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Point = (function () { function Point(x, y) { this.x = x; diff --git a/tests/baselines/reference/baseCheck.js b/tests/baselines/reference/baseCheck.js index 29e4c9fdc4d62..c8145c170b614 100644 --- a/tests/baselines/reference/baseCheck.js +++ b/tests/baselines/reference/baseCheck.js @@ -30,15 +30,16 @@ function f() { //// [baseCheck.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C(x, y) { } diff --git a/tests/baselines/reference/baseIndexSignatureResolution.js b/tests/baselines/reference/baseIndexSignatureResolution.js index 8ccd2e5f335db..7389e2afe8b4b 100644 --- a/tests/baselines/reference/baseIndexSignatureResolution.js +++ b/tests/baselines/reference/baseIndexSignatureResolution.js @@ -25,15 +25,16 @@ var z: Derived = b.foo(); */ //// [baseIndexSignatureResolution.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/baseTypeOrderChecking.js b/tests/baselines/reference/baseTypeOrderChecking.js index e408805edb837..c2eb77a3b9ece 100644 --- a/tests/baselines/reference/baseTypeOrderChecking.js +++ b/tests/baselines/reference/baseTypeOrderChecking.js @@ -37,15 +37,16 @@ class Class4 extends Class3 //// [baseTypeOrderChecking.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var someVariable; var Class1 = (function () { function Class1() { diff --git a/tests/baselines/reference/baseTypeWrappingInstantiationChain.js b/tests/baselines/reference/baseTypeWrappingInstantiationChain.js index bb55cc0f9a450..308637b576c70 100644 --- a/tests/baselines/reference/baseTypeWrappingInstantiationChain.js +++ b/tests/baselines/reference/baseTypeWrappingInstantiationChain.js @@ -28,15 +28,16 @@ class C extends CBase { //// [baseTypeWrappingInstantiationChain.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var CBaseBase = (function () { function CBaseBase(x) { } diff --git a/tests/baselines/reference/bases.js b/tests/baselines/reference/bases.js index 1962e4d824468..201d0e7ac2736 100644 --- a/tests/baselines/reference/bases.js +++ b/tests/baselines/reference/bases.js @@ -21,15 +21,16 @@ new C().y; //// [bases.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var B = (function () { function B() { this.y; diff --git a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js index c43bfc7177f2d..af0c24ca5d5da 100644 --- a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js +++ b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js @@ -29,15 +29,16 @@ function foo5(t: T, u: U): Object { //// [bestCommonTypeOfConditionalExpressions.js] // conditional expressions return the best common type of the branches plus contextual type (using the first candidate if multiple BCTs exist) // no errors expected here -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a; var b; var Base = (function () { diff --git a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js index 0df9198a447e1..bf3c8b830aab7 100644 --- a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js +++ b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js @@ -27,15 +27,16 @@ function foo3(t: T, u: U) { //// [bestCommonTypeOfConditionalExpressions2.js] // conditional expressions return the best common type of the branches plus contextual type (using the first candidate if multiple BCTs exist) // these are errors -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/bestCommonTypeOfTuple2.js b/tests/baselines/reference/bestCommonTypeOfTuple2.js index 18b903bea7058..3bac937c8aeb9 100644 --- a/tests/baselines/reference/bestCommonTypeOfTuple2.js +++ b/tests/baselines/reference/bestCommonTypeOfTuple2.js @@ -23,15 +23,16 @@ var e51 = t5[2]; // {} //// [bestCommonTypeOfTuple2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js index 1bf31ad90280b..662bfa931fb7a 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js @@ -71,15 +71,16 @@ interface I extends A { //// [callSignatureAssignabilityInInheritance2.js] // checking subtype relations for function types as it relates to contextual signature instantiation -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js index 704ddfe5adf77..e27e4729cd410 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js @@ -116,15 +116,16 @@ module Errors { //// [callSignatureAssignabilityInInheritance3.js] // checking subtype relations for function types as it relates to contextual signature instantiation // error cases -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Errors; (function (Errors) { var Base = (function () { diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js index db8c0fa0b52bb..687cc9aa0e192 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js @@ -51,15 +51,16 @@ interface I extends A { //// [callSignatureAssignabilityInInheritance4.js] // checking subtype relations for function types as it relates to contextual signature instantiation -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js index eca44c3c59fdd..16e50218cd90e 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js @@ -51,15 +51,16 @@ interface I extends B { //// [callSignatureAssignabilityInInheritance5.js] // checking subtype relations for function types as it relates to contextual signature instantiation // same as subtypingWithCallSignatures2 just with an extra level of indirection in the inheritance chain -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js index c17b84f859464..717fe64da4ec2 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js @@ -54,15 +54,16 @@ interface I9 extends A { // checking subtype relations for function types as it relates to contextual signature instantiation // same as subtypingWithCallSignatures4 but using class type parameters instead of generic signatures // all are errors -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/callWithSpread.js b/tests/baselines/reference/callWithSpread.js index 00bf93a092d81..06ca3e91d0270 100644 --- a/tests/baselines/reference/callWithSpread.js +++ b/tests/baselines/reference/callWithSpread.js @@ -59,15 +59,16 @@ class D extends C { //// [callWithSpread.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); function foo(x, y) { var z = []; for (var _i = 2; _i < arguments.length; _i++) { diff --git a/tests/baselines/reference/captureThisInSuperCall.js b/tests/baselines/reference/captureThisInSuperCall.js index 43f8e8964dff0..c218c8b1687ca 100644 --- a/tests/baselines/reference/captureThisInSuperCall.js +++ b/tests/baselines/reference/captureThisInSuperCall.js @@ -9,15 +9,16 @@ class B extends A { } //// [captureThisInSuperCall.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A(p) { } diff --git a/tests/baselines/reference/castingTuple.js b/tests/baselines/reference/castingTuple.js index b4916cdbd654e..04965748c0da3 100644 --- a/tests/baselines/reference/castingTuple.js +++ b/tests/baselines/reference/castingTuple.js @@ -33,15 +33,16 @@ t4[2] = 10; //// [castingTuple.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { this.a = 10; diff --git a/tests/baselines/reference/chainedAssignment3.js b/tests/baselines/reference/chainedAssignment3.js index cb313122a9a12..2ddd0f7577ec9 100644 --- a/tests/baselines/reference/chainedAssignment3.js +++ b/tests/baselines/reference/chainedAssignment3.js @@ -23,15 +23,16 @@ a = b = new A(); //// [chainedAssignment3.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js index b56e5a9320600..f820e6c39a3da 100644 --- a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js +++ b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js @@ -20,15 +20,16 @@ class C extends B { (new Chain(new A)).then(a => new B).then(b => new C).then(c => new B).then(b => new A); //// [chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Chain = (function () { function Chain(value) { this.value = value; diff --git a/tests/baselines/reference/checkForObjectTooStrict.js b/tests/baselines/reference/checkForObjectTooStrict.js index 243022a81c294..dbf1a34b46574 100644 --- a/tests/baselines/reference/checkForObjectTooStrict.js +++ b/tests/baselines/reference/checkForObjectTooStrict.js @@ -32,15 +32,16 @@ class Baz extends Object { //// [checkForObjectTooStrict.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Foo; (function (Foo) { var Object = (function () { diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js index d1dc6839b8ffe..8322bb8178325 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js @@ -11,15 +11,16 @@ class Derived extends Based { } //// [checkSuperCallBeforeThisAccessing1.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Based = (function () { function Based() { } diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js index 6fe42a6993462..6d787a70b8c32 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js @@ -11,15 +11,16 @@ class Derived extends Based { } //// [checkSuperCallBeforeThisAccessing2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Based = (function () { function Based() { } diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js index 642ded30216d7..41092fcd9845e 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js @@ -16,15 +16,16 @@ class Derived extends Based { } //// [checkSuperCallBeforeThisAccessing3.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Based = (function () { function Based() { } diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js index 1b9b1fd2b03b5..9bc5cc6f82b22 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js @@ -20,15 +20,16 @@ class Derived extends Based { } //// [checkSuperCallBeforeThisAccessing4.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Based = (function () { function Based() { } diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js index 76853f4a210b4..c178a78e84ebb 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js @@ -8,15 +8,16 @@ class Derived extends Based { } //// [checkSuperCallBeforeThisAccessing5.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Based = (function () { function Based() { var arg = []; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js index 4c2e04c46df8b..14cbda775d5da 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js @@ -11,15 +11,16 @@ class Super extends Base { } //// [checkSuperCallBeforeThisAccessing6.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { var arg = []; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js index d67fb3451f095..ad85fa1736c5f 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js @@ -10,15 +10,16 @@ class Super extends Base { } //// [checkSuperCallBeforeThisAccessing7.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base(func) { } diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js index 9bcf0ba166806..3f824a00c96ec 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js @@ -11,15 +11,16 @@ class Super extends Base { } //// [checkSuperCallBeforeThisAccessing8.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { var arg = []; diff --git a/tests/baselines/reference/circularImportAlias.js b/tests/baselines/reference/circularImportAlias.js index 154b0c8c68dca..2ca47382b3284 100644 --- a/tests/baselines/reference/circularImportAlias.js +++ b/tests/baselines/reference/circularImportAlias.js @@ -21,15 +21,16 @@ var c = new B.a.C(); //// [circularImportAlias.js] // expected no error -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var B; (function (B) { B.a = A; diff --git a/tests/baselines/reference/circularTypeofWithFunctionModule.js b/tests/baselines/reference/circularTypeofWithFunctionModule.js index 357ce10188c53..e1e3c1efe5841 100644 --- a/tests/baselines/reference/circularTypeofWithFunctionModule.js +++ b/tests/baselines/reference/circularTypeofWithFunctionModule.js @@ -14,15 +14,16 @@ namespace maker { //// [circularTypeofWithFunctionModule.js] // Repro from #6072 -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Foo = (function () { function Foo() { } diff --git a/tests/baselines/reference/classAbstractConstructorAssignability.js b/tests/baselines/reference/classAbstractConstructorAssignability.js index 915055bc991cf..e9beaced63dd9 100644 --- a/tests/baselines/reference/classAbstractConstructorAssignability.js +++ b/tests/baselines/reference/classAbstractConstructorAssignability.js @@ -15,15 +15,16 @@ new BB; new CC; //// [classAbstractConstructorAssignability.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/classAbstractCrashedOnce.js b/tests/baselines/reference/classAbstractCrashedOnce.js index e9a60f8c713e1..319c6c237dcf5 100644 --- a/tests/baselines/reference/classAbstractCrashedOnce.js +++ b/tests/baselines/reference/classAbstractCrashedOnce.js @@ -11,15 +11,16 @@ class bar extends foo { var x = new bar(); //// [classAbstractCrashedOnce.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var foo = (function () { function foo() { } diff --git a/tests/baselines/reference/classAbstractExtends.js b/tests/baselines/reference/classAbstractExtends.js index 1d5967b96a928..9b4faff67c3b9 100644 --- a/tests/baselines/reference/classAbstractExtends.js +++ b/tests/baselines/reference/classAbstractExtends.js @@ -17,15 +17,16 @@ class E extends B { } //// [classAbstractExtends.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/classAbstractFactoryFunction.js b/tests/baselines/reference/classAbstractFactoryFunction.js index c07390da7dd6b..e7ddb867d2848 100644 --- a/tests/baselines/reference/classAbstractFactoryFunction.js +++ b/tests/baselines/reference/classAbstractFactoryFunction.js @@ -18,15 +18,16 @@ NewB(A); NewB(B); //// [classAbstractFactoryFunction.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/classAbstractGeneric.js b/tests/baselines/reference/classAbstractGeneric.js index 46406731e59ec..5063d7fcdd69c 100644 --- a/tests/baselines/reference/classAbstractGeneric.js +++ b/tests/baselines/reference/classAbstractGeneric.js @@ -26,15 +26,16 @@ class G extends A { } //// [classAbstractGeneric.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/classAbstractInAModule.js b/tests/baselines/reference/classAbstractInAModule.js index 1c76bd43fb535..73ff32d3d5efc 100644 --- a/tests/baselines/reference/classAbstractInAModule.js +++ b/tests/baselines/reference/classAbstractInAModule.js @@ -8,15 +8,16 @@ new M.A; new M.B; //// [classAbstractInAModule.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var M; (function (M) { var A = (function () { diff --git a/tests/baselines/reference/classAbstractInheritance.js b/tests/baselines/reference/classAbstractInheritance.js index dbf585c86d295..8a173bb1bf4cb 100644 --- a/tests/baselines/reference/classAbstractInheritance.js +++ b/tests/baselines/reference/classAbstractInheritance.js @@ -22,15 +22,16 @@ class FF extends CC {} abstract class GG extends CC {} //// [classAbstractInheritance.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/classAbstractInstantiations1.js b/tests/baselines/reference/classAbstractInstantiations1.js index 22732bdc2b487..094bc7555593b 100644 --- a/tests/baselines/reference/classAbstractInstantiations1.js +++ b/tests/baselines/reference/classAbstractInstantiations1.js @@ -28,15 +28,16 @@ c = new B; // // Calling new with (non)abstract classes. // -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/classAbstractInstantiations2.js b/tests/baselines/reference/classAbstractInstantiations2.js index 13dd7957aeb13..01277eb034a6e 100644 --- a/tests/baselines/reference/classAbstractInstantiations2.js +++ b/tests/baselines/reference/classAbstractInstantiations2.js @@ -52,15 +52,16 @@ class H { // error -- not declared abstract } //// [classAbstractInstantiations2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/classAbstractOverrideWithAbstract.js b/tests/baselines/reference/classAbstractOverrideWithAbstract.js index c8b1d61aa9ebe..8f304c709cfe4 100644 --- a/tests/baselines/reference/classAbstractOverrideWithAbstract.js +++ b/tests/baselines/reference/classAbstractOverrideWithAbstract.js @@ -24,15 +24,16 @@ class DD extends BB { } //// [classAbstractOverrideWithAbstract.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/classAbstractSuperCalls.js b/tests/baselines/reference/classAbstractSuperCalls.js index 9d46086bc70ff..ba9ed10795bb0 100644 --- a/tests/baselines/reference/classAbstractSuperCalls.js +++ b/tests/baselines/reference/classAbstractSuperCalls.js @@ -28,15 +28,16 @@ abstract class BB extends AA { //// [classAbstractSuperCalls.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/classAbstractUsingAbstractMethod1.js b/tests/baselines/reference/classAbstractUsingAbstractMethod1.js index 56644d06a79d9..8e23906e1492a 100644 --- a/tests/baselines/reference/classAbstractUsingAbstractMethod1.js +++ b/tests/baselines/reference/classAbstractUsingAbstractMethod1.js @@ -18,15 +18,16 @@ a = new C; // error, cannot instantiate abstract class. a.foo(); //// [classAbstractUsingAbstractMethod1.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/classAbstractUsingAbstractMethods2.js b/tests/baselines/reference/classAbstractUsingAbstractMethods2.js index 011df09e258b3..3d09949c0aef2 100644 --- a/tests/baselines/reference/classAbstractUsingAbstractMethods2.js +++ b/tests/baselines/reference/classAbstractUsingAbstractMethods2.js @@ -28,15 +28,16 @@ class DD extends AA { } //// [classAbstractUsingAbstractMethods2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/classConstructorAccessibility2.js b/tests/baselines/reference/classConstructorAccessibility2.js index c4e4b15bf3cdf..e16a623ef43fc 100644 --- a/tests/baselines/reference/classConstructorAccessibility2.js +++ b/tests/baselines/reference/classConstructorAccessibility2.js @@ -47,15 +47,16 @@ var dc = new DerivedC(1); //// [classConstructorAccessibility2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var BaseA = (function () { function BaseA(x) { this.x = x; diff --git a/tests/baselines/reference/classConstructorAccessibility4.js b/tests/baselines/reference/classConstructorAccessibility4.js index 3946dcb82de77..0680f590ef440 100644 --- a/tests/baselines/reference/classConstructorAccessibility4.js +++ b/tests/baselines/reference/classConstructorAccessibility4.js @@ -31,15 +31,16 @@ class D { } //// [classConstructorAccessibility4.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/classConstructorAccessibility5.js b/tests/baselines/reference/classConstructorAccessibility5.js index 6226c80750ef3..671530694e79f 100644 --- a/tests/baselines/reference/classConstructorAccessibility5.js +++ b/tests/baselines/reference/classConstructorAccessibility5.js @@ -12,15 +12,16 @@ class Unrelated { //// [classConstructorAccessibility5.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/classConstructorParametersAccessibility.js b/tests/baselines/reference/classConstructorParametersAccessibility.js index 26fc8fcfe3d6a..4c3d374715745 100644 --- a/tests/baselines/reference/classConstructorParametersAccessibility.js +++ b/tests/baselines/reference/classConstructorParametersAccessibility.js @@ -27,15 +27,16 @@ class Derived extends C3 { //// [classConstructorParametersAccessibility.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C1 = (function () { function C1(x) { this.x = x; diff --git a/tests/baselines/reference/classConstructorParametersAccessibility2.js b/tests/baselines/reference/classConstructorParametersAccessibility2.js index 6d4806414843c..14f7a33a6b346 100644 --- a/tests/baselines/reference/classConstructorParametersAccessibility2.js +++ b/tests/baselines/reference/classConstructorParametersAccessibility2.js @@ -27,15 +27,16 @@ class Derived extends C3 { //// [classConstructorParametersAccessibility2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C1 = (function () { function C1(x) { this.x = x; diff --git a/tests/baselines/reference/classConstructorParametersAccessibility3.js b/tests/baselines/reference/classConstructorParametersAccessibility3.js index 898b475f5ff4b..1f02b7a75b5ac 100644 --- a/tests/baselines/reference/classConstructorParametersAccessibility3.js +++ b/tests/baselines/reference/classConstructorParametersAccessibility3.js @@ -14,15 +14,16 @@ var d: Derived; d.p; // public, OK //// [classConstructorParametersAccessibility3.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base(p) { this.p = p; diff --git a/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js b/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js index e9208d7d78367..bf15fcf8fadb5 100644 --- a/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js +++ b/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js @@ -12,15 +12,16 @@ module M { } //// [classDeclarationMergedInModuleWithContinuation.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var M; (function (M) { var N = (function () { diff --git a/tests/baselines/reference/classDeclaredBeforeClassFactory.js b/tests/baselines/reference/classDeclaredBeforeClassFactory.js index ca548e2ecd7df..8a49c6ca13899 100644 --- a/tests/baselines/reference/classDeclaredBeforeClassFactory.js +++ b/tests/baselines/reference/classDeclaredBeforeClassFactory.js @@ -8,15 +8,16 @@ function makeBaseClass() { //// [classDeclaredBeforeClassFactory.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); // Should be OK due to hoisting var Derived = (function (_super) { __extends(Derived, _super); diff --git a/tests/baselines/reference/classDoesNotDependOnBaseTypes.js b/tests/baselines/reference/classDoesNotDependOnBaseTypes.js index b154c47f70c10..17dc38502145e 100644 --- a/tests/baselines/reference/classDoesNotDependOnBaseTypes.js +++ b/tests/baselines/reference/classDoesNotDependOnBaseTypes.js @@ -13,15 +13,16 @@ class StringTreeCollectionBase { class StringTreeCollection extends StringTreeCollectionBase { } //// [classDoesNotDependOnBaseTypes.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var x; if (typeof x !== "string") { x[0] = ""; diff --git a/tests/baselines/reference/classExpression2.js b/tests/baselines/reference/classExpression2.js index 1243b96721924..016858652650e 100644 --- a/tests/baselines/reference/classExpression2.js +++ b/tests/baselines/reference/classExpression2.js @@ -3,15 +3,16 @@ class D { } var v = class C extends D {}; //// [classExpression2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var D = (function () { function D() { } diff --git a/tests/baselines/reference/classExpression3.js b/tests/baselines/reference/classExpression3.js index 7564c6274b357..3acbcef1ab889 100644 --- a/tests/baselines/reference/classExpression3.js +++ b/tests/baselines/reference/classExpression3.js @@ -7,15 +7,16 @@ c.c; //// [classExpression3.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function (_super) { __extends(class_1, _super); function class_1() { diff --git a/tests/baselines/reference/classExpressionExtendingAbstractClass.js b/tests/baselines/reference/classExpressionExtendingAbstractClass.js index b44fb0a1dc871..1d661cafb65c8 100644 --- a/tests/baselines/reference/classExpressionExtendingAbstractClass.js +++ b/tests/baselines/reference/classExpressionExtendingAbstractClass.js @@ -9,15 +9,16 @@ var C = class extends A { // no error reported! //// [classExpressionExtendingAbstractClass.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/classExtendingBuiltinType.js b/tests/baselines/reference/classExtendingBuiltinType.js index b492f64c68076..902b3327754a1 100644 --- a/tests/baselines/reference/classExtendingBuiltinType.js +++ b/tests/baselines/reference/classExtendingBuiltinType.js @@ -12,15 +12,16 @@ class C10 extends Array { } //// [classExtendingBuiltinType.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C1 = (function (_super) { __extends(C1, _super); function C1() { diff --git a/tests/baselines/reference/classExtendingClass.js b/tests/baselines/reference/classExtendingClass.js index c00c6ead988f2..f9085262904c1 100644 --- a/tests/baselines/reference/classExtendingClass.js +++ b/tests/baselines/reference/classExtendingClass.js @@ -32,15 +32,16 @@ var r7 = d2.thing(''); var r8 = D2.other(1); //// [classExtendingClass.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/classExtendingClassLikeType.js b/tests/baselines/reference/classExtendingClassLikeType.js index e1f083888489f..d793534bd18ed 100644 --- a/tests/baselines/reference/classExtendingClassLikeType.js +++ b/tests/baselines/reference/classExtendingClassLikeType.js @@ -59,15 +59,16 @@ class D5 extends getBadBase() { //// [classExtendingClassLikeType.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); // Error, no Base constructor function var D0 = (function (_super) { __extends(D0, _super); diff --git a/tests/baselines/reference/classExtendingNonConstructor.js b/tests/baselines/reference/classExtendingNonConstructor.js index 5cdf91d1b2062..43112c4076bbb 100644 --- a/tests/baselines/reference/classExtendingNonConstructor.js +++ b/tests/baselines/reference/classExtendingNonConstructor.js @@ -15,15 +15,16 @@ class C7 extends foo { } //// [classExtendingNonConstructor.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var x; function foo() { this.x = 1; diff --git a/tests/baselines/reference/classExtendingNull.js b/tests/baselines/reference/classExtendingNull.js index 087a16b352516..44fd8a51a862d 100644 --- a/tests/baselines/reference/classExtendingNull.js +++ b/tests/baselines/reference/classExtendingNull.js @@ -4,15 +4,16 @@ class C2 extends (null) { } //// [classExtendingNull.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C1 = (function (_super) { __extends(C1, _super); function C1() { diff --git a/tests/baselines/reference/classExtendingPrimitive.js b/tests/baselines/reference/classExtendingPrimitive.js index 642ab4671afa9..15f225a6dbe53 100644 --- a/tests/baselines/reference/classExtendingPrimitive.js +++ b/tests/baselines/reference/classExtendingPrimitive.js @@ -16,15 +16,16 @@ class C8 extends E { } //// [classExtendingPrimitive.js] // classes cannot extend primitives -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function (_super) { __extends(C, _super); function C() { diff --git a/tests/baselines/reference/classExtendingPrimitive2.js b/tests/baselines/reference/classExtendingPrimitive2.js index 6b56f16547f03..49fbce51aa28d 100644 --- a/tests/baselines/reference/classExtendingPrimitive2.js +++ b/tests/baselines/reference/classExtendingPrimitive2.js @@ -6,15 +6,16 @@ class C5a extends null { } //// [classExtendingPrimitive2.js] // classes cannot extend primitives -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C4a = (function () { function C4a() { } diff --git a/tests/baselines/reference/classExtendingQualifiedName.js b/tests/baselines/reference/classExtendingQualifiedName.js index f144f13c5b8ef..02346427ed3ca 100644 --- a/tests/baselines/reference/classExtendingQualifiedName.js +++ b/tests/baselines/reference/classExtendingQualifiedName.js @@ -8,15 +8,16 @@ module M { } //// [classExtendingQualifiedName.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var M; (function (M) { var C = (function () { diff --git a/tests/baselines/reference/classExtendingQualifiedName2.js b/tests/baselines/reference/classExtendingQualifiedName2.js index 6c07a40580421..8add304601371 100644 --- a/tests/baselines/reference/classExtendingQualifiedName2.js +++ b/tests/baselines/reference/classExtendingQualifiedName2.js @@ -8,15 +8,16 @@ module M { } //// [classExtendingQualifiedName2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var M; (function (M) { var C = (function () { diff --git a/tests/baselines/reference/classExtendsAcrossFiles.js b/tests/baselines/reference/classExtendsAcrossFiles.js index b3584f425114b..0f0fb5ba2d94b 100644 --- a/tests/baselines/reference/classExtendsAcrossFiles.js +++ b/tests/baselines/reference/classExtendsAcrossFiles.js @@ -21,15 +21,16 @@ export const b = { //// [b.js] "use strict"; -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a_1 = require("./a"); exports.b = { f: function () { @@ -50,15 +51,16 @@ exports.b = { }; //// [a.js] "use strict"; -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var b_1 = require("./b"); exports.a = { f: function () { diff --git a/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js b/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js index 56d13af039d59..9bca40631f937 100644 --- a/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js +++ b/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js @@ -14,15 +14,16 @@ module Foo { } //// [classExtendsClauseClassMergedWithModuleNotReferingConstructor.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.js b/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.js index 7f529967cda89..3d02e381da93e 100644 --- a/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.js +++ b/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.js @@ -7,15 +7,16 @@ module Foo { //// [classExtendsClauseClassNotReferringConstructor.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/classExtendsEveryObjectType.js b/tests/baselines/reference/classExtendsEveryObjectType.js index 6babd7fb0b38e..91ccc496fcb57 100644 --- a/tests/baselines/reference/classExtendsEveryObjectType.js +++ b/tests/baselines/reference/classExtendsEveryObjectType.js @@ -17,15 +17,16 @@ class C5 extends foo { } // error class C6 extends []{ } // error //// [classExtendsEveryObjectType.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function (_super) { __extends(C, _super); function C() { diff --git a/tests/baselines/reference/classExtendsEveryObjectType2.js b/tests/baselines/reference/classExtendsEveryObjectType2.js index 9777735d4a964..a30b3d8c8d8d1 100644 --- a/tests/baselines/reference/classExtendsEveryObjectType2.js +++ b/tests/baselines/reference/classExtendsEveryObjectType2.js @@ -4,15 +4,16 @@ class C2 extends { foo: string; } { } // error class C6 extends []{ } // error //// [classExtendsEveryObjectType2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C2 = (function (_super) { __extends(C2, _super); function C2() { diff --git a/tests/baselines/reference/classExtendsInterface.js b/tests/baselines/reference/classExtendsInterface.js index b432989752827..e5710190673fe 100644 --- a/tests/baselines/reference/classExtendsInterface.js +++ b/tests/baselines/reference/classExtendsInterface.js @@ -9,15 +9,16 @@ class B2 implements Comparable2 {} //// [classExtendsInterface.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function (_super) { __extends(A, _super); function A() { diff --git a/tests/baselines/reference/classExtendsInterfaceInExpression.js b/tests/baselines/reference/classExtendsInterfaceInExpression.js index 2d6b25bea3730..e017ebb8e0653 100644 --- a/tests/baselines/reference/classExtendsInterfaceInExpression.js +++ b/tests/baselines/reference/classExtendsInterfaceInExpression.js @@ -9,15 +9,16 @@ class C extends factory(A) {} //// [classExtendsInterfaceInExpression.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); function factory(a) { return null; } diff --git a/tests/baselines/reference/classExtendsInterfaceInModule.js b/tests/baselines/reference/classExtendsInterfaceInModule.js index 89ed504296449..3d100bcfb679c 100644 --- a/tests/baselines/reference/classExtendsInterfaceInModule.js +++ b/tests/baselines/reference/classExtendsInterfaceInModule.js @@ -16,15 +16,16 @@ class D extends Mod.Nested.I {} //// [classExtendsInterfaceInModule.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C1 = (function (_super) { __extends(C1, _super); function C1() { diff --git a/tests/baselines/reference/classExtendsItself.js b/tests/baselines/reference/classExtendsItself.js index 29f029bd62659..2f32d827dcbcf 100644 --- a/tests/baselines/reference/classExtendsItself.js +++ b/tests/baselines/reference/classExtendsItself.js @@ -6,15 +6,16 @@ class D extends D { } // error class E extends E { } // error //// [classExtendsItself.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function (_super) { __extends(C, _super); function C() { diff --git a/tests/baselines/reference/classExtendsItselfIndirectly.js b/tests/baselines/reference/classExtendsItselfIndirectly.js index a12b90dce44c4..d6ca939a910ba 100644 --- a/tests/baselines/reference/classExtendsItselfIndirectly.js +++ b/tests/baselines/reference/classExtendsItselfIndirectly.js @@ -12,15 +12,16 @@ class D2 extends C2 { bar: T; } class E2 extends D2 { baz: T; } //// [classExtendsItselfIndirectly.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function (_super) { __extends(C, _super); function C() { diff --git a/tests/baselines/reference/classExtendsItselfIndirectly2.js b/tests/baselines/reference/classExtendsItselfIndirectly2.js index 1a073528bad5d..6587c65a5fad5 100644 --- a/tests/baselines/reference/classExtendsItselfIndirectly2.js +++ b/tests/baselines/reference/classExtendsItselfIndirectly2.js @@ -23,15 +23,16 @@ module O { } //// [classExtendsItselfIndirectly2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function (_super) { __extends(C, _super); function C() { diff --git a/tests/baselines/reference/classExtendsItselfIndirectly3.js b/tests/baselines/reference/classExtendsItselfIndirectly3.js index c42b937a85c92..d36545bafd378 100644 --- a/tests/baselines/reference/classExtendsItselfIndirectly3.js +++ b/tests/baselines/reference/classExtendsItselfIndirectly3.js @@ -19,15 +19,16 @@ class D2 extends C2 { bar: T; } class E2 extends D2 { baz: T; } //// [classExtendsItselfIndirectly_file1.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function (_super) { __extends(C, _super); function C() { @@ -36,15 +37,16 @@ var C = (function (_super) { return C; }(E)); // error //// [classExtendsItselfIndirectly_file2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var D = (function (_super) { __extends(D, _super); function D() { @@ -53,15 +55,16 @@ var D = (function (_super) { return D; }(C)); //// [classExtendsItselfIndirectly_file3.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var E = (function (_super) { __extends(E, _super); function E() { @@ -70,15 +73,16 @@ var E = (function (_super) { return E; }(D)); //// [classExtendsItselfIndirectly_file4.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C2 = (function (_super) { __extends(C2, _super); function C2() { @@ -87,15 +91,16 @@ var C2 = (function (_super) { return C2; }(E2)); // error //// [classExtendsItselfIndirectly_file5.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var D2 = (function (_super) { __extends(D2, _super); function D2() { @@ -104,15 +109,16 @@ var D2 = (function (_super) { return D2; }(C2)); //// [classExtendsItselfIndirectly_file6.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var E2 = (function (_super) { __extends(E2, _super); function E2() { diff --git a/tests/baselines/reference/classExtendsMultipleBaseClasses.js b/tests/baselines/reference/classExtendsMultipleBaseClasses.js index 7028383c34975..3b1fd2de5cfe9 100644 --- a/tests/baselines/reference/classExtendsMultipleBaseClasses.js +++ b/tests/baselines/reference/classExtendsMultipleBaseClasses.js @@ -4,15 +4,16 @@ class B { } class C extends A,B { } //// [classExtendsMultipleBaseClasses.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/classExtendsNull.js b/tests/baselines/reference/classExtendsNull.js index d68d39a1acba0..d8cadbbe32b79 100644 --- a/tests/baselines/reference/classExtendsNull.js +++ b/tests/baselines/reference/classExtendsNull.js @@ -13,15 +13,16 @@ class D extends null { } //// [classExtendsNull.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function (_super) { __extends(C, _super); function C() { diff --git a/tests/baselines/reference/classExtendsShadowedConstructorFunction.js b/tests/baselines/reference/classExtendsShadowedConstructorFunction.js index 9dd314f8c1dda..79ae0cf243ffd 100644 --- a/tests/baselines/reference/classExtendsShadowedConstructorFunction.js +++ b/tests/baselines/reference/classExtendsShadowedConstructorFunction.js @@ -9,15 +9,16 @@ module M { } //// [classExtendsShadowedConstructorFunction.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/classExtendsValidConstructorFunction.js b/tests/baselines/reference/classExtendsValidConstructorFunction.js index 603fd5d6997d9..b2a38318babad 100644 --- a/tests/baselines/reference/classExtendsValidConstructorFunction.js +++ b/tests/baselines/reference/classExtendsValidConstructorFunction.js @@ -6,15 +6,16 @@ var x = new foo(); // can be used as a constructor function class C extends foo { } // error, cannot extend it though //// [classExtendsValidConstructorFunction.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); function foo() { } var x = new foo(); // can be used as a constructor function var C = (function (_super) { diff --git a/tests/baselines/reference/classHeritageWithTrailingSeparator.js b/tests/baselines/reference/classHeritageWithTrailingSeparator.js index 087696113d4f0..bd9f925b7d66a 100644 --- a/tests/baselines/reference/classHeritageWithTrailingSeparator.js +++ b/tests/baselines/reference/classHeritageWithTrailingSeparator.js @@ -4,15 +4,16 @@ class D extends C, { } //// [classHeritageWithTrailingSeparator.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/classImplementsClass2.js b/tests/baselines/reference/classImplementsClass2.js index 756e5df939a4c..e564beda16437 100644 --- a/tests/baselines/reference/classImplementsClass2.js +++ b/tests/baselines/reference/classImplementsClass2.js @@ -14,15 +14,16 @@ c = c2; c2 = c; //// [classImplementsClass2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/classImplementsClass3.js b/tests/baselines/reference/classImplementsClass3.js index c6e50df32b057..707a9dbe6b923 100644 --- a/tests/baselines/reference/classImplementsClass3.js +++ b/tests/baselines/reference/classImplementsClass3.js @@ -15,15 +15,16 @@ c = c2; c2 = c; //// [classImplementsClass3.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/classImplementsClass4.js b/tests/baselines/reference/classImplementsClass4.js index 0b19e3d3aa76e..5748fbb30f52b 100644 --- a/tests/baselines/reference/classImplementsClass4.js +++ b/tests/baselines/reference/classImplementsClass4.js @@ -17,15 +17,16 @@ c = c2; c2 = c; //// [classImplementsClass4.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { this.x = 1; diff --git a/tests/baselines/reference/classImplementsClass5.js b/tests/baselines/reference/classImplementsClass5.js index 941fc02a1ce25..12388b65a1756 100644 --- a/tests/baselines/reference/classImplementsClass5.js +++ b/tests/baselines/reference/classImplementsClass5.js @@ -18,15 +18,16 @@ c = c2; c2 = c; //// [classImplementsClass5.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { this.x = 1; diff --git a/tests/baselines/reference/classImplementsClass6.js b/tests/baselines/reference/classImplementsClass6.js index 1e2eb13419ac9..52959ed351a71 100644 --- a/tests/baselines/reference/classImplementsClass6.js +++ b/tests/baselines/reference/classImplementsClass6.js @@ -22,15 +22,16 @@ c.bar(); // error c2.bar(); // should error //// [classImplementsClass6.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/classIndexer3.js b/tests/baselines/reference/classIndexer3.js index 5c65f63cc034c..29dd552da9c7e 100644 --- a/tests/baselines/reference/classIndexer3.js +++ b/tests/baselines/reference/classIndexer3.js @@ -11,15 +11,16 @@ class D123 extends C123 { } //// [classIndexer3.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C123 = (function () { function C123() { } diff --git a/tests/baselines/reference/classInheritence.js b/tests/baselines/reference/classInheritence.js index 509433205e90c..d53bdbd821411 100644 --- a/tests/baselines/reference/classInheritence.js +++ b/tests/baselines/reference/classInheritence.js @@ -3,15 +3,16 @@ class B extends A { } class A extends A { } //// [classInheritence.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var B = (function (_super) { __extends(B, _super); function B() { diff --git a/tests/baselines/reference/classIsSubtypeOfBaseType.js b/tests/baselines/reference/classIsSubtypeOfBaseType.js index 861d84ebbac6f..f8a691ead9a31 100644 --- a/tests/baselines/reference/classIsSubtypeOfBaseType.js +++ b/tests/baselines/reference/classIsSubtypeOfBaseType.js @@ -16,15 +16,16 @@ class Derived2 extends Base<{ bar: string; }> { } //// [classIsSubtypeOfBaseType.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/classOrder2.js b/tests/baselines/reference/classOrder2.js index a80e58fe3cda3..c9859337efe70 100644 --- a/tests/baselines/reference/classOrder2.js +++ b/tests/baselines/reference/classOrder2.js @@ -20,15 +20,16 @@ a.foo(); //// [classOrder2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function (_super) { __extends(A, _super); function A() { diff --git a/tests/baselines/reference/classOrderBug.js b/tests/baselines/reference/classOrderBug.js index a872fe3165f20..14ab934d77cfe 100644 --- a/tests/baselines/reference/classOrderBug.js +++ b/tests/baselines/reference/classOrderBug.js @@ -16,15 +16,16 @@ class foo extends baz {} //// [classOrderBug.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var bar = (function () { function bar() { this.baz = new foo(); diff --git a/tests/baselines/reference/classSideInheritance1.js b/tests/baselines/reference/classSideInheritance1.js index 09bddc4b22bb4..da6e44e42fe86 100644 --- a/tests/baselines/reference/classSideInheritance1.js +++ b/tests/baselines/reference/classSideInheritance1.js @@ -16,15 +16,16 @@ A.bar(); // valid C2.bar(); // valid //// [classSideInheritance1.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/classSideInheritance2.js b/tests/baselines/reference/classSideInheritance2.js index 49ddf4daa723b..a75bef9fbafee 100644 --- a/tests/baselines/reference/classSideInheritance2.js +++ b/tests/baselines/reference/classSideInheritance2.js @@ -21,15 +21,16 @@ class TextBase implements IText { } //// [classSideInheritance2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var SubText = (function (_super) { __extends(SubText, _super); function SubText(text, span) { diff --git a/tests/baselines/reference/classSideInheritance3.js b/tests/baselines/reference/classSideInheritance3.js index 55f5b6863aa99..1538ed6e07ee1 100644 --- a/tests/baselines/reference/classSideInheritance3.js +++ b/tests/baselines/reference/classSideInheritance3.js @@ -19,15 +19,16 @@ var r2: new (x: string) => A = B; // error var r3: typeof A = C; // ok //// [classSideInheritance3.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A(x) { this.x = x; diff --git a/tests/baselines/reference/classUpdateTests.js b/tests/baselines/reference/classUpdateTests.js index 1cb5c51e963e5..5e11c44830775 100644 --- a/tests/baselines/reference/classUpdateTests.js +++ b/tests/baselines/reference/classUpdateTests.js @@ -114,15 +114,16 @@ class R { } //// [classUpdateTests.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); // // test codegen for instance properties // diff --git a/tests/baselines/reference/classWithBaseClassButNoConstructor.js b/tests/baselines/reference/classWithBaseClassButNoConstructor.js index 9bc92274b4760..d6638d88ceca6 100644 --- a/tests/baselines/reference/classWithBaseClassButNoConstructor.js +++ b/tests/baselines/reference/classWithBaseClassButNoConstructor.js @@ -41,15 +41,16 @@ var d5 = new D(); // error var d6 = new D(1); // ok //// [classWithBaseClassButNoConstructor.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base(x) { } diff --git a/tests/baselines/reference/classWithConstructors.js b/tests/baselines/reference/classWithConstructors.js index 96dc9dea8c581..fde7ad2da3238 100644 --- a/tests/baselines/reference/classWithConstructors.js +++ b/tests/baselines/reference/classWithConstructors.js @@ -50,15 +50,16 @@ module Generics { } //// [classWithConstructors.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var NonGeneric; (function (NonGeneric) { var C = (function () { diff --git a/tests/baselines/reference/classWithProtectedProperty.js b/tests/baselines/reference/classWithProtectedProperty.js index aee0b38fef81c..0188835fdac55 100644 --- a/tests/baselines/reference/classWithProtectedProperty.js +++ b/tests/baselines/reference/classWithProtectedProperty.js @@ -29,15 +29,16 @@ class D extends C { //// [classWithProtectedProperty.js] // accessing any protected outside the class is an error -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { this.a = ''; diff --git a/tests/baselines/reference/classWithStaticMembers.js b/tests/baselines/reference/classWithStaticMembers.js index e327c76afcfc2..1ed38d2fee8cc 100644 --- a/tests/baselines/reference/classWithStaticMembers.js +++ b/tests/baselines/reference/classWithStaticMembers.js @@ -20,15 +20,16 @@ var r2 = r.x; var r3 = r.foo; //// [classWithStaticMembers.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C(a, b) { this.a = a; diff --git a/tests/baselines/reference/classdecl.js b/tests/baselines/reference/classdecl.js index 57ab3282526cd..ef7490f572d20 100644 --- a/tests/baselines/reference/classdecl.js +++ b/tests/baselines/reference/classdecl.js @@ -94,15 +94,16 @@ class e { } //// [classdecl.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = (function () { function a(ns) { } diff --git a/tests/baselines/reference/clodulesDerivedClasses.js b/tests/baselines/reference/clodulesDerivedClasses.js index 88a39a0700352..3fd40d61762ca 100644 --- a/tests/baselines/reference/clodulesDerivedClasses.js +++ b/tests/baselines/reference/clodulesDerivedClasses.js @@ -23,15 +23,16 @@ module Path.Utils { //// [clodulesDerivedClasses.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Shape = (function () { function Shape() { } diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js index d7bf933004d08..77025b6aa0c4b 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js @@ -40,15 +40,16 @@ class c extends Foo { } //// [collisionSuperAndLocalFunctionInAccessors.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); function _super() { } var Foo = (function () { diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.js index c725285a36858..02e88a6076181 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.js +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.js @@ -25,15 +25,16 @@ class c extends Foo { } //// [collisionSuperAndLocalFunctionInConstructor.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); function _super() { } var Foo = (function () { diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.js index b9bbd23c538c9..91f9f5617dfa3 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.js +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.js @@ -29,15 +29,16 @@ class c extends Foo { } //// [collisionSuperAndLocalFunctionInMethod.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); function _super() { } var Foo = (function () { diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js index 69beacb953b1a..520367125fe7a 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js @@ -19,15 +19,16 @@ class b extends Foo { } //// [collisionSuperAndLocalFunctionInProperty.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); function _super() { } var Foo = (function () { diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js b/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js index adf4a62a9b8e5..e77c21c058e17 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js +++ b/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js @@ -33,15 +33,16 @@ class c extends Foo { } //// [collisionSuperAndLocalVarInAccessors.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var _super = 10; // No Error var Foo = (function () { function Foo() { diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js b/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js index d6909c50783c1..1a2f6b3580083 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js +++ b/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js @@ -21,15 +21,16 @@ class c extends Foo { } //// [collisionSuperAndLocalVarInConstructor.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var _super = 10; // No Error var Foo = (function () { function Foo() { diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js b/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js index e63bf4d9ac5e1..028ce3ae4a98f 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js +++ b/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js @@ -19,15 +19,16 @@ class c extends Foo { } //// [collisionSuperAndLocalVarInMethod.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var _super = 10; // No Error var Foo = (function () { function Foo() { diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js b/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js index 48b1298a5457e..c8ed5fc9d8f4b 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js +++ b/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js @@ -18,15 +18,16 @@ class b extends Foo { } //// [collisionSuperAndLocalVarInProperty.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var _super = 10; // No Error var Foo = (function () { function Foo() { diff --git a/tests/baselines/reference/collisionSuperAndNameResolution.js b/tests/baselines/reference/collisionSuperAndNameResolution.js index 6c8f5a8fe3491..2c0316dc66b8c 100644 --- a/tests/baselines/reference/collisionSuperAndNameResolution.js +++ b/tests/baselines/reference/collisionSuperAndNameResolution.js @@ -12,15 +12,16 @@ class Foo extends base { } //// [collisionSuperAndNameResolution.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var console; var _super = 10; // No error var base = (function () { diff --git a/tests/baselines/reference/collisionSuperAndParameter.js b/tests/baselines/reference/collisionSuperAndParameter.js index ccc2d90f5f310..ef86232c1f16c 100644 --- a/tests/baselines/reference/collisionSuperAndParameter.js +++ b/tests/baselines/reference/collisionSuperAndParameter.js @@ -63,15 +63,16 @@ class Foo4 extends Foo { } //// [collisionSuperAndParameter.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Foo = (function () { function Foo() { } diff --git a/tests/baselines/reference/collisionSuperAndParameter1.js b/tests/baselines/reference/collisionSuperAndParameter1.js index 554148becf8a3..d70f7da34e873 100644 --- a/tests/baselines/reference/collisionSuperAndParameter1.js +++ b/tests/baselines/reference/collisionSuperAndParameter1.js @@ -10,15 +10,16 @@ class Foo2 extends Foo { } //// [collisionSuperAndParameter1.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Foo = (function () { function Foo() { } diff --git a/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js b/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js index 211602b2c1471..919265f587efe 100644 --- a/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js +++ b/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js @@ -31,15 +31,16 @@ class b4 extends a { } //// [collisionSuperAndPropertyNameAsConstuctorParameter.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = (function () { function a() { } diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js b/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js index e80dc2b8ebbb2..f380d8dc4ba09 100644 --- a/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js +++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js @@ -19,15 +19,16 @@ class b2 extends a { } //// [collisionThisExpressionAndLocalVarWithSuperExperssion.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = (function () { function a() { } diff --git a/tests/baselines/reference/commentsInheritance.js b/tests/baselines/reference/commentsInheritance.js index cba27b5f2e8c3..e7feed00b6af7 100644 --- a/tests/baselines/reference/commentsInheritance.js +++ b/tests/baselines/reference/commentsInheritance.js @@ -152,15 +152,16 @@ i2_i = i3_i; //// [commentsInheritance.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var c1 = (function () { function c1() { } diff --git a/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.js b/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.js index afaf71ca9b2d5..15b82315972ad 100644 --- a/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.js +++ b/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.js @@ -195,15 +195,16 @@ var r8b6 = b5 !== a5; var r8b7 = b6 !== a6; //// [comparisonOperatorWithIdenticalObjects.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A1 = (function () { function A1() { } diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js index 236804898c343..7b541b2c304e2 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js @@ -169,15 +169,16 @@ var r8b6 = b6 !== a6; var r8b7 = b7 !== a7; //// [comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js index 0408116f8cfc5..9cf6be1f116e4 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js @@ -169,15 +169,16 @@ var r8b6 = b6 !== a6; var r8b7 = b7 !== a7; //// [comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js index 44fceec00045c..f0fe513de271a 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js @@ -112,15 +112,16 @@ var r8b3 = b3 !== a3; var r8b4 = b4 !== a4; //// [comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js index 641b75e8688b8..4b31f7403e191 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js @@ -150,15 +150,16 @@ var r8b5 = b5 !== a5; var r8b6 = b6 !== a6; //// [comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js index cc75533ef97c8..06472bc1527d6 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js @@ -150,15 +150,16 @@ var r8b5 = b5 !== a5; var r8b6 = b6 !== a6; //// [comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnCallSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnCallSignature.js index 5fa26a6446971..91fa37507bf85 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnCallSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnCallSignature.js @@ -260,15 +260,16 @@ var r8b11 = b11 !== a11; //var r8b12 = b12 !== a12; //// [comparisonOperatorWithSubtypeObjectOnCallSignature.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnConstructorSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnConstructorSignature.js index 0a9a731428d0a..2eb5c7de9e8e1 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnConstructorSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnConstructorSignature.js @@ -222,15 +222,16 @@ var r8b9 = b9 !== a9; //var r8b10 = b10 !== a10; //// [comparisonOperatorWithSubtypeObjectOnConstructorSignature.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnIndexSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnIndexSignature.js index 669202334b8ca..a5287dcb0af30 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnIndexSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnIndexSignature.js @@ -108,15 +108,16 @@ var r8b1 = b3 !== a3; var r8b1 = b4 !== a4; //// [comparisonOperatorWithSubtypeObjectOnIndexSignature.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js index 983d756c8c0cc..c34ed06252f37 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js @@ -165,15 +165,16 @@ var r8b6 = b6 !== a6; //var r8b7 = b7 !== a7; //// [comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js index f7cc1cd02c7c2..0056917d60d13 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js @@ -165,15 +165,16 @@ var r8b6 = b6 !== a6; //var r8b7 = b7 !== a7; //// [comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.js index f39f869018b77..73c2b62cd3a07 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.js @@ -79,15 +79,16 @@ var rh3 = b1 !== a1; var rh4 = b2 !== a2; //// [comparisonOperatorWithSubtypeObjectOnProperty.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/complexClassRelationships.js b/tests/baselines/reference/complexClassRelationships.js index fb481259bd3e2..bfbbbab2bc50a 100644 --- a/tests/baselines/reference/complexClassRelationships.js +++ b/tests/baselines/reference/complexClassRelationships.js @@ -48,15 +48,16 @@ class FooBase { } //// [complexClassRelationships.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); // There should be no errors in this file var Derived = (function (_super) { __extends(Derived, _super); diff --git a/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.js b/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.js index c63df9b0c9b49..187a4389261b2 100644 --- a/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.js +++ b/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.js @@ -6,15 +6,16 @@ class S18 extends S18 //// [complicatedGenericRecursiveBaseClassReference.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var S18 = (function (_super) { __extends(S18, _super); function S18() { diff --git a/tests/baselines/reference/compoundAssignmentLHSIsValue.js b/tests/baselines/reference/compoundAssignmentLHSIsValue.js index b918701f5a152..ec8610a11641f 100644 --- a/tests/baselines/reference/compoundAssignmentLHSIsValue.js +++ b/tests/baselines/reference/compoundAssignmentLHSIsValue.js @@ -124,15 +124,16 @@ foo() += value; (foo()) += value; //// [compoundAssignmentLHSIsValue.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); // expected error for all the LHS of compound assignments (arithmetic and addition) var value; // this diff --git a/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js b/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js index a4812a00cc62a..c7060a5120ddb 100644 --- a/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js +++ b/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js @@ -86,15 +86,16 @@ foo() **= value; (foo()) **= value; //// [compoundExponentiationAssignmentLHSIsValue.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); // expected error for all the LHS of compound assignments (arithmetic and addition) var value; // this diff --git a/tests/baselines/reference/computedPropertyNames24_ES5.js b/tests/baselines/reference/computedPropertyNames24_ES5.js index 8ac5c5be0b895..75c032d7f91f0 100644 --- a/tests/baselines/reference/computedPropertyNames24_ES5.js +++ b/tests/baselines/reference/computedPropertyNames24_ES5.js @@ -9,15 +9,16 @@ class C extends Base { } //// [computedPropertyNames24_ES5.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/computedPropertyNames25_ES5.js b/tests/baselines/reference/computedPropertyNames25_ES5.js index 12f3c1e301db4..a300b687f53bf 100644 --- a/tests/baselines/reference/computedPropertyNames25_ES5.js +++ b/tests/baselines/reference/computedPropertyNames25_ES5.js @@ -14,15 +14,16 @@ class C extends Base { } //// [computedPropertyNames25_ES5.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/computedPropertyNames26_ES5.js b/tests/baselines/reference/computedPropertyNames26_ES5.js index f4a9d79af0f51..16566ec14e786 100644 --- a/tests/baselines/reference/computedPropertyNames26_ES5.js +++ b/tests/baselines/reference/computedPropertyNames26_ES5.js @@ -11,15 +11,16 @@ class C extends Base { } //// [computedPropertyNames26_ES5.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/computedPropertyNames27_ES5.js b/tests/baselines/reference/computedPropertyNames27_ES5.js index 88319039ee627..a7d16a4d18ead 100644 --- a/tests/baselines/reference/computedPropertyNames27_ES5.js +++ b/tests/baselines/reference/computedPropertyNames27_ES5.js @@ -6,15 +6,16 @@ class C extends Base { } //// [computedPropertyNames27_ES5.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/computedPropertyNames28_ES5.js b/tests/baselines/reference/computedPropertyNames28_ES5.js index 696da70eb9312..5eb7b307b623f 100644 --- a/tests/baselines/reference/computedPropertyNames28_ES5.js +++ b/tests/baselines/reference/computedPropertyNames28_ES5.js @@ -11,15 +11,16 @@ class C extends Base { } //// [computedPropertyNames28_ES5.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/computedPropertyNames30_ES5.js b/tests/baselines/reference/computedPropertyNames30_ES5.js index 3b4c663602d24..44b748a0af2fe 100644 --- a/tests/baselines/reference/computedPropertyNames30_ES5.js +++ b/tests/baselines/reference/computedPropertyNames30_ES5.js @@ -16,15 +16,16 @@ class C extends Base { } //// [computedPropertyNames30_ES5.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/computedPropertyNames31_ES5.js b/tests/baselines/reference/computedPropertyNames31_ES5.js index a727f47860389..97f03e7192352 100644 --- a/tests/baselines/reference/computedPropertyNames31_ES5.js +++ b/tests/baselines/reference/computedPropertyNames31_ES5.js @@ -16,15 +16,16 @@ class C extends Base { } //// [computedPropertyNames31_ES5.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/computedPropertyNames43_ES5.js b/tests/baselines/reference/computedPropertyNames43_ES5.js index d2bde183b8bc8..100258284ba0e 100644 --- a/tests/baselines/reference/computedPropertyNames43_ES5.js +++ b/tests/baselines/reference/computedPropertyNames43_ES5.js @@ -13,15 +13,16 @@ class D extends C { } //// [computedPropertyNames43_ES5.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Foo = (function () { function Foo() { } diff --git a/tests/baselines/reference/computedPropertyNames44_ES5.js b/tests/baselines/reference/computedPropertyNames44_ES5.js index b39e2375cb583..6064411248d82 100644 --- a/tests/baselines/reference/computedPropertyNames44_ES5.js +++ b/tests/baselines/reference/computedPropertyNames44_ES5.js @@ -12,15 +12,16 @@ class D extends C { } //// [computedPropertyNames44_ES5.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Foo = (function () { function Foo() { } diff --git a/tests/baselines/reference/computedPropertyNames45_ES5.js b/tests/baselines/reference/computedPropertyNames45_ES5.js index a74e87bbfd5b5..d3b6ccc755276 100644 --- a/tests/baselines/reference/computedPropertyNames45_ES5.js +++ b/tests/baselines/reference/computedPropertyNames45_ES5.js @@ -13,15 +13,16 @@ class D extends C { } //// [computedPropertyNames45_ES5.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Foo = (function () { function Foo() { } diff --git a/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js b/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js index aa8b62c16e773..609c81f173dd0 100644 --- a/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js +++ b/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js @@ -48,15 +48,16 @@ var result11: any = true ? 1 : 'string'; //// [conditionalOperatorWithIdenticalBCT.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); //Cond ? Expr1 : Expr2, Expr1 and Expr2 have identical best common type var X = (function () { function X() { diff --git a/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js b/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js index 8f4f4b20a5671..df5c7aac44f01 100644 --- a/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js +++ b/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js @@ -24,15 +24,16 @@ var result61: (t: X) => number| string = true ? (m) => m.propertyX1 : (n) => n.p //// [conditionalOperatorWithoutIdenticalBCT.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); //Cond ? Expr1 : Expr2, Expr1 and Expr2 have no identical best common type var X = (function () { function X() { diff --git a/tests/baselines/reference/constantOverloadFunction.js b/tests/baselines/reference/constantOverloadFunction.js index 170f5ba5daed2..70effecc4986a 100644 --- a/tests/baselines/reference/constantOverloadFunction.js +++ b/tests/baselines/reference/constantOverloadFunction.js @@ -14,15 +14,16 @@ function foo(tagName: any): Base { //// [constantOverloadFunction.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js b/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js index e104a1f8e89ee..74e70d97bd94e 100644 --- a/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js +++ b/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js @@ -15,15 +15,16 @@ function foo(tagName: any): Base { //// [constantOverloadFunctionNoSubtypeError.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js b/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js index fddad13713661..49f93e2497ecd 100644 --- a/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js +++ b/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js @@ -20,15 +20,16 @@ class Container { } //// [constraintCheckInGenericBaseTypeReference.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); // No errors var Constraint = (function () { function Constraint() { diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.js index 06b273e9801cb..e2a884c458972 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.js @@ -71,15 +71,16 @@ interface I extends A { //// [constructSignatureAssignabilityInInheritance2.js] // checking subtype relations for function types as it relates to contextual signature instantiation -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.js index 6ca8645ee9e62..87392413b1b91 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.js @@ -114,15 +114,16 @@ module Errors { //// [constructSignatureAssignabilityInInheritance3.js] // checking subtype relations for function types as it relates to contextual signature instantiation // error cases -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Errors; (function (Errors) { var Base = (function () { diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance4.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance4.js index 41ad9ead84983..fb09253688dd7 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance4.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance4.js @@ -61,15 +61,16 @@ interface I extends A { //// [constructSignatureAssignabilityInInheritance4.js] // checking subtype relations for function types as it relates to contextual signature instantiation -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.js index cb5e254d6b26d..6ad855c7d32fc 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.js @@ -51,15 +51,16 @@ interface I extends B { //// [constructSignatureAssignabilityInInheritance5.js] // checking subtype relations for function types as it relates to contextual signature instantiation // same as subtypingWithConstructSignatures2 just with an extra level of indirection in the inheritance chain -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.js index b9389d26fc814..5e768b4a41b6c 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.js @@ -54,15 +54,16 @@ interface I9 extends A { // checking subtype relations for function types as it relates to contextual signature instantiation // same as subtypingWithConstructSignatures4 but using class type parameters instead of generic signatures // all are errors -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/constructorArgs.js b/tests/baselines/reference/constructorArgs.js index 5f5a3d7b5655a..47c508cab0681 100644 --- a/tests/baselines/reference/constructorArgs.js +++ b/tests/baselines/reference/constructorArgs.js @@ -16,15 +16,16 @@ class Sub extends Super { //// [constructorArgs.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Super = (function () { function Super(value) { } diff --git a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType.js b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType.js index 13e2317bb6fba..633a7a155c5fa 100644 --- a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType.js +++ b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType.js @@ -20,15 +20,16 @@ class Derived2 extends Base { } //// [constructorFunctionTypeIsAssignableToBaseType.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js index e8c04ace7ef39..07e11b5c681f1 100644 --- a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js +++ b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js @@ -34,15 +34,16 @@ class Derived2 extends Base { //// [constructorFunctionTypeIsAssignableToBaseType2.js] // the constructor function itself does not need to be a subtype of the base type constructor function -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base(x) { } diff --git a/tests/baselines/reference/constructorHasPrototypeProperty.js b/tests/baselines/reference/constructorHasPrototypeProperty.js index 76d260f780dcf..f2b90a571613b 100644 --- a/tests/baselines/reference/constructorHasPrototypeProperty.js +++ b/tests/baselines/reference/constructorHasPrototypeProperty.js @@ -32,15 +32,16 @@ module Generic { } //// [constructorHasPrototypeProperty.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var NonGeneric; (function (NonGeneric) { var C = (function () { diff --git a/tests/baselines/reference/constructorOverloads2.js b/tests/baselines/reference/constructorOverloads2.js index a3302dc70f910..67df7fb4e228a 100644 --- a/tests/baselines/reference/constructorOverloads2.js +++ b/tests/baselines/reference/constructorOverloads2.js @@ -26,15 +26,16 @@ f1.bar1(); //// [constructorOverloads2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var FooBase = (function () { function FooBase(x) { } diff --git a/tests/baselines/reference/constructorOverloads3.js b/tests/baselines/reference/constructorOverloads3.js index e202486ececff..79b648e0cbbf1 100644 --- a/tests/baselines/reference/constructorOverloads3.js +++ b/tests/baselines/reference/constructorOverloads3.js @@ -23,15 +23,16 @@ f1.bar1(); //// [constructorOverloads3.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Foo = (function (_super) { __extends(Foo, _super); function Foo(x, y) { diff --git a/tests/baselines/reference/constructorWithCapturedSuper.js b/tests/baselines/reference/constructorWithCapturedSuper.js index be129d5f1ec2e..2034ea11c4f94 100644 --- a/tests/baselines/reference/constructorWithCapturedSuper.js +++ b/tests/baselines/reference/constructorWithCapturedSuper.js @@ -53,15 +53,16 @@ class D extends A { } //// [constructorWithCapturedSuper.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var oneA; var A = (function () { function A() { diff --git a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js index 2f481a58bea6c..dbeed3de1fd0d 100644 --- a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js +++ b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js @@ -281,15 +281,16 @@ TypeScriptAllInOne.Program.Main(); //// [constructorWithIncompleteTypeAnnotation.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var fs = module; ("fs"); var TypeScriptAllInOne; diff --git a/tests/baselines/reference/contextualTypingArrayOfLambdas.js b/tests/baselines/reference/contextualTypingArrayOfLambdas.js index 39cbbe78c0034..60cc6d9977154 100644 --- a/tests/baselines/reference/contextualTypingArrayOfLambdas.js +++ b/tests/baselines/reference/contextualTypingArrayOfLambdas.js @@ -15,15 +15,16 @@ var xs = [(x: A) => { }, (x: B) => { }, (x: C) => { }]; //// [contextualTypingArrayOfLambdas.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/contextualTypingOfConditionalExpression.js b/tests/baselines/reference/contextualTypingOfConditionalExpression.js index 0a6794472a155..063ae781b6fc3 100644 --- a/tests/baselines/reference/contextualTypingOfConditionalExpression.js +++ b/tests/baselines/reference/contextualTypingOfConditionalExpression.js @@ -15,15 +15,16 @@ var x2: (a: A) => void = true ? (a) => a.foo : (b) => b.foo; //// [contextualTypingOfConditionalExpression.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var x = true ? function (a) { return a.toExponential(); } : function (b) { return b.toFixed(); }; var A = (function () { function A() { diff --git a/tests/baselines/reference/contextualTypingOfConditionalExpression2.js b/tests/baselines/reference/contextualTypingOfConditionalExpression2.js index 7788ee4438201..c2bf66b2973c5 100644 --- a/tests/baselines/reference/contextualTypingOfConditionalExpression2.js +++ b/tests/baselines/reference/contextualTypingOfConditionalExpression2.js @@ -13,15 +13,16 @@ var x2: (a: A) => void = true ? (a: C) => a.foo : (b: number) => { }; //// [contextualTypingOfConditionalExpression2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.js b/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.js index 2e2bdd009d248..8c6de85ca93c2 100644 --- a/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.js +++ b/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.js @@ -11,15 +11,16 @@ var a: D = foo("hi", []); //// [crashInsourcePropertyIsRelatableToTargetProperty.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { this.x = 1; diff --git a/tests/baselines/reference/declFileClassExtendsNull.js b/tests/baselines/reference/declFileClassExtendsNull.js index d362a5f04d948..b5d473c86ce76 100644 --- a/tests/baselines/reference/declFileClassExtendsNull.js +++ b/tests/baselines/reference/declFileClassExtendsNull.js @@ -4,15 +4,16 @@ class ExtendsNull extends null { } //// [declFileClassExtendsNull.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var ExtendsNull = (function (_super) { __extends(ExtendsNull, _super); function ExtendsNull() { diff --git a/tests/baselines/reference/declFileForFunctionTypeAsTypeParameter.js b/tests/baselines/reference/declFileForFunctionTypeAsTypeParameter.js index f0805f9617faa..3262454f72db0 100644 --- a/tests/baselines/reference/declFileForFunctionTypeAsTypeParameter.js +++ b/tests/baselines/reference/declFileForFunctionTypeAsTypeParameter.js @@ -10,15 +10,16 @@ interface I extends X<() => number> { //// [declFileForFunctionTypeAsTypeParameter.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var X = (function () { function X() { } diff --git a/tests/baselines/reference/declFileGenericClassWithGenericExtendedClass.js b/tests/baselines/reference/declFileGenericClassWithGenericExtendedClass.js index c1be3af34e179..0333bf19d21c5 100644 --- a/tests/baselines/reference/declFileGenericClassWithGenericExtendedClass.js +++ b/tests/baselines/reference/declFileGenericClassWithGenericExtendedClass.js @@ -13,15 +13,16 @@ class Baz implements IBar { //// [declFileGenericClassWithGenericExtendedClass.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/declFileGenericType.js b/tests/baselines/reference/declFileGenericType.js index 402b19c0ff3ec..6946e840dbe84 100644 --- a/tests/baselines/reference/declFileGenericType.js +++ b/tests/baselines/reference/declFileGenericType.js @@ -41,15 +41,16 @@ export var j = C.F6; //// [declFileGenericType.js] "use strict"; -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C; (function (C) { var A = (function () { diff --git a/tests/baselines/reference/declFileGenericType2.js b/tests/baselines/reference/declFileGenericType2.js index 2d0bb3ce50099..1b9a79e95cb22 100644 --- a/tests/baselines/reference/declFileGenericType2.js +++ b/tests/baselines/reference/declFileGenericType2.js @@ -43,15 +43,16 @@ module templa.dom.mvc.composite { //// [declFileGenericType2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); // Module var templa; (function (templa) { diff --git a/tests/baselines/reference/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js b/tests/baselines/reference/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js index 65fee8c91e422..5edd9c8c19d3a 100644 --- a/tests/baselines/reference/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js +++ b/tests/baselines/reference/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js @@ -21,15 +21,16 @@ module X.Y.base.Z { //// [declFileWithClassNameConflictingWithClassReferredByExtendsClause.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var X; (function (X) { var Y; diff --git a/tests/baselines/reference/declFileWithExtendsClauseThatHasItsContainerNameConflict.js b/tests/baselines/reference/declFileWithExtendsClauseThatHasItsContainerNameConflict.js index 0a79b9be3bc72..07809bc8dec1a 100644 --- a/tests/baselines/reference/declFileWithExtendsClauseThatHasItsContainerNameConflict.js +++ b/tests/baselines/reference/declFileWithExtendsClauseThatHasItsContainerNameConflict.js @@ -19,15 +19,16 @@ module A.B.C { } //// [declFileWithExtendsClauseThatHasItsContainerNameConflict.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A; (function (A) { var B; diff --git a/tests/baselines/reference/declarationEmitExpressionInExtends.js b/tests/baselines/reference/declarationEmitExpressionInExtends.js index 4fb5b585c9992..e3ebe2d0a4243 100644 --- a/tests/baselines/reference/declarationEmitExpressionInExtends.js +++ b/tests/baselines/reference/declarationEmitExpressionInExtends.js @@ -15,15 +15,16 @@ var q: B; q.s; //// [declarationEmitExpressionInExtends.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var x; var Q = (function () { function Q() { diff --git a/tests/baselines/reference/declarationEmitExpressionInExtends2.js b/tests/baselines/reference/declarationEmitExpressionInExtends2.js index e059e44f1402b..284b0ca83cea1 100644 --- a/tests/baselines/reference/declarationEmitExpressionInExtends2.js +++ b/tests/baselines/reference/declarationEmitExpressionInExtends2.js @@ -13,15 +13,16 @@ class MyClass extends getClass(2) { } //// [declarationEmitExpressionInExtends2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/declarationEmitExpressionInExtends3.js b/tests/baselines/reference/declarationEmitExpressionInExtends3.js index 19d5952948668..41383d43d9e38 100644 --- a/tests/baselines/reference/declarationEmitExpressionInExtends3.js +++ b/tests/baselines/reference/declarationEmitExpressionInExtends3.js @@ -45,15 +45,16 @@ export class MyClass4 extends getExportedClass(undefined)>>var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { ->>> __extendStatics(d, b); ->>> function __() { this.constructor = d; } ->>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); ->>>}; +>>>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]; }; +>>> return function (d, b) { +>>> __extendStatics(d, b); +>>> function __() { this.constructor = d; } +>>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +>>> }; +>>>})(); >>>var C = (function () { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 1) Source(2, 1) + SourceIndex(0) +1 >Emitted(11, 1) Source(2, 1) + SourceIndex(0) --- >>> function C(value) { 1->^^^^ @@ -37,9 +38,9 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts > 2 > constructor( 3 > value: number -1->Emitted(11, 5) Source(7, 5) + SourceIndex(0) -2 >Emitted(11, 16) Source(7, 17) + SourceIndex(0) -3 >Emitted(11, 21) Source(7, 30) + SourceIndex(0) +1->Emitted(12, 5) Source(7, 5) + SourceIndex(0) +2 >Emitted(12, 16) Source(7, 17) + SourceIndex(0) +3 >Emitted(12, 21) Source(7, 30) + SourceIndex(0) --- >>> this.cProp = 10; 1->^^^^^^^^ @@ -52,11 +53,11 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 3 > = 4 > 10 5 > ; -1->Emitted(12, 9) Source(3, 5) + SourceIndex(0) -2 >Emitted(12, 19) Source(3, 10) + SourceIndex(0) -3 >Emitted(12, 22) Source(3, 13) + SourceIndex(0) -4 >Emitted(12, 24) Source(3, 15) + SourceIndex(0) -5 >Emitted(12, 25) Source(3, 16) + SourceIndex(0) +1->Emitted(13, 9) Source(3, 5) + SourceIndex(0) +2 >Emitted(13, 19) Source(3, 10) + SourceIndex(0) +3 >Emitted(13, 22) Source(3, 13) + SourceIndex(0) +4 >Emitted(13, 24) Source(3, 15) + SourceIndex(0) +5 >Emitted(13, 25) Source(3, 16) + SourceIndex(0) --- >>> return { 1 >^^^^^^^^ @@ -71,9 +72,9 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts > 2 > return 3 > -1 >Emitted(13, 9) Source(8, 9) + SourceIndex(0) -2 >Emitted(13, 15) Source(8, 15) + SourceIndex(0) -3 >Emitted(13, 16) Source(8, 16) + SourceIndex(0) +1 >Emitted(14, 9) Source(8, 9) + SourceIndex(0) +2 >Emitted(14, 15) Source(8, 15) + SourceIndex(0) +3 >Emitted(14, 16) Source(8, 16) + SourceIndex(0) --- >>> cProp: value, 1->^^^^^^^^^^^^ @@ -86,10 +87,10 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 2 > cProp 3 > : 4 > value -1->Emitted(14, 13) Source(9, 13) + SourceIndex(0) -2 >Emitted(14, 18) Source(9, 18) + SourceIndex(0) -3 >Emitted(14, 20) Source(9, 20) + SourceIndex(0) -4 >Emitted(14, 25) Source(9, 25) + SourceIndex(0) +1->Emitted(15, 13) Source(9, 13) + SourceIndex(0) +2 >Emitted(15, 18) Source(9, 18) + SourceIndex(0) +3 >Emitted(15, 20) Source(9, 20) + SourceIndex(0) +4 >Emitted(15, 25) Source(9, 25) + SourceIndex(0) --- >>> foo: function () { 1->^^^^^^^^^^^^ @@ -98,8 +99,8 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 1->, > 2 > foo -1->Emitted(15, 13) Source(10, 13) + SourceIndex(0) -2 >Emitted(15, 16) Source(10, 16) + SourceIndex(0) +1->Emitted(16, 13) Source(10, 13) + SourceIndex(0) +2 >Emitted(16, 16) Source(10, 16) + SourceIndex(0) --- >>> return "well this looks kinda C-ish."; 1->^^^^^^^^^^^^^^^^ @@ -113,11 +114,11 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 3 > 4 > "well this looks kinda C-ish." 5 > ; -1->Emitted(16, 17) Source(11, 17) + SourceIndex(0) -2 >Emitted(16, 23) Source(11, 23) + SourceIndex(0) -3 >Emitted(16, 24) Source(11, 24) + SourceIndex(0) -4 >Emitted(16, 54) Source(11, 54) + SourceIndex(0) -5 >Emitted(16, 55) Source(11, 55) + SourceIndex(0) +1->Emitted(17, 17) Source(11, 17) + SourceIndex(0) +2 >Emitted(17, 23) Source(11, 23) + SourceIndex(0) +3 >Emitted(17, 24) Source(11, 24) + SourceIndex(0) +4 >Emitted(17, 54) Source(11, 54) + SourceIndex(0) +5 >Emitted(17, 55) Source(11, 55) + SourceIndex(0) --- >>> } 1 >^^^^^^^^^^^^ @@ -125,8 +126,8 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 1 > > 2 > } -1 >Emitted(17, 13) Source(12, 13) + SourceIndex(0) -2 >Emitted(17, 14) Source(12, 14) + SourceIndex(0) +1 >Emitted(18, 13) Source(12, 13) + SourceIndex(0) +2 >Emitted(18, 14) Source(12, 14) + SourceIndex(0) --- >>> }; 1 >^^^^^^^^^ @@ -134,8 +135,8 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 1 > > } 2 > -1 >Emitted(18, 10) Source(13, 10) + SourceIndex(0) -2 >Emitted(18, 11) Source(13, 10) + SourceIndex(0) +1 >Emitted(19, 10) Source(13, 10) + SourceIndex(0) +2 >Emitted(19, 11) Source(13, 10) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -144,8 +145,8 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 1 > > 2 > } -1 >Emitted(19, 5) Source(14, 5) + SourceIndex(0) -2 >Emitted(19, 6) Source(14, 6) + SourceIndex(0) +1 >Emitted(20, 5) Source(14, 5) + SourceIndex(0) +2 >Emitted(20, 6) Source(14, 6) + SourceIndex(0) --- >>> C.prototype.foo = function () { return "this never gets used."; }; 1->^^^^ @@ -168,16 +169,16 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 8 > ; 9 > 10> } -1->Emitted(20, 5) Source(5, 5) + SourceIndex(0) -2 >Emitted(20, 20) Source(5, 8) + SourceIndex(0) -3 >Emitted(20, 23) Source(5, 5) + SourceIndex(0) -4 >Emitted(20, 37) Source(5, 13) + SourceIndex(0) -5 >Emitted(20, 43) Source(5, 19) + SourceIndex(0) -6 >Emitted(20, 44) Source(5, 20) + SourceIndex(0) -7 >Emitted(20, 67) Source(5, 43) + SourceIndex(0) -8 >Emitted(20, 68) Source(5, 44) + SourceIndex(0) -9 >Emitted(20, 69) Source(5, 45) + SourceIndex(0) -10>Emitted(20, 70) Source(5, 46) + SourceIndex(0) +1->Emitted(21, 5) Source(5, 5) + SourceIndex(0) +2 >Emitted(21, 20) Source(5, 8) + SourceIndex(0) +3 >Emitted(21, 23) Source(5, 5) + SourceIndex(0) +4 >Emitted(21, 37) Source(5, 13) + SourceIndex(0) +5 >Emitted(21, 43) Source(5, 19) + SourceIndex(0) +6 >Emitted(21, 44) Source(5, 20) + SourceIndex(0) +7 >Emitted(21, 67) Source(5, 43) + SourceIndex(0) +8 >Emitted(21, 68) Source(5, 44) + SourceIndex(0) +9 >Emitted(21, 69) Source(5, 45) + SourceIndex(0) +10>Emitted(21, 70) Source(5, 46) + SourceIndex(0) --- >>> return C; 1 >^^^^ @@ -194,8 +195,8 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts > } > 2 > } -1 >Emitted(21, 5) Source(15, 1) + SourceIndex(0) -2 >Emitted(21, 13) Source(15, 2) + SourceIndex(0) +1 >Emitted(22, 5) Source(15, 1) + SourceIndex(0) +2 >Emitted(22, 13) Source(15, 2) + SourceIndex(0) --- >>>}()); 1 > @@ -220,10 +221,10 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts > } > } > } -1 >Emitted(22, 1) Source(15, 1) + SourceIndex(0) -2 >Emitted(22, 2) Source(15, 2) + SourceIndex(0) -3 >Emitted(22, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(22, 6) Source(15, 2) + SourceIndex(0) +1 >Emitted(23, 1) Source(15, 1) + SourceIndex(0) +2 >Emitted(23, 2) Source(15, 2) + SourceIndex(0) +3 >Emitted(23, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(23, 6) Source(15, 2) + SourceIndex(0) --- >>>var D = (function (_super) { 1-> @@ -231,15 +232,15 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 1-> > > -1->Emitted(23, 1) Source(17, 1) + SourceIndex(0) +1->Emitted(24, 1) Source(17, 1) + SourceIndex(0) --- >>> __extends(D, _super); 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^ 1->class D extends 2 > C -1->Emitted(24, 5) Source(17, 17) + SourceIndex(0) -2 >Emitted(24, 26) Source(17, 18) + SourceIndex(0) +1->Emitted(25, 5) Source(17, 17) + SourceIndex(0) +2 >Emitted(25, 26) Source(17, 18) + SourceIndex(0) --- >>> function D(a) { 1 >^^^^ @@ -252,9 +253,9 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts > 2 > constructor( 3 > a = 100 -1 >Emitted(25, 5) Source(20, 5) + SourceIndex(0) -2 >Emitted(25, 16) Source(20, 17) + SourceIndex(0) -3 >Emitted(25, 17) Source(20, 24) + SourceIndex(0) +1 >Emitted(26, 5) Source(20, 5) + SourceIndex(0) +2 >Emitted(26, 16) Source(20, 17) + SourceIndex(0) +3 >Emitted(26, 17) Source(20, 24) + SourceIndex(0) --- >>> if (a === void 0) { a = 100; } 1->^^^^^^^^ @@ -266,10 +267,10 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 2 > 3 > 4 > a = 100 -1->Emitted(26, 9) Source(20, 17) + SourceIndex(0) -2 >Emitted(26, 27) Source(20, 17) + SourceIndex(0) -3 >Emitted(26, 29) Source(20, 17) + SourceIndex(0) -4 >Emitted(26, 36) Source(20, 24) + SourceIndex(0) +1->Emitted(27, 9) Source(20, 17) + SourceIndex(0) +2 >Emitted(27, 27) Source(20, 17) + SourceIndex(0) +3 >Emitted(27, 29) Source(20, 17) + SourceIndex(0) +4 >Emitted(27, 36) Source(20, 24) + SourceIndex(0) --- >>> var _this = _super.call(this, a) || this; 1->^^^^^^^^ @@ -298,12 +299,12 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts > else > return null; > } -1->Emitted(27, 9) Source(20, 5) + SourceIndex(0) -2 >Emitted(27, 21) Source(21, 9) + SourceIndex(0) -3 >Emitted(27, 39) Source(21, 15) + SourceIndex(0) -4 >Emitted(27, 40) Source(21, 16) + SourceIndex(0) -5 >Emitted(27, 41) Source(21, 17) + SourceIndex(0) -6 >Emitted(27, 50) Source(33, 6) + SourceIndex(0) +1->Emitted(28, 9) Source(20, 5) + SourceIndex(0) +2 >Emitted(28, 21) Source(21, 9) + SourceIndex(0) +3 >Emitted(28, 39) Source(21, 15) + SourceIndex(0) +4 >Emitted(28, 40) Source(21, 16) + SourceIndex(0) +5 >Emitted(28, 41) Source(21, 17) + SourceIndex(0) +6 >Emitted(28, 50) Source(33, 6) + SourceIndex(0) --- >>> _this.dProp = function () { return _this; }; 1->^^^^^^^^ @@ -324,15 +325,15 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 7 > 8 > this 9 > ; -1->Emitted(28, 9) Source(18, 5) + SourceIndex(0) -2 >Emitted(28, 20) Source(18, 10) + SourceIndex(0) -3 >Emitted(28, 23) Source(18, 13) + SourceIndex(0) -4 >Emitted(28, 37) Source(18, 19) + SourceIndex(0) -5 >Emitted(28, 44) Source(18, 19) + SourceIndex(0) -6 >Emitted(28, 49) Source(18, 23) + SourceIndex(0) -7 >Emitted(28, 51) Source(18, 19) + SourceIndex(0) -8 >Emitted(28, 52) Source(18, 23) + SourceIndex(0) -9 >Emitted(28, 53) Source(18, 24) + SourceIndex(0) +1->Emitted(29, 9) Source(18, 5) + SourceIndex(0) +2 >Emitted(29, 20) Source(18, 10) + SourceIndex(0) +3 >Emitted(29, 23) Source(18, 13) + SourceIndex(0) +4 >Emitted(29, 37) Source(18, 19) + SourceIndex(0) +5 >Emitted(29, 44) Source(18, 19) + SourceIndex(0) +6 >Emitted(29, 49) Source(18, 23) + SourceIndex(0) +7 >Emitted(29, 51) Source(18, 19) + SourceIndex(0) +8 >Emitted(29, 52) Source(18, 23) + SourceIndex(0) +9 >Emitted(29, 53) Source(18, 24) + SourceIndex(0) --- >>> if (Math.random() < 0.5) { 1 >^^^^^^^^ @@ -366,19 +367,19 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 11> ) 12> 13> { -1 >Emitted(29, 9) Source(23, 9) + SourceIndex(0) -2 >Emitted(29, 11) Source(23, 11) + SourceIndex(0) -3 >Emitted(29, 12) Source(23, 12) + SourceIndex(0) -4 >Emitted(29, 13) Source(23, 13) + SourceIndex(0) -5 >Emitted(29, 17) Source(23, 17) + SourceIndex(0) -6 >Emitted(29, 18) Source(23, 18) + SourceIndex(0) -7 >Emitted(29, 24) Source(23, 24) + SourceIndex(0) -8 >Emitted(29, 26) Source(23, 26) + SourceIndex(0) -9 >Emitted(29, 29) Source(23, 29) + SourceIndex(0) -10>Emitted(29, 32) Source(23, 32) + SourceIndex(0) -11>Emitted(29, 33) Source(23, 33) + SourceIndex(0) -12>Emitted(29, 34) Source(23, 34) + SourceIndex(0) -13>Emitted(29, 35) Source(23, 35) + SourceIndex(0) +1 >Emitted(30, 9) Source(23, 9) + SourceIndex(0) +2 >Emitted(30, 11) Source(23, 11) + SourceIndex(0) +3 >Emitted(30, 12) Source(23, 12) + SourceIndex(0) +4 >Emitted(30, 13) Source(23, 13) + SourceIndex(0) +5 >Emitted(30, 17) Source(23, 17) + SourceIndex(0) +6 >Emitted(30, 18) Source(23, 18) + SourceIndex(0) +7 >Emitted(30, 24) Source(23, 24) + SourceIndex(0) +8 >Emitted(30, 26) Source(23, 26) + SourceIndex(0) +9 >Emitted(30, 29) Source(23, 29) + SourceIndex(0) +10>Emitted(30, 32) Source(23, 32) + SourceIndex(0) +11>Emitted(30, 33) Source(23, 33) + SourceIndex(0) +12>Emitted(30, 34) Source(23, 34) + SourceIndex(0) +13>Emitted(30, 35) Source(23, 35) + SourceIndex(0) --- >>> "You win!"; 1 >^^^^^^^^^^^^ @@ -388,9 +389,9 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts > 2 > "You win!" 3 > -1 >Emitted(30, 13) Source(24, 13) + SourceIndex(0) -2 >Emitted(30, 23) Source(24, 23) + SourceIndex(0) -3 >Emitted(30, 24) Source(24, 23) + SourceIndex(0) +1 >Emitted(31, 13) Source(24, 13) + SourceIndex(0) +2 >Emitted(31, 23) Source(24, 23) + SourceIndex(0) +3 >Emitted(31, 24) Source(24, 23) + SourceIndex(0) --- >>> return { 1 >^^^^^^^^^^^^ @@ -401,9 +402,9 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts > 2 > return 3 > -1 >Emitted(31, 13) Source(25, 13) + SourceIndex(0) -2 >Emitted(31, 19) Source(25, 19) + SourceIndex(0) -3 >Emitted(31, 20) Source(25, 20) + SourceIndex(0) +1 >Emitted(32, 13) Source(25, 13) + SourceIndex(0) +2 >Emitted(32, 19) Source(25, 19) + SourceIndex(0) +3 >Emitted(32, 20) Source(25, 20) + SourceIndex(0) --- >>> cProp: 1, 1->^^^^^^^^^^^^^^^^ @@ -416,10 +417,10 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 2 > cProp 3 > : 4 > 1 -1->Emitted(32, 17) Source(26, 17) + SourceIndex(0) -2 >Emitted(32, 22) Source(26, 22) + SourceIndex(0) -3 >Emitted(32, 24) Source(26, 24) + SourceIndex(0) -4 >Emitted(32, 25) Source(26, 25) + SourceIndex(0) +1->Emitted(33, 17) Source(26, 17) + SourceIndex(0) +2 >Emitted(33, 22) Source(26, 22) + SourceIndex(0) +3 >Emitted(33, 24) Source(26, 24) + SourceIndex(0) +4 >Emitted(33, 25) Source(26, 25) + SourceIndex(0) --- >>> dProp: function () { return _this; }, 1->^^^^^^^^^^^^^^^^ @@ -440,14 +441,14 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 6 > this 7 > 8 > this -1->Emitted(33, 17) Source(27, 17) + SourceIndex(0) -2 >Emitted(33, 22) Source(27, 22) + SourceIndex(0) -3 >Emitted(33, 24) Source(27, 24) + SourceIndex(0) -4 >Emitted(33, 38) Source(27, 30) + SourceIndex(0) -5 >Emitted(33, 45) Source(27, 30) + SourceIndex(0) -6 >Emitted(33, 50) Source(27, 34) + SourceIndex(0) -7 >Emitted(33, 52) Source(27, 30) + SourceIndex(0) -8 >Emitted(33, 53) Source(27, 34) + SourceIndex(0) +1->Emitted(34, 17) Source(27, 17) + SourceIndex(0) +2 >Emitted(34, 22) Source(27, 22) + SourceIndex(0) +3 >Emitted(34, 24) Source(27, 24) + SourceIndex(0) +4 >Emitted(34, 38) Source(27, 30) + SourceIndex(0) +5 >Emitted(34, 45) Source(27, 30) + SourceIndex(0) +6 >Emitted(34, 50) Source(27, 34) + SourceIndex(0) +7 >Emitted(34, 52) Source(27, 30) + SourceIndex(0) +8 >Emitted(34, 53) Source(27, 34) + SourceIndex(0) --- >>> foo: function () { return "You win!!!!!"; } 1->^^^^^^^^^^^^^^^^ @@ -469,15 +470,15 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 7 > 8 > 9 > } -1->Emitted(34, 17) Source(28, 17) + SourceIndex(0) -2 >Emitted(34, 20) Source(28, 20) + SourceIndex(0) -3 >Emitted(34, 36) Source(28, 25) + SourceIndex(0) -4 >Emitted(34, 42) Source(28, 31) + SourceIndex(0) -5 >Emitted(34, 43) Source(28, 32) + SourceIndex(0) -6 >Emitted(34, 57) Source(28, 46) + SourceIndex(0) -7 >Emitted(34, 58) Source(28, 46) + SourceIndex(0) -8 >Emitted(34, 59) Source(28, 47) + SourceIndex(0) -9 >Emitted(34, 60) Source(28, 48) + SourceIndex(0) +1->Emitted(35, 17) Source(28, 17) + SourceIndex(0) +2 >Emitted(35, 20) Source(28, 20) + SourceIndex(0) +3 >Emitted(35, 36) Source(28, 25) + SourceIndex(0) +4 >Emitted(35, 42) Source(28, 31) + SourceIndex(0) +5 >Emitted(35, 43) Source(28, 32) + SourceIndex(0) +6 >Emitted(35, 57) Source(28, 46) + SourceIndex(0) +7 >Emitted(35, 58) Source(28, 46) + SourceIndex(0) +8 >Emitted(35, 59) Source(28, 47) + SourceIndex(0) +9 >Emitted(35, 60) Source(28, 48) + SourceIndex(0) --- >>> }; 1 >^^^^^^^^^^^^^ @@ -485,8 +486,8 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 1 > > } 2 > ; -1 >Emitted(35, 14) Source(29, 14) + SourceIndex(0) -2 >Emitted(35, 15) Source(29, 15) + SourceIndex(0) +1 >Emitted(36, 14) Source(29, 14) + SourceIndex(0) +2 >Emitted(36, 15) Source(29, 15) + SourceIndex(0) --- >>> } 1 >^^^^^^^^ @@ -495,8 +496,8 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 1 > > 2 > } -1 >Emitted(36, 9) Source(30, 9) + SourceIndex(0) -2 >Emitted(36, 10) Source(30, 10) + SourceIndex(0) +1 >Emitted(37, 9) Source(30, 9) + SourceIndex(0) +2 >Emitted(37, 10) Source(30, 10) + SourceIndex(0) --- >>> else 1->^^^^^^^^ @@ -505,8 +506,8 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 1-> > 2 > else -1->Emitted(37, 9) Source(31, 9) + SourceIndex(0) -2 >Emitted(37, 13) Source(31, 13) + SourceIndex(0) +1->Emitted(38, 9) Source(31, 9) + SourceIndex(0) +2 >Emitted(38, 13) Source(31, 13) + SourceIndex(0) --- >>> return null; 1->^^^^^^^^^^^^ @@ -520,11 +521,11 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 3 > 4 > null 5 > ; -1->Emitted(38, 13) Source(32, 13) + SourceIndex(0) -2 >Emitted(38, 19) Source(32, 19) + SourceIndex(0) -3 >Emitted(38, 20) Source(32, 20) + SourceIndex(0) -4 >Emitted(38, 24) Source(32, 24) + SourceIndex(0) -5 >Emitted(38, 25) Source(32, 25) + SourceIndex(0) +1->Emitted(39, 13) Source(32, 13) + SourceIndex(0) +2 >Emitted(39, 19) Source(32, 19) + SourceIndex(0) +3 >Emitted(39, 20) Source(32, 20) + SourceIndex(0) +4 >Emitted(39, 24) Source(32, 24) + SourceIndex(0) +5 >Emitted(39, 25) Source(32, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -533,8 +534,8 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 1 > > 2 > } -1 >Emitted(39, 5) Source(33, 5) + SourceIndex(0) -2 >Emitted(39, 6) Source(33, 6) + SourceIndex(0) +1 >Emitted(40, 5) Source(33, 5) + SourceIndex(0) +2 >Emitted(40, 6) Source(33, 6) + SourceIndex(0) --- >>> return D; 1->^^^^ @@ -542,8 +543,8 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 1-> > 2 > } -1->Emitted(40, 5) Source(34, 1) + SourceIndex(0) -2 >Emitted(40, 13) Source(34, 2) + SourceIndex(0) +1->Emitted(41, 5) Source(34, 1) + SourceIndex(0) +2 >Emitted(41, 13) Source(34, 2) + SourceIndex(0) --- >>>}(C)); 1 > @@ -576,11 +577,11 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts > return null; > } > } -1 >Emitted(41, 1) Source(34, 1) + SourceIndex(0) -2 >Emitted(41, 2) Source(34, 2) + SourceIndex(0) -3 >Emitted(41, 2) Source(17, 1) + SourceIndex(0) -4 >Emitted(41, 3) Source(17, 17) + SourceIndex(0) -5 >Emitted(41, 4) Source(17, 18) + SourceIndex(0) -6 >Emitted(41, 7) Source(34, 2) + SourceIndex(0) +1 >Emitted(42, 1) Source(34, 1) + SourceIndex(0) +2 >Emitted(42, 2) Source(34, 2) + SourceIndex(0) +3 >Emitted(42, 2) Source(17, 1) + SourceIndex(0) +4 >Emitted(42, 3) Source(17, 17) + SourceIndex(0) +5 >Emitted(42, 4) Source(17, 18) + SourceIndex(0) +6 >Emitted(42, 7) Source(34, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=derivedClassConstructorWithExplicitReturns01.js.map \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js b/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js index f92b9ab7c99ca..9c295b584adf6 100644 --- a/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js +++ b/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js @@ -34,15 +34,16 @@ class Derived4 extends Base2 { //// [derivedClassConstructorWithoutSuperCall.js] // derived class constructors must contain a super call -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.js b/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.js index 2fa9323295a2e..bb9fcbc19523c 100644 --- a/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.js +++ b/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.js @@ -15,15 +15,16 @@ class Derived extends Base { } //// [derivedClassFunctionOverridesBaseClassAccessor.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/derivedClassIncludesInheritedMembers.js b/tests/baselines/reference/derivedClassIncludesInheritedMembers.js index 3fe81a587af5f..10cad78a322d1 100644 --- a/tests/baselines/reference/derivedClassIncludesInheritedMembers.js +++ b/tests/baselines/reference/derivedClassIncludesInheritedMembers.js @@ -41,15 +41,16 @@ var r8 = d2[1]; //// [derivedClassIncludesInheritedMembers.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base(x) { } diff --git a/tests/baselines/reference/derivedClassOverridesIndexersWithAssignmentCompatibility.js b/tests/baselines/reference/derivedClassOverridesIndexersWithAssignmentCompatibility.js index da2abf23166d9..875270b57f382 100644 --- a/tests/baselines/reference/derivedClassOverridesIndexersWithAssignmentCompatibility.js +++ b/tests/baselines/reference/derivedClassOverridesIndexersWithAssignmentCompatibility.js @@ -18,15 +18,16 @@ class Derived2 extends Base2 { } //// [derivedClassOverridesIndexersWithAssignmentCompatibility.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/derivedClassOverridesPrivateFunction1.js b/tests/baselines/reference/derivedClassOverridesPrivateFunction1.js index 14549e8d9c470..cd04b7ede3712 100644 --- a/tests/baselines/reference/derivedClassOverridesPrivateFunction1.js +++ b/tests/baselines/reference/derivedClassOverridesPrivateFunction1.js @@ -16,15 +16,16 @@ class DerivedClass extends BaseClass { new DerivedClass(); //// [derivedClassOverridesPrivateFunction1.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var BaseClass = (function () { function BaseClass() { this._init(); diff --git a/tests/baselines/reference/derivedClassOverridesPrivates.js b/tests/baselines/reference/derivedClassOverridesPrivates.js index b88ce8d37ee94..9dc81e9b5ade9 100644 --- a/tests/baselines/reference/derivedClassOverridesPrivates.js +++ b/tests/baselines/reference/derivedClassOverridesPrivates.js @@ -16,15 +16,16 @@ class Derived2 extends Base2 { } //// [derivedClassOverridesPrivates.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers.js index d44fc6a483d59..2ae532f0c84ee 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers.js @@ -37,15 +37,16 @@ class Derived extends Base { //// [derivedClassOverridesProtectedMembers.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var x; var y; var Base = (function () { diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js index 8f8e913c82b77..0f321c1824133 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js @@ -64,15 +64,16 @@ var r8 = d2[1]; //// [derivedClassOverridesProtectedMembers2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var x; var y; var Base = (function () { diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js index 2825524d22478..014cea9753ea7 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js @@ -72,15 +72,16 @@ class Derived10 extends Base { } //// [derivedClassOverridesProtectedMembers3.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var x; var y; var Base = (function () { diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers4.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers4.js index 9d4c76a8384d6..5e4804b5bacdb 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers4.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers4.js @@ -15,15 +15,16 @@ class Derived2 extends Derived1 { } //// [derivedClassOverridesProtectedMembers4.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var x; var y; var Base = (function () { diff --git a/tests/baselines/reference/derivedClassOverridesPublicMembers.js b/tests/baselines/reference/derivedClassOverridesPublicMembers.js index 6390636e09f87..73d620ce2f55c 100644 --- a/tests/baselines/reference/derivedClassOverridesPublicMembers.js +++ b/tests/baselines/reference/derivedClassOverridesPublicMembers.js @@ -63,15 +63,16 @@ var r8 = d2[1]; //// [derivedClassOverridesPublicMembers.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var x; var y; var Base = (function () { diff --git a/tests/baselines/reference/derivedClassOverridesWithoutSubtype.js b/tests/baselines/reference/derivedClassOverridesWithoutSubtype.js index 3ce6c5d196645..81fda59ae7844 100644 --- a/tests/baselines/reference/derivedClassOverridesWithoutSubtype.js +++ b/tests/baselines/reference/derivedClassOverridesWithoutSubtype.js @@ -24,15 +24,16 @@ class Derived2 extends Base2 { } //// [derivedClassOverridesWithoutSubtype.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/derivedClassParameterProperties.js b/tests/baselines/reference/derivedClassParameterProperties.js index 340aa0f570939..26bf27bd023c4 100644 --- a/tests/baselines/reference/derivedClassParameterProperties.js +++ b/tests/baselines/reference/derivedClassParameterProperties.js @@ -96,15 +96,16 @@ class Derived10 extends Base2 { //// [derivedClassParameterProperties.js] // ordering of super calls in derived constructors matters depending on other class contents -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js b/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js index 7238b7d1af300..5c29ea9ed89fa 100644 --- a/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js +++ b/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js @@ -33,15 +33,16 @@ class Derived extends Base { //// [derivedClassSuperCallsInNonConstructorMembers.js] // error to use super calls outside a constructor -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js b/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js index 6a79fd2d2a2be..bce8697a7e83b 100644 --- a/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js +++ b/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js @@ -29,15 +29,16 @@ class Derived4 extends Base { } //// [derivedClassSuperCallsWithThisArg.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base(a) { } diff --git a/tests/baselines/reference/derivedClassTransitivity.js b/tests/baselines/reference/derivedClassTransitivity.js index b6cd5a284e460..997d25693a698 100644 --- a/tests/baselines/reference/derivedClassTransitivity.js +++ b/tests/baselines/reference/derivedClassTransitivity.js @@ -22,15 +22,16 @@ var r2 = e.foo(''); //// [derivedClassTransitivity.js] // subclassing is not transitive when you can remove required parameters and add optional parameters -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/derivedClassTransitivity2.js b/tests/baselines/reference/derivedClassTransitivity2.js index 05648a0050736..c1304ad5242ec 100644 --- a/tests/baselines/reference/derivedClassTransitivity2.js +++ b/tests/baselines/reference/derivedClassTransitivity2.js @@ -22,15 +22,16 @@ var r2 = e.foo(1, ''); //// [derivedClassTransitivity2.js] // subclassing is not transitive when you can remove required parameters and add optional parameters -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/derivedClassTransitivity3.js b/tests/baselines/reference/derivedClassTransitivity3.js index a280316b63920..264616cea7f00 100644 --- a/tests/baselines/reference/derivedClassTransitivity3.js +++ b/tests/baselines/reference/derivedClassTransitivity3.js @@ -22,15 +22,16 @@ var r2 = e.foo('', 1); //// [derivedClassTransitivity3.js] // subclassing is not transitive when you can remove required parameters and add optional parameters -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/derivedClassTransitivity4.js b/tests/baselines/reference/derivedClassTransitivity4.js index 2d32ece137529..63a78e3d3b630 100644 --- a/tests/baselines/reference/derivedClassTransitivity4.js +++ b/tests/baselines/reference/derivedClassTransitivity4.js @@ -22,15 +22,16 @@ var r2 = e.foo(''); //// [derivedClassTransitivity4.js] // subclassing is not transitive when you can remove required parameters and add optional parameters on protected members -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/derivedClassWithAny.js b/tests/baselines/reference/derivedClassWithAny.js index 64b6a1c995a58..01d7c130f94ef 100644 --- a/tests/baselines/reference/derivedClassWithAny.js +++ b/tests/baselines/reference/derivedClassWithAny.js @@ -60,15 +60,16 @@ var r = c.foo(); // e.foo would return string //// [derivedClassWithAny.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js index 6c9ff2f36e7b8..1b8cca7a0a811 100644 --- a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js +++ b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js @@ -23,15 +23,16 @@ class Derived extends Base { //// [derivedClassWithPrivateInstanceShadowingProtectedInstance.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js index 924526923f8d3..e2ecad8be4b52 100644 --- a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js +++ b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js @@ -33,15 +33,16 @@ var r6 = Derived.a; // error Derived.a = 2; // error //// [derivedClassWithPrivateInstanceShadowingPublicInstance.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js index 9705b1e8d038f..26095ed66287e 100644 --- a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js +++ b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js @@ -22,15 +22,16 @@ class Derived extends Base { } //// [derivedClassWithPrivateStaticShadowingProtectedStatic.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js index dd15ec7e66dcf..f01edcc8a3ab9 100644 --- a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js +++ b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js @@ -34,15 +34,16 @@ var r6 = Derived.a; // error Derived.a = 2; // error //// [derivedClassWithPrivateStaticShadowingPublicStatic.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js b/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js index 7a145b763c08c..d3ce1f3cdbfe1 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js @@ -26,15 +26,16 @@ var d = new D(); // error var d2 = new D(new Date()); // ok //// [derivedClassWithoutExplicitConstructor.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base(x) { this.a = 1; diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js b/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js index 29cb878de4689..c15ac71c5735e 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js @@ -34,15 +34,16 @@ var d3 = new D(new Date(), new Date()); var d4 = new D(new Date(), new Date(), new Date()); //// [derivedClassWithoutExplicitConstructor2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base(x) { this.a = 1; diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js b/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js index 79d26767df63a..fe02d135c2413 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js @@ -48,15 +48,16 @@ var d3 = new D2(new Date(), new Date()); // ok //// [derivedClassWithoutExplicitConstructor3.js] // automatic constructors with a class hieararchy of depth > 2 -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base(x) { this.a = 1; diff --git a/tests/baselines/reference/derivedClasses.js b/tests/baselines/reference/derivedClasses.js index 38af357d6c3f2..f310c0e5fd214 100644 --- a/tests/baselines/reference/derivedClasses.js +++ b/tests/baselines/reference/derivedClasses.js @@ -31,15 +31,16 @@ b.hue(); //// [derivedClasses.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Red = (function (_super) { __extends(Red, _super); function Red() { diff --git a/tests/baselines/reference/derivedGenericClassWithAny.js b/tests/baselines/reference/derivedGenericClassWithAny.js index 6644fefcac4ea..abd8954fe2258 100644 --- a/tests/baselines/reference/derivedGenericClassWithAny.js +++ b/tests/baselines/reference/derivedGenericClassWithAny.js @@ -43,15 +43,16 @@ c = e; var r = c.foo(); // e.foo would return string //// [derivedGenericClassWithAny.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js b/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js index 91224f98a5d5d..b32d0a79d6bbd 100644 --- a/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js +++ b/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js @@ -18,15 +18,16 @@ class Derived extends Base { } //// [derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js b/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js index 926ca09274d66..b5ef2f8109943 100644 --- a/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js +++ b/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js @@ -21,15 +21,16 @@ b = d2; var r: Base[] = [d1, d2]; //// [derivedTypeDoesNotRequireExtendsClause.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/destructuringParameterDeclaration5.js b/tests/baselines/reference/destructuringParameterDeclaration5.js index 831cf209995fc..a00fc2489395e 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration5.js +++ b/tests/baselines/reference/destructuringParameterDeclaration5.js @@ -52,15 +52,16 @@ d3({ y: "world" }); //// [destructuringParameterDeclaration5.js] // Parameter Declaration with generic -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Class = (function () { function Class() { } diff --git a/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js b/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js index 79babde83e272..325a15007c8b4 100644 --- a/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js +++ b/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js @@ -14,15 +14,16 @@ class B extends A { //// [emitSuperCallBeforeEmitParameterPropertyDeclaration1.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { this.blub = 6; diff --git a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js index d798856231550..2d97d0a986510 100644 --- a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js +++ b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js @@ -16,15 +16,16 @@ class B extends A { } //// [emitSuperCallBeforeEmitPropertyDeclaration1.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { this.blub = 6; diff --git a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js index fdec4c4e7be27..63de121ed4d20 100644 --- a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js +++ b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js @@ -14,15 +14,16 @@ class B extends A { } //// [emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { this.blub = 6; diff --git a/tests/baselines/reference/emitThisInSuperMethodCall.js b/tests/baselines/reference/emitThisInSuperMethodCall.js index c87ad7d418914..5488e3aa00571 100644 --- a/tests/baselines/reference/emitThisInSuperMethodCall.js +++ b/tests/baselines/reference/emitThisInSuperMethodCall.js @@ -28,15 +28,16 @@ class RegisteredUser extends User { //// [emitThisInSuperMethodCall.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var User = (function () { function User() { } diff --git a/tests/baselines/reference/emptyModuleName.js b/tests/baselines/reference/emptyModuleName.js index e4ad120250f7a..16493baae98b1 100644 --- a/tests/baselines/reference/emptyModuleName.js +++ b/tests/baselines/reference/emptyModuleName.js @@ -5,15 +5,16 @@ class B extends A { //// [emptyModuleName.js] "use strict"; -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = require(""); var B = (function (_super) { __extends(B, _super); diff --git a/tests/baselines/reference/errorForwardReferenceForwadingConstructor.js b/tests/baselines/reference/errorForwardReferenceForwadingConstructor.js index 851a97663de70..98eb91ce417ce 100644 --- a/tests/baselines/reference/errorForwardReferenceForwadingConstructor.js +++ b/tests/baselines/reference/errorForwardReferenceForwadingConstructor.js @@ -12,15 +12,16 @@ class derived extends base { } //// [errorForwardReferenceForwadingConstructor.js] // Error forward referencing derived class with forwarding constructor -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); function f() { var d1 = new derived(); var d2 = new derived(4); diff --git a/tests/baselines/reference/errorSuperCalls.js b/tests/baselines/reference/errorSuperCalls.js index 43d89076ade01..6c7a1441b05fd 100644 --- a/tests/baselines/reference/errorSuperCalls.js +++ b/tests/baselines/reference/errorSuperCalls.js @@ -75,15 +75,16 @@ class OtherDerived extends OtherBase { //// [errorSuperCalls.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); //super call in class constructor with no base type var NoBase = (function () { function NoBase() { diff --git a/tests/baselines/reference/errorSuperPropertyAccess.js b/tests/baselines/reference/errorSuperPropertyAccess.js index 42a2acf431705..70d777644c60e 100644 --- a/tests/baselines/reference/errorSuperPropertyAccess.js +++ b/tests/baselines/reference/errorSuperPropertyAccess.js @@ -129,15 +129,16 @@ var obj = { n: super.wat, p: super.foo() }; //// [errorSuperPropertyAccess.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); //super property access in constructor of class with no base type //super property access in instance member function of class with no base type //super property access in instance member accessor(get and set) of class with no base type diff --git a/tests/baselines/reference/errorsInGenericTypeReference.js b/tests/baselines/reference/errorsInGenericTypeReference.js index 64227abe6b253..d7797d7e35048 100644 --- a/tests/baselines/reference/errorsInGenericTypeReference.js +++ b/tests/baselines/reference/errorsInGenericTypeReference.js @@ -73,15 +73,16 @@ interface testInterface2 { //// [errorsInGenericTypeReference.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Foo = (function () { function Foo() { } diff --git a/tests/baselines/reference/es6ClassSuperCodegenBug.js b/tests/baselines/reference/es6ClassSuperCodegenBug.js index 68fa43fd64b54..c958470d077b9 100644 --- a/tests/baselines/reference/es6ClassSuperCodegenBug.js +++ b/tests/baselines/reference/es6ClassSuperCodegenBug.js @@ -15,15 +15,16 @@ class B extends A { //// [es6ClassSuperCodegenBug.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A(str1, str2) { } diff --git a/tests/baselines/reference/es6ClassTest.js b/tests/baselines/reference/es6ClassTest.js index e433f19ece344..6834e6139aa24 100644 --- a/tests/baselines/reference/es6ClassTest.js +++ b/tests/baselines/reference/es6ClassTest.js @@ -85,15 +85,16 @@ declare module AmbientMod { //// [es6ClassTest.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Bar = (function () { function Bar(n) { } diff --git a/tests/baselines/reference/es6ClassTest2.js b/tests/baselines/reference/es6ClassTest2.js index 491bec40e742e..c456f270d6ed9 100644 --- a/tests/baselines/reference/es6ClassTest2.js +++ b/tests/baselines/reference/es6ClassTest2.js @@ -159,15 +159,16 @@ var ccwc = new ChildClassWithoutConstructor(1, "s"); //// [es6ClassTest2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var BasicMonster = (function () { function BasicMonster(name, health) { this.name = name; diff --git a/tests/baselines/reference/es6ClassTest7.js b/tests/baselines/reference/es6ClassTest7.js index d8f7f688ec078..899ac4100eb66 100644 --- a/tests/baselines/reference/es6ClassTest7.js +++ b/tests/baselines/reference/es6ClassTest7.js @@ -9,15 +9,16 @@ class Bar extends M.Foo { //// [es6ClassTest7.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Bar = (function (_super) { __extends(Bar, _super); function Bar() { diff --git a/tests/baselines/reference/exportAssignmentOfGenericType1.js b/tests/baselines/reference/exportAssignmentOfGenericType1.js index 76485e8d91e5b..4be64d6774588 100644 --- a/tests/baselines/reference/exportAssignmentOfGenericType1.js +++ b/tests/baselines/reference/exportAssignmentOfGenericType1.js @@ -24,15 +24,16 @@ define(["require", "exports"], function (require, exports) { return T; }); //// [exportAssignmentOfGenericType1_1.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); define(["require", "exports", "exportAssignmentOfGenericType1_0"], function (require, exports, q) { "use strict"; var M = (function (_super) { diff --git a/tests/baselines/reference/exportDeclarationInInternalModule.js b/tests/baselines/reference/exportDeclarationInInternalModule.js index e83c10b59fd31..c9c593606217a 100644 --- a/tests/baselines/reference/exportDeclarationInInternalModule.js +++ b/tests/baselines/reference/exportDeclarationInInternalModule.js @@ -19,15 +19,16 @@ var a: Bbb.SomeType; //// [exportDeclarationInInternalModule.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Bbb = (function () { function Bbb() { } diff --git a/tests/baselines/reference/extBaseClass1.js b/tests/baselines/reference/extBaseClass1.js index f144fbdbca84b..c05c43c1d27db 100644 --- a/tests/baselines/reference/extBaseClass1.js +++ b/tests/baselines/reference/extBaseClass1.js @@ -20,15 +20,16 @@ module N { //// [extBaseClass1.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var M; (function (M) { var B = (function () { diff --git a/tests/baselines/reference/extBaseClass2.js b/tests/baselines/reference/extBaseClass2.js index f453255379bff..d55b201a72894 100644 --- a/tests/baselines/reference/extBaseClass2.js +++ b/tests/baselines/reference/extBaseClass2.js @@ -11,15 +11,16 @@ module M { //// [extBaseClass2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var N; (function (N) { var C4 = (function (_super) { diff --git a/tests/baselines/reference/extendAndImplementTheSameBaseType.js b/tests/baselines/reference/extendAndImplementTheSameBaseType.js index 5242430513a48..1a6900949257e 100644 --- a/tests/baselines/reference/extendAndImplementTheSameBaseType.js +++ b/tests/baselines/reference/extendAndImplementTheSameBaseType.js @@ -14,15 +14,16 @@ d.baz(); d.foo; //// [extendAndImplementTheSameBaseType.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/extendAndImplementTheSameBaseType2.js b/tests/baselines/reference/extendAndImplementTheSameBaseType2.js index d670758f32446..d262bcae95fe9 100644 --- a/tests/baselines/reference/extendAndImplementTheSameBaseType2.js +++ b/tests/baselines/reference/extendAndImplementTheSameBaseType2.js @@ -17,15 +17,16 @@ var r3: string = d.bar(); var r4: number = d.bar(); //// [extendAndImplementTheSameBaseType2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/extendBaseClassBeforeItsDeclared.js b/tests/baselines/reference/extendBaseClassBeforeItsDeclared.js index a2e55deaa2683..25be2160ecb4d 100644 --- a/tests/baselines/reference/extendBaseClassBeforeItsDeclared.js +++ b/tests/baselines/reference/extendBaseClassBeforeItsDeclared.js @@ -4,15 +4,16 @@ class derived extends base { } class base { constructor (public n: number) { } } //// [extendBaseClassBeforeItsDeclared.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var derived = (function (_super) { __extends(derived, _super); function derived() { diff --git a/tests/baselines/reference/extendClassExpressionFromModule.js b/tests/baselines/reference/extendClassExpressionFromModule.js index 08ad33d619b72..746379cc73c37 100644 --- a/tests/baselines/reference/extendClassExpressionFromModule.js +++ b/tests/baselines/reference/extendClassExpressionFromModule.js @@ -21,15 +21,16 @@ var x = (function () { module.exports = x; //// [foo2.js] "use strict"; -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var foo1 = require("./foo1"); var x = foo1; var y = (function (_super) { diff --git a/tests/baselines/reference/extendConstructSignatureInInterface.js b/tests/baselines/reference/extendConstructSignatureInInterface.js index dc721dc343a32..d8562243c6688 100644 --- a/tests/baselines/reference/extendConstructSignatureInInterface.js +++ b/tests/baselines/reference/extendConstructSignatureInInterface.js @@ -11,15 +11,16 @@ var e: E = new E(1); //// [extendConstructSignatureInInterface.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var CStatic; var E = (function (_super) { __extends(E, _super); diff --git a/tests/baselines/reference/extendNonClassSymbol1.js b/tests/baselines/reference/extendNonClassSymbol1.js index f52b0382827af..ac2f6c7ff9374 100644 --- a/tests/baselines/reference/extendNonClassSymbol1.js +++ b/tests/baselines/reference/extendNonClassSymbol1.js @@ -4,15 +4,16 @@ var x = A; class C extends x { } // error, could not find symbol xs //// [extendNonClassSymbol1.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/extendNonClassSymbol2.js b/tests/baselines/reference/extendNonClassSymbol2.js index 57695fb5fcf73..5b8800a553d59 100644 --- a/tests/baselines/reference/extendNonClassSymbol2.js +++ b/tests/baselines/reference/extendNonClassSymbol2.js @@ -6,15 +6,16 @@ var x = new Foo(); // legal, considered a constructor function class C extends Foo {} // error, could not find symbol Foo //// [extendNonClassSymbol2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); function Foo() { this.x = 1; } diff --git a/tests/baselines/reference/extendPrivateConstructorClass.js b/tests/baselines/reference/extendPrivateConstructorClass.js index 6578c4c9ce343..96b1bf985388b 100644 --- a/tests/baselines/reference/extendPrivateConstructorClass.js +++ b/tests/baselines/reference/extendPrivateConstructorClass.js @@ -10,15 +10,16 @@ class C extends abc.XYZ { //// [extendPrivateConstructorClass.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function (_super) { __extends(C, _super); function C() { diff --git a/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js b/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js index f979a820f6374..5e5f09622ee45 100644 --- a/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js +++ b/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js @@ -42,15 +42,16 @@ var Model = (function () { exports.Model = Model; //// [extendingClassFromAliasAndUsageInIndexer_moduleA.js] "use strict"; -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Backbone = require("./extendingClassFromAliasAndUsageInIndexer_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); @@ -62,15 +63,16 @@ var VisualizationModel = (function (_super) { exports.VisualizationModel = VisualizationModel; //// [extendingClassFromAliasAndUsageInIndexer_moduleB.js] "use strict"; -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Backbone = require("./extendingClassFromAliasAndUsageInIndexer_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); diff --git a/tests/baselines/reference/extendsClauseAlreadySeen.js b/tests/baselines/reference/extendsClauseAlreadySeen.js index 1e9681a0d3cf2..cf06895cb8688 100644 --- a/tests/baselines/reference/extendsClauseAlreadySeen.js +++ b/tests/baselines/reference/extendsClauseAlreadySeen.js @@ -7,15 +7,16 @@ class D extends C extends C { } //// [extendsClauseAlreadySeen.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/extendsClauseAlreadySeen2.js b/tests/baselines/reference/extendsClauseAlreadySeen2.js index 502618d78cebf..3dd977b657a28 100644 --- a/tests/baselines/reference/extendsClauseAlreadySeen2.js +++ b/tests/baselines/reference/extendsClauseAlreadySeen2.js @@ -7,15 +7,16 @@ class D extends C extends C { } //// [extendsClauseAlreadySeen2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/fluentClasses.js b/tests/baselines/reference/fluentClasses.js index 887cb9c1febbd..34e8b10d70cf8 100644 --- a/tests/baselines/reference/fluentClasses.js +++ b/tests/baselines/reference/fluentClasses.js @@ -19,15 +19,16 @@ var z = c.foo().bar().baz(); // Fluent pattern //// [fluentClasses.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/for-inStatements.js b/tests/baselines/reference/for-inStatements.js index d03972b9f175d..b57d6383d9665 100644 --- a/tests/baselines/reference/for-inStatements.js +++ b/tests/baselines/reference/for-inStatements.js @@ -81,15 +81,16 @@ for (var x in Color.Blue) { } //// [for-inStatements.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var aString; for (aString in {}) { } var anAny; diff --git a/tests/baselines/reference/for-inStatementsInvalid.js b/tests/baselines/reference/for-inStatementsInvalid.js index 938ab4daf8749..4670bf17807b9 100644 --- a/tests/baselines/reference/for-inStatementsInvalid.js +++ b/tests/baselines/reference/for-inStatementsInvalid.js @@ -64,15 +64,16 @@ for (var x in i[42]) { } //// [for-inStatementsInvalid.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var aNumber; for (aNumber in {}) { } var aBoolean; diff --git a/tests/baselines/reference/forStatementsMultipleInvalidDecl.js b/tests/baselines/reference/forStatementsMultipleInvalidDecl.js index 5bb0709c13c5b..5f40059174154 100644 --- a/tests/baselines/reference/forStatementsMultipleInvalidDecl.js +++ b/tests/baselines/reference/forStatementsMultipleInvalidDecl.js @@ -55,15 +55,16 @@ for(var m: typeof M;;){} for( var m = M.A;;){} //// [forStatementsMultipleInvalidDecl.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/functionImplementationErrors.js b/tests/baselines/reference/functionImplementationErrors.js index 94335364ec865..67f13db465e89 100644 --- a/tests/baselines/reference/functionImplementationErrors.js +++ b/tests/baselines/reference/functionImplementationErrors.js @@ -75,15 +75,16 @@ var f13 = () => { //// [functionImplementationErrors.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); // FunctionExpression with no return type annotation with multiple return statements with unrelated types var f1 = function () { return ''; diff --git a/tests/baselines/reference/functionImplementations.js b/tests/baselines/reference/functionImplementations.js index 2a19b4b841f4f..9fd603f16d314 100644 --- a/tests/baselines/reference/functionImplementations.js +++ b/tests/baselines/reference/functionImplementations.js @@ -158,15 +158,16 @@ var f12: (x: number) => any = x => { // should be (x: number) => Base | AnotherC } //// [functionImplementations.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); // FunctionExpression with no return type annotation and no return statement returns void var v = function () { }(); // FunctionExpression f with no return type annotation and directly references f in its body returns any diff --git a/tests/baselines/reference/functionSubtypingOfVarArgs.js b/tests/baselines/reference/functionSubtypingOfVarArgs.js index 01a6a130823d4..f7365781a2cfe 100644 --- a/tests/baselines/reference/functionSubtypingOfVarArgs.js +++ b/tests/baselines/reference/functionSubtypingOfVarArgs.js @@ -15,15 +15,16 @@ class StringEvent extends EventBase { // should work //// [functionSubtypingOfVarArgs.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var EventBase = (function () { function EventBase() { this._listeners = []; diff --git a/tests/baselines/reference/functionSubtypingOfVarArgs2.js b/tests/baselines/reference/functionSubtypingOfVarArgs2.js index a1aaf35748a02..6f534e64e883c 100644 --- a/tests/baselines/reference/functionSubtypingOfVarArgs2.js +++ b/tests/baselines/reference/functionSubtypingOfVarArgs2.js @@ -15,15 +15,16 @@ class StringEvent extends EventBase { //// [functionSubtypingOfVarArgs2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var EventBase = (function () { function EventBase() { this._listeners = []; diff --git a/tests/baselines/reference/generatedContextualTyping.js b/tests/baselines/reference/generatedContextualTyping.js index 1551b671b6203..43aa5dd6e9a98 100644 --- a/tests/baselines/reference/generatedContextualTyping.js +++ b/tests/baselines/reference/generatedContextualTyping.js @@ -356,15 +356,16 @@ var x355 = function(n: (s: Base[]) => any) { }; x355(n => { var n: Base[]; retur var x356 = function(n: Genric) { }; x356({ func: n => { return [d1, d2]; } }); //// [generatedContextualTyping.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/genericBaseClassLiteralProperty.js b/tests/baselines/reference/genericBaseClassLiteralProperty.js index c0ef8541ad7d9..73f5cb87bed60 100644 --- a/tests/baselines/reference/genericBaseClassLiteralProperty.js +++ b/tests/baselines/reference/genericBaseClassLiteralProperty.js @@ -13,15 +13,16 @@ class SubClass extends BaseClass { } //// [genericBaseClassLiteralProperty.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var BaseClass = (function () { function BaseClass() { } diff --git a/tests/baselines/reference/genericBaseClassLiteralProperty2.js b/tests/baselines/reference/genericBaseClassLiteralProperty2.js index 53fb2472d05c4..fb4f51749cde1 100644 --- a/tests/baselines/reference/genericBaseClassLiteralProperty2.js +++ b/tests/baselines/reference/genericBaseClassLiteralProperty2.js @@ -16,15 +16,16 @@ class DataView2 extends BaseCollection2 { //// [genericBaseClassLiteralProperty2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var CollectionItem2 = (function () { function CollectionItem2() { } diff --git a/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.js b/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.js index 318f5aa149400..d625797ea535e 100644 --- a/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.js +++ b/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.js @@ -109,15 +109,16 @@ var r11 = i.foo8(); // Base //// [genericCallWithConstraintsTypeArgumentInference.js] // Basic type inference with generic calls and constraints, no errors expected -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgs2.js b/tests/baselines/reference/genericCallWithObjectTypeArgs2.js index dc5bf22658dd8..ae844d043e652 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgs2.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgs2.js @@ -33,15 +33,16 @@ var i: I; var r4 = f2(i); // Base => Derived //// [genericCallWithObjectTypeArgs2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js index ce39f51d49c43..e3d80ebd572ba 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js @@ -41,15 +41,16 @@ var r7 = f3(null, x => x); // any //// [genericCallWithObjectTypeArgsAndConstraints2.js] // Generic call with constraints infering type parameter from object member properties // No errors expected -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js index 76d0f0854eab8..387c4526764bd 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js @@ -39,15 +39,16 @@ var r6 = f3(x => x, null); //// [genericCallWithObjectTypeArgsAndConstraints3.js] // Generic call with constraints infering type parameter from object member properties -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/genericCallbacksAndClassHierarchy.js b/tests/baselines/reference/genericCallbacksAndClassHierarchy.js index 645929e2c141d..d4d86fe57931a 100644 --- a/tests/baselines/reference/genericCallbacksAndClassHierarchy.js +++ b/tests/baselines/reference/genericCallbacksAndClassHierarchy.js @@ -24,15 +24,16 @@ module M { } //// [genericCallbacksAndClassHierarchy.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var M; (function (M) { var C1 = (function () { diff --git a/tests/baselines/reference/genericClassExpressionInFunction.js b/tests/baselines/reference/genericClassExpressionInFunction.js index 8d7098ba4f256..152237d458ddb 100644 --- a/tests/baselines/reference/genericClassExpressionInFunction.js +++ b/tests/baselines/reference/genericClassExpressionInFunction.js @@ -32,15 +32,16 @@ s.genericVar = 12; //// [genericClassExpressionInFunction.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/genericClassInheritsConstructorFromNonGenericClass.js b/tests/baselines/reference/genericClassInheritsConstructorFromNonGenericClass.js index 8219bf91c3830..aa3e06cf57e92 100644 --- a/tests/baselines/reference/genericClassInheritsConstructorFromNonGenericClass.js +++ b/tests/baselines/reference/genericClassInheritsConstructorFromNonGenericClass.js @@ -6,15 +6,16 @@ class C { } //// [genericClassInheritsConstructorFromNonGenericClass.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function (_super) { __extends(A, _super); function A() { diff --git a/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js b/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js index 8563581f95354..4efb95cdebaf9 100644 --- a/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js +++ b/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js @@ -76,15 +76,16 @@ class ViewModel implements Contract { //// [genericClassPropertyInheritanceSpecialization.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Portal; (function (Portal) { var Controls; diff --git a/tests/baselines/reference/genericClassStaticMethod.js b/tests/baselines/reference/genericClassStaticMethod.js index 85b09999c6ada..32b29319c1215 100644 --- a/tests/baselines/reference/genericClassStaticMethod.js +++ b/tests/baselines/reference/genericClassStaticMethod.js @@ -11,15 +11,16 @@ class Bar extends Foo { //// [genericClassStaticMethod.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Foo = (function () { function Foo() { } diff --git a/tests/baselines/reference/genericClasses3.js b/tests/baselines/reference/genericClasses3.js index 0097132b1e45c..a8a3db2f3a048 100644 --- a/tests/baselines/reference/genericClasses3.js +++ b/tests/baselines/reference/genericClasses3.js @@ -18,15 +18,16 @@ var z = v2.b; //// [genericClasses3.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var B = (function () { function B() { } diff --git a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js index a956f444aec97..97bc5d27ee0d3 100644 --- a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js +++ b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js @@ -27,15 +27,16 @@ module EndGate.Tweening { } //// [genericConstraintOnExtendedBuiltinTypes.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var EndGate; (function (EndGate) { var Tweening; diff --git a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js index b51acfd80b43c..66df407444199 100644 --- a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js +++ b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js @@ -26,15 +26,16 @@ module EndGate.Tweening { } //// [genericConstraintOnExtendedBuiltinTypes2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var EndGate; (function (EndGate) { var Tweening; diff --git a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.js b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.js index d17f3992c4634..edd74ea92e481 100644 --- a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.js +++ b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.js @@ -13,15 +13,16 @@ x = y; // error //// [genericDerivedTypeWithSpecializedBase.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.js b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.js index 3387beda5c45d..9fb286b1c400c 100644 --- a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.js +++ b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.js @@ -13,15 +13,16 @@ x = y; // error //// [genericDerivedTypeWithSpecializedBase2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/genericInheritedDefaultConstructors.js b/tests/baselines/reference/genericInheritedDefaultConstructors.js index f9d4979fb2ab0..7ed0c8179dd82 100644 --- a/tests/baselines/reference/genericInheritedDefaultConstructors.js +++ b/tests/baselines/reference/genericInheritedDefaultConstructors.js @@ -11,15 +11,16 @@ var c:Constructor> = B; // shouldn't error here //// [genericInheritedDefaultConstructors.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/genericPrototypeProperty2.js b/tests/baselines/reference/genericPrototypeProperty2.js index f07c1f305949e..73a64a657636e 100644 --- a/tests/baselines/reference/genericPrototypeProperty2.js +++ b/tests/baselines/reference/genericPrototypeProperty2.js @@ -16,15 +16,16 @@ class MyEventWrapper extends BaseEventWrapper { } //// [genericPrototypeProperty2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var BaseEvent = (function () { function BaseEvent() { } diff --git a/tests/baselines/reference/genericPrototypeProperty3.js b/tests/baselines/reference/genericPrototypeProperty3.js index a594644df6a67..48e8b367486aa 100644 --- a/tests/baselines/reference/genericPrototypeProperty3.js +++ b/tests/baselines/reference/genericPrototypeProperty3.js @@ -15,15 +15,16 @@ class MyEventWrapper extends BaseEventWrapper { } //// [genericPrototypeProperty3.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var BaseEvent = (function () { function BaseEvent() { } diff --git a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js index d60d4c960bdae..a9ea14337f4f2 100644 --- a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js +++ b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js @@ -27,15 +27,16 @@ module TypeScript2 { //// [genericRecursiveImplicitConstructorErrors2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var TypeScript2; (function (TypeScript2) { ; diff --git a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js index 6ecbdcf8dae2c..60d214a191467 100644 --- a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js +++ b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js @@ -31,15 +31,16 @@ module TypeScript { //// [genericRecursiveImplicitConstructorErrors3.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var TypeScript; (function (TypeScript) { var MemberName = (function () { diff --git a/tests/baselines/reference/genericTypeAssertions2.js b/tests/baselines/reference/genericTypeAssertions2.js index df70516ad34f9..416317ea9f60a 100644 --- a/tests/baselines/reference/genericTypeAssertions2.js +++ b/tests/baselines/reference/genericTypeAssertions2.js @@ -14,15 +14,16 @@ var r4: A = >new A(); var r5: A = >[]; // error //// [genericTypeAssertions2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/genericTypeAssertions4.js b/tests/baselines/reference/genericTypeAssertions4.js index f65447822c9e1..a857ae3ef8d86 100644 --- a/tests/baselines/reference/genericTypeAssertions4.js +++ b/tests/baselines/reference/genericTypeAssertions4.js @@ -26,15 +26,16 @@ function foo2(x: T) { } //// [genericTypeAssertions4.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/genericTypeAssertions6.js b/tests/baselines/reference/genericTypeAssertions6.js index 362625133192b..8e69ccdbbc33f 100644 --- a/tests/baselines/reference/genericTypeAssertions6.js +++ b/tests/baselines/reference/genericTypeAssertions6.js @@ -25,15 +25,16 @@ var b: B; var c: A = >b; //// [genericTypeAssertions6.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A(x) { var y = x; diff --git a/tests/baselines/reference/genericTypeConstraints.js b/tests/baselines/reference/genericTypeConstraints.js index fae7f381616bd..48baec0e6f6af 100644 --- a/tests/baselines/reference/genericTypeConstraints.js +++ b/tests/baselines/reference/genericTypeConstraints.js @@ -14,15 +14,16 @@ class BarExtended extends Bar { } //// [genericTypeConstraints.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Foo = (function () { function Foo() { } diff --git a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js index 3d0e940eaa999..d123ce1bd2e5c 100644 --- a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js +++ b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js @@ -40,15 +40,16 @@ var k = null; //// [genericTypeReferenceWithoutTypeArgument.js] // it is an error to use a generic type without type arguments // all of these are errors -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js index 552edc1f13429..e03295d50864b 100644 --- a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js +++ b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js @@ -40,15 +40,16 @@ var k = null; //// [genericTypeReferenceWithoutTypeArgument2.js] // it is an error to use a generic type without type arguments // all of these are errors -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var c; var a; var b; diff --git a/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js b/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js index c12bec69ba682..25f443c9bf49f 100644 --- a/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js +++ b/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js @@ -15,15 +15,16 @@ export class ListItem extends CollectionItem { //// [genericWithIndexerOfTypeParameterType2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); define(["require", "exports"], function (require, exports) { "use strict"; var Collection = (function () { diff --git a/tests/baselines/reference/heterogeneousArrayLiterals.js b/tests/baselines/reference/heterogeneousArrayLiterals.js index afb3477111fa6..828a2894ed0f0 100644 --- a/tests/baselines/reference/heterogeneousArrayLiterals.js +++ b/tests/baselines/reference/heterogeneousArrayLiterals.js @@ -133,15 +133,16 @@ function foo4(t: T, u: U) { //// [heterogeneousArrayLiterals.js] // type of an array is the best common type of its elements (plus its contextual type if it exists) -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = [1, '']; // {}[] var b = [1, null]; // number[] var c = [1, '', null]; // {}[] diff --git a/tests/baselines/reference/ifDoWhileStatements.js b/tests/baselines/reference/ifDoWhileStatements.js index 909b52ad0d65d..527e241c35ca9 100644 --- a/tests/baselines/reference/ifDoWhileStatements.js +++ b/tests/baselines/reference/ifDoWhileStatements.js @@ -164,15 +164,16 @@ do { }while(fn) //// [ifDoWhileStatements.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/illegalSuperCallsInConstructor.js b/tests/baselines/reference/illegalSuperCallsInConstructor.js index 1ddb27788d85c..37fa76388f01d 100644 --- a/tests/baselines/reference/illegalSuperCallsInConstructor.js +++ b/tests/baselines/reference/illegalSuperCallsInConstructor.js @@ -21,15 +21,16 @@ class Derived extends Base { } //// [illegalSuperCallsInConstructor.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/implementClausePrecedingExtends.js b/tests/baselines/reference/implementClausePrecedingExtends.js index 6aa751d7b5454..916bbaebf7a29 100644 --- a/tests/baselines/reference/implementClausePrecedingExtends.js +++ b/tests/baselines/reference/implementClausePrecedingExtends.js @@ -3,15 +3,16 @@ class C { foo: number } class D implements C extends C { } //// [implementClausePrecedingExtends.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.js b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.js index 4ab1c3add2378..e6831db5f9cc3 100644 --- a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.js +++ b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.js @@ -86,15 +86,16 @@ module M2 { } //// [implementingAnInterfaceExtendingClassWithPrivates2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Foo = (function () { function Foo() { } diff --git a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.js b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.js index 21e99dfa07ba2..4e2dc2514d291 100644 --- a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.js +++ b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.js @@ -42,15 +42,16 @@ class Bar8 extends Foo implements I { //// [implementingAnInterfaceExtendingClassWithProtecteds.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Foo = (function () { function Foo() { } diff --git a/tests/baselines/reference/importAsBaseClass.js b/tests/baselines/reference/importAsBaseClass.js index 0f95c2d3dbbdc..9f2461ebd42d3 100644 --- a/tests/baselines/reference/importAsBaseClass.js +++ b/tests/baselines/reference/importAsBaseClass.js @@ -21,15 +21,16 @@ var Greeter = (function () { exports.Greeter = Greeter; //// [importAsBaseClass_1.js] "use strict"; -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Greeter = require("./importAsBaseClass_0"); var Hello = (function (_super) { __extends(Hello, _super); diff --git a/tests/baselines/reference/importHelpers.js b/tests/baselines/reference/importHelpers.js index 06360b221b6e8..7a28d8087103e 100644 --- a/tests/baselines/reference/importHelpers.js +++ b/tests/baselines/reference/importHelpers.js @@ -68,15 +68,16 @@ C = tslib_1.__decorate([ tslib_1.__metadata("design:paramtypes", []) ], C); //// [script.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); diff --git a/tests/baselines/reference/importHelpersNoHelpers.js b/tests/baselines/reference/importHelpersNoHelpers.js index e48e51de44b0d..7fc3f22e1e22e 100644 --- a/tests/baselines/reference/importHelpersNoHelpers.js +++ b/tests/baselines/reference/importHelpersNoHelpers.js @@ -70,15 +70,16 @@ var o = { a: 1 }; var y = tslib_1.__assign({}, o); var x = tslib_1.__rest(y, []); //// [script.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); diff --git a/tests/baselines/reference/importHelpersNoModule.js b/tests/baselines/reference/importHelpersNoModule.js index 9d655f401c7d2..820913a0f944c 100644 --- a/tests/baselines/reference/importHelpersNoModule.js +++ b/tests/baselines/reference/importHelpersNoModule.js @@ -60,15 +60,16 @@ C = tslib_1.__decorate([ tslib_1.__metadata("design:paramtypes", []) ], C); //// [script.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); diff --git a/tests/baselines/reference/importShadowsGlobalName.js b/tests/baselines/reference/importShadowsGlobalName.js index 61f715a2194cf..0c6a299ee5a90 100644 --- a/tests/baselines/reference/importShadowsGlobalName.js +++ b/tests/baselines/reference/importShadowsGlobalName.js @@ -21,15 +21,16 @@ define(["require", "exports"], function (require, exports) { return Foo; }); //// [Bar.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); define(["require", "exports", "Foo"], function (require, exports, Error) { "use strict"; var Bar = (function (_super) { diff --git a/tests/baselines/reference/importUsedInExtendsList1.js b/tests/baselines/reference/importUsedInExtendsList1.js index b4bc18ddb7fd3..25c82b8cb7bb0 100644 --- a/tests/baselines/reference/importUsedInExtendsList1.js +++ b/tests/baselines/reference/importUsedInExtendsList1.js @@ -21,15 +21,16 @@ var Super = (function () { exports.Super = Super; //// [importUsedInExtendsList1_1.js] "use strict"; -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); /// var foo = require("./importUsedInExtendsList1_require"); var Sub = (function (_super) { diff --git a/tests/baselines/reference/indexerConstraints2.js b/tests/baselines/reference/indexerConstraints2.js index 2fdfe55d22d72..8a9b10c34c72b 100644 --- a/tests/baselines/reference/indexerConstraints2.js +++ b/tests/baselines/reference/indexerConstraints2.js @@ -29,15 +29,16 @@ class K extends J { } //// [indexerConstraints2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/indirectSelfReference.js b/tests/baselines/reference/indirectSelfReference.js index 9a3c5e3cfeb53..dbf484907e725 100644 --- a/tests/baselines/reference/indirectSelfReference.js +++ b/tests/baselines/reference/indirectSelfReference.js @@ -3,15 +3,16 @@ class a extends b{ } class b extends a{ } //// [indirectSelfReference.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = (function (_super) { __extends(a, _super); function a() { diff --git a/tests/baselines/reference/indirectSelfReferenceGeneric.js b/tests/baselines/reference/indirectSelfReferenceGeneric.js index f9ba7ccc940fa..6c73f2fa095c1 100644 --- a/tests/baselines/reference/indirectSelfReferenceGeneric.js +++ b/tests/baselines/reference/indirectSelfReferenceGeneric.js @@ -3,15 +3,16 @@ class a extends b { } class b extends a { } //// [indirectSelfReferenceGeneric.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = (function (_super) { __extends(a, _super); function a() { diff --git a/tests/baselines/reference/infinitelyExpandingTypesNonGenericBase.js b/tests/baselines/reference/infinitelyExpandingTypesNonGenericBase.js index bbcedbfa6b818..7fb9d28679104 100644 --- a/tests/baselines/reference/infinitelyExpandingTypesNonGenericBase.js +++ b/tests/baselines/reference/infinitelyExpandingTypesNonGenericBase.js @@ -25,15 +25,16 @@ o(A); //// [infinitelyExpandingTypesNonGenericBase.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Functionality = (function () { function Functionality() { } diff --git a/tests/baselines/reference/inheritFromGenericTypeParameter.js b/tests/baselines/reference/inheritFromGenericTypeParameter.js index b8ffd010380ee..aadf2edb3141a 100644 --- a/tests/baselines/reference/inheritFromGenericTypeParameter.js +++ b/tests/baselines/reference/inheritFromGenericTypeParameter.js @@ -3,15 +3,16 @@ class C extends T { } interface I extends T { } //// [inheritFromGenericTypeParameter.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function (_super) { __extends(C, _super); function C() { diff --git a/tests/baselines/reference/inheritSameNamePrivatePropertiesFromSameOrigin.js b/tests/baselines/reference/inheritSameNamePrivatePropertiesFromSameOrigin.js index b63252a44496d..81717bfec0580 100644 --- a/tests/baselines/reference/inheritSameNamePrivatePropertiesFromSameOrigin.js +++ b/tests/baselines/reference/inheritSameNamePrivatePropertiesFromSameOrigin.js @@ -11,15 +11,16 @@ interface A extends C, C2 { // ok } //// [inheritSameNamePrivatePropertiesFromSameOrigin.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var B = (function () { function B() { } diff --git a/tests/baselines/reference/inheritance.js b/tests/baselines/reference/inheritance.js index 7cb4b76c740ac..b619542312826 100644 --- a/tests/baselines/reference/inheritance.js +++ b/tests/baselines/reference/inheritance.js @@ -35,15 +35,16 @@ class Baad extends Good { //// [inheritance.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var B1 = (function () { function B1() { } diff --git a/tests/baselines/reference/inheritance1.js b/tests/baselines/reference/inheritance1.js index 4ad5c55dc6268..6f1e76e89257a 100644 --- a/tests/baselines/reference/inheritance1.js +++ b/tests/baselines/reference/inheritance1.js @@ -62,15 +62,16 @@ l1 = sc; l1 = c; //// [inheritance1.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Control = (function () { function Control() { } diff --git a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js index 2fd7aa913d04f..3a79d28b51e8d 100644 --- a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js +++ b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js @@ -11,15 +11,16 @@ class C extends B { //// [inheritanceGrandParentPrivateMemberCollision.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js index 8f436ffd35379..6b49c0fb9b564 100644 --- a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js +++ b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js @@ -11,15 +11,16 @@ class C extends B { //// [inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js b/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js index e13c592eccbaf..f801c6cdd0d4f 100644 --- a/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js +++ b/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js @@ -11,15 +11,16 @@ class C extends B { //// [inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js b/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js index b593654036b84..b85a1f7d99e28 100644 --- a/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js @@ -18,15 +18,16 @@ class b extends a { } //// [inheritanceMemberAccessorOverridingAccessor.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = (function () { function a() { } diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.js b/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.js index 84c1f0d3a4c53..ac0b0376749c0 100644 --- a/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.js +++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.js @@ -15,15 +15,16 @@ class b extends a { } //// [inheritanceMemberAccessorOverridingMethod.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = (function () { function a() { } diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js b/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js index b8cec2486d727..eaae0a3c126f4 100644 --- a/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js +++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js @@ -13,15 +13,16 @@ class b extends a { } //// [inheritanceMemberAccessorOverridingProperty.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = (function () { function a() { } diff --git a/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js b/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js index 158c89d092e06..8ed9f07dbb689 100644 --- a/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js @@ -15,15 +15,16 @@ class b extends a { } //// [inheritanceMemberFuncOverridingAccessor.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = (function () { function a() { } diff --git a/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.js b/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.js index a2c8a6b690e90..a05acd4752f7c 100644 --- a/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.js +++ b/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.js @@ -12,15 +12,16 @@ class b extends a { } //// [inheritanceMemberFuncOverridingMethod.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = (function () { function a() { } diff --git a/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.js b/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.js index bd0a9e55ba19c..1b27447d3dc37 100644 --- a/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.js +++ b/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.js @@ -10,15 +10,16 @@ class b extends a { } //// [inheritanceMemberFuncOverridingProperty.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = (function () { function a() { } diff --git a/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js b/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js index 2c7ae4fb6b64a..c18e12d38cb49 100644 --- a/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js @@ -14,15 +14,16 @@ class b extends a { } //// [inheritanceMemberPropertyOverridingAccessor.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = (function () { function a() { } diff --git a/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.js b/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.js index 0b604adae2a85..e9b333ddee102 100644 --- a/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.js +++ b/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.js @@ -10,15 +10,16 @@ class b extends a { } //// [inheritanceMemberPropertyOverridingMethod.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = (function () { function a() { } diff --git a/tests/baselines/reference/inheritanceMemberPropertyOverridingProperty.js b/tests/baselines/reference/inheritanceMemberPropertyOverridingProperty.js index 71a9731e82857..0ccfa544a7c0b 100644 --- a/tests/baselines/reference/inheritanceMemberPropertyOverridingProperty.js +++ b/tests/baselines/reference/inheritanceMemberPropertyOverridingProperty.js @@ -8,15 +8,16 @@ class b extends a { } //// [inheritanceMemberPropertyOverridingProperty.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = (function () { function a() { } diff --git a/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js b/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js index 4c243028296ec..c150ef6434d5b 100644 --- a/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js +++ b/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js @@ -8,15 +8,16 @@ var b3 = new B(); // error, could not select overload for 'new' expression //// [inheritanceOfGenericConstructorMethod1.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js b/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js index 1bf2fd4eed79a..8753fbe9b463e 100644 --- a/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js +++ b/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js @@ -15,15 +15,16 @@ var n3 = new N.D2(); // no error, D2 //// [inheritanceOfGenericConstructorMethod2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var M; (function (M) { var C1 = (function () { diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js b/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js index e35b3f24a5dc5..3abc4b6d453f4 100644 --- a/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js @@ -18,15 +18,16 @@ class b extends a { } //// [inheritanceStaticAccessorOverridingAccessor.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = (function () { function a() { } diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js b/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js index d1035ae3d480c..8215f4fdf0e3c 100644 --- a/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js +++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js @@ -15,15 +15,16 @@ class b extends a { } //// [inheritanceStaticAccessorOverridingMethod.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = (function () { function a() { } diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js b/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js index c51f321020dcd..3375597f114b8 100644 --- a/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js +++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js @@ -13,15 +13,16 @@ class b extends a { } //// [inheritanceStaticAccessorOverridingProperty.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = (function () { function a() { } diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js index 778e7987f2746..7f27718a1fb3e 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js @@ -15,15 +15,16 @@ class b extends a { } //// [inheritanceStaticFuncOverridingAccessor.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = (function () { function a() { } diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js index a6afadefb3a84..03de6f62af45b 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js @@ -12,15 +12,16 @@ class b extends a { } //// [inheritanceStaticFuncOverridingAccessorOfFuncType.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = (function () { function a() { } diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.js b/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.js index 37b3113b855a8..a1380343bee16 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.js @@ -12,15 +12,16 @@ class b extends a { } //// [inheritanceStaticFuncOverridingMethod.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = (function () { function a() { } diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.js b/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.js index 0d328df7c53b8..e28d0a026dd24 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.js @@ -10,15 +10,16 @@ class b extends a { } //// [inheritanceStaticFuncOverridingProperty.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = (function () { function a() { } diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.js b/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.js index 541cda8e1b25a..d8155525444f6 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.js @@ -10,15 +10,16 @@ class b extends a { } //// [inheritanceStaticFuncOverridingPropertyOfFuncType.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = (function () { function a() { } diff --git a/tests/baselines/reference/inheritanceStaticFunctionOverridingInstanceProperty.js b/tests/baselines/reference/inheritanceStaticFunctionOverridingInstanceProperty.js index 4ec01a1dc36fc..9b696526a4453 100644 --- a/tests/baselines/reference/inheritanceStaticFunctionOverridingInstanceProperty.js +++ b/tests/baselines/reference/inheritanceStaticFunctionOverridingInstanceProperty.js @@ -10,15 +10,16 @@ class b extends a { } //// [inheritanceStaticFunctionOverridingInstanceProperty.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = (function () { function a() { } diff --git a/tests/baselines/reference/inheritanceStaticMembersCompatible.js b/tests/baselines/reference/inheritanceStaticMembersCompatible.js index 74a86c64f8c28..59dc7e5fff1c7 100644 --- a/tests/baselines/reference/inheritanceStaticMembersCompatible.js +++ b/tests/baselines/reference/inheritanceStaticMembersCompatible.js @@ -8,15 +8,16 @@ class b extends a { } //// [inheritanceStaticMembersCompatible.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = (function () { function a() { } diff --git a/tests/baselines/reference/inheritanceStaticMembersIncompatible.js b/tests/baselines/reference/inheritanceStaticMembersIncompatible.js index e1ac5204119ee..e6e2edf0d5b43 100644 --- a/tests/baselines/reference/inheritanceStaticMembersIncompatible.js +++ b/tests/baselines/reference/inheritanceStaticMembersIncompatible.js @@ -8,15 +8,16 @@ class b extends a { } //// [inheritanceStaticMembersIncompatible.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = (function () { function a() { } diff --git a/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js b/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js index 48cb36812a290..7872f35ae90fc 100644 --- a/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js @@ -13,15 +13,16 @@ class b extends a { } //// [inheritanceStaticPropertyOverridingAccessor.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = (function () { function a() { } diff --git a/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.js b/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.js index f5130abe8bd51..24a6135b30c26 100644 --- a/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.js +++ b/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.js @@ -10,15 +10,16 @@ class b extends a { } //// [inheritanceStaticPropertyOverridingMethod.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = (function () { function a() { } diff --git a/tests/baselines/reference/inheritanceStaticPropertyOverridingProperty.js b/tests/baselines/reference/inheritanceStaticPropertyOverridingProperty.js index e60108ca25b12..182fb27a9705b 100644 --- a/tests/baselines/reference/inheritanceStaticPropertyOverridingProperty.js +++ b/tests/baselines/reference/inheritanceStaticPropertyOverridingProperty.js @@ -8,15 +8,16 @@ class b extends a { } //// [inheritanceStaticPropertyOverridingProperty.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = (function () { function a() { } diff --git a/tests/baselines/reference/inheritedConstructorWithRestParams.js b/tests/baselines/reference/inheritedConstructorWithRestParams.js index 9abc3a38497ef..a2538cf999d6b 100644 --- a/tests/baselines/reference/inheritedConstructorWithRestParams.js +++ b/tests/baselines/reference/inheritedConstructorWithRestParams.js @@ -15,15 +15,16 @@ new Derived("", 3); new Derived(3); //// [inheritedConstructorWithRestParams.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { var a = []; diff --git a/tests/baselines/reference/inheritedConstructorWithRestParams2.js b/tests/baselines/reference/inheritedConstructorWithRestParams2.js index 925f5124753ac..17cca41912d48 100644 --- a/tests/baselines/reference/inheritedConstructorWithRestParams2.js +++ b/tests/baselines/reference/inheritedConstructorWithRestParams2.js @@ -35,15 +35,16 @@ new Derived("", 3, "", 3); new Derived("", 3, "", ""); //// [inheritedConstructorWithRestParams2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var IBaseBase = (function () { function IBaseBase(x) { } diff --git a/tests/baselines/reference/inheritedModuleMembersForClodule.js b/tests/baselines/reference/inheritedModuleMembersForClodule.js index f919c354e5e60..5e7f49be55970 100644 --- a/tests/baselines/reference/inheritedModuleMembersForClodule.js +++ b/tests/baselines/reference/inheritedModuleMembersForClodule.js @@ -22,15 +22,16 @@ class E extends D { //// [inheritedModuleMembersForClodule.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/instanceOfAssignability.js b/tests/baselines/reference/instanceOfAssignability.js index d6581fbfd094d..c85caf07e53b9 100644 --- a/tests/baselines/reference/instanceOfAssignability.js +++ b/tests/baselines/reference/instanceOfAssignability.js @@ -90,15 +90,16 @@ function fn8(x: Alpha|Beta|Gamma) { //// [instanceOfAssignability.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); // Derived1 is assignable to, but not a subtype of, Base var Derived1 = (function () { function Derived1() { diff --git a/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js b/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js index bf304bc0aabd4..8eb7e3321f940 100644 --- a/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js +++ b/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js @@ -43,15 +43,16 @@ module Generic { } //// [instancePropertiesInheritedIntoClassType.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var NonGeneric; (function (NonGeneric) { var C = (function () { diff --git a/tests/baselines/reference/instanceSubtypeCheck2.js b/tests/baselines/reference/instanceSubtypeCheck2.js index 791e72a6b4ebd..581921446129a 100644 --- a/tests/baselines/reference/instanceSubtypeCheck2.js +++ b/tests/baselines/reference/instanceSubtypeCheck2.js @@ -8,15 +8,16 @@ class C2 extends C1 { } //// [instanceSubtypeCheck2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C1 = (function () { function C1() { } diff --git a/tests/baselines/reference/instanceofWithStructurallyIdenticalTypes.js b/tests/baselines/reference/instanceofWithStructurallyIdenticalTypes.js index 938bf26dc44a3..8eefac932235e 100644 --- a/tests/baselines/reference/instanceofWithStructurallyIdenticalTypes.js +++ b/tests/baselines/reference/instanceofWithStructurallyIdenticalTypes.js @@ -72,15 +72,16 @@ function goo(x: A) { //// [instanceofWithStructurallyIdenticalTypes.js] // Repro from #7271 -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C1 = (function () { function C1() { } diff --git a/tests/baselines/reference/instantiatedReturnTypeContravariance.js b/tests/baselines/reference/instantiatedReturnTypeContravariance.js index 62de511b4c899..01b8da419c4c7 100644 --- a/tests/baselines/reference/instantiatedReturnTypeContravariance.js +++ b/tests/baselines/reference/instantiatedReturnTypeContravariance.js @@ -31,15 +31,16 @@ return null; //// [instantiatedReturnTypeContravariance.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var c = (function () { function c() { } diff --git a/tests/baselines/reference/interfaceClassMerging.js b/tests/baselines/reference/interfaceClassMerging.js index d3d7b257465fd..9b75b9e4d105c 100644 --- a/tests/baselines/reference/interfaceClassMerging.js +++ b/tests/baselines/reference/interfaceClassMerging.js @@ -41,15 +41,16 @@ obj = bar; //// [interfaceClassMerging.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Foo = (function () { function Foo() { } diff --git a/tests/baselines/reference/interfaceClassMerging2.js b/tests/baselines/reference/interfaceClassMerging2.js index 9f7037048bd6a..93c05759367b0 100644 --- a/tests/baselines/reference/interfaceClassMerging2.js +++ b/tests/baselines/reference/interfaceClassMerging2.js @@ -37,15 +37,16 @@ foo = bar; //// [interfaceClassMerging2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Foo = (function () { function Foo() { } diff --git a/tests/baselines/reference/interfaceExtendsClass1.js b/tests/baselines/reference/interfaceExtendsClass1.js index 7b0865b0018f2..5e8d36136a81e 100644 --- a/tests/baselines/reference/interfaceExtendsClass1.js +++ b/tests/baselines/reference/interfaceExtendsClass1.js @@ -19,15 +19,16 @@ class Location { //// [interfaceExtendsClass1.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Control = (function () { function Control() { } diff --git a/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js b/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js index a560df2598656..d567d5661d94e 100644 --- a/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js +++ b/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js @@ -28,15 +28,16 @@ c = d; d = c; // error //// [interfaceExtendsClassWithPrivate1.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { this.x = 1; diff --git a/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js b/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js index 3aa5f800d9c8f..b7e2fe715cbd8 100644 --- a/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js +++ b/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js @@ -24,15 +24,16 @@ class D2 extends C implements I { // error } //// [interfaceExtendsClassWithPrivate2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { this.x = 1; diff --git a/tests/baselines/reference/interfaceImplementation8.js b/tests/baselines/reference/interfaceImplementation8.js index c8a739a3a1f82..f90d58edd4f51 100644 --- a/tests/baselines/reference/interfaceImplementation8.js +++ b/tests/baselines/reference/interfaceImplementation8.js @@ -41,15 +41,16 @@ class C8 extends C7 implements i2{ //// [interfaceImplementation8.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C1 = (function () { function C1() { } diff --git a/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.js b/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.js index 9ed7be8e0f223..4b88d58fd184b 100644 --- a/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.js +++ b/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.js @@ -80,15 +80,16 @@ module YYY4 { //// [invalidModuleWithStatementsOfEveryKind.js] // All of these should be an error -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Y; (function (Y) { var A = (function () { diff --git a/tests/baselines/reference/invalidMultipleVariableDeclarations.js b/tests/baselines/reference/invalidMultipleVariableDeclarations.js index 788b91f13c5f7..4e473a95bf5fc 100644 --- a/tests/baselines/reference/invalidMultipleVariableDeclarations.js +++ b/tests/baselines/reference/invalidMultipleVariableDeclarations.js @@ -54,15 +54,16 @@ var m: typeof M; var m = M.A; //// [invalidMultipleVariableDeclarations.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/invalidReturnStatements.js b/tests/baselines/reference/invalidReturnStatements.js index ca25cdc98703c..7dc01b18b5b2e 100644 --- a/tests/baselines/reference/invalidReturnStatements.js +++ b/tests/baselines/reference/invalidReturnStatements.js @@ -21,15 +21,16 @@ function fn11(): D { return new C(); } //// [invalidReturnStatements.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); // all the following should be error function fn1() { } function fn2() { } diff --git a/tests/baselines/reference/isolatedModulesImportExportElision.js b/tests/baselines/reference/isolatedModulesImportExportElision.js index dddc8d5633953..e430e1eda1b01 100644 --- a/tests/baselines/reference/isolatedModulesImportExportElision.js +++ b/tests/baselines/reference/isolatedModulesImportExportElision.js @@ -15,15 +15,16 @@ export var z = x; //// [file1.js] "use strict"; -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var module_1 = require("module"); var module_2 = require("module"); var ns = require("module"); diff --git a/tests/baselines/reference/jsxViaImport.js b/tests/baselines/reference/jsxViaImport.js index 110cbba1ef60e..7955a6e65b9d0 100644 --- a/tests/baselines/reference/jsxViaImport.js +++ b/tests/baselines/reference/jsxViaImport.js @@ -25,15 +25,16 @@ class TestComponent extends React.Component { //// [consumer.jsx] "use strict"; -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); /// var BaseComponent = require("BaseComponent"); var TestComponent = (function (_super) { diff --git a/tests/baselines/reference/keyofAndIndexedAccess.js b/tests/baselines/reference/keyofAndIndexedAccess.js index 6c3591344e31c..e9d76ee4d7ff2 100644 --- a/tests/baselines/reference/keyofAndIndexedAccess.js +++ b/tests/baselines/reference/keyofAndIndexedAccess.js @@ -367,15 +367,16 @@ function f(p: K) { } //// [keyofAndIndexedAccess.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Shape = (function () { function Shape() { } diff --git a/tests/baselines/reference/lambdaArgCrash.js b/tests/baselines/reference/lambdaArgCrash.js index 8fbe9a407283b..cdc03b555efbe 100644 --- a/tests/baselines/reference/lambdaArgCrash.js +++ b/tests/baselines/reference/lambdaArgCrash.js @@ -35,15 +35,16 @@ class ItemSetEvent extends Event { //// [lambdaArgCrash.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Event = (function () { function Event() { // TODO: remove diff --git a/tests/baselines/reference/lift.js b/tests/baselines/reference/lift.js index a9f3b4b17ac97..d2f2ed8dc0dc4 100644 --- a/tests/baselines/reference/lift.js +++ b/tests/baselines/reference/lift.js @@ -18,15 +18,16 @@ class C extends B { //// [lift.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var B = (function () { function B(y) { this.y = y; diff --git a/tests/baselines/reference/localTypes1.js b/tests/baselines/reference/localTypes1.js index 503a34c528c45..27045613c817f 100644 --- a/tests/baselines/reference/localTypes1.js +++ b/tests/baselines/reference/localTypes1.js @@ -142,15 +142,16 @@ function f6() { //// [localTypes1.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); function f1() { var E; (function (E) { diff --git a/tests/baselines/reference/m7Bugs.js b/tests/baselines/reference/m7Bugs.js index b48fb3bbb3e25..86504bdf8f979 100644 --- a/tests/baselines/reference/m7Bugs.js +++ b/tests/baselines/reference/m7Bugs.js @@ -27,15 +27,16 @@ var y3: C1 = {}; //// [m7Bugs.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var s = ({}); var x = {}; var C1 = (function () { diff --git a/tests/baselines/reference/mergedDeclarations5.js b/tests/baselines/reference/mergedDeclarations5.js index e3273fd811598..886afebe35866 100644 --- a/tests/baselines/reference/mergedDeclarations5.js +++ b/tests/baselines/reference/mergedDeclarations5.js @@ -19,15 +19,16 @@ var A = (function () { return A; }()); //// [b.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var B = (function (_super) { __extends(B, _super); function B() { diff --git a/tests/baselines/reference/mergedDeclarations6.js b/tests/baselines/reference/mergedDeclarations6.js index d4f013e4eccce..445fbac34b70b 100644 --- a/tests/baselines/reference/mergedDeclarations6.js +++ b/tests/baselines/reference/mergedDeclarations6.js @@ -37,15 +37,16 @@ define(["require", "exports"], function (require, exports) { exports.A = A; }); //// [b.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); define(["require", "exports", "./a"], function (require, exports, a_1) { "use strict"; var B = (function (_super) { diff --git a/tests/baselines/reference/mergedInheritedClassInterface.js b/tests/baselines/reference/mergedInheritedClassInterface.js index 4b6457fe1ddd9..1772d6139d846 100644 --- a/tests/baselines/reference/mergedInheritedClassInterface.js +++ b/tests/baselines/reference/mergedInheritedClassInterface.js @@ -47,15 +47,16 @@ grandchild.method2(); //// [mergedInheritedClassInterface.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var BaseClass = (function () { function BaseClass() { } diff --git a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.js b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.js index 3207ae8f8c5dc..65477941c0a3e 100644 --- a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.js +++ b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.js @@ -32,15 +32,16 @@ var r = a.x; // error var r2 = a.w; // error //// [mergedInterfacesWithInheritedPrivates2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.js b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.js index 6a01a6cdd7871..c3d2cc0ea571b 100644 --- a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.js +++ b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.js @@ -39,15 +39,16 @@ module M { } //// [mergedInterfacesWithInheritedPrivates3.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/missingPropertiesOfClassExpression.js b/tests/baselines/reference/missingPropertiesOfClassExpression.js index 54016af34afef..a2d38f47c6240 100644 --- a/tests/baselines/reference/missingPropertiesOfClassExpression.js +++ b/tests/baselines/reference/missingPropertiesOfClassExpression.js @@ -7,15 +7,16 @@ class George extends class { reset() { return this.y; } } { //// [missingPropertiesOfClassExpression.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var George = (function (_super) { __extends(George, _super); function George() { diff --git a/tests/baselines/reference/moduleAsBaseType.js b/tests/baselines/reference/moduleAsBaseType.js index 5a421d7d3f410..99553e041084a 100644 --- a/tests/baselines/reference/moduleAsBaseType.js +++ b/tests/baselines/reference/moduleAsBaseType.js @@ -5,15 +5,16 @@ interface I extends M { } class C2 implements M { } //// [moduleAsBaseType.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function (_super) { __extends(C, _super); function C() { diff --git a/tests/baselines/reference/moduleImportedForTypeArgumentPosition.js b/tests/baselines/reference/moduleImportedForTypeArgumentPosition.js index c57f7af6579c7..6471abaf13d32 100644 --- a/tests/baselines/reference/moduleImportedForTypeArgumentPosition.js +++ b/tests/baselines/reference/moduleImportedForTypeArgumentPosition.js @@ -16,15 +16,16 @@ define(["require", "exports"], function (require, exports) { "use strict"; }); //// [moduleImportedForTypeArgumentPosition_1.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); define(["require", "exports"], function (require, exports) { "use strict"; var C1 = (function () { diff --git a/tests/baselines/reference/moduleWithStatementsOfEveryKind.js b/tests/baselines/reference/moduleWithStatementsOfEveryKind.js index 6fda8588f4383..f75324420203d 100644 --- a/tests/baselines/reference/moduleWithStatementsOfEveryKind.js +++ b/tests/baselines/reference/moduleWithStatementsOfEveryKind.js @@ -59,15 +59,16 @@ module Y { //// [moduleWithStatementsOfEveryKind.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A; (function (A_1) { var A = (function () { diff --git a/tests/baselines/reference/multipleInheritance.js b/tests/baselines/reference/multipleInheritance.js index 2036f81bf925a..f0074664ad158 100644 --- a/tests/baselines/reference/multipleInheritance.js +++ b/tests/baselines/reference/multipleInheritance.js @@ -39,15 +39,16 @@ class Baad extends Good { //// [multipleInheritance.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var B1 = (function () { function B1() { } diff --git a/tests/baselines/reference/mutuallyRecursiveGenericBaseTypes2.js b/tests/baselines/reference/mutuallyRecursiveGenericBaseTypes2.js index 0f86ca802a651..90ffbf5148f1a 100644 --- a/tests/baselines/reference/mutuallyRecursiveGenericBaseTypes2.js +++ b/tests/baselines/reference/mutuallyRecursiveGenericBaseTypes2.js @@ -11,15 +11,16 @@ var test = new foo(); //// [mutuallyRecursiveGenericBaseTypes2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var foo = (function () { function foo() { } diff --git a/tests/baselines/reference/noImplicitAnyMissingGetAccessor.js b/tests/baselines/reference/noImplicitAnyMissingGetAccessor.js index 1253860daa6df..25815641e9564 100644 --- a/tests/baselines/reference/noImplicitAnyMissingGetAccessor.js +++ b/tests/baselines/reference/noImplicitAnyMissingGetAccessor.js @@ -13,15 +13,16 @@ class Child extends Parent { } //// [noImplicitAnyMissingGetAccessor.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Parent = (function () { function Parent() { } diff --git a/tests/baselines/reference/noImplicitAnyMissingSetAccessor.js b/tests/baselines/reference/noImplicitAnyMissingSetAccessor.js index 76011cee44213..cb37fafd9f9fe 100644 --- a/tests/baselines/reference/noImplicitAnyMissingSetAccessor.js +++ b/tests/baselines/reference/noImplicitAnyMissingSetAccessor.js @@ -12,15 +12,16 @@ class Child extends Parent { } //// [noImplicitAnyMissingSetAccessor.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Parent = (function () { function Parent() { } diff --git a/tests/baselines/reference/nonGenericClassExtendingGenericClassWithAny.js b/tests/baselines/reference/nonGenericClassExtendingGenericClassWithAny.js index 1dab2ae6fb8ea..49a3a7e05eb12 100644 --- a/tests/baselines/reference/nonGenericClassExtendingGenericClassWithAny.js +++ b/tests/baselines/reference/nonGenericClassExtendingGenericClassWithAny.js @@ -6,15 +6,16 @@ class Foo { class Bar extends Foo { } // Valid //// [nonGenericClassExtendingGenericClassWithAny.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Foo = (function () { function Foo() { } diff --git a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js index b571573c18f44..9c44df837570d 100644 --- a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js +++ b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js @@ -47,15 +47,16 @@ var b: { [x: number]: A } = { //// [numericIndexerConstrainsPropertyDeclarations2.js] // String indexer providing a constraint of a user defined type -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/numericIndexerConstraint3.js b/tests/baselines/reference/numericIndexerConstraint3.js index 0dbcc5308c80c..4a8c3caf12bde 100644 --- a/tests/baselines/reference/numericIndexerConstraint3.js +++ b/tests/baselines/reference/numericIndexerConstraint3.js @@ -13,15 +13,16 @@ class C { } //// [numericIndexerConstraint3.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/numericIndexerConstraint4.js b/tests/baselines/reference/numericIndexerConstraint4.js index 0b4f1be536134..4fe10b54ee416 100644 --- a/tests/baselines/reference/numericIndexerConstraint4.js +++ b/tests/baselines/reference/numericIndexerConstraint4.js @@ -13,15 +13,16 @@ var x: { //// [numericIndexerConstraint4.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/numericIndexerTyping2.js b/tests/baselines/reference/numericIndexerTyping2.js index d4e12eddd27dd..e6fce38d81853 100644 --- a/tests/baselines/reference/numericIndexerTyping2.js +++ b/tests/baselines/reference/numericIndexerTyping2.js @@ -13,15 +13,16 @@ var i2: I2; var r2: string = i2[1]; // error: numeric indexer returns the type of the string indexere //// [numericIndexerTyping2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var I = (function () { function I() { } diff --git a/tests/baselines/reference/objectCreationOfElementAccessExpression.js b/tests/baselines/reference/objectCreationOfElementAccessExpression.js index 0d6589f09e3ff..7d192f7ee9a0f 100644 --- a/tests/baselines/reference/objectCreationOfElementAccessExpression.js +++ b/tests/baselines/reference/objectCreationOfElementAccessExpression.js @@ -56,15 +56,16 @@ var foods2: MonsterFood[] = new PetFood[new IceCream('Mint chocolate chip') , Co //// [objectCreationOfElementAccessExpression.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Food = (function () { function Food(name) { this.name = name; diff --git a/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js b/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js index 8f9acd3615cf7..84caecad63aa8 100644 --- a/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js +++ b/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js @@ -55,15 +55,16 @@ var b: { var r4: void = b.valueOf(); //// [objectTypeHidingMembersOfExtendedObject.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js index e995999e04b55..a00f33b2a9775 100644 --- a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js +++ b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js @@ -124,15 +124,16 @@ function foo16(x: any) { } //// [objectTypesIdentityWithNumericIndexers1.js] // object types are identical structurally -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js index 81521fccedf92..fa176f483d740 100644 --- a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js +++ b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js @@ -127,15 +127,16 @@ function foo16(x: any) { } //// [objectTypesIdentityWithNumericIndexers2.js] // object types are identical structurally -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js index c66084b049fcb..a09e844b6c4be 100644 --- a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js +++ b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js @@ -124,15 +124,16 @@ function foo16(x: any) { } //// [objectTypesIdentityWithNumericIndexers3.js] // object types are identical structurally -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/objectTypesIdentityWithPrivates.js b/tests/baselines/reference/objectTypesIdentityWithPrivates.js index e0cfd4b3be182..a187c353056f6 100644 --- a/tests/baselines/reference/objectTypesIdentityWithPrivates.js +++ b/tests/baselines/reference/objectTypesIdentityWithPrivates.js @@ -122,15 +122,16 @@ function foo16(x: any) { } //// [objectTypesIdentityWithPrivates.js] // object types are identical structurally -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/objectTypesIdentityWithPrivates2.js b/tests/baselines/reference/objectTypesIdentityWithPrivates2.js index 97f8179bfb1fb..5d130734c7bb8 100644 --- a/tests/baselines/reference/objectTypesIdentityWithPrivates2.js +++ b/tests/baselines/reference/objectTypesIdentityWithPrivates2.js @@ -40,15 +40,16 @@ function foo6(x: any): any { } //// [objectTypesIdentityWithPrivates2.js] // object types are identical structurally -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/objectTypesIdentityWithPrivates3.js b/tests/baselines/reference/objectTypesIdentityWithPrivates3.js index 740c9af666b12..f28147ba50ddf 100644 --- a/tests/baselines/reference/objectTypesIdentityWithPrivates3.js +++ b/tests/baselines/reference/objectTypesIdentityWithPrivates3.js @@ -26,15 +26,16 @@ var c3: C3; c3; // Should fail (private x originates in the same declaration, but different types) //// [objectTypesIdentityWithPrivates3.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C1 = (function () { function C1() { } diff --git a/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js b/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js index fe72b6d409a86..a561df31753dc 100644 --- a/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js +++ b/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js @@ -124,15 +124,16 @@ function foo16(x: any) { } //// [objectTypesIdentityWithStringIndexers.js] // object types are identical structurally -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js b/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js index 9cd95ea962900..282ec34ea5f46 100644 --- a/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js +++ b/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js @@ -127,15 +127,16 @@ function foo16(x: any) { } //// [objectTypesIdentityWithStringIndexers2.js] // object types are identical structurally -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/optionalConstructorArgInSuper.js b/tests/baselines/reference/optionalConstructorArgInSuper.js index 927fbd25854d4..5033f9d1581e1 100644 --- a/tests/baselines/reference/optionalConstructorArgInSuper.js +++ b/tests/baselines/reference/optionalConstructorArgInSuper.js @@ -11,15 +11,16 @@ d2.foo(); //// [optionalConstructorArgInSuper.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base(opt) { } diff --git a/tests/baselines/reference/optionalMethods.js b/tests/baselines/reference/optionalMethods.js index 4d89325803d20..3af46d7e41a7b 100644 --- a/tests/baselines/reference/optionalMethods.js +++ b/tests/baselines/reference/optionalMethods.js @@ -58,15 +58,16 @@ class Derived extends Base { //// [optionalMethods.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); function test1(x) { x.a; x.b; diff --git a/tests/baselines/reference/optionalParamArgsTest.js b/tests/baselines/reference/optionalParamArgsTest.js index 7f606887baa88..2bcfbd44da5f5 100644 --- a/tests/baselines/reference/optionalParamArgsTest.js +++ b/tests/baselines/reference/optionalParamArgsTest.js @@ -125,15 +125,16 @@ fnOpt2(1, [2, 3], [1], true); //// [optionalParamArgsTest.js] // Optional parameter and default argument tests -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); // test basic configurations var C1 = (function () { function C1(v, p) { diff --git a/tests/baselines/reference/optionalParamInOverride.js b/tests/baselines/reference/optionalParamInOverride.js index cfa9364bb68bc..52fa0a385176e 100644 --- a/tests/baselines/reference/optionalParamInOverride.js +++ b/tests/baselines/reference/optionalParamInOverride.js @@ -8,15 +8,16 @@ class Y extends Z { //// [optionalParamInOverride.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Z = (function () { function Z() { } diff --git a/tests/baselines/reference/optionalParameterProperty.js b/tests/baselines/reference/optionalParameterProperty.js index 5a7bb5441ddad..ed1b910241d53 100644 --- a/tests/baselines/reference/optionalParameterProperty.js +++ b/tests/baselines/reference/optionalParameterProperty.js @@ -12,15 +12,16 @@ class D extends C { //// [optionalParameterProperty.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/outModuleConcatAmd.js b/tests/baselines/reference/outModuleConcatAmd.js index 867360fc49ee2..398978793c128 100644 --- a/tests/baselines/reference/outModuleConcatAmd.js +++ b/tests/baselines/reference/outModuleConcatAmd.js @@ -9,15 +9,16 @@ import {A} from "./ref/a"; export class B extends A { } //// [all.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); define("ref/a", ["require", "exports"], function (require, exports) { "use strict"; var A = (function () { diff --git a/tests/baselines/reference/outModuleConcatAmd.js.map b/tests/baselines/reference/outModuleConcatAmd.js.map index 937bec9396901..a95ca740a615c 100644 --- a/tests/baselines/reference/outModuleConcatAmd.js.map +++ b/tests/baselines/reference/outModuleConcatAmd.js.map @@ -1,2 +1,2 @@ //// [all.js.map] -{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":";;;;;;;;;;;IACA;QAAA;QAAiB,CAAC;QAAD,QAAC;IAAD,CAAC,AAAlB,IAAkB;IAAL,cAAC;;;;ICAd;QAAuB,qBAAC;QAAxB;;QAA2B,CAAC;QAAD,QAAC;IAAD,CAAC,AAA5B,CAAuB,KAAC,GAAI;IAAf,cAAC"} \ No newline at end of file +{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":";;;;;;;;;;;;IACA;QAAA;QAAiB,CAAC;QAAD,QAAC;IAAD,CAAC,AAAlB,IAAkB;IAAL,cAAC;;;;ICAd;QAAuB,qBAAC;QAAxB;;QAA2B,CAAC;QAAD,QAAC;IAAD,CAAC,AAA5B,CAAuB,KAAC,GAAI;IAAf,cAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt b/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt index ef5e9e9dcab82..f220eb3e0edf8 100644 --- a/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt +++ b/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt @@ -8,15 +8,16 @@ sources: tests/cases/compiler/ref/a.ts,tests/cases/compiler/b.ts emittedFile:all.js sourceFile:tests/cases/compiler/ref/a.ts ------------------------------------------------------------------- ->>>var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { ->>> __extendStatics(d, b); ->>> function __() { this.constructor = d; } ->>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); ->>>}; +>>>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]; }; +>>> return function (d, b) { +>>> __extendStatics(d, b); +>>> function __() { this.constructor = d; } +>>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +>>> }; +>>>})(); >>>define("ref/a", ["require", "exports"], function (require, exports) { >>> "use strict"; >>> var A = (function () { @@ -24,13 +25,13 @@ sourceFile:tests/cases/compiler/ref/a.ts 2 > ^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(12, 5) Source(2, 1) + SourceIndex(0) +1 >Emitted(13, 5) Source(2, 1) + SourceIndex(0) --- >>> function A() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(13, 9) Source(2, 1) + SourceIndex(0) +1->Emitted(14, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -38,16 +39,16 @@ sourceFile:tests/cases/compiler/ref/a.ts 3 > ^^^^^^^^^-> 1->export class A { 2 > } -1->Emitted(14, 9) Source(2, 18) + SourceIndex(0) -2 >Emitted(14, 10) Source(2, 19) + SourceIndex(0) +1->Emitted(15, 9) Source(2, 18) + SourceIndex(0) +2 >Emitted(15, 10) Source(2, 19) + SourceIndex(0) --- >>> return A; 1->^^^^^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(15, 9) Source(2, 18) + SourceIndex(0) -2 >Emitted(15, 17) Source(2, 19) + SourceIndex(0) +1->Emitted(16, 9) Source(2, 18) + SourceIndex(0) +2 >Emitted(16, 17) Source(2, 19) + SourceIndex(0) --- >>> }()); 1 >^^^^ @@ -59,18 +60,18 @@ sourceFile:tests/cases/compiler/ref/a.ts 2 > } 3 > 4 > export class A { } -1 >Emitted(16, 5) Source(2, 18) + SourceIndex(0) -2 >Emitted(16, 6) Source(2, 19) + SourceIndex(0) -3 >Emitted(16, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(16, 10) Source(2, 19) + SourceIndex(0) +1 >Emitted(17, 5) Source(2, 18) + SourceIndex(0) +2 >Emitted(17, 6) Source(2, 19) + SourceIndex(0) +3 >Emitted(17, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(17, 10) Source(2, 19) + SourceIndex(0) --- >>> exports.A = A; 1->^^^^ 2 > ^^^^^^^^^^^^^^ 1-> 2 > A -1->Emitted(17, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(17, 19) Source(2, 15) + SourceIndex(0) +1->Emitted(18, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(18, 19) Source(2, 15) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:all.js @@ -84,21 +85,21 @@ sourceFile:tests/cases/compiler/b.ts 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >import {A} from "./ref/a"; > -1 >Emitted(21, 5) Source(2, 1) + SourceIndex(1) +1 >Emitted(22, 5) Source(2, 1) + SourceIndex(1) --- >>> __extends(B, _super); 1->^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^ 1->export class B extends 2 > A -1->Emitted(22, 9) Source(2, 24) + SourceIndex(1) -2 >Emitted(22, 30) Source(2, 25) + SourceIndex(1) +1->Emitted(23, 9) Source(2, 24) + SourceIndex(1) +2 >Emitted(23, 30) Source(2, 25) + SourceIndex(1) --- >>> function B() { 1 >^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > -1 >Emitted(23, 9) Source(2, 1) + SourceIndex(1) +1 >Emitted(24, 9) Source(2, 1) + SourceIndex(1) --- >>> return _super.apply(this, arguments) || this; >>> } @@ -107,16 +108,16 @@ sourceFile:tests/cases/compiler/b.ts 3 > ^^^^^^^^^-> 1->export class B extends A { 2 > } -1->Emitted(25, 9) Source(2, 28) + SourceIndex(1) -2 >Emitted(25, 10) Source(2, 29) + SourceIndex(1) +1->Emitted(26, 9) Source(2, 28) + SourceIndex(1) +2 >Emitted(26, 10) Source(2, 29) + SourceIndex(1) --- >>> return B; 1->^^^^^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(26, 9) Source(2, 28) + SourceIndex(1) -2 >Emitted(26, 17) Source(2, 29) + SourceIndex(1) +1->Emitted(27, 9) Source(2, 28) + SourceIndex(1) +2 >Emitted(27, 17) Source(2, 29) + SourceIndex(1) --- >>> }(a_1.A)); 1 >^^^^ @@ -132,20 +133,20 @@ sourceFile:tests/cases/compiler/b.ts 4 > export class B extends 5 > A 6 > { } -1 >Emitted(27, 5) Source(2, 28) + SourceIndex(1) -2 >Emitted(27, 6) Source(2, 29) + SourceIndex(1) -3 >Emitted(27, 6) Source(2, 1) + SourceIndex(1) -4 >Emitted(27, 7) Source(2, 24) + SourceIndex(1) -5 >Emitted(27, 12) Source(2, 25) + SourceIndex(1) -6 >Emitted(27, 15) Source(2, 29) + SourceIndex(1) +1 >Emitted(28, 5) Source(2, 28) + SourceIndex(1) +2 >Emitted(28, 6) Source(2, 29) + SourceIndex(1) +3 >Emitted(28, 6) Source(2, 1) + SourceIndex(1) +4 >Emitted(28, 7) Source(2, 24) + SourceIndex(1) +5 >Emitted(28, 12) Source(2, 25) + SourceIndex(1) +6 >Emitted(28, 15) Source(2, 29) + SourceIndex(1) --- >>> exports.B = B; 1->^^^^ 2 > ^^^^^^^^^^^^^^ 1-> 2 > B -1->Emitted(28, 5) Source(2, 14) + SourceIndex(1) -2 >Emitted(28, 19) Source(2, 15) + SourceIndex(1) +1->Emitted(29, 5) Source(2, 14) + SourceIndex(1) +2 >Emitted(29, 19) Source(2, 15) + SourceIndex(1) --- >>>}); >>>//# sourceMappingURL=all.js.map \ No newline at end of file diff --git a/tests/baselines/reference/outModuleConcatSystem.js b/tests/baselines/reference/outModuleConcatSystem.js index db9191cedf738..e5a1bd65cadca 100644 --- a/tests/baselines/reference/outModuleConcatSystem.js +++ b/tests/baselines/reference/outModuleConcatSystem.js @@ -9,15 +9,16 @@ import {A} from "./ref/a"; export class B extends A { } //// [all.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); System.register("ref/a", [], function (exports_1, context_1) { "use strict"; var __moduleName = context_1 && context_1.id; diff --git a/tests/baselines/reference/outModuleConcatSystem.js.map b/tests/baselines/reference/outModuleConcatSystem.js.map index 275b47b1363ad..25b706844e242 100644 --- a/tests/baselines/reference/outModuleConcatSystem.js.map +++ b/tests/baselines/reference/outModuleConcatSystem.js.map @@ -1,2 +1,2 @@ //// [all.js.map] -{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;YACA;gBAAA;gBAAiB,CAAC;gBAAD,QAAC;YAAD,CAAC,AAAlB,IAAkB;;QAClB,CAAC;;;;;;;;;;;;;;YCDD;gBAAuB,qBAAC;gBAAxB;;gBAA2B,CAAC;gBAAD,QAAC;YAAD,CAAC,AAA5B,CAAuB,KAAC,GAAI;;QAAA,CAAC"} \ No newline at end of file +{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;YACA;gBAAA;gBAAiB,CAAC;gBAAD,QAAC;YAAD,CAAC,AAAlB,IAAkB;;QAClB,CAAC;;;;;;;;;;;;;;YCDD;gBAAuB,qBAAC;gBAAxB;;gBAA2B,CAAC;gBAAD,QAAC;YAAD,CAAC,AAA5B,CAAuB,KAAC,GAAI;;QAAA,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt b/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt index fa08e14d1351e..72b6bf09dd140 100644 --- a/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt +++ b/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt @@ -8,15 +8,16 @@ sources: tests/cases/compiler/ref/a.ts,tests/cases/compiler/b.ts emittedFile:all.js sourceFile:tests/cases/compiler/ref/a.ts ------------------------------------------------------------------- ->>>var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { ->>> __extendStatics(d, b); ->>> function __() { this.constructor = d; } ->>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); ->>>}; +>>>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]; }; +>>> return function (d, b) { +>>> __extendStatics(d, b); +>>> function __() { this.constructor = d; } +>>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +>>> }; +>>>})(); >>>System.register("ref/a", [], function (exports_1, context_1) { >>> "use strict"; >>> var __moduleName = context_1 && context_1.id; @@ -29,13 +30,13 @@ sourceFile:tests/cases/compiler/ref/a.ts 2 > ^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(17, 13) Source(2, 1) + SourceIndex(0) +1 >Emitted(18, 13) Source(2, 1) + SourceIndex(0) --- >>> function A() { 1->^^^^^^^^^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(18, 17) Source(2, 1) + SourceIndex(0) +1->Emitted(19, 17) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^^^^^^^^^ @@ -43,16 +44,16 @@ sourceFile:tests/cases/compiler/ref/a.ts 3 > ^^^^^^^^^-> 1->export class A { 2 > } -1->Emitted(19, 17) Source(2, 18) + SourceIndex(0) -2 >Emitted(19, 18) Source(2, 19) + SourceIndex(0) +1->Emitted(20, 17) Source(2, 18) + SourceIndex(0) +2 >Emitted(20, 18) Source(2, 19) + SourceIndex(0) --- >>> return A; 1->^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(20, 17) Source(2, 18) + SourceIndex(0) -2 >Emitted(20, 25) Source(2, 19) + SourceIndex(0) +1->Emitted(21, 17) Source(2, 18) + SourceIndex(0) +2 >Emitted(21, 25) Source(2, 19) + SourceIndex(0) --- >>> }()); 1 >^^^^^^^^^^^^ @@ -64,10 +65,10 @@ sourceFile:tests/cases/compiler/ref/a.ts 2 > } 3 > 4 > export class A { } -1 >Emitted(21, 13) Source(2, 18) + SourceIndex(0) -2 >Emitted(21, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(21, 14) Source(2, 1) + SourceIndex(0) -4 >Emitted(21, 18) Source(2, 19) + SourceIndex(0) +1 >Emitted(22, 13) Source(2, 18) + SourceIndex(0) +2 >Emitted(22, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(22, 14) Source(2, 1) + SourceIndex(0) +4 >Emitted(22, 18) Source(2, 19) + SourceIndex(0) --- >>> exports_1("A", A); >>> } @@ -76,8 +77,8 @@ sourceFile:tests/cases/compiler/ref/a.ts 1-> > 2 > -1->Emitted(23, 9) Source(3, 1) + SourceIndex(0) -2 >Emitted(23, 10) Source(3, 2) + SourceIndex(0) +1->Emitted(24, 9) Source(3, 1) + SourceIndex(0) +2 >Emitted(24, 10) Source(3, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:all.js @@ -101,21 +102,21 @@ sourceFile:tests/cases/compiler/b.ts 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >import {A} from "./ref/a"; > -1 >Emitted(37, 13) Source(2, 1) + SourceIndex(1) +1 >Emitted(38, 13) Source(2, 1) + SourceIndex(1) --- >>> __extends(B, _super); 1->^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^ 1->export class B extends 2 > A -1->Emitted(38, 17) Source(2, 24) + SourceIndex(1) -2 >Emitted(38, 38) Source(2, 25) + SourceIndex(1) +1->Emitted(39, 17) Source(2, 24) + SourceIndex(1) +2 >Emitted(39, 38) Source(2, 25) + SourceIndex(1) --- >>> function B() { 1 >^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > -1 >Emitted(39, 17) Source(2, 1) + SourceIndex(1) +1 >Emitted(40, 17) Source(2, 1) + SourceIndex(1) --- >>> return _super.apply(this, arguments) || this; >>> } @@ -124,16 +125,16 @@ sourceFile:tests/cases/compiler/b.ts 3 > ^^^^^^^^^-> 1->export class B extends A { 2 > } -1->Emitted(41, 17) Source(2, 28) + SourceIndex(1) -2 >Emitted(41, 18) Source(2, 29) + SourceIndex(1) +1->Emitted(42, 17) Source(2, 28) + SourceIndex(1) +2 >Emitted(42, 18) Source(2, 29) + SourceIndex(1) --- >>> return B; 1->^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(42, 17) Source(2, 28) + SourceIndex(1) -2 >Emitted(42, 25) Source(2, 29) + SourceIndex(1) +1->Emitted(43, 17) Source(2, 28) + SourceIndex(1) +2 >Emitted(43, 25) Source(2, 29) + SourceIndex(1) --- >>> }(a_1.A)); 1 >^^^^^^^^^^^^ @@ -149,12 +150,12 @@ sourceFile:tests/cases/compiler/b.ts 4 > export class B extends 5 > A 6 > { } -1 >Emitted(43, 13) Source(2, 28) + SourceIndex(1) -2 >Emitted(43, 14) Source(2, 29) + SourceIndex(1) -3 >Emitted(43, 14) Source(2, 1) + SourceIndex(1) -4 >Emitted(43, 15) Source(2, 24) + SourceIndex(1) -5 >Emitted(43, 20) Source(2, 25) + SourceIndex(1) -6 >Emitted(43, 23) Source(2, 29) + SourceIndex(1) +1 >Emitted(44, 13) Source(2, 28) + SourceIndex(1) +2 >Emitted(44, 14) Source(2, 29) + SourceIndex(1) +3 >Emitted(44, 14) Source(2, 1) + SourceIndex(1) +4 >Emitted(44, 15) Source(2, 24) + SourceIndex(1) +5 >Emitted(44, 20) Source(2, 25) + SourceIndex(1) +6 >Emitted(44, 23) Source(2, 29) + SourceIndex(1) --- >>> exports_2("B", B); >>> } @@ -162,8 +163,8 @@ sourceFile:tests/cases/compiler/b.ts 2 > ^ 1-> 2 > -1->Emitted(45, 9) Source(2, 29) + SourceIndex(1) -2 >Emitted(45, 10) Source(2, 30) + SourceIndex(1) +1->Emitted(46, 9) Source(2, 29) + SourceIndex(1) +2 >Emitted(46, 10) Source(2, 30) + SourceIndex(1) --- >>> }; >>>}); diff --git a/tests/baselines/reference/outModuleTripleSlashRefs.js b/tests/baselines/reference/outModuleTripleSlashRefs.js index d8b543ef72720..8308f58cc99c2 100644 --- a/tests/baselines/reference/outModuleTripleSlashRefs.js +++ b/tests/baselines/reference/outModuleTripleSlashRefs.js @@ -31,15 +31,16 @@ export class B extends A { } //// [all.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); /// var Foo = (function () { function Foo() { diff --git a/tests/baselines/reference/outModuleTripleSlashRefs.js.map b/tests/baselines/reference/outModuleTripleSlashRefs.js.map index cb10515edd282..e91088c249c8a 100644 --- a/tests/baselines/reference/outModuleTripleSlashRefs.js.map +++ b/tests/baselines/reference/outModuleTripleSlashRefs.js.map @@ -1,2 +1,2 @@ //// [all.js.map] -{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/b.ts","tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":";;;;;;;;;AAAA,iCAAiC;AACjC;IAAA;IAEA,CAAC;IAAD,UAAC;AAAD,CAAC,AAFD,IAEC;;;ICFD,+BAA+B;IAC/B;QAAA;QAEA,CAAC;QAAD,QAAC;IAAD,CAAC,AAFD,IAEC;IAFY,cAAC;;;;ICDd;QAAuB,qBAAC;QAAxB;;QAA2B,CAAC;QAAD,QAAC;IAAD,CAAC,AAA5B,CAAuB,KAAC,GAAI;IAAf,cAAC"} \ No newline at end of file +{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/b.ts","tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,iCAAiC;AACjC;IAAA;IAEA,CAAC;IAAD,UAAC;AAAD,CAAC,AAFD,IAEC;;;ICFD,+BAA+B;IAC/B;QAAA;QAEA,CAAC;QAAD,QAAC;IAAD,CAAC,AAFD,IAEC;IAFY,cAAC;;;;ICDd;QAAuB,qBAAC;QAAxB;;QAA2B,CAAC;QAAD,QAAC;IAAD,CAAC,AAA5B,CAAuB,KAAC,GAAI;IAAf,cAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt b/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt index f035719a690b4..102664ea71a36 100644 --- a/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt +++ b/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt @@ -8,35 +8,36 @@ sources: tests/cases/compiler/ref/b.ts,tests/cases/compiler/ref/a.ts,tests/cases emittedFile:all.js sourceFile:tests/cases/compiler/ref/b.ts ------------------------------------------------------------------- ->>>var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { ->>> __extendStatics(d, b); ->>> function __() { this.constructor = d; } ->>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); ->>>}; +>>>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]; }; +>>> return function (d, b) { +>>> __extendStatics(d, b); +>>> function __() { this.constructor = d; } +>>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +>>> }; +>>>})(); >>>/// 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1 > 2 >/// -1 >Emitted(10, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(10, 34) Source(1, 34) + SourceIndex(0) +1 >Emitted(11, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(11, 34) Source(1, 34) + SourceIndex(0) --- >>>var Foo = (function () { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(11, 1) Source(2, 1) + SourceIndex(0) +1 >Emitted(12, 1) Source(2, 1) + SourceIndex(0) --- >>> function Foo() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(12, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(13, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -46,16 +47,16 @@ sourceFile:tests/cases/compiler/ref/b.ts > member: Bar; > 2 > } -1->Emitted(13, 5) Source(4, 1) + SourceIndex(0) -2 >Emitted(13, 6) Source(4, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(14, 6) Source(4, 2) + SourceIndex(0) --- >>> return Foo; 1->^^^^ 2 > ^^^^^^^^^^ 1-> 2 > } -1->Emitted(14, 5) Source(4, 1) + SourceIndex(0) -2 >Emitted(14, 15) Source(4, 2) + SourceIndex(0) +1->Emitted(15, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(15, 15) Source(4, 2) + SourceIndex(0) --- >>>}()); 1 > @@ -69,10 +70,10 @@ sourceFile:tests/cases/compiler/ref/b.ts 4 > class Foo { > member: Bar; > } -1 >Emitted(15, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(15, 2) Source(4, 2) + SourceIndex(0) -3 >Emitted(15, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(15, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(16, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(16, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(16, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(16, 6) Source(4, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:all.js @@ -86,21 +87,21 @@ sourceFile:tests/cases/compiler/ref/a.ts 1-> > 2 > /// -1->Emitted(18, 5) Source(2, 1) + SourceIndex(1) -2 >Emitted(18, 36) Source(2, 32) + SourceIndex(1) +1->Emitted(19, 5) Source(2, 1) + SourceIndex(1) +2 >Emitted(19, 36) Source(2, 32) + SourceIndex(1) --- >>> var A = (function () { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(19, 5) Source(3, 1) + SourceIndex(1) +1 >Emitted(20, 5) Source(3, 1) + SourceIndex(1) --- >>> function A() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(20, 9) Source(3, 1) + SourceIndex(1) +1->Emitted(21, 9) Source(3, 1) + SourceIndex(1) --- >>> } 1->^^^^^^^^ @@ -110,16 +111,16 @@ sourceFile:tests/cases/compiler/ref/a.ts > member: typeof GlobalFoo; > 2 > } -1->Emitted(21, 9) Source(5, 1) + SourceIndex(1) -2 >Emitted(21, 10) Source(5, 2) + SourceIndex(1) +1->Emitted(22, 9) Source(5, 1) + SourceIndex(1) +2 >Emitted(22, 10) Source(5, 2) + SourceIndex(1) --- >>> return A; 1->^^^^^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(22, 9) Source(5, 1) + SourceIndex(1) -2 >Emitted(22, 17) Source(5, 2) + SourceIndex(1) +1->Emitted(23, 9) Source(5, 1) + SourceIndex(1) +2 >Emitted(23, 17) Source(5, 2) + SourceIndex(1) --- >>> }()); 1 >^^^^ @@ -133,18 +134,18 @@ sourceFile:tests/cases/compiler/ref/a.ts 4 > export class A { > member: typeof GlobalFoo; > } -1 >Emitted(23, 5) Source(5, 1) + SourceIndex(1) -2 >Emitted(23, 6) Source(5, 2) + SourceIndex(1) -3 >Emitted(23, 6) Source(3, 1) + SourceIndex(1) -4 >Emitted(23, 10) Source(5, 2) + SourceIndex(1) +1 >Emitted(24, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(24, 6) Source(5, 2) + SourceIndex(1) +3 >Emitted(24, 6) Source(3, 1) + SourceIndex(1) +4 >Emitted(24, 10) Source(5, 2) + SourceIndex(1) --- >>> exports.A = A; 1->^^^^ 2 > ^^^^^^^^^^^^^^ 1-> 2 > A -1->Emitted(24, 5) Source(3, 14) + SourceIndex(1) -2 >Emitted(24, 19) Source(3, 15) + SourceIndex(1) +1->Emitted(25, 5) Source(3, 14) + SourceIndex(1) +2 >Emitted(25, 19) Source(3, 15) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:all.js @@ -158,21 +159,21 @@ sourceFile:tests/cases/compiler/b.ts 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >import {A} from "./ref/a"; > -1 >Emitted(28, 5) Source(2, 1) + SourceIndex(2) +1 >Emitted(29, 5) Source(2, 1) + SourceIndex(2) --- >>> __extends(B, _super); 1->^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^ 1->export class B extends 2 > A -1->Emitted(29, 9) Source(2, 24) + SourceIndex(2) -2 >Emitted(29, 30) Source(2, 25) + SourceIndex(2) +1->Emitted(30, 9) Source(2, 24) + SourceIndex(2) +2 >Emitted(30, 30) Source(2, 25) + SourceIndex(2) --- >>> function B() { 1 >^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > -1 >Emitted(30, 9) Source(2, 1) + SourceIndex(2) +1 >Emitted(31, 9) Source(2, 1) + SourceIndex(2) --- >>> return _super.apply(this, arguments) || this; >>> } @@ -181,16 +182,16 @@ sourceFile:tests/cases/compiler/b.ts 3 > ^^^^^^^^^-> 1->export class B extends A { 2 > } -1->Emitted(32, 9) Source(2, 28) + SourceIndex(2) -2 >Emitted(32, 10) Source(2, 29) + SourceIndex(2) +1->Emitted(33, 9) Source(2, 28) + SourceIndex(2) +2 >Emitted(33, 10) Source(2, 29) + SourceIndex(2) --- >>> return B; 1->^^^^^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(33, 9) Source(2, 28) + SourceIndex(2) -2 >Emitted(33, 17) Source(2, 29) + SourceIndex(2) +1->Emitted(34, 9) Source(2, 28) + SourceIndex(2) +2 >Emitted(34, 17) Source(2, 29) + SourceIndex(2) --- >>> }(a_1.A)); 1 >^^^^ @@ -206,20 +207,20 @@ sourceFile:tests/cases/compiler/b.ts 4 > export class B extends 5 > A 6 > { } -1 >Emitted(34, 5) Source(2, 28) + SourceIndex(2) -2 >Emitted(34, 6) Source(2, 29) + SourceIndex(2) -3 >Emitted(34, 6) Source(2, 1) + SourceIndex(2) -4 >Emitted(34, 7) Source(2, 24) + SourceIndex(2) -5 >Emitted(34, 12) Source(2, 25) + SourceIndex(2) -6 >Emitted(34, 15) Source(2, 29) + SourceIndex(2) +1 >Emitted(35, 5) Source(2, 28) + SourceIndex(2) +2 >Emitted(35, 6) Source(2, 29) + SourceIndex(2) +3 >Emitted(35, 6) Source(2, 1) + SourceIndex(2) +4 >Emitted(35, 7) Source(2, 24) + SourceIndex(2) +5 >Emitted(35, 12) Source(2, 25) + SourceIndex(2) +6 >Emitted(35, 15) Source(2, 29) + SourceIndex(2) --- >>> exports.B = B; 1->^^^^ 2 > ^^^^^^^^^^^^^^ 1-> 2 > B -1->Emitted(35, 5) Source(2, 14) + SourceIndex(2) -2 >Emitted(35, 19) Source(2, 15) + SourceIndex(2) +1->Emitted(36, 5) Source(2, 14) + SourceIndex(2) +2 >Emitted(36, 19) Source(2, 15) + SourceIndex(2) --- >>>}); >>>//# sourceMappingURL=all.js.map \ No newline at end of file diff --git a/tests/baselines/reference/overload1.js b/tests/baselines/reference/overload1.js index c4f19ef0ed70a..e73c84abb14e2 100644 --- a/tests/baselines/reference/overload1.js +++ b/tests/baselines/reference/overload1.js @@ -40,15 +40,16 @@ var v=x.g; //// [overload1.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var O; (function (O) { var A = (function () { diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks1.js b/tests/baselines/reference/overloadOnConstConstraintChecks1.js index 0888083df4205..18d16ef99138f 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks1.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks1.js @@ -23,15 +23,16 @@ class D implements MyDoc { } //// [overloadOnConstConstraintChecks1.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks2.js b/tests/baselines/reference/overloadOnConstConstraintChecks2.js index ab91c99f6ff1a..f78ed9a7d50c3 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks2.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks2.js @@ -12,15 +12,16 @@ function foo(name: any): A { } //// [overloadOnConstConstraintChecks2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks3.js b/tests/baselines/reference/overloadOnConstConstraintChecks3.js index d6d4ce137e670..b26d1067f5572 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks3.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks3.js @@ -13,15 +13,16 @@ function foo(name: any): A { //// [overloadOnConstConstraintChecks3.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { this.x = 1; diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks4.js b/tests/baselines/reference/overloadOnConstConstraintChecks4.js index 53b6b9049978b..db2d6e9adbaad 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks4.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks4.js @@ -14,15 +14,16 @@ function foo(name: any): Z { //// [overloadOnConstConstraintChecks4.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Z = (function () { function Z() { } diff --git a/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js b/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js index 0400ee2bb8836..438c41fa8bdc6 100644 --- a/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js +++ b/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js @@ -12,15 +12,16 @@ function foo(name: "DIV"): Derived2 { foo("HI"); //// [overloadOnConstantsInvalidOverload1.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/overloadResolution.js b/tests/baselines/reference/overloadResolution.js index 4b026d8c062d7..24de159979675 100644 --- a/tests/baselines/reference/overloadResolution.js +++ b/tests/baselines/reference/overloadResolution.js @@ -95,15 +95,16 @@ var s = fn5((n) => n.substr(0)); //// [overloadResolution.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var SomeBase = (function () { function SomeBase() { } diff --git a/tests/baselines/reference/overloadResolutionClassConstructors.js b/tests/baselines/reference/overloadResolutionClassConstructors.js index dcacbc4f9ecde..5f81c47c9ff1b 100644 --- a/tests/baselines/reference/overloadResolutionClassConstructors.js +++ b/tests/baselines/reference/overloadResolutionClassConstructors.js @@ -102,15 +102,16 @@ new fn5((n) => n.blah); // Error //// [overloadResolutionClassConstructors.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var SomeBase = (function () { function SomeBase() { } diff --git a/tests/baselines/reference/overloadResolutionConstructors.js b/tests/baselines/reference/overloadResolutionConstructors.js index 89953cb378a4e..02cc668c64d8a 100644 --- a/tests/baselines/reference/overloadResolutionConstructors.js +++ b/tests/baselines/reference/overloadResolutionConstructors.js @@ -103,15 +103,16 @@ var s = new fn5((n) => n.substr(0)); //// [overloadResolutionConstructors.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var SomeBase = (function () { function SomeBase() { } diff --git a/tests/baselines/reference/overloadingOnConstants1.js b/tests/baselines/reference/overloadingOnConstants1.js index 981ad6358a0cb..606d4aa674ce1 100644 --- a/tests/baselines/reference/overloadingOnConstants1.js +++ b/tests/baselines/reference/overloadingOnConstants1.js @@ -26,15 +26,16 @@ var htmlDivElement2: Derived1 = d2.createElement("div"); var htmlSpanElement2: Derived1 = d2.createElement("span"); //// [overloadingOnConstants1.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/overloadingOnConstants2.js b/tests/baselines/reference/overloadingOnConstants2.js index 4afdf483f2a83..7beb3662ff19f 100644 --- a/tests/baselines/reference/overloadingOnConstants2.js +++ b/tests/baselines/reference/overloadingOnConstants2.js @@ -28,15 +28,16 @@ var e: E = bar("bye", []); // E var f: C = bar("um", []); // C //// [overloadingOnConstants2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { this.x = 1; diff --git a/tests/baselines/reference/overridingPrivateStaticMembers.js b/tests/baselines/reference/overridingPrivateStaticMembers.js index 8372f54c40c48..b5bfa6ac62748 100644 --- a/tests/baselines/reference/overridingPrivateStaticMembers.js +++ b/tests/baselines/reference/overridingPrivateStaticMembers.js @@ -8,15 +8,16 @@ class Derived2 extends Base2 { } //// [overridingPrivateStaticMembers.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base2 = (function () { function Base2() { } diff --git a/tests/baselines/reference/parseErrorInHeritageClause1.js b/tests/baselines/reference/parseErrorInHeritageClause1.js index 7a29c55629ad9..293309025fe87 100644 --- a/tests/baselines/reference/parseErrorInHeritageClause1.js +++ b/tests/baselines/reference/parseErrorInHeritageClause1.js @@ -3,15 +3,16 @@ class C extends A # { } //// [parseErrorInHeritageClause1.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function (_super) { __extends(C, _super); function C() { diff --git a/tests/baselines/reference/parser509630.js b/tests/baselines/reference/parser509630.js index d95819d1e4595..482a078f3d124 100644 --- a/tests/baselines/reference/parser509630.js +++ b/tests/baselines/reference/parser509630.js @@ -7,15 +7,16 @@ class Any extends Type { //// [parser509630.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Type = (function () { function Type() { this.examples = []; // typing here diff --git a/tests/baselines/reference/parserAstSpans1.js b/tests/baselines/reference/parserAstSpans1.js index de26b5b2b3bd4..fd9c5822dd898 100644 --- a/tests/baselines/reference/parserAstSpans1.js +++ b/tests/baselines/reference/parserAstSpans1.js @@ -220,15 +220,16 @@ class c6 extends c5 { } //// [parserAstSpans1.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var c1 = (function () { function c1() { } diff --git a/tests/baselines/reference/parserClassDeclaration1.js b/tests/baselines/reference/parserClassDeclaration1.js index 47c15c9f6bf59..5b8ea6c183a27 100644 --- a/tests/baselines/reference/parserClassDeclaration1.js +++ b/tests/baselines/reference/parserClassDeclaration1.js @@ -3,15 +3,16 @@ class C extends A extends B { } //// [parserClassDeclaration1.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function (_super) { __extends(C, _super); function C() { diff --git a/tests/baselines/reference/parserClassDeclaration3.js b/tests/baselines/reference/parserClassDeclaration3.js index 4dd54e974cb00..a419598461f67 100644 --- a/tests/baselines/reference/parserClassDeclaration3.js +++ b/tests/baselines/reference/parserClassDeclaration3.js @@ -3,15 +3,16 @@ class C implements A extends B { } //// [parserClassDeclaration3.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function (_super) { __extends(C, _super); function C() { diff --git a/tests/baselines/reference/parserClassDeclaration4.js b/tests/baselines/reference/parserClassDeclaration4.js index 4e3c3e8424352..6ed902beed05f 100644 --- a/tests/baselines/reference/parserClassDeclaration4.js +++ b/tests/baselines/reference/parserClassDeclaration4.js @@ -3,15 +3,16 @@ class C extends A implements B extends C { } //// [parserClassDeclaration4.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function (_super) { __extends(C, _super); function C() { diff --git a/tests/baselines/reference/parserClassDeclaration5.js b/tests/baselines/reference/parserClassDeclaration5.js index e5ae42ec1ebdf..a8e54191fee4f 100644 --- a/tests/baselines/reference/parserClassDeclaration5.js +++ b/tests/baselines/reference/parserClassDeclaration5.js @@ -3,15 +3,16 @@ class C extends A implements B implements C { } //// [parserClassDeclaration5.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function (_super) { __extends(C, _super); function C() { diff --git a/tests/baselines/reference/parserClassDeclaration6.js b/tests/baselines/reference/parserClassDeclaration6.js index eb698fd236f21..648213d1516cc 100644 --- a/tests/baselines/reference/parserClassDeclaration6.js +++ b/tests/baselines/reference/parserClassDeclaration6.js @@ -3,15 +3,16 @@ class C extends A, B { } //// [parserClassDeclaration6.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function (_super) { __extends(C, _super); function C() { diff --git a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause2.js b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause2.js index d45ef8894b086..5cd993caf708d 100644 --- a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause2.js +++ b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause2.js @@ -3,15 +3,16 @@ class C extends A, { } //// [parserErrorRecovery_ExtendsOrImplementsClause2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function (_super) { __extends(C, _super); function C() { diff --git a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause4.js b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause4.js index f69ce2ad6000e..9d5b039321883 100644 --- a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause4.js +++ b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause4.js @@ -3,15 +3,16 @@ class C extends A implements { } //// [parserErrorRecovery_ExtendsOrImplementsClause4.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function (_super) { __extends(C, _super); function C() { diff --git a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause5.js b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause5.js index ec6a047916951..010eace1920ee 100644 --- a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause5.js +++ b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause5.js @@ -3,15 +3,16 @@ class C extends A, implements B, { } //// [parserErrorRecovery_ExtendsOrImplementsClause5.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function (_super) { __extends(C, _super); function C() { diff --git a/tests/baselines/reference/parserGenericsInTypeContexts1.js b/tests/baselines/reference/parserGenericsInTypeContexts1.js index 69e53b2974d4d..f85f5b6fd1a9e 100644 --- a/tests/baselines/reference/parserGenericsInTypeContexts1.js +++ b/tests/baselines/reference/parserGenericsInTypeContexts1.js @@ -18,15 +18,16 @@ function f2(): F { //// [parserGenericsInTypeContexts1.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function (_super) { __extends(C, _super); function C() { diff --git a/tests/baselines/reference/parserGenericsInTypeContexts2.js b/tests/baselines/reference/parserGenericsInTypeContexts2.js index ac24d025b8403..1491fd37b5fd5 100644 --- a/tests/baselines/reference/parserGenericsInTypeContexts2.js +++ b/tests/baselines/reference/parserGenericsInTypeContexts2.js @@ -18,15 +18,16 @@ function f2(): F, Y>> { //// [parserGenericsInTypeContexts2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function (_super) { __extends(C, _super); function C() { diff --git a/tests/baselines/reference/parserRealSource10.js b/tests/baselines/reference/parserRealSource10.js index ea095e52c6990..d2e8c5ff1f738 100644 --- a/tests/baselines/reference/parserRealSource10.js +++ b/tests/baselines/reference/parserRealSource10.js @@ -458,15 +458,16 @@ module TypeScript { //// [parserRealSource10.js] // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. // See LICENSE.txt in the project root for complete license information. -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); /// var TypeScript; (function (TypeScript) { diff --git a/tests/baselines/reference/parserRealSource11.js b/tests/baselines/reference/parserRealSource11.js index 9f4f4fc2f7062..0e39573238c43 100644 --- a/tests/baselines/reference/parserRealSource11.js +++ b/tests/baselines/reference/parserRealSource11.js @@ -2367,15 +2367,16 @@ module TypeScript { //// [parserRealSource11.js] // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. // See LICENSE.txt in the project root for complete license information. -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); /// var TypeScript; (function (TypeScript) { diff --git a/tests/baselines/reference/parserharness.js b/tests/baselines/reference/parserharness.js index 16fe9508c2a19..f173052a11257 100644 --- a/tests/baselines/reference/parserharness.js +++ b/tests/baselines/reference/parserharness.js @@ -2096,15 +2096,16 @@ module Harness { // See the License for the specific language governing permissions and // limitations under the License. // -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); /// /// /// diff --git a/tests/baselines/reference/partiallyAnnotatedFunctionInferenceError.js b/tests/baselines/reference/partiallyAnnotatedFunctionInferenceError.js index 1c666d92c9d5b..0d1097b4773a5 100644 --- a/tests/baselines/reference/partiallyAnnotatedFunctionInferenceError.js +++ b/tests/baselines/reference/partiallyAnnotatedFunctionInferenceError.js @@ -16,15 +16,16 @@ testError((t1, t2, t3: D) => {}) //// [partiallyAnnotatedFunctionInferenceError.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/partiallyAnnotatedFunctionInferenceWithTypeParameter.js b/tests/baselines/reference/partiallyAnnotatedFunctionInferenceWithTypeParameter.js index b43a5a5a2c92f..c55721cb64739 100644 --- a/tests/baselines/reference/partiallyAnnotatedFunctionInferenceWithTypeParameter.js +++ b/tests/baselines/reference/partiallyAnnotatedFunctionInferenceWithTypeParameter.js @@ -35,15 +35,16 @@ testRest((t2, ...t3: D[]) => {}) //// [partiallyAnnotatedFunctionInferenceWithTypeParameter.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/primitiveMembers.js b/tests/baselines/reference/primitiveMembers.js index 4c00a4fb3ead2..6ef048203ae0e 100644 --- a/tests/baselines/reference/primitiveMembers.js +++ b/tests/baselines/reference/primitiveMembers.js @@ -32,15 +32,16 @@ class foo extends baz { public bar(){ return undefined}; } //// [primitiveMembers.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var x = 5; var r = /yo/; r.source; diff --git a/tests/baselines/reference/privacyClass.js b/tests/baselines/reference/privacyClass.js index be90775cf0bc1..07ea7691ac2ac 100644 --- a/tests/baselines/reference/privacyClass.js +++ b/tests/baselines/reference/privacyClass.js @@ -129,15 +129,16 @@ export class glo_C12_public extends glo_c_private implements glo_i_private, glo //// [privacyClass.js] "use strict"; -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var m1; (function (m1) { var m1_c_public = (function () { diff --git a/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js b/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js index 1802f61717cb7..c1b219a3eaf40 100644 --- a/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js +++ b/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js @@ -99,15 +99,16 @@ class publicClassExtendingPublicClassInGlobal extends publicClassInGlobal { //// [privacyClassExtendsClauseDeclFile_externalModule.js] "use strict"; -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var publicModule; (function (publicModule) { var publicClassInPublicModule = (function () { @@ -289,15 +290,16 @@ var publicClassExtendingFromPrivateModuleClass = (function (_super) { }(privateModule.publicClassInPrivateModule)); exports.publicClassExtendingFromPrivateModuleClass = publicClassExtendingFromPrivateModuleClass; //// [privacyClassExtendsClauseDeclFile_GlobalFile.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var publicModuleInGlobal; (function (publicModuleInGlobal) { var publicClassInPublicModule = (function () { diff --git a/tests/baselines/reference/privacyGloClass.js b/tests/baselines/reference/privacyGloClass.js index d74a59d5ac262..9698b1a097767 100644 --- a/tests/baselines/reference/privacyGloClass.js +++ b/tests/baselines/reference/privacyGloClass.js @@ -61,15 +61,16 @@ class glo_C11_public extends glo_c_public implements glo_i_public { //// [privacyGloClass.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var m1; (function (m1) { var m1_c_public = (function () { diff --git a/tests/baselines/reference/privateAccessInSubclass1.js b/tests/baselines/reference/privateAccessInSubclass1.js index bbdcd5a433834..0f02de4ad4d6a 100644 --- a/tests/baselines/reference/privateAccessInSubclass1.js +++ b/tests/baselines/reference/privateAccessInSubclass1.js @@ -10,15 +10,16 @@ class D extends Base { } //// [privateAccessInSubclass1.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/privateInstanceMemberAccessibility.js b/tests/baselines/reference/privateInstanceMemberAccessibility.js index d1efc894fc351..5f9a857269e5e 100644 --- a/tests/baselines/reference/privateInstanceMemberAccessibility.js +++ b/tests/baselines/reference/privateInstanceMemberAccessibility.js @@ -14,15 +14,16 @@ class Derived extends Base { } //// [privateInstanceMemberAccessibility.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/privateProtectedMembersAreNotAccessibleDestructuring.js b/tests/baselines/reference/privateProtectedMembersAreNotAccessibleDestructuring.js index 6f9b717888d3e..f9d4fe56c392c 100644 --- a/tests/baselines/reference/privateProtectedMembersAreNotAccessibleDestructuring.js +++ b/tests/baselines/reference/privateProtectedMembersAreNotAccessibleDestructuring.js @@ -22,15 +22,16 @@ let { priv: a, prot: b, privateMethod: f } = k; // error //// [privateProtectedMembersAreNotAccessibleDestructuring.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var K = (function () { function K() { } diff --git a/tests/baselines/reference/privateStaticMemberAccessibility.js b/tests/baselines/reference/privateStaticMemberAccessibility.js index 319f4fac001a0..548b08b9b92e9 100644 --- a/tests/baselines/reference/privateStaticMemberAccessibility.js +++ b/tests/baselines/reference/privateStaticMemberAccessibility.js @@ -9,15 +9,16 @@ class Derived extends Base { } //// [privateStaticMemberAccessibility.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/privateStaticNotAccessibleInClodule2.js b/tests/baselines/reference/privateStaticNotAccessibleInClodule2.js index 974dcb477f567..a417144143052 100644 --- a/tests/baselines/reference/privateStaticNotAccessibleInClodule2.js +++ b/tests/baselines/reference/privateStaticNotAccessibleInClodule2.js @@ -16,15 +16,16 @@ module D { //// [privateStaticNotAccessibleInClodule2.js] // Any attempt to access a private property member outside the class body that contains its declaration results in a compile-time error. -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/amd/testGlo.js b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/amd/testGlo.js index 3ab7685aec496..26700d01d5970 100644 --- a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/amd/testGlo.js +++ b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/amd/testGlo.js @@ -1,12 +1,13 @@ -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var m2; (function (m2) { m2.c1 = new m2.mExported.me.class1; diff --git a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/node/testGlo.js b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/node/testGlo.js index 3ab7685aec496..26700d01d5970 100644 --- a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/node/testGlo.js +++ b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/node/testGlo.js @@ -1,12 +1,13 @@ -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var m2; (function (m2) { m2.c1 = new m2.mExported.me.class1; diff --git a/tests/baselines/reference/project/prologueEmit/amd/out.js b/tests/baselines/reference/project/prologueEmit/amd/out.js index 08697664279e1..5d13ff191f093 100644 --- a/tests/baselines/reference/project/prologueEmit/amd/out.js +++ b/tests/baselines/reference/project/prologueEmit/amd/out.js @@ -1,12 +1,13 @@ -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var _this = this; // Add a lambda to ensure global 'this' capture is triggered (function () { return _this.window; }); diff --git a/tests/baselines/reference/project/prologueEmit/node/out.js b/tests/baselines/reference/project/prologueEmit/node/out.js index 08697664279e1..5d13ff191f093 100644 --- a/tests/baselines/reference/project/prologueEmit/node/out.js +++ b/tests/baselines/reference/project/prologueEmit/node/out.js @@ -1,12 +1,13 @@ -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var _this = this; // Add a lambda to ensure global 'this' capture is triggered (function () { return _this.window; }); diff --git a/tests/baselines/reference/project/quotesInFileAndDirectoryNames/amd/m'ain.js b/tests/baselines/reference/project/quotesInFileAndDirectoryNames/amd/m'ain.js index dd192c408635d..859117be88075 100644 --- a/tests/baselines/reference/project/quotesInFileAndDirectoryNames/amd/m'ain.js +++ b/tests/baselines/reference/project/quotesInFileAndDirectoryNames/amd/m'ain.js @@ -1,13 +1,14 @@ /// -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var ClassC = (function (_super) { __extends(ClassC, _super); function ClassC() { diff --git a/tests/baselines/reference/project/quotesInFileAndDirectoryNames/node/m'ain.js b/tests/baselines/reference/project/quotesInFileAndDirectoryNames/node/m'ain.js index dd192c408635d..859117be88075 100644 --- a/tests/baselines/reference/project/quotesInFileAndDirectoryNames/node/m'ain.js +++ b/tests/baselines/reference/project/quotesInFileAndDirectoryNames/node/m'ain.js @@ -1,13 +1,14 @@ /// -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var ClassC = (function (_super) { __extends(ClassC, _super); function ClassC() { diff --git a/tests/baselines/reference/propertiesAndIndexers.js b/tests/baselines/reference/propertiesAndIndexers.js index 87f12dd7242b5..9ea39c60dfb2b 100644 --- a/tests/baselines/reference/propertiesAndIndexers.js +++ b/tests/baselines/reference/propertiesAndIndexers.js @@ -52,15 +52,16 @@ var c: { }; //// [propertiesAndIndexers.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var P = (function () { function P() { } diff --git a/tests/baselines/reference/propertyAccess.js b/tests/baselines/reference/propertyAccess.js index 89c6ed0efe9fc..4a3910e8594b5 100644 --- a/tests/baselines/reference/propertyAccess.js +++ b/tests/baselines/reference/propertyAccess.js @@ -151,15 +151,16 @@ var x3: A; //// [propertyAccess.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js index 346024cf47065..665550081b30f 100644 --- a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js @@ -83,15 +83,16 @@ var r4 = b.foo(aB, aB); // no inferences for T so constraint isn't satisfied, er //// [propertyAccessOnTypeParameterWithConstraints2.js] // generic types should behave as if they have properties of their constraint type -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js index c4d0a8e8ac403..a79ba9ed75cac 100644 --- a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js @@ -58,15 +58,16 @@ var r4 = b.foo(new B()); // valid call to an invalid function //// [propertyAccessOnTypeParameterWithConstraints3.js] // generic types should behave as if they have properties of their constraint type -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js index 4d677b85396a8..41de2d8c0e03f 100644 --- a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js @@ -45,15 +45,16 @@ var b = { var r4 = b.foo(new B()); // error after constraints above made illegal, doesn't matter //// [propertyAccessOnTypeParameterWithConstraints5.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass.js index e0a051b309603..a94af12901d24 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass.js @@ -39,15 +39,16 @@ class E extends C { } //// [protectedClassPropertyAccessibleWithinNestedSubclass.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var B = (function () { function B() { } diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass1.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass1.js index 26d42b7b65840..d26f70b75bd32 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass1.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass1.js @@ -115,15 +115,16 @@ d3.x; // Error, neither within their declaring class nor class d4.x; // Error, neither within their declaring class nor classes derived from their declaring class //// [protectedClassPropertyAccessibleWithinNestedSubclass1.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js index af3440f9fb8e8..330f73bca191e 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js @@ -21,15 +21,16 @@ class C extends B { //// [protectedClassPropertyAccessibleWithinSubclass.js] // no errors -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var B = (function () { function B() { } diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass2.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass2.js index ba4c9f079f8fc..cbde651add9b8 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass2.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass2.js @@ -95,15 +95,16 @@ d3.x; // Error, neither within their declaring class nor class d4.x; // Error, neither within their declaring class nor classes derived from their declaring class //// [protectedClassPropertyAccessibleWithinSubclass2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass3.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass3.js index 8b45c46ec8393..a2cb66b2997c9 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass3.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass3.js @@ -14,15 +14,16 @@ class Derived extends Base { } //// [protectedClassPropertyAccessibleWithinSubclass3.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/protectedInstanceMemberAccessibility.js b/tests/baselines/reference/protectedInstanceMemberAccessibility.js index 682ff897e522f..abe608b1ed4e7 100644 --- a/tests/baselines/reference/protectedInstanceMemberAccessibility.js +++ b/tests/baselines/reference/protectedInstanceMemberAccessibility.js @@ -45,15 +45,16 @@ class C extends A { //// [protectedInstanceMemberAccessibility.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/protectedMembers.js b/tests/baselines/reference/protectedMembers.js index f0553d721841f..689d11be3c359 100644 --- a/tests/baselines/reference/protectedMembers.js +++ b/tests/baselines/reference/protectedMembers.js @@ -116,15 +116,16 @@ class B3 extends A3 { //// [protectedMembers.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); // Class with protected members var C1 = (function () { function C1() { diff --git a/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass.js b/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass.js index 76bb5d10455f2..f681073d629bb 100644 --- a/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass.js +++ b/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass.js @@ -44,15 +44,16 @@ Derived2.x; // Error, neither within their declaring class nor classes deriv Derived3.x; // Error, neither within their declaring class nor classes derived from their declaring class //// [protectedStaticClassPropertyAccessibleWithinSubclass.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass2.js b/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass2.js index f694c9f301d87..3096ea6aa3ce9 100644 --- a/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass2.js +++ b/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass2.js @@ -22,15 +22,16 @@ class Derived2 extends Derived1 { } //// [protectedStaticClassPropertyAccessibleWithinSubclass2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/qualifiedName_entity-name-resolution-does-not-affect-class-heritage.js b/tests/baselines/reference/qualifiedName_entity-name-resolution-does-not-affect-class-heritage.js index 11c49dbb28ddd..96df9d1d85b91 100644 --- a/tests/baselines/reference/qualifiedName_entity-name-resolution-does-not-affect-class-heritage.js +++ b/tests/baselines/reference/qualifiedName_entity-name-resolution-does-not-affect-class-heritage.js @@ -7,15 +7,16 @@ class Beta extends Alpha.x { } //// [qualifiedName_entity-name-resolution-does-not-affect-class-heritage.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Alpha; (function (Alpha) { Alpha.x = 100; diff --git a/tests/baselines/reference/readonlyConstructorAssignment.js b/tests/baselines/reference/readonlyConstructorAssignment.js index eb268d9aafe0e..42f88abcf5407 100644 --- a/tests/baselines/reference/readonlyConstructorAssignment.js +++ b/tests/baselines/reference/readonlyConstructorAssignment.js @@ -41,15 +41,16 @@ class E extends D { //// [readonlyConstructorAssignment.js] // Tests that readonly parameter properties behave like regular readonly properties -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A(x) { this.x = x; diff --git a/tests/baselines/reference/recursiveBaseCheck3.js b/tests/baselines/reference/recursiveBaseCheck3.js index 435f87a6b1a96..3e2cbcee520eb 100644 --- a/tests/baselines/reference/recursiveBaseCheck3.js +++ b/tests/baselines/reference/recursiveBaseCheck3.js @@ -5,15 +5,16 @@ class C extends A { } (new C).blah; //// [recursiveBaseCheck3.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function (_super) { __extends(A, _super); function A() { diff --git a/tests/baselines/reference/recursiveBaseCheck4.js b/tests/baselines/reference/recursiveBaseCheck4.js index 5790cabf7d8a8..5bcf5bb63a787 100644 --- a/tests/baselines/reference/recursiveBaseCheck4.js +++ b/tests/baselines/reference/recursiveBaseCheck4.js @@ -3,15 +3,16 @@ class M extends M { } (new M).blah; //// [recursiveBaseCheck4.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var M = (function (_super) { __extends(M, _super); function M() { diff --git a/tests/baselines/reference/recursiveBaseCheck6.js b/tests/baselines/reference/recursiveBaseCheck6.js index c9a7d68532266..7c5134c397c40 100644 --- a/tests/baselines/reference/recursiveBaseCheck6.js +++ b/tests/baselines/reference/recursiveBaseCheck6.js @@ -3,15 +3,16 @@ class S18 extends S18<{ S19: A; }>{ } (new S18()).blah; //// [recursiveBaseCheck6.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var S18 = (function (_super) { __extends(S18, _super); function S18() { diff --git a/tests/baselines/reference/recursiveBaseConstructorCreation1.js b/tests/baselines/reference/recursiveBaseConstructorCreation1.js index b62f9f6622f80..0caeb0b3b675d 100644 --- a/tests/baselines/reference/recursiveBaseConstructorCreation1.js +++ b/tests/baselines/reference/recursiveBaseConstructorCreation1.js @@ -7,15 +7,16 @@ var x = new C2(); // Valid //// [recursiveBaseConstructorCreation1.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C1 = (function () { function C1() { } diff --git a/tests/baselines/reference/recursiveClassInstantiationsWithDefaultConstructors.js b/tests/baselines/reference/recursiveClassInstantiationsWithDefaultConstructors.js index 5c5d01c453d72..2b0c30072dc07 100644 --- a/tests/baselines/reference/recursiveClassInstantiationsWithDefaultConstructors.js +++ b/tests/baselines/reference/recursiveClassInstantiationsWithDefaultConstructors.js @@ -10,15 +10,16 @@ export class MemberNameArray extends MemberName { //// [recursiveClassInstantiationsWithDefaultConstructors.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = new TypeScript2.MemberNameArray(); var TypeScript2; (function (TypeScript2) { diff --git a/tests/baselines/reference/recursiveClassReferenceTest.js b/tests/baselines/reference/recursiveClassReferenceTest.js index e03965b23ea82..8469935d13bc2 100644 --- a/tests/baselines/reference/recursiveClassReferenceTest.js +++ b/tests/baselines/reference/recursiveClassReferenceTest.js @@ -105,15 +105,16 @@ module Sample.Thing.Languages.PlainText { //// [recursiveClassReferenceTest.js] // Scenario 1: Test reqursive function call with "this" parameter // Scenario 2: Test recursive function call with cast and "this" parameter -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Sample; (function (Sample) { var Actions; diff --git a/tests/baselines/reference/recursiveClassReferenceTest.js.map b/tests/baselines/reference/recursiveClassReferenceTest.js.map index f322d6f051041..b27f18ddffac6 100644 --- a/tests/baselines/reference/recursiveClassReferenceTest.js.map +++ b/tests/baselines/reference/recursiveClassReferenceTest.js.map @@ -1,2 +1,2 @@ //// [recursiveClassReferenceTest.js.map] -{"version":3,"file":"recursiveClassReferenceTest.js","sourceRoot":"","sources":["recursiveClassReferenceTest.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,0EAA0E;;;;;;;;;;AA8B1E,IAAO,MAAM,CAUZ;AAVD,WAAO,MAAM;IAAC,IAAA,OAAO,CAUpB;IAVa,WAAA,OAAO;QAAC,IAAA,KAAK,CAU1B;QAVqB,WAAA,OAAK;YAAC,IAAA,IAAI,CAU/B;YAV2B,WAAA,IAAI;gBAC/B;oBAAA;oBAQA,CAAC;oBANO,+BAAK,GAAZ,cAAiB,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;oBAExB,6BAAG,GAAV,UAAW,KAA6B;wBAEvC,MAAM,CAAC,IAAI,CAAC;oBACb,CAAC;oBACF,sBAAC;gBAAD,CAAC,AARD,IAQC;gBARY,oBAAe,kBAQ3B,CAAA;YACF,CAAC,EAV2B,IAAI,GAAJ,YAAI,KAAJ,YAAI,QAU/B;QAAD,CAAC,EAVqB,KAAK,GAAL,aAAK,KAAL,aAAK,QAU1B;IAAD,CAAC,EAVa,OAAO,GAAP,cAAO,KAAP,cAAO,QAUpB;AAAD,CAAC,EAVM,MAAM,KAAN,MAAM,QAUZ;AAED,WAAO,MAAM;IAAC,IAAA,KAAK,CAoBlB;IApBa,WAAA,KAAK;QAAC,IAAA,OAAO,CAoB1B;QApBmB,WAAA,OAAO;YAC1B;gBAKC,oBAAoB,SAAkC;oBAAlC,cAAS,GAAT,SAAS,CAAyB;oBAD9C,YAAO,GAAO,IAAI,CAAC;oBAEvB,aAAa;oBACb,SAAS,CAAC,SAAS,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;gBAC3C,CAAC;gBANM,wBAAG,GAAV,UAAW,MAAyC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;oBAAA,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;gBAAA,CAAC,CAAA,CAAC;gBAQlF,+BAAU,GAAjB;oBACC,MAAM,CAAC,OAAO,CAAC;gBAChB,CAAC;gBAEM,4BAAO,GAAd;gBAEA,CAAC;gBAEF,iBAAC;YAAD,CAAC,AAlBD,IAkBC;YAlBY,kBAAU,aAkBtB,CAAA;QACF,CAAC,EApBmB,OAAO,GAAP,aAAO,KAAP,aAAO,QAoB1B;IAAD,CAAC,EApBa,KAAK,GAAL,YAAK,KAAL,YAAK,QAoBlB;AAAD,CAAC,EApBM,MAAM,KAAN,MAAM,QAoBZ;AAGD;IAAA;IAAuF,CAAC;IAA3C,sCAAe,GAAtB,cAAmC,MAAM,CAAC,IAAI,CAAC,CAAA,CAAC;IAAC,mBAAC;AAAD,CAAC,AAAxF,IAAwF;AASxF,WAAO,MAAM;IAAC,IAAA,KAAK,CAwBlB;IAxBa,WAAA,KAAK;QAAC,IAAA,SAAS,CAwB5B;QAxBmB,WAAA,SAAS;YAAC,IAAA,SAAS,CAwBtC;YAxB6B,WAAA,SAAS;gBAEtC;oBACO,eAAoB,IAAW;wBAAX,SAAI,GAAJ,IAAI,CAAO;oBAAI,CAAC;oBACnC,qBAAK,GAAZ;wBACC,MAAM,CAAC,IAAI,CAAC;oBACb,CAAC;oBAEM,sBAAM,GAAb,UAAc,KAAY;wBACzB,MAAM,CAAC,IAAI,KAAK,KAAK,CAAC;oBACvB,CAAC;oBAEM,uBAAO,GAAd,cAA0B,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;oBACzC,YAAC;gBAAD,CAAC,AAXD,IAWC;gBAXY,eAAK,QAWjB,CAAA;gBAED;oBAA0B,wBAAY;oBAAtC;;oBAQA,CAAC;oBANA,aAAa;oBACN,8BAAe,GAAtB;wBACC,MAAM,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC;oBACxB,CAAC;oBAGF,WAAC;gBAAD,CAAC,AARD,CAA0B,YAAY,GAQrC;gBARY,cAAI,OAQhB,CAAA;YACF,CAAC,EAxB6B,SAAS,GAAT,mBAAS,KAAT,mBAAS,QAwBtC;QAAD,CAAC,EAxBmB,SAAS,GAAT,eAAS,KAAT,eAAS,QAwB5B;IAAD,CAAC,EAxBa,KAAK,GAAL,YAAK,KAAL,YAAK,QAwBlB;AAAD,CAAC,EAxBM,MAAM,KAAN,MAAM,QAwBZ"} \ No newline at end of file +{"version":3,"file":"recursiveClassReferenceTest.js","sourceRoot":"","sources":["recursiveClassReferenceTest.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,0EAA0E;;;;;;;;;;;AA8B1E,IAAO,MAAM,CAUZ;AAVD,WAAO,MAAM;IAAC,IAAA,OAAO,CAUpB;IAVa,WAAA,OAAO;QAAC,IAAA,KAAK,CAU1B;QAVqB,WAAA,OAAK;YAAC,IAAA,IAAI,CAU/B;YAV2B,WAAA,IAAI;gBAC/B;oBAAA;oBAQA,CAAC;oBANO,+BAAK,GAAZ,cAAiB,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;oBAExB,6BAAG,GAAV,UAAW,KAA6B;wBAEvC,MAAM,CAAC,IAAI,CAAC;oBACb,CAAC;oBACF,sBAAC;gBAAD,CAAC,AARD,IAQC;gBARY,oBAAe,kBAQ3B,CAAA;YACF,CAAC,EAV2B,IAAI,GAAJ,YAAI,KAAJ,YAAI,QAU/B;QAAD,CAAC,EAVqB,KAAK,GAAL,aAAK,KAAL,aAAK,QAU1B;IAAD,CAAC,EAVa,OAAO,GAAP,cAAO,KAAP,cAAO,QAUpB;AAAD,CAAC,EAVM,MAAM,KAAN,MAAM,QAUZ;AAED,WAAO,MAAM;IAAC,IAAA,KAAK,CAoBlB;IApBa,WAAA,KAAK;QAAC,IAAA,OAAO,CAoB1B;QApBmB,WAAA,OAAO;YAC1B;gBAKC,oBAAoB,SAAkC;oBAAlC,cAAS,GAAT,SAAS,CAAyB;oBAD9C,YAAO,GAAO,IAAI,CAAC;oBAEvB,aAAa;oBACb,SAAS,CAAC,SAAS,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;gBAC3C,CAAC;gBANM,wBAAG,GAAV,UAAW,MAAyC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;oBAAA,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;gBAAA,CAAC,CAAA,CAAC;gBAQlF,+BAAU,GAAjB;oBACC,MAAM,CAAC,OAAO,CAAC;gBAChB,CAAC;gBAEM,4BAAO,GAAd;gBAEA,CAAC;gBAEF,iBAAC;YAAD,CAAC,AAlBD,IAkBC;YAlBY,kBAAU,aAkBtB,CAAA;QACF,CAAC,EApBmB,OAAO,GAAP,aAAO,KAAP,aAAO,QAoB1B;IAAD,CAAC,EApBa,KAAK,GAAL,YAAK,KAAL,YAAK,QAoBlB;AAAD,CAAC,EApBM,MAAM,KAAN,MAAM,QAoBZ;AAGD;IAAA;IAAuF,CAAC;IAA3C,sCAAe,GAAtB,cAAmC,MAAM,CAAC,IAAI,CAAC,CAAA,CAAC;IAAC,mBAAC;AAAD,CAAC,AAAxF,IAAwF;AASxF,WAAO,MAAM;IAAC,IAAA,KAAK,CAwBlB;IAxBa,WAAA,KAAK;QAAC,IAAA,SAAS,CAwB5B;QAxBmB,WAAA,SAAS;YAAC,IAAA,SAAS,CAwBtC;YAxB6B,WAAA,SAAS;gBAEtC;oBACO,eAAoB,IAAW;wBAAX,SAAI,GAAJ,IAAI,CAAO;oBAAI,CAAC;oBACnC,qBAAK,GAAZ;wBACC,MAAM,CAAC,IAAI,CAAC;oBACb,CAAC;oBAEM,sBAAM,GAAb,UAAc,KAAY;wBACzB,MAAM,CAAC,IAAI,KAAK,KAAK,CAAC;oBACvB,CAAC;oBAEM,uBAAO,GAAd,cAA0B,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;oBACzC,YAAC;gBAAD,CAAC,AAXD,IAWC;gBAXY,eAAK,QAWjB,CAAA;gBAED;oBAA0B,wBAAY;oBAAtC;;oBAQA,CAAC;oBANA,aAAa;oBACN,8BAAe,GAAtB;wBACC,MAAM,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC;oBACxB,CAAC;oBAGF,WAAC;gBAAD,CAAC,AARD,CAA0B,YAAY,GAQrC;gBARY,cAAI,OAQhB,CAAA;YACF,CAAC,EAxB6B,SAAS,GAAT,mBAAS,KAAT,mBAAS,QAwBtC;QAAD,CAAC,EAxBmB,SAAS,GAAT,eAAS,KAAT,eAAS,QAwB5B;IAAD,CAAC,EAxBa,KAAK,GAAL,YAAK,KAAL,YAAK,QAwBlB;AAAD,CAAC,EAxBM,MAAM,KAAN,MAAM,QAwBZ"} \ No newline at end of file diff --git a/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt b/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt index d8a6d74f0a875..c1c4865024160 100644 --- a/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt +++ b/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt @@ -26,15 +26,16 @@ sourceFile:recursiveClassReferenceTest.ts 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) 2 >Emitted(2, 75) Source(2, 75) + SourceIndex(0) --- ->>>var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { ->>> __extendStatics(d, b); ->>> function __() { this.constructor = d; } ->>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); ->>>}; +>>>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]; }; +>>> return function (d, b) { +>>> __extendStatics(d, b); +>>> function __() { this.constructor = d; } +>>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +>>> }; +>>>})(); >>>var Sample; 1 > 2 >^^^^ @@ -85,10 +86,10 @@ sourceFile:recursiveClassReferenceTest.ts > } > } > } -1 >Emitted(12, 1) Source(32, 1) + SourceIndex(0) -2 >Emitted(12, 5) Source(32, 8) + SourceIndex(0) -3 >Emitted(12, 11) Source(32, 14) + SourceIndex(0) -4 >Emitted(12, 12) Source(42, 2) + SourceIndex(0) +1 >Emitted(13, 1) Source(32, 1) + SourceIndex(0) +2 >Emitted(13, 5) Source(32, 8) + SourceIndex(0) +3 >Emitted(13, 11) Source(32, 14) + SourceIndex(0) +4 >Emitted(13, 12) Source(42, 2) + SourceIndex(0) --- >>>(function (Sample) { 1-> @@ -97,9 +98,9 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 >module 3 > Sample -1->Emitted(13, 1) Source(32, 1) + SourceIndex(0) -2 >Emitted(13, 12) Source(32, 8) + SourceIndex(0) -3 >Emitted(13, 18) Source(32, 14) + SourceIndex(0) +1->Emitted(14, 1) Source(32, 1) + SourceIndex(0) +2 >Emitted(14, 12) Source(32, 8) + SourceIndex(0) +3 >Emitted(14, 18) Source(32, 14) + SourceIndex(0) --- >>> var Actions; 1 >^^^^ @@ -121,10 +122,10 @@ sourceFile:recursiveClassReferenceTest.ts > } > } > } -1 >Emitted(14, 5) Source(32, 15) + SourceIndex(0) -2 >Emitted(14, 9) Source(32, 15) + SourceIndex(0) -3 >Emitted(14, 16) Source(32, 22) + SourceIndex(0) -4 >Emitted(14, 17) Source(42, 2) + SourceIndex(0) +1 >Emitted(15, 5) Source(32, 15) + SourceIndex(0) +2 >Emitted(15, 9) Source(32, 15) + SourceIndex(0) +3 >Emitted(15, 16) Source(32, 22) + SourceIndex(0) +4 >Emitted(15, 17) Source(42, 2) + SourceIndex(0) --- >>> (function (Actions) { 1->^^^^ @@ -133,9 +134,9 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 > 3 > Actions -1->Emitted(15, 5) Source(32, 15) + SourceIndex(0) -2 >Emitted(15, 16) Source(32, 15) + SourceIndex(0) -3 >Emitted(15, 23) Source(32, 22) + SourceIndex(0) +1->Emitted(16, 5) Source(32, 15) + SourceIndex(0) +2 >Emitted(16, 16) Source(32, 15) + SourceIndex(0) +3 >Emitted(16, 23) Source(32, 22) + SourceIndex(0) --- >>> var Thing; 1 >^^^^^^^^ @@ -157,10 +158,10 @@ sourceFile:recursiveClassReferenceTest.ts > } > } > } -1 >Emitted(16, 9) Source(32, 23) + SourceIndex(0) -2 >Emitted(16, 13) Source(32, 23) + SourceIndex(0) -3 >Emitted(16, 18) Source(32, 28) + SourceIndex(0) -4 >Emitted(16, 19) Source(42, 2) + SourceIndex(0) +1 >Emitted(17, 9) Source(32, 23) + SourceIndex(0) +2 >Emitted(17, 13) Source(32, 23) + SourceIndex(0) +3 >Emitted(17, 18) Source(32, 28) + SourceIndex(0) +4 >Emitted(17, 19) Source(42, 2) + SourceIndex(0) --- >>> (function (Thing_1) { 1->^^^^^^^^ @@ -169,9 +170,9 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 > 3 > Thing -1->Emitted(17, 9) Source(32, 23) + SourceIndex(0) -2 >Emitted(17, 20) Source(32, 23) + SourceIndex(0) -3 >Emitted(17, 27) Source(32, 28) + SourceIndex(0) +1->Emitted(18, 9) Source(32, 23) + SourceIndex(0) +2 >Emitted(18, 20) Source(32, 23) + SourceIndex(0) +3 >Emitted(18, 27) Source(32, 28) + SourceIndex(0) --- >>> var Find; 1 >^^^^^^^^^^^^ @@ -193,10 +194,10 @@ sourceFile:recursiveClassReferenceTest.ts > } > } > } -1 >Emitted(18, 13) Source(32, 29) + SourceIndex(0) -2 >Emitted(18, 17) Source(32, 29) + SourceIndex(0) -3 >Emitted(18, 21) Source(32, 33) + SourceIndex(0) -4 >Emitted(18, 22) Source(42, 2) + SourceIndex(0) +1 >Emitted(19, 13) Source(32, 29) + SourceIndex(0) +2 >Emitted(19, 17) Source(32, 29) + SourceIndex(0) +3 >Emitted(19, 21) Source(32, 33) + SourceIndex(0) +4 >Emitted(19, 22) Source(42, 2) + SourceIndex(0) --- >>> (function (Find) { 1->^^^^^^^^^^^^ @@ -206,22 +207,22 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 > 3 > Find -1->Emitted(19, 13) Source(32, 29) + SourceIndex(0) -2 >Emitted(19, 24) Source(32, 29) + SourceIndex(0) -3 >Emitted(19, 28) Source(32, 33) + SourceIndex(0) +1->Emitted(20, 13) Source(32, 29) + SourceIndex(0) +2 >Emitted(20, 24) Source(32, 29) + SourceIndex(0) +3 >Emitted(20, 28) Source(32, 33) + SourceIndex(0) --- >>> var StartFindAction = (function () { 1->^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> { > -1->Emitted(20, 17) Source(33, 2) + SourceIndex(0) +1->Emitted(21, 17) Source(33, 2) + SourceIndex(0) --- >>> function StartFindAction() { 1->^^^^^^^^^^^^^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(21, 21) Source(33, 2) + SourceIndex(0) +1->Emitted(22, 21) Source(33, 2) + SourceIndex(0) --- >>> } 1->^^^^^^^^^^^^^^^^^^^^ @@ -237,8 +238,8 @@ sourceFile:recursiveClassReferenceTest.ts > } > 2 > } -1->Emitted(22, 21) Source(41, 2) + SourceIndex(0) -2 >Emitted(22, 22) Source(41, 3) + SourceIndex(0) +1->Emitted(23, 21) Source(41, 2) + SourceIndex(0) +2 >Emitted(23, 22) Source(41, 3) + SourceIndex(0) --- >>> StartFindAction.prototype.getId = function () { return "yo"; }; 1->^^^^^^^^^^^^^^^^^^^^ @@ -261,16 +262,16 @@ sourceFile:recursiveClassReferenceTest.ts 8 > ; 9 > 10> } -1->Emitted(23, 21) Source(35, 10) + SourceIndex(0) -2 >Emitted(23, 52) Source(35, 15) + SourceIndex(0) -3 >Emitted(23, 55) Source(35, 3) + SourceIndex(0) -4 >Emitted(23, 69) Source(35, 20) + SourceIndex(0) -5 >Emitted(23, 75) Source(35, 26) + SourceIndex(0) -6 >Emitted(23, 76) Source(35, 27) + SourceIndex(0) -7 >Emitted(23, 80) Source(35, 31) + SourceIndex(0) -8 >Emitted(23, 81) Source(35, 32) + SourceIndex(0) -9 >Emitted(23, 82) Source(35, 33) + SourceIndex(0) -10>Emitted(23, 83) Source(35, 34) + SourceIndex(0) +1->Emitted(24, 21) Source(35, 10) + SourceIndex(0) +2 >Emitted(24, 52) Source(35, 15) + SourceIndex(0) +3 >Emitted(24, 55) Source(35, 3) + SourceIndex(0) +4 >Emitted(24, 69) Source(35, 20) + SourceIndex(0) +5 >Emitted(24, 75) Source(35, 26) + SourceIndex(0) +6 >Emitted(24, 76) Source(35, 27) + SourceIndex(0) +7 >Emitted(24, 80) Source(35, 31) + SourceIndex(0) +8 >Emitted(24, 81) Source(35, 32) + SourceIndex(0) +9 >Emitted(24, 82) Source(35, 33) + SourceIndex(0) +10>Emitted(24, 83) Source(35, 34) + SourceIndex(0) --- >>> StartFindAction.prototype.run = function (Thing) { 1 >^^^^^^^^^^^^^^^^^^^^ @@ -285,11 +286,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > 4 > public run( 5 > Thing:Sample.Thing.ICodeThing -1 >Emitted(24, 21) Source(37, 10) + SourceIndex(0) -2 >Emitted(24, 50) Source(37, 13) + SourceIndex(0) -3 >Emitted(24, 53) Source(37, 3) + SourceIndex(0) -4 >Emitted(24, 63) Source(37, 14) + SourceIndex(0) -5 >Emitted(24, 68) Source(37, 43) + SourceIndex(0) +1 >Emitted(25, 21) Source(37, 10) + SourceIndex(0) +2 >Emitted(25, 50) Source(37, 13) + SourceIndex(0) +3 >Emitted(25, 53) Source(37, 3) + SourceIndex(0) +4 >Emitted(25, 63) Source(37, 14) + SourceIndex(0) +5 >Emitted(25, 68) Source(37, 43) + SourceIndex(0) --- >>> return true; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -304,11 +305,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > 4 > true 5 > ; -1 >Emitted(25, 25) Source(39, 4) + SourceIndex(0) -2 >Emitted(25, 31) Source(39, 10) + SourceIndex(0) -3 >Emitted(25, 32) Source(39, 11) + SourceIndex(0) -4 >Emitted(25, 36) Source(39, 15) + SourceIndex(0) -5 >Emitted(25, 37) Source(39, 16) + SourceIndex(0) +1 >Emitted(26, 25) Source(39, 4) + SourceIndex(0) +2 >Emitted(26, 31) Source(39, 10) + SourceIndex(0) +3 >Emitted(26, 32) Source(39, 11) + SourceIndex(0) +4 >Emitted(26, 36) Source(39, 15) + SourceIndex(0) +5 >Emitted(26, 37) Source(39, 16) + SourceIndex(0) --- >>> }; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -317,8 +318,8 @@ sourceFile:recursiveClassReferenceTest.ts 1 > > 2 > } -1 >Emitted(26, 21) Source(40, 3) + SourceIndex(0) -2 >Emitted(26, 22) Source(40, 4) + SourceIndex(0) +1 >Emitted(27, 21) Source(40, 3) + SourceIndex(0) +2 >Emitted(27, 22) Source(40, 4) + SourceIndex(0) --- >>> return StartFindAction; 1->^^^^^^^^^^^^^^^^^^^^ @@ -326,8 +327,8 @@ sourceFile:recursiveClassReferenceTest.ts 1-> > 2 > } -1->Emitted(27, 21) Source(41, 2) + SourceIndex(0) -2 >Emitted(27, 43) Source(41, 3) + SourceIndex(0) +1->Emitted(28, 21) Source(41, 2) + SourceIndex(0) +2 >Emitted(28, 43) Source(41, 3) + SourceIndex(0) --- >>> }()); 1 >^^^^^^^^^^^^^^^^ @@ -347,10 +348,10 @@ sourceFile:recursiveClassReferenceTest.ts > return true; > } > } -1 >Emitted(28, 17) Source(41, 2) + SourceIndex(0) -2 >Emitted(28, 18) Source(41, 3) + SourceIndex(0) -3 >Emitted(28, 18) Source(33, 2) + SourceIndex(0) -4 >Emitted(28, 22) Source(41, 3) + SourceIndex(0) +1 >Emitted(29, 17) Source(41, 2) + SourceIndex(0) +2 >Emitted(29, 18) Source(41, 3) + SourceIndex(0) +3 >Emitted(29, 18) Source(33, 2) + SourceIndex(0) +4 >Emitted(29, 22) Source(41, 3) + SourceIndex(0) --- >>> Find.StartFindAction = StartFindAction; 1->^^^^^^^^^^^^^^^^ @@ -370,10 +371,10 @@ sourceFile:recursiveClassReferenceTest.ts > } > } 4 > -1->Emitted(29, 17) Source(33, 15) + SourceIndex(0) -2 >Emitted(29, 37) Source(33, 30) + SourceIndex(0) -3 >Emitted(29, 55) Source(41, 3) + SourceIndex(0) -4 >Emitted(29, 56) Source(41, 3) + SourceIndex(0) +1->Emitted(30, 17) Source(33, 15) + SourceIndex(0) +2 >Emitted(30, 37) Source(33, 30) + SourceIndex(0) +3 >Emitted(30, 55) Source(41, 3) + SourceIndex(0) +4 >Emitted(30, 56) Source(41, 3) + SourceIndex(0) --- >>> })(Find = Thing_1.Find || (Thing_1.Find = {})); 1->^^^^^^^^^^^^ @@ -405,15 +406,15 @@ sourceFile:recursiveClassReferenceTest.ts > } > } > } -1->Emitted(30, 13) Source(42, 1) + SourceIndex(0) -2 >Emitted(30, 14) Source(42, 2) + SourceIndex(0) -3 >Emitted(30, 16) Source(32, 29) + SourceIndex(0) -4 >Emitted(30, 20) Source(32, 33) + SourceIndex(0) -5 >Emitted(30, 23) Source(32, 29) + SourceIndex(0) -6 >Emitted(30, 35) Source(32, 33) + SourceIndex(0) -7 >Emitted(30, 40) Source(32, 29) + SourceIndex(0) -8 >Emitted(30, 52) Source(32, 33) + SourceIndex(0) -9 >Emitted(30, 60) Source(42, 2) + SourceIndex(0) +1->Emitted(31, 13) Source(42, 1) + SourceIndex(0) +2 >Emitted(31, 14) Source(42, 2) + SourceIndex(0) +3 >Emitted(31, 16) Source(32, 29) + SourceIndex(0) +4 >Emitted(31, 20) Source(32, 33) + SourceIndex(0) +5 >Emitted(31, 23) Source(32, 29) + SourceIndex(0) +6 >Emitted(31, 35) Source(32, 33) + SourceIndex(0) +7 >Emitted(31, 40) Source(32, 29) + SourceIndex(0) +8 >Emitted(31, 52) Source(32, 33) + SourceIndex(0) +9 >Emitted(31, 60) Source(42, 2) + SourceIndex(0) --- >>> })(Thing = Actions.Thing || (Actions.Thing = {})); 1 >^^^^^^^^ @@ -445,15 +446,15 @@ sourceFile:recursiveClassReferenceTest.ts > } > } > } -1 >Emitted(31, 9) Source(42, 1) + SourceIndex(0) -2 >Emitted(31, 10) Source(42, 2) + SourceIndex(0) -3 >Emitted(31, 12) Source(32, 23) + SourceIndex(0) -4 >Emitted(31, 17) Source(32, 28) + SourceIndex(0) -5 >Emitted(31, 20) Source(32, 23) + SourceIndex(0) -6 >Emitted(31, 33) Source(32, 28) + SourceIndex(0) -7 >Emitted(31, 38) Source(32, 23) + SourceIndex(0) -8 >Emitted(31, 51) Source(32, 28) + SourceIndex(0) -9 >Emitted(31, 59) Source(42, 2) + SourceIndex(0) +1 >Emitted(32, 9) Source(42, 1) + SourceIndex(0) +2 >Emitted(32, 10) Source(42, 2) + SourceIndex(0) +3 >Emitted(32, 12) Source(32, 23) + SourceIndex(0) +4 >Emitted(32, 17) Source(32, 28) + SourceIndex(0) +5 >Emitted(32, 20) Source(32, 23) + SourceIndex(0) +6 >Emitted(32, 33) Source(32, 28) + SourceIndex(0) +7 >Emitted(32, 38) Source(32, 23) + SourceIndex(0) +8 >Emitted(32, 51) Source(32, 28) + SourceIndex(0) +9 >Emitted(32, 59) Source(42, 2) + SourceIndex(0) --- >>> })(Actions = Sample.Actions || (Sample.Actions = {})); 1->^^^^ @@ -484,15 +485,15 @@ sourceFile:recursiveClassReferenceTest.ts > } > } > } -1->Emitted(32, 5) Source(42, 1) + SourceIndex(0) -2 >Emitted(32, 6) Source(42, 2) + SourceIndex(0) -3 >Emitted(32, 8) Source(32, 15) + SourceIndex(0) -4 >Emitted(32, 15) Source(32, 22) + SourceIndex(0) -5 >Emitted(32, 18) Source(32, 15) + SourceIndex(0) -6 >Emitted(32, 32) Source(32, 22) + SourceIndex(0) -7 >Emitted(32, 37) Source(32, 15) + SourceIndex(0) -8 >Emitted(32, 51) Source(32, 22) + SourceIndex(0) -9 >Emitted(32, 59) Source(42, 2) + SourceIndex(0) +1->Emitted(33, 5) Source(42, 1) + SourceIndex(0) +2 >Emitted(33, 6) Source(42, 2) + SourceIndex(0) +3 >Emitted(33, 8) Source(32, 15) + SourceIndex(0) +4 >Emitted(33, 15) Source(32, 22) + SourceIndex(0) +5 >Emitted(33, 18) Source(32, 15) + SourceIndex(0) +6 >Emitted(33, 32) Source(32, 22) + SourceIndex(0) +7 >Emitted(33, 37) Source(32, 15) + SourceIndex(0) +8 >Emitted(33, 51) Source(32, 22) + SourceIndex(0) +9 >Emitted(33, 59) Source(42, 2) + SourceIndex(0) --- >>>})(Sample || (Sample = {})); 1 > @@ -519,13 +520,13 @@ sourceFile:recursiveClassReferenceTest.ts > } > } > } -1 >Emitted(33, 1) Source(42, 1) + SourceIndex(0) -2 >Emitted(33, 2) Source(42, 2) + SourceIndex(0) -3 >Emitted(33, 4) Source(32, 8) + SourceIndex(0) -4 >Emitted(33, 10) Source(32, 14) + SourceIndex(0) -5 >Emitted(33, 15) Source(32, 8) + SourceIndex(0) -6 >Emitted(33, 21) Source(32, 14) + SourceIndex(0) -7 >Emitted(33, 29) Source(42, 2) + SourceIndex(0) +1 >Emitted(34, 1) Source(42, 1) + SourceIndex(0) +2 >Emitted(34, 2) Source(42, 2) + SourceIndex(0) +3 >Emitted(34, 4) Source(32, 8) + SourceIndex(0) +4 >Emitted(34, 10) Source(32, 14) + SourceIndex(0) +5 >Emitted(34, 15) Source(32, 8) + SourceIndex(0) +6 >Emitted(34, 21) Source(32, 14) + SourceIndex(0) +7 >Emitted(34, 29) Source(42, 2) + SourceIndex(0) --- >>>(function (Sample) { 1 > @@ -536,9 +537,9 @@ sourceFile:recursiveClassReferenceTest.ts > 2 >module 3 > Sample -1 >Emitted(34, 1) Source(44, 1) + SourceIndex(0) -2 >Emitted(34, 12) Source(44, 8) + SourceIndex(0) -3 >Emitted(34, 18) Source(44, 14) + SourceIndex(0) +1 >Emitted(35, 1) Source(44, 1) + SourceIndex(0) +2 >Emitted(35, 12) Source(44, 8) + SourceIndex(0) +3 >Emitted(35, 18) Source(44, 14) + SourceIndex(0) --- >>> var Thing; 1 >^^^^ @@ -570,10 +571,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(35, 5) Source(44, 15) + SourceIndex(0) -2 >Emitted(35, 9) Source(44, 15) + SourceIndex(0) -3 >Emitted(35, 14) Source(44, 20) + SourceIndex(0) -4 >Emitted(35, 15) Source(64, 2) + SourceIndex(0) +1 >Emitted(36, 5) Source(44, 15) + SourceIndex(0) +2 >Emitted(36, 9) Source(44, 15) + SourceIndex(0) +3 >Emitted(36, 14) Source(44, 20) + SourceIndex(0) +4 >Emitted(36, 15) Source(64, 2) + SourceIndex(0) --- >>> (function (Thing) { 1->^^^^ @@ -583,9 +584,9 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 > 3 > Thing -1->Emitted(36, 5) Source(44, 15) + SourceIndex(0) -2 >Emitted(36, 16) Source(44, 15) + SourceIndex(0) -3 >Emitted(36, 21) Source(44, 20) + SourceIndex(0) +1->Emitted(37, 5) Source(44, 15) + SourceIndex(0) +2 >Emitted(37, 16) Source(44, 15) + SourceIndex(0) +3 >Emitted(37, 21) Source(44, 20) + SourceIndex(0) --- >>> var Widgets; 1->^^^^^^^^ @@ -617,10 +618,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1->Emitted(37, 9) Source(44, 21) + SourceIndex(0) -2 >Emitted(37, 13) Source(44, 21) + SourceIndex(0) -3 >Emitted(37, 20) Source(44, 28) + SourceIndex(0) -4 >Emitted(37, 21) Source(64, 2) + SourceIndex(0) +1->Emitted(38, 9) Source(44, 21) + SourceIndex(0) +2 >Emitted(38, 13) Source(44, 21) + SourceIndex(0) +3 >Emitted(38, 20) Source(44, 28) + SourceIndex(0) +4 >Emitted(38, 21) Source(64, 2) + SourceIndex(0) --- >>> (function (Widgets) { 1->^^^^^^^^ @@ -630,16 +631,16 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 > 3 > Widgets -1->Emitted(38, 9) Source(44, 21) + SourceIndex(0) -2 >Emitted(38, 20) Source(44, 21) + SourceIndex(0) -3 >Emitted(38, 27) Source(44, 28) + SourceIndex(0) +1->Emitted(39, 9) Source(44, 21) + SourceIndex(0) +2 >Emitted(39, 20) Source(44, 21) + SourceIndex(0) +3 >Emitted(39, 27) Source(44, 28) + SourceIndex(0) --- >>> var FindWidget = (function () { 1->^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> { > -1->Emitted(39, 13) Source(45, 2) + SourceIndex(0) +1->Emitted(40, 13) Source(45, 2) + SourceIndex(0) --- >>> function FindWidget(codeThing) { 1->^^^^^^^^^^^^^^^^ @@ -654,9 +655,9 @@ sourceFile:recursiveClassReferenceTest.ts > 2 > constructor(private 3 > codeThing: Sample.Thing.ICodeThing -1->Emitted(40, 17) Source(50, 3) + SourceIndex(0) -2 >Emitted(40, 37) Source(50, 23) + SourceIndex(0) -3 >Emitted(40, 46) Source(50, 57) + SourceIndex(0) +1->Emitted(41, 17) Source(50, 3) + SourceIndex(0) +2 >Emitted(41, 37) Source(50, 23) + SourceIndex(0) +3 >Emitted(41, 46) Source(50, 57) + SourceIndex(0) --- >>> this.codeThing = codeThing; 1->^^^^^^^^^^^^^^^^^^^^ @@ -669,11 +670,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > 4 > codeThing 5 > : Sample.Thing.ICodeThing -1->Emitted(41, 21) Source(50, 23) + SourceIndex(0) -2 >Emitted(41, 35) Source(50, 32) + SourceIndex(0) -3 >Emitted(41, 38) Source(50, 23) + SourceIndex(0) -4 >Emitted(41, 47) Source(50, 32) + SourceIndex(0) -5 >Emitted(41, 48) Source(50, 57) + SourceIndex(0) +1->Emitted(42, 21) Source(50, 23) + SourceIndex(0) +2 >Emitted(42, 35) Source(50, 32) + SourceIndex(0) +3 >Emitted(42, 38) Source(50, 23) + SourceIndex(0) +4 >Emitted(42, 47) Source(50, 32) + SourceIndex(0) +5 >Emitted(42, 48) Source(50, 57) + SourceIndex(0) --- >>> this.domNode = null; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -686,11 +687,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > :any = 4 > null 5 > ; -1 >Emitted(42, 21) Source(49, 11) + SourceIndex(0) -2 >Emitted(42, 33) Source(49, 18) + SourceIndex(0) -3 >Emitted(42, 36) Source(49, 25) + SourceIndex(0) -4 >Emitted(42, 40) Source(49, 29) + SourceIndex(0) -5 >Emitted(42, 41) Source(49, 30) + SourceIndex(0) +1 >Emitted(43, 21) Source(49, 11) + SourceIndex(0) +2 >Emitted(43, 33) Source(49, 18) + SourceIndex(0) +3 >Emitted(43, 36) Source(49, 25) + SourceIndex(0) +4 >Emitted(43, 40) Source(49, 29) + SourceIndex(0) +5 >Emitted(43, 41) Source(49, 30) + SourceIndex(0) --- >>> // scenario 1 1 >^^^^^^^^^^^^^^^^^^^^ @@ -700,8 +701,8 @@ sourceFile:recursiveClassReferenceTest.ts > constructor(private codeThing: Sample.Thing.ICodeThing) { > 2 > // scenario 1 -1 >Emitted(43, 21) Source(51, 7) + SourceIndex(0) -2 >Emitted(43, 34) Source(51, 20) + SourceIndex(0) +1 >Emitted(44, 21) Source(51, 7) + SourceIndex(0) +2 >Emitted(44, 34) Source(51, 20) + SourceIndex(0) --- >>> codeThing.addWidget("addWidget", this); 1->^^^^^^^^^^^^^^^^^^^^ @@ -725,16 +726,16 @@ sourceFile:recursiveClassReferenceTest.ts 8 > this 9 > ) 10> ; -1->Emitted(44, 21) Source(52, 7) + SourceIndex(0) -2 >Emitted(44, 30) Source(52, 16) + SourceIndex(0) -3 >Emitted(44, 31) Source(52, 17) + SourceIndex(0) -4 >Emitted(44, 40) Source(52, 26) + SourceIndex(0) -5 >Emitted(44, 41) Source(52, 27) + SourceIndex(0) -6 >Emitted(44, 52) Source(52, 38) + SourceIndex(0) -7 >Emitted(44, 54) Source(52, 40) + SourceIndex(0) -8 >Emitted(44, 58) Source(52, 44) + SourceIndex(0) -9 >Emitted(44, 59) Source(52, 45) + SourceIndex(0) -10>Emitted(44, 60) Source(52, 46) + SourceIndex(0) +1->Emitted(45, 21) Source(52, 7) + SourceIndex(0) +2 >Emitted(45, 30) Source(52, 16) + SourceIndex(0) +3 >Emitted(45, 31) Source(52, 17) + SourceIndex(0) +4 >Emitted(45, 40) Source(52, 26) + SourceIndex(0) +5 >Emitted(45, 41) Source(52, 27) + SourceIndex(0) +6 >Emitted(45, 52) Source(52, 38) + SourceIndex(0) +7 >Emitted(45, 54) Source(52, 40) + SourceIndex(0) +8 >Emitted(45, 58) Source(52, 44) + SourceIndex(0) +9 >Emitted(45, 59) Source(52, 45) + SourceIndex(0) +10>Emitted(45, 60) Source(52, 46) + SourceIndex(0) --- >>> } 1 >^^^^^^^^^^^^^^^^ @@ -743,8 +744,8 @@ sourceFile:recursiveClassReferenceTest.ts 1 > > 2 > } -1 >Emitted(45, 17) Source(53, 3) + SourceIndex(0) -2 >Emitted(45, 18) Source(53, 4) + SourceIndex(0) +1 >Emitted(46, 17) Source(53, 3) + SourceIndex(0) +2 >Emitted(46, 18) Source(53, 4) + SourceIndex(0) --- >>> FindWidget.prototype.gar = function (runner) { if (true) { 1->^^^^^^^^^^^^^^^^ @@ -773,19 +774,19 @@ sourceFile:recursiveClassReferenceTest.ts 11> ) 12> 13> { -1->Emitted(46, 17) Source(47, 10) + SourceIndex(0) -2 >Emitted(46, 41) Source(47, 13) + SourceIndex(0) -3 >Emitted(46, 44) Source(47, 3) + SourceIndex(0) -4 >Emitted(46, 54) Source(47, 14) + SourceIndex(0) -5 >Emitted(46, 60) Source(47, 55) + SourceIndex(0) -6 >Emitted(46, 64) Source(47, 59) + SourceIndex(0) -7 >Emitted(46, 66) Source(47, 61) + SourceIndex(0) -8 >Emitted(46, 67) Source(47, 62) + SourceIndex(0) -9 >Emitted(46, 68) Source(47, 63) + SourceIndex(0) -10>Emitted(46, 72) Source(47, 67) + SourceIndex(0) -11>Emitted(46, 73) Source(47, 68) + SourceIndex(0) -12>Emitted(46, 74) Source(47, 69) + SourceIndex(0) -13>Emitted(46, 75) Source(47, 70) + SourceIndex(0) +1->Emitted(47, 17) Source(47, 10) + SourceIndex(0) +2 >Emitted(47, 41) Source(47, 13) + SourceIndex(0) +3 >Emitted(47, 44) Source(47, 3) + SourceIndex(0) +4 >Emitted(47, 54) Source(47, 14) + SourceIndex(0) +5 >Emitted(47, 60) Source(47, 55) + SourceIndex(0) +6 >Emitted(47, 64) Source(47, 59) + SourceIndex(0) +7 >Emitted(47, 66) Source(47, 61) + SourceIndex(0) +8 >Emitted(47, 67) Source(47, 62) + SourceIndex(0) +9 >Emitted(47, 68) Source(47, 63) + SourceIndex(0) +10>Emitted(47, 72) Source(47, 67) + SourceIndex(0) +11>Emitted(47, 73) Source(47, 68) + SourceIndex(0) +12>Emitted(47, 74) Source(47, 69) + SourceIndex(0) +13>Emitted(47, 75) Source(47, 70) + SourceIndex(0) --- >>> return runner(this); 1 >^^^^^^^^^^^^^^^^^^^^ @@ -804,14 +805,14 @@ sourceFile:recursiveClassReferenceTest.ts 6 > this 7 > ) 8 > ; -1 >Emitted(47, 21) Source(47, 70) + SourceIndex(0) -2 >Emitted(47, 27) Source(47, 76) + SourceIndex(0) -3 >Emitted(47, 28) Source(47, 77) + SourceIndex(0) -4 >Emitted(47, 34) Source(47, 83) + SourceIndex(0) -5 >Emitted(47, 35) Source(47, 84) + SourceIndex(0) -6 >Emitted(47, 39) Source(47, 88) + SourceIndex(0) -7 >Emitted(47, 40) Source(47, 89) + SourceIndex(0) -8 >Emitted(47, 41) Source(47, 90) + SourceIndex(0) +1 >Emitted(48, 21) Source(47, 70) + SourceIndex(0) +2 >Emitted(48, 27) Source(47, 76) + SourceIndex(0) +3 >Emitted(48, 28) Source(47, 77) + SourceIndex(0) +4 >Emitted(48, 34) Source(47, 83) + SourceIndex(0) +5 >Emitted(48, 35) Source(47, 84) + SourceIndex(0) +6 >Emitted(48, 39) Source(47, 88) + SourceIndex(0) +7 >Emitted(48, 40) Source(47, 89) + SourceIndex(0) +8 >Emitted(48, 41) Source(47, 90) + SourceIndex(0) --- >>> } }; 1 >^^^^^^^^^^^^^^^^ @@ -823,10 +824,10 @@ sourceFile:recursiveClassReferenceTest.ts 2 > } 3 > 4 > } -1 >Emitted(48, 17) Source(47, 90) + SourceIndex(0) -2 >Emitted(48, 18) Source(47, 91) + SourceIndex(0) -3 >Emitted(48, 19) Source(47, 91) + SourceIndex(0) -4 >Emitted(48, 20) Source(47, 92) + SourceIndex(0) +1 >Emitted(49, 17) Source(47, 90) + SourceIndex(0) +2 >Emitted(49, 18) Source(47, 91) + SourceIndex(0) +3 >Emitted(49, 19) Source(47, 91) + SourceIndex(0) +4 >Emitted(49, 20) Source(47, 92) + SourceIndex(0) --- >>> FindWidget.prototype.getDomNode = function () { 1->^^^^^^^^^^^^^^^^ @@ -843,9 +844,9 @@ sourceFile:recursiveClassReferenceTest.ts > public 2 > getDomNode 3 > -1->Emitted(49, 17) Source(55, 10) + SourceIndex(0) -2 >Emitted(49, 48) Source(55, 20) + SourceIndex(0) -3 >Emitted(49, 51) Source(55, 3) + SourceIndex(0) +1->Emitted(50, 17) Source(55, 10) + SourceIndex(0) +2 >Emitted(50, 48) Source(55, 20) + SourceIndex(0) +3 >Emitted(50, 51) Source(55, 3) + SourceIndex(0) --- >>> return domNode; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -859,11 +860,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > 4 > domNode 5 > ; -1 >Emitted(50, 21) Source(56, 4) + SourceIndex(0) -2 >Emitted(50, 27) Source(56, 10) + SourceIndex(0) -3 >Emitted(50, 28) Source(56, 11) + SourceIndex(0) -4 >Emitted(50, 35) Source(56, 18) + SourceIndex(0) -5 >Emitted(50, 36) Source(56, 19) + SourceIndex(0) +1 >Emitted(51, 21) Source(56, 4) + SourceIndex(0) +2 >Emitted(51, 27) Source(56, 10) + SourceIndex(0) +3 >Emitted(51, 28) Source(56, 11) + SourceIndex(0) +4 >Emitted(51, 35) Source(56, 18) + SourceIndex(0) +5 >Emitted(51, 36) Source(56, 19) + SourceIndex(0) --- >>> }; 1 >^^^^^^^^^^^^^^^^ @@ -872,8 +873,8 @@ sourceFile:recursiveClassReferenceTest.ts 1 > > 2 > } -1 >Emitted(51, 17) Source(57, 3) + SourceIndex(0) -2 >Emitted(51, 18) Source(57, 4) + SourceIndex(0) +1 >Emitted(52, 17) Source(57, 3) + SourceIndex(0) +2 >Emitted(52, 18) Source(57, 4) + SourceIndex(0) --- >>> FindWidget.prototype.destroy = function () { 1->^^^^^^^^^^^^^^^^ @@ -884,9 +885,9 @@ sourceFile:recursiveClassReferenceTest.ts > public 2 > destroy 3 > -1->Emitted(52, 17) Source(59, 10) + SourceIndex(0) -2 >Emitted(52, 45) Source(59, 17) + SourceIndex(0) -3 >Emitted(52, 48) Source(59, 3) + SourceIndex(0) +1->Emitted(53, 17) Source(59, 10) + SourceIndex(0) +2 >Emitted(53, 45) Source(59, 17) + SourceIndex(0) +3 >Emitted(53, 48) Source(59, 3) + SourceIndex(0) --- >>> }; 1 >^^^^^^^^^^^^^^^^ @@ -896,8 +897,8 @@ sourceFile:recursiveClassReferenceTest.ts > > 2 > } -1 >Emitted(53, 17) Source(61, 3) + SourceIndex(0) -2 >Emitted(53, 18) Source(61, 4) + SourceIndex(0) +1 >Emitted(54, 17) Source(61, 3) + SourceIndex(0) +2 >Emitted(54, 18) Source(61, 4) + SourceIndex(0) --- >>> return FindWidget; 1->^^^^^^^^^^^^^^^^ @@ -906,8 +907,8 @@ sourceFile:recursiveClassReferenceTest.ts > > 2 > } -1->Emitted(54, 17) Source(63, 2) + SourceIndex(0) -2 >Emitted(54, 34) Source(63, 3) + SourceIndex(0) +1->Emitted(55, 17) Source(63, 2) + SourceIndex(0) +2 >Emitted(55, 34) Source(63, 3) + SourceIndex(0) --- >>> }()); 1 >^^^^^^^^^^^^ @@ -937,10 +938,10 @@ sourceFile:recursiveClassReferenceTest.ts > } > > } -1 >Emitted(55, 13) Source(63, 2) + SourceIndex(0) -2 >Emitted(55, 14) Source(63, 3) + SourceIndex(0) -3 >Emitted(55, 14) Source(45, 2) + SourceIndex(0) -4 >Emitted(55, 18) Source(63, 3) + SourceIndex(0) +1 >Emitted(56, 13) Source(63, 2) + SourceIndex(0) +2 >Emitted(56, 14) Source(63, 3) + SourceIndex(0) +3 >Emitted(56, 14) Source(45, 2) + SourceIndex(0) +4 >Emitted(56, 18) Source(63, 3) + SourceIndex(0) --- >>> Widgets.FindWidget = FindWidget; 1->^^^^^^^^^^^^ @@ -970,10 +971,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } 4 > -1->Emitted(56, 13) Source(45, 15) + SourceIndex(0) -2 >Emitted(56, 31) Source(45, 25) + SourceIndex(0) -3 >Emitted(56, 44) Source(63, 3) + SourceIndex(0) -4 >Emitted(56, 45) Source(63, 3) + SourceIndex(0) +1->Emitted(57, 13) Source(45, 15) + SourceIndex(0) +2 >Emitted(57, 31) Source(45, 25) + SourceIndex(0) +3 >Emitted(57, 44) Source(63, 3) + SourceIndex(0) +4 >Emitted(57, 45) Source(63, 3) + SourceIndex(0) --- >>> })(Widgets = Thing.Widgets || (Thing.Widgets = {})); 1->^^^^^^^^ @@ -1015,15 +1016,15 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1->Emitted(57, 9) Source(64, 1) + SourceIndex(0) -2 >Emitted(57, 10) Source(64, 2) + SourceIndex(0) -3 >Emitted(57, 12) Source(44, 21) + SourceIndex(0) -4 >Emitted(57, 19) Source(44, 28) + SourceIndex(0) -5 >Emitted(57, 22) Source(44, 21) + SourceIndex(0) -6 >Emitted(57, 35) Source(44, 28) + SourceIndex(0) -7 >Emitted(57, 40) Source(44, 21) + SourceIndex(0) -8 >Emitted(57, 53) Source(44, 28) + SourceIndex(0) -9 >Emitted(57, 61) Source(64, 2) + SourceIndex(0) +1->Emitted(58, 9) Source(64, 1) + SourceIndex(0) +2 >Emitted(58, 10) Source(64, 2) + SourceIndex(0) +3 >Emitted(58, 12) Source(44, 21) + SourceIndex(0) +4 >Emitted(58, 19) Source(44, 28) + SourceIndex(0) +5 >Emitted(58, 22) Source(44, 21) + SourceIndex(0) +6 >Emitted(58, 35) Source(44, 28) + SourceIndex(0) +7 >Emitted(58, 40) Source(44, 21) + SourceIndex(0) +8 >Emitted(58, 53) Source(44, 28) + SourceIndex(0) +9 >Emitted(58, 61) Source(64, 2) + SourceIndex(0) --- >>> })(Thing = Sample.Thing || (Sample.Thing = {})); 1 >^^^^ @@ -1064,15 +1065,15 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(58, 5) Source(64, 1) + SourceIndex(0) -2 >Emitted(58, 6) Source(64, 2) + SourceIndex(0) -3 >Emitted(58, 8) Source(44, 15) + SourceIndex(0) -4 >Emitted(58, 13) Source(44, 20) + SourceIndex(0) -5 >Emitted(58, 16) Source(44, 15) + SourceIndex(0) -6 >Emitted(58, 28) Source(44, 20) + SourceIndex(0) -7 >Emitted(58, 33) Source(44, 15) + SourceIndex(0) -8 >Emitted(58, 45) Source(44, 20) + SourceIndex(0) -9 >Emitted(58, 53) Source(64, 2) + SourceIndex(0) +1 >Emitted(59, 5) Source(64, 1) + SourceIndex(0) +2 >Emitted(59, 6) Source(64, 2) + SourceIndex(0) +3 >Emitted(59, 8) Source(44, 15) + SourceIndex(0) +4 >Emitted(59, 13) Source(44, 20) + SourceIndex(0) +5 >Emitted(59, 16) Source(44, 15) + SourceIndex(0) +6 >Emitted(59, 28) Source(44, 20) + SourceIndex(0) +7 >Emitted(59, 33) Source(44, 15) + SourceIndex(0) +8 >Emitted(59, 45) Source(44, 20) + SourceIndex(0) +9 >Emitted(59, 53) Source(64, 2) + SourceIndex(0) --- >>>})(Sample || (Sample = {})); 1 > @@ -1110,13 +1111,13 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(59, 1) Source(64, 1) + SourceIndex(0) -2 >Emitted(59, 2) Source(64, 2) + SourceIndex(0) -3 >Emitted(59, 4) Source(44, 8) + SourceIndex(0) -4 >Emitted(59, 10) Source(44, 14) + SourceIndex(0) -5 >Emitted(59, 15) Source(44, 8) + SourceIndex(0) -6 >Emitted(59, 21) Source(44, 14) + SourceIndex(0) -7 >Emitted(59, 29) Source(64, 2) + SourceIndex(0) +1 >Emitted(60, 1) Source(64, 1) + SourceIndex(0) +2 >Emitted(60, 2) Source(64, 2) + SourceIndex(0) +3 >Emitted(60, 4) Source(44, 8) + SourceIndex(0) +4 >Emitted(60, 10) Source(44, 14) + SourceIndex(0) +5 >Emitted(60, 15) Source(44, 8) + SourceIndex(0) +6 >Emitted(60, 21) Source(44, 14) + SourceIndex(0) +7 >Emitted(60, 29) Source(64, 2) + SourceIndex(0) --- >>>var AbstractMode = (function () { 1-> @@ -1125,13 +1126,13 @@ sourceFile:recursiveClassReferenceTest.ts > >interface IMode { getInitialState(): IState;} > -1->Emitted(60, 1) Source(67, 1) + SourceIndex(0) +1->Emitted(61, 1) Source(67, 1) + SourceIndex(0) --- >>> function AbstractMode() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(61, 5) Source(67, 1) + SourceIndex(0) +1->Emitted(62, 5) Source(67, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -1139,8 +1140,8 @@ sourceFile:recursiveClassReferenceTest.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1->class AbstractMode implements IMode { public getInitialState(): IState { return null;} 2 > } -1->Emitted(62, 5) Source(67, 88) + SourceIndex(0) -2 >Emitted(62, 6) Source(67, 89) + SourceIndex(0) +1->Emitted(63, 5) Source(67, 88) + SourceIndex(0) +2 >Emitted(63, 6) Source(67, 89) + SourceIndex(0) --- >>> AbstractMode.prototype.getInitialState = function () { return null; }; 1->^^^^ @@ -1163,24 +1164,24 @@ sourceFile:recursiveClassReferenceTest.ts 8 > ; 9 > 10> } -1->Emitted(63, 5) Source(67, 46) + SourceIndex(0) -2 >Emitted(63, 43) Source(67, 61) + SourceIndex(0) -3 >Emitted(63, 46) Source(67, 39) + SourceIndex(0) -4 >Emitted(63, 60) Source(67, 74) + SourceIndex(0) -5 >Emitted(63, 66) Source(67, 80) + SourceIndex(0) -6 >Emitted(63, 67) Source(67, 81) + SourceIndex(0) -7 >Emitted(63, 71) Source(67, 85) + SourceIndex(0) -8 >Emitted(63, 72) Source(67, 86) + SourceIndex(0) -9 >Emitted(63, 73) Source(67, 86) + SourceIndex(0) -10>Emitted(63, 74) Source(67, 87) + SourceIndex(0) +1->Emitted(64, 5) Source(67, 46) + SourceIndex(0) +2 >Emitted(64, 43) Source(67, 61) + SourceIndex(0) +3 >Emitted(64, 46) Source(67, 39) + SourceIndex(0) +4 >Emitted(64, 60) Source(67, 74) + SourceIndex(0) +5 >Emitted(64, 66) Source(67, 80) + SourceIndex(0) +6 >Emitted(64, 67) Source(67, 81) + SourceIndex(0) +7 >Emitted(64, 71) Source(67, 85) + SourceIndex(0) +8 >Emitted(64, 72) Source(67, 86) + SourceIndex(0) +9 >Emitted(64, 73) Source(67, 86) + SourceIndex(0) +10>Emitted(64, 74) Source(67, 87) + SourceIndex(0) --- >>> return AbstractMode; 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^ 1 > 2 > } -1 >Emitted(64, 5) Source(67, 88) + SourceIndex(0) -2 >Emitted(64, 24) Source(67, 89) + SourceIndex(0) +1 >Emitted(65, 5) Source(67, 88) + SourceIndex(0) +2 >Emitted(65, 24) Source(67, 89) + SourceIndex(0) --- >>>}()); 1 > @@ -1192,10 +1193,10 @@ sourceFile:recursiveClassReferenceTest.ts 2 >} 3 > 4 > class AbstractMode implements IMode { public getInitialState(): IState { return null;} } -1 >Emitted(65, 1) Source(67, 88) + SourceIndex(0) -2 >Emitted(65, 2) Source(67, 89) + SourceIndex(0) -3 >Emitted(65, 2) Source(67, 1) + SourceIndex(0) -4 >Emitted(65, 6) Source(67, 89) + SourceIndex(0) +1 >Emitted(66, 1) Source(67, 88) + SourceIndex(0) +2 >Emitted(66, 2) Source(67, 89) + SourceIndex(0) +3 >Emitted(66, 2) Source(67, 1) + SourceIndex(0) +4 >Emitted(66, 6) Source(67, 89) + SourceIndex(0) --- >>>(function (Sample) { 1-> @@ -1213,9 +1214,9 @@ sourceFile:recursiveClassReferenceTest.ts > 2 >module 3 > Sample -1->Emitted(66, 1) Source(76, 1) + SourceIndex(0) -2 >Emitted(66, 12) Source(76, 8) + SourceIndex(0) -3 >Emitted(66, 18) Source(76, 14) + SourceIndex(0) +1->Emitted(67, 1) Source(76, 1) + SourceIndex(0) +2 >Emitted(67, 12) Source(76, 8) + SourceIndex(0) +3 >Emitted(67, 18) Source(76, 14) + SourceIndex(0) --- >>> var Thing; 1 >^^^^ @@ -1251,10 +1252,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(67, 5) Source(76, 15) + SourceIndex(0) -2 >Emitted(67, 9) Source(76, 15) + SourceIndex(0) -3 >Emitted(67, 14) Source(76, 20) + SourceIndex(0) -4 >Emitted(67, 15) Source(100, 2) + SourceIndex(0) +1 >Emitted(68, 5) Source(76, 15) + SourceIndex(0) +2 >Emitted(68, 9) Source(76, 15) + SourceIndex(0) +3 >Emitted(68, 14) Source(76, 20) + SourceIndex(0) +4 >Emitted(68, 15) Source(100, 2) + SourceIndex(0) --- >>> (function (Thing) { 1->^^^^ @@ -1264,9 +1265,9 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 > 3 > Thing -1->Emitted(68, 5) Source(76, 15) + SourceIndex(0) -2 >Emitted(68, 16) Source(76, 15) + SourceIndex(0) -3 >Emitted(68, 21) Source(76, 20) + SourceIndex(0) +1->Emitted(69, 5) Source(76, 15) + SourceIndex(0) +2 >Emitted(69, 16) Source(76, 15) + SourceIndex(0) +3 >Emitted(69, 21) Source(76, 20) + SourceIndex(0) --- >>> var Languages; 1->^^^^^^^^ @@ -1302,10 +1303,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1->Emitted(69, 9) Source(76, 21) + SourceIndex(0) -2 >Emitted(69, 13) Source(76, 21) + SourceIndex(0) -3 >Emitted(69, 22) Source(76, 30) + SourceIndex(0) -4 >Emitted(69, 23) Source(100, 2) + SourceIndex(0) +1->Emitted(70, 9) Source(76, 21) + SourceIndex(0) +2 >Emitted(70, 13) Source(76, 21) + SourceIndex(0) +3 >Emitted(70, 22) Source(76, 30) + SourceIndex(0) +4 >Emitted(70, 23) Source(100, 2) + SourceIndex(0) --- >>> (function (Languages) { 1->^^^^^^^^ @@ -1314,9 +1315,9 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 > 3 > Languages -1->Emitted(70, 9) Source(76, 21) + SourceIndex(0) -2 >Emitted(70, 20) Source(76, 21) + SourceIndex(0) -3 >Emitted(70, 29) Source(76, 30) + SourceIndex(0) +1->Emitted(71, 9) Source(76, 21) + SourceIndex(0) +2 >Emitted(71, 20) Source(76, 21) + SourceIndex(0) +3 >Emitted(71, 29) Source(76, 30) + SourceIndex(0) --- >>> var PlainText; 1 >^^^^^^^^^^^^ @@ -1352,10 +1353,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(71, 13) Source(76, 31) + SourceIndex(0) -2 >Emitted(71, 17) Source(76, 31) + SourceIndex(0) -3 >Emitted(71, 26) Source(76, 40) + SourceIndex(0) -4 >Emitted(71, 27) Source(100, 2) + SourceIndex(0) +1 >Emitted(72, 13) Source(76, 31) + SourceIndex(0) +2 >Emitted(72, 17) Source(76, 31) + SourceIndex(0) +3 >Emitted(72, 26) Source(76, 40) + SourceIndex(0) +4 >Emitted(72, 27) Source(100, 2) + SourceIndex(0) --- >>> (function (PlainText) { 1->^^^^^^^^^^^^ @@ -1365,9 +1366,9 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 > 3 > PlainText -1->Emitted(72, 13) Source(76, 31) + SourceIndex(0) -2 >Emitted(72, 24) Source(76, 31) + SourceIndex(0) -3 >Emitted(72, 33) Source(76, 40) + SourceIndex(0) +1->Emitted(73, 13) Source(76, 31) + SourceIndex(0) +2 >Emitted(73, 24) Source(76, 31) + SourceIndex(0) +3 >Emitted(73, 33) Source(76, 40) + SourceIndex(0) --- >>> var State = (function () { 1->^^^^^^^^^^^^^^^^ @@ -1375,7 +1376,7 @@ sourceFile:recursiveClassReferenceTest.ts 1-> { > > -1->Emitted(73, 17) Source(78, 2) + SourceIndex(0) +1->Emitted(74, 17) Source(78, 2) + SourceIndex(0) --- >>> function State(mode) { 1->^^^^^^^^^^^^^^^^^^^^ @@ -1386,9 +1387,9 @@ sourceFile:recursiveClassReferenceTest.ts > 2 > constructor(private 3 > mode: IMode -1->Emitted(74, 21) Source(79, 9) + SourceIndex(0) -2 >Emitted(74, 36) Source(79, 29) + SourceIndex(0) -3 >Emitted(74, 40) Source(79, 40) + SourceIndex(0) +1->Emitted(75, 21) Source(79, 9) + SourceIndex(0) +2 >Emitted(75, 36) Source(79, 29) + SourceIndex(0) +3 >Emitted(75, 40) Source(79, 40) + SourceIndex(0) --- >>> this.mode = mode; 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1401,11 +1402,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > 4 > mode 5 > : IMode -1->Emitted(75, 25) Source(79, 29) + SourceIndex(0) -2 >Emitted(75, 34) Source(79, 33) + SourceIndex(0) -3 >Emitted(75, 37) Source(79, 29) + SourceIndex(0) -4 >Emitted(75, 41) Source(79, 33) + SourceIndex(0) -5 >Emitted(75, 42) Source(79, 40) + SourceIndex(0) +1->Emitted(76, 25) Source(79, 29) + SourceIndex(0) +2 >Emitted(76, 34) Source(79, 33) + SourceIndex(0) +3 >Emitted(76, 37) Source(79, 29) + SourceIndex(0) +4 >Emitted(76, 41) Source(79, 33) + SourceIndex(0) +5 >Emitted(76, 42) Source(79, 40) + SourceIndex(0) --- >>> } 1 >^^^^^^^^^^^^^^^^^^^^ @@ -1413,8 +1414,8 @@ sourceFile:recursiveClassReferenceTest.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >) { 2 > } -1 >Emitted(76, 21) Source(79, 44) + SourceIndex(0) -2 >Emitted(76, 22) Source(79, 45) + SourceIndex(0) +1 >Emitted(77, 21) Source(79, 44) + SourceIndex(0) +2 >Emitted(77, 22) Source(79, 45) + SourceIndex(0) --- >>> State.prototype.clone = function () { 1->^^^^^^^^^^^^^^^^^^^^ @@ -1424,9 +1425,9 @@ sourceFile:recursiveClassReferenceTest.ts > public 2 > clone 3 > -1->Emitted(77, 21) Source(80, 10) + SourceIndex(0) -2 >Emitted(77, 42) Source(80, 15) + SourceIndex(0) -3 >Emitted(77, 45) Source(80, 3) + SourceIndex(0) +1->Emitted(78, 21) Source(80, 10) + SourceIndex(0) +2 >Emitted(78, 42) Source(80, 15) + SourceIndex(0) +3 >Emitted(78, 45) Source(80, 3) + SourceIndex(0) --- >>> return this; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1440,11 +1441,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > 4 > this 5 > ; -1 >Emitted(78, 25) Source(81, 4) + SourceIndex(0) -2 >Emitted(78, 31) Source(81, 10) + SourceIndex(0) -3 >Emitted(78, 32) Source(81, 11) + SourceIndex(0) -4 >Emitted(78, 36) Source(81, 15) + SourceIndex(0) -5 >Emitted(78, 37) Source(81, 16) + SourceIndex(0) +1 >Emitted(79, 25) Source(81, 4) + SourceIndex(0) +2 >Emitted(79, 31) Source(81, 10) + SourceIndex(0) +3 >Emitted(79, 32) Source(81, 11) + SourceIndex(0) +4 >Emitted(79, 36) Source(81, 15) + SourceIndex(0) +5 >Emitted(79, 37) Source(81, 16) + SourceIndex(0) --- >>> }; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -1453,8 +1454,8 @@ sourceFile:recursiveClassReferenceTest.ts 1 > > 2 > } -1 >Emitted(79, 21) Source(82, 3) + SourceIndex(0) -2 >Emitted(79, 22) Source(82, 4) + SourceIndex(0) +1 >Emitted(80, 21) Source(82, 3) + SourceIndex(0) +2 >Emitted(80, 22) Source(82, 4) + SourceIndex(0) --- >>> State.prototype.equals = function (other) { 1->^^^^^^^^^^^^^^^^^^^^ @@ -1469,11 +1470,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > 4 > public equals( 5 > other:IState -1->Emitted(80, 21) Source(84, 10) + SourceIndex(0) -2 >Emitted(80, 43) Source(84, 16) + SourceIndex(0) -3 >Emitted(80, 46) Source(84, 3) + SourceIndex(0) -4 >Emitted(80, 56) Source(84, 17) + SourceIndex(0) -5 >Emitted(80, 61) Source(84, 29) + SourceIndex(0) +1->Emitted(81, 21) Source(84, 10) + SourceIndex(0) +2 >Emitted(81, 43) Source(84, 16) + SourceIndex(0) +3 >Emitted(81, 46) Source(84, 3) + SourceIndex(0) +4 >Emitted(81, 56) Source(84, 17) + SourceIndex(0) +5 >Emitted(81, 61) Source(84, 29) + SourceIndex(0) --- >>> return this === other; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1491,13 +1492,13 @@ sourceFile:recursiveClassReferenceTest.ts 5 > === 6 > other 7 > ; -1 >Emitted(81, 25) Source(85, 4) + SourceIndex(0) -2 >Emitted(81, 31) Source(85, 10) + SourceIndex(0) -3 >Emitted(81, 32) Source(85, 11) + SourceIndex(0) -4 >Emitted(81, 36) Source(85, 15) + SourceIndex(0) -5 >Emitted(81, 41) Source(85, 20) + SourceIndex(0) -6 >Emitted(81, 46) Source(85, 25) + SourceIndex(0) -7 >Emitted(81, 47) Source(85, 26) + SourceIndex(0) +1 >Emitted(82, 25) Source(85, 4) + SourceIndex(0) +2 >Emitted(82, 31) Source(85, 10) + SourceIndex(0) +3 >Emitted(82, 32) Source(85, 11) + SourceIndex(0) +4 >Emitted(82, 36) Source(85, 15) + SourceIndex(0) +5 >Emitted(82, 41) Source(85, 20) + SourceIndex(0) +6 >Emitted(82, 46) Source(85, 25) + SourceIndex(0) +7 >Emitted(82, 47) Source(85, 26) + SourceIndex(0) --- >>> }; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -1506,8 +1507,8 @@ sourceFile:recursiveClassReferenceTest.ts 1 > > 2 > } -1 >Emitted(82, 21) Source(86, 3) + SourceIndex(0) -2 >Emitted(82, 22) Source(86, 4) + SourceIndex(0) +1 >Emitted(83, 21) Source(86, 3) + SourceIndex(0) +2 >Emitted(83, 22) Source(86, 4) + SourceIndex(0) --- >>> State.prototype.getMode = function () { return mode; }; 1->^^^^^^^^^^^^^^^^^^^^ @@ -1532,16 +1533,16 @@ sourceFile:recursiveClassReferenceTest.ts 8 > ; 9 > 10> } -1->Emitted(83, 21) Source(88, 10) + SourceIndex(0) -2 >Emitted(83, 44) Source(88, 17) + SourceIndex(0) -3 >Emitted(83, 47) Source(88, 3) + SourceIndex(0) -4 >Emitted(83, 61) Source(88, 29) + SourceIndex(0) -5 >Emitted(83, 67) Source(88, 35) + SourceIndex(0) -6 >Emitted(83, 68) Source(88, 36) + SourceIndex(0) -7 >Emitted(83, 72) Source(88, 40) + SourceIndex(0) -8 >Emitted(83, 73) Source(88, 41) + SourceIndex(0) -9 >Emitted(83, 74) Source(88, 42) + SourceIndex(0) -10>Emitted(83, 75) Source(88, 43) + SourceIndex(0) +1->Emitted(84, 21) Source(88, 10) + SourceIndex(0) +2 >Emitted(84, 44) Source(88, 17) + SourceIndex(0) +3 >Emitted(84, 47) Source(88, 3) + SourceIndex(0) +4 >Emitted(84, 61) Source(88, 29) + SourceIndex(0) +5 >Emitted(84, 67) Source(88, 35) + SourceIndex(0) +6 >Emitted(84, 68) Source(88, 36) + SourceIndex(0) +7 >Emitted(84, 72) Source(88, 40) + SourceIndex(0) +8 >Emitted(84, 73) Source(88, 41) + SourceIndex(0) +9 >Emitted(84, 74) Source(88, 42) + SourceIndex(0) +10>Emitted(84, 75) Source(88, 43) + SourceIndex(0) --- >>> return State; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -1549,8 +1550,8 @@ sourceFile:recursiveClassReferenceTest.ts 1 > > 2 > } -1 >Emitted(84, 21) Source(89, 2) + SourceIndex(0) -2 >Emitted(84, 33) Source(89, 3) + SourceIndex(0) +1 >Emitted(85, 21) Source(89, 2) + SourceIndex(0) +2 >Emitted(85, 33) Source(89, 3) + SourceIndex(0) --- >>> }()); 1 >^^^^^^^^^^^^^^^^ @@ -1573,10 +1574,10 @@ sourceFile:recursiveClassReferenceTest.ts > > public getMode(): IMode { return mode; } > } -1 >Emitted(85, 17) Source(89, 2) + SourceIndex(0) -2 >Emitted(85, 18) Source(89, 3) + SourceIndex(0) -3 >Emitted(85, 18) Source(78, 2) + SourceIndex(0) -4 >Emitted(85, 22) Source(89, 3) + SourceIndex(0) +1 >Emitted(86, 17) Source(89, 2) + SourceIndex(0) +2 >Emitted(86, 18) Source(89, 3) + SourceIndex(0) +3 >Emitted(86, 18) Source(78, 2) + SourceIndex(0) +4 >Emitted(86, 22) Source(89, 3) + SourceIndex(0) --- >>> PlainText.State = State; 1->^^^^^^^^^^^^^^^^ @@ -1599,10 +1600,10 @@ sourceFile:recursiveClassReferenceTest.ts > public getMode(): IMode { return mode; } > } 4 > -1->Emitted(86, 17) Source(78, 15) + SourceIndex(0) -2 >Emitted(86, 32) Source(78, 20) + SourceIndex(0) -3 >Emitted(86, 40) Source(89, 3) + SourceIndex(0) -4 >Emitted(86, 41) Source(89, 3) + SourceIndex(0) +1->Emitted(87, 17) Source(78, 15) + SourceIndex(0) +2 >Emitted(87, 32) Source(78, 20) + SourceIndex(0) +3 >Emitted(87, 40) Source(89, 3) + SourceIndex(0) +4 >Emitted(87, 41) Source(89, 3) + SourceIndex(0) --- >>> var Mode = (function (_super) { 1->^^^^^^^^^^^^^^^^ @@ -1610,21 +1611,21 @@ sourceFile:recursiveClassReferenceTest.ts 1-> > > -1->Emitted(87, 17) Source(91, 2) + SourceIndex(0) +1->Emitted(88, 17) Source(91, 2) + SourceIndex(0) --- >>> __extends(Mode, _super); 1->^^^^^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^ 1->export class Mode extends 2 > AbstractMode -1->Emitted(88, 21) Source(91, 28) + SourceIndex(0) -2 >Emitted(88, 45) Source(91, 40) + SourceIndex(0) +1->Emitted(89, 21) Source(91, 28) + SourceIndex(0) +2 >Emitted(89, 45) Source(91, 40) + SourceIndex(0) --- >>> function Mode() { 1 >^^^^^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > -1 >Emitted(89, 21) Source(91, 2) + SourceIndex(0) +1 >Emitted(90, 21) Source(91, 2) + SourceIndex(0) --- >>> return _super.apply(this, arguments) || this; >>> } @@ -1641,8 +1642,8 @@ sourceFile:recursiveClassReferenceTest.ts > > 2 > } -1->Emitted(91, 21) Source(99, 2) + SourceIndex(0) -2 >Emitted(91, 22) Source(99, 3) + SourceIndex(0) +1->Emitted(92, 21) Source(99, 2) + SourceIndex(0) +2 >Emitted(92, 22) Source(99, 3) + SourceIndex(0) --- >>> // scenario 2 1->^^^^^^^^^^^^^^^^^^^^ @@ -1650,8 +1651,8 @@ sourceFile:recursiveClassReferenceTest.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 > // scenario 2 -1->Emitted(92, 21) Source(93, 3) + SourceIndex(0) -2 >Emitted(92, 34) Source(93, 16) + SourceIndex(0) +1->Emitted(93, 21) Source(93, 3) + SourceIndex(0) +2 >Emitted(93, 34) Source(93, 16) + SourceIndex(0) --- >>> Mode.prototype.getInitialState = function () { 1->^^^^^^^^^^^^^^^^^^^^ @@ -1661,9 +1662,9 @@ sourceFile:recursiveClassReferenceTest.ts > public 2 > getInitialState 3 > -1->Emitted(93, 21) Source(94, 10) + SourceIndex(0) -2 >Emitted(93, 51) Source(94, 25) + SourceIndex(0) -3 >Emitted(93, 54) Source(94, 3) + SourceIndex(0) +1->Emitted(94, 21) Source(94, 10) + SourceIndex(0) +2 >Emitted(94, 51) Source(94, 25) + SourceIndex(0) +3 >Emitted(94, 54) Source(94, 3) + SourceIndex(0) --- >>> return new State(self); 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1685,15 +1686,15 @@ sourceFile:recursiveClassReferenceTest.ts 7 > self 8 > ) 9 > ; -1 >Emitted(94, 25) Source(95, 4) + SourceIndex(0) -2 >Emitted(94, 31) Source(95, 10) + SourceIndex(0) -3 >Emitted(94, 32) Source(95, 11) + SourceIndex(0) -4 >Emitted(94, 36) Source(95, 15) + SourceIndex(0) -5 >Emitted(94, 41) Source(95, 20) + SourceIndex(0) -6 >Emitted(94, 42) Source(95, 21) + SourceIndex(0) -7 >Emitted(94, 46) Source(95, 25) + SourceIndex(0) -8 >Emitted(94, 47) Source(95, 26) + SourceIndex(0) -9 >Emitted(94, 48) Source(95, 27) + SourceIndex(0) +1 >Emitted(95, 25) Source(95, 4) + SourceIndex(0) +2 >Emitted(95, 31) Source(95, 10) + SourceIndex(0) +3 >Emitted(95, 32) Source(95, 11) + SourceIndex(0) +4 >Emitted(95, 36) Source(95, 15) + SourceIndex(0) +5 >Emitted(95, 41) Source(95, 20) + SourceIndex(0) +6 >Emitted(95, 42) Source(95, 21) + SourceIndex(0) +7 >Emitted(95, 46) Source(95, 25) + SourceIndex(0) +8 >Emitted(95, 47) Source(95, 26) + SourceIndex(0) +9 >Emitted(95, 48) Source(95, 27) + SourceIndex(0) --- >>> }; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -1702,8 +1703,8 @@ sourceFile:recursiveClassReferenceTest.ts 1 > > 2 > } -1 >Emitted(95, 21) Source(96, 3) + SourceIndex(0) -2 >Emitted(95, 22) Source(96, 4) + SourceIndex(0) +1 >Emitted(96, 21) Source(96, 3) + SourceIndex(0) +2 >Emitted(96, 22) Source(96, 4) + SourceIndex(0) --- >>> return Mode; 1->^^^^^^^^^^^^^^^^^^^^ @@ -1714,8 +1715,8 @@ sourceFile:recursiveClassReferenceTest.ts > > 2 > } -1->Emitted(96, 21) Source(99, 2) + SourceIndex(0) -2 >Emitted(96, 32) Source(99, 3) + SourceIndex(0) +1->Emitted(97, 21) Source(99, 2) + SourceIndex(0) +2 >Emitted(97, 32) Source(99, 3) + SourceIndex(0) --- >>> }(AbstractMode)); 1->^^^^^^^^^^^^^^^^ @@ -1739,12 +1740,12 @@ sourceFile:recursiveClassReferenceTest.ts > > > } -1->Emitted(97, 17) Source(99, 2) + SourceIndex(0) -2 >Emitted(97, 18) Source(99, 3) + SourceIndex(0) -3 >Emitted(97, 18) Source(91, 2) + SourceIndex(0) -4 >Emitted(97, 19) Source(91, 28) + SourceIndex(0) -5 >Emitted(97, 31) Source(91, 40) + SourceIndex(0) -6 >Emitted(97, 34) Source(99, 3) + SourceIndex(0) +1->Emitted(98, 17) Source(99, 2) + SourceIndex(0) +2 >Emitted(98, 18) Source(99, 3) + SourceIndex(0) +3 >Emitted(98, 18) Source(91, 2) + SourceIndex(0) +4 >Emitted(98, 19) Source(91, 28) + SourceIndex(0) +5 >Emitted(98, 31) Source(91, 40) + SourceIndex(0) +6 >Emitted(98, 34) Source(99, 3) + SourceIndex(0) --- >>> PlainText.Mode = Mode; 1->^^^^^^^^^^^^^^^^ @@ -1764,10 +1765,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } 4 > -1->Emitted(98, 17) Source(91, 15) + SourceIndex(0) -2 >Emitted(98, 31) Source(91, 19) + SourceIndex(0) -3 >Emitted(98, 38) Source(99, 3) + SourceIndex(0) -4 >Emitted(98, 39) Source(99, 3) + SourceIndex(0) +1->Emitted(99, 17) Source(91, 15) + SourceIndex(0) +2 >Emitted(99, 31) Source(91, 19) + SourceIndex(0) +3 >Emitted(99, 38) Source(99, 3) + SourceIndex(0) +4 >Emitted(99, 39) Source(99, 3) + SourceIndex(0) --- >>> })(PlainText = Languages.PlainText || (Languages.PlainText = {})); 1->^^^^^^^^^^^^ @@ -1813,15 +1814,15 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1->Emitted(99, 13) Source(100, 1) + SourceIndex(0) -2 >Emitted(99, 14) Source(100, 2) + SourceIndex(0) -3 >Emitted(99, 16) Source(76, 31) + SourceIndex(0) -4 >Emitted(99, 25) Source(76, 40) + SourceIndex(0) -5 >Emitted(99, 28) Source(76, 31) + SourceIndex(0) -6 >Emitted(99, 47) Source(76, 40) + SourceIndex(0) -7 >Emitted(99, 52) Source(76, 31) + SourceIndex(0) -8 >Emitted(99, 71) Source(76, 40) + SourceIndex(0) -9 >Emitted(99, 79) Source(100, 2) + SourceIndex(0) +1->Emitted(100, 13) Source(100, 1) + SourceIndex(0) +2 >Emitted(100, 14) Source(100, 2) + SourceIndex(0) +3 >Emitted(100, 16) Source(76, 31) + SourceIndex(0) +4 >Emitted(100, 25) Source(76, 40) + SourceIndex(0) +5 >Emitted(100, 28) Source(76, 31) + SourceIndex(0) +6 >Emitted(100, 47) Source(76, 40) + SourceIndex(0) +7 >Emitted(100, 52) Source(76, 31) + SourceIndex(0) +8 >Emitted(100, 71) Source(76, 40) + SourceIndex(0) +9 >Emitted(100, 79) Source(100, 2) + SourceIndex(0) --- >>> })(Languages = Thing.Languages || (Thing.Languages = {})); 1 >^^^^^^^^ @@ -1866,15 +1867,15 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(100, 9) Source(100, 1) + SourceIndex(0) -2 >Emitted(100, 10) Source(100, 2) + SourceIndex(0) -3 >Emitted(100, 12) Source(76, 21) + SourceIndex(0) -4 >Emitted(100, 21) Source(76, 30) + SourceIndex(0) -5 >Emitted(100, 24) Source(76, 21) + SourceIndex(0) -6 >Emitted(100, 39) Source(76, 30) + SourceIndex(0) -7 >Emitted(100, 44) Source(76, 21) + SourceIndex(0) -8 >Emitted(100, 59) Source(76, 30) + SourceIndex(0) -9 >Emitted(100, 67) Source(100, 2) + SourceIndex(0) +1 >Emitted(101, 9) Source(100, 1) + SourceIndex(0) +2 >Emitted(101, 10) Source(100, 2) + SourceIndex(0) +3 >Emitted(101, 12) Source(76, 21) + SourceIndex(0) +4 >Emitted(101, 21) Source(76, 30) + SourceIndex(0) +5 >Emitted(101, 24) Source(76, 21) + SourceIndex(0) +6 >Emitted(101, 39) Source(76, 30) + SourceIndex(0) +7 >Emitted(101, 44) Source(76, 21) + SourceIndex(0) +8 >Emitted(101, 59) Source(76, 30) + SourceIndex(0) +9 >Emitted(101, 67) Source(100, 2) + SourceIndex(0) --- >>> })(Thing = Sample.Thing || (Sample.Thing = {})); 1 >^^^^ @@ -1919,15 +1920,15 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(101, 5) Source(100, 1) + SourceIndex(0) -2 >Emitted(101, 6) Source(100, 2) + SourceIndex(0) -3 >Emitted(101, 8) Source(76, 15) + SourceIndex(0) -4 >Emitted(101, 13) Source(76, 20) + SourceIndex(0) -5 >Emitted(101, 16) Source(76, 15) + SourceIndex(0) -6 >Emitted(101, 28) Source(76, 20) + SourceIndex(0) -7 >Emitted(101, 33) Source(76, 15) + SourceIndex(0) -8 >Emitted(101, 45) Source(76, 20) + SourceIndex(0) -9 >Emitted(101, 53) Source(100, 2) + SourceIndex(0) +1 >Emitted(102, 5) Source(100, 1) + SourceIndex(0) +2 >Emitted(102, 6) Source(100, 2) + SourceIndex(0) +3 >Emitted(102, 8) Source(76, 15) + SourceIndex(0) +4 >Emitted(102, 13) Source(76, 20) + SourceIndex(0) +5 >Emitted(102, 16) Source(76, 15) + SourceIndex(0) +6 >Emitted(102, 28) Source(76, 20) + SourceIndex(0) +7 >Emitted(102, 33) Source(76, 15) + SourceIndex(0) +8 >Emitted(102, 45) Source(76, 20) + SourceIndex(0) +9 >Emitted(102, 53) Source(100, 2) + SourceIndex(0) --- >>>})(Sample || (Sample = {})); 1 > @@ -1969,12 +1970,12 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(102, 1) Source(100, 1) + SourceIndex(0) -2 >Emitted(102, 2) Source(100, 2) + SourceIndex(0) -3 >Emitted(102, 4) Source(76, 8) + SourceIndex(0) -4 >Emitted(102, 10) Source(76, 14) + SourceIndex(0) -5 >Emitted(102, 15) Source(76, 8) + SourceIndex(0) -6 >Emitted(102, 21) Source(76, 14) + SourceIndex(0) -7 >Emitted(102, 29) Source(100, 2) + SourceIndex(0) +1 >Emitted(103, 1) Source(100, 1) + SourceIndex(0) +2 >Emitted(103, 2) Source(100, 2) + SourceIndex(0) +3 >Emitted(103, 4) Source(76, 8) + SourceIndex(0) +4 >Emitted(103, 10) Source(76, 14) + SourceIndex(0) +5 >Emitted(103, 15) Source(76, 8) + SourceIndex(0) +6 >Emitted(103, 21) Source(76, 14) + SourceIndex(0) +7 >Emitted(103, 29) Source(100, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=recursiveClassReferenceTest.js.map \ No newline at end of file diff --git a/tests/baselines/reference/recursiveComplicatedClasses.js b/tests/baselines/reference/recursiveComplicatedClasses.js index 9544c60b9f5e5..f1f34e272f120 100644 --- a/tests/baselines/reference/recursiveComplicatedClasses.js +++ b/tests/baselines/reference/recursiveComplicatedClasses.js @@ -25,15 +25,16 @@ class TypeSymbol extends InferenceSymbol { } //// [recursiveComplicatedClasses.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Signature = (function () { function Signature() { this.parameters = null; diff --git a/tests/baselines/reference/recursivelySpecializedConstructorDeclaration.js b/tests/baselines/reference/recursivelySpecializedConstructorDeclaration.js index e7c3ce7a3ce42..e2a2e8dccffb7 100644 --- a/tests/baselines/reference/recursivelySpecializedConstructorDeclaration.js +++ b/tests/baselines/reference/recursivelySpecializedConstructorDeclaration.js @@ -30,15 +30,16 @@ declare module MsPortal.Controls.Base.ItemList { */ //// [recursivelySpecializedConstructorDeclaration.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var MsPortal; (function (MsPortal) { var Controls; diff --git a/tests/baselines/reference/reexportClassDefinition.js b/tests/baselines/reference/reexportClassDefinition.js index db5486b1af71b..bbaf78a0283cf 100644 --- a/tests/baselines/reference/reexportClassDefinition.js +++ b/tests/baselines/reference/reexportClassDefinition.js @@ -33,15 +33,16 @@ module.exports = { }; //// [foo3.js] "use strict"; -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var foo2 = require("./foo2"); var x = (function (_super) { __extends(x, _super); diff --git a/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js b/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js index bdea9b287bbc1..cf9592ab4b2b0 100644 --- a/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js +++ b/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js @@ -1020,15 +1020,16 @@ module caurinus { //// [resolvingClassDeclarationWhenInBaseTypeResolution.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var rionegrensis; (function (rionegrensis) { var caniventer = (function (_super) { diff --git a/tests/baselines/reference/returnInConstructor1.js b/tests/baselines/reference/returnInConstructor1.js index 625028055b4ea..0a71ab129a800 100644 --- a/tests/baselines/reference/returnInConstructor1.js +++ b/tests/baselines/reference/returnInConstructor1.js @@ -67,15 +67,16 @@ class I extends G { //// [returnInConstructor1.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { return; diff --git a/tests/baselines/reference/returnStatements.js b/tests/baselines/reference/returnStatements.js index b62ef87dadcc2..999d12f15f838 100644 --- a/tests/baselines/reference/returnStatements.js +++ b/tests/baselines/reference/returnStatements.js @@ -25,15 +25,16 @@ function fn13(): C { return null; } //// [returnStatements.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); // all the following should be valid function fn1() { return 1; } function fn2() { return ''; } diff --git a/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.js b/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.js index 3fdc1795c3292..33723f36d6ae0 100644 --- a/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.js +++ b/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.js @@ -9,15 +9,16 @@ class D extends C { } //// [scopeCheckExtendedClassInsidePublicMethod2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.js b/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.js index 237faa00fe39c..bac44a57ac032 100644 --- a/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.js +++ b/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.js @@ -9,15 +9,16 @@ class D extends C { } //// [scopeCheckExtendedClassInsideStaticMethod1.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/scopeTests.js b/tests/baselines/reference/scopeTests.js index 6090536a099a3..0086a0b08ce4e 100644 --- a/tests/baselines/reference/scopeTests.js +++ b/tests/baselines/reference/scopeTests.js @@ -12,15 +12,16 @@ class D extends C { } //// [scopeTests.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/shadowPrivateMembers.js b/tests/baselines/reference/shadowPrivateMembers.js index d842185b47cb6..2c56c8ddada05 100644 --- a/tests/baselines/reference/shadowPrivateMembers.js +++ b/tests/baselines/reference/shadowPrivateMembers.js @@ -4,15 +4,16 @@ class derived extends base { private n() {} } //// [shadowPrivateMembers.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var base = (function () { function base() { } diff --git a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js index b5216c1c16801..b07cc2e8d8ee2 100644 --- a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js +++ b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js @@ -8,15 +8,16 @@ class Greeter extends AbstractGreeter { } //// [sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var AbstractGreeter = (function () { function AbstractGreeter() { } diff --git a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js.map b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js.map index 27577a7e338cd..6de0ba822fab6 100644 --- a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js.map +++ b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js.map] -{"version":3,"file":"sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js","sourceRoot":"","sources":["sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts"],"names":[],"mappings":";;;;;;;;;AAAA;IAAA;IACA,CAAC;IAAD,sBAAC;AAAD,CAAC,AADD,IACC;AAED;IAAsB,2BAAe;IAArC;QAAA,kDAGC;QAFU,OAAC,GAAG,EAAE,CAAC;QACP,WAAK,GAAG,KAAK,CAAC;;IACzB,CAAC;IAAD,cAAC;AAAD,CAAC,AAHD,CAAsB,eAAe,GAGpC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js","sourceRoot":"","sources":["sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts"],"names":[],"mappings":";;;;;;;;;;AAAA;IAAA;IACA,CAAC;IAAD,sBAAC;AAAD,CAAC,AADD,IACC;AAED;IAAsB,2BAAe;IAArC;QAAA,kDAGC;QAFU,OAAC,GAAG,EAAE,CAAC;QACP,WAAK,GAAG,KAAK,CAAC;;IACzB,CAAC;IAAD,cAAC;AAAD,CAAC,AAHD,CAAsB,eAAe,GAGpC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt index 2ca29e33e91f0..00e15a91e19e8 100644 --- a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt @@ -8,26 +8,27 @@ sources: sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts emittedFile:tests/cases/compiler/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts ------------------------------------------------------------------- ->>>var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { ->>> __extendStatics(d, b); ->>> function __() { this.constructor = d; } ->>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); ->>>}; +>>>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]; }; +>>> return function (d, b) { +>>> __extendStatics(d, b); +>>> function __() { this.constructor = d; } +>>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +>>> }; +>>>})(); >>>var AbstractGreeter = (function () { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > -1 >Emitted(10, 1) Source(1, 1) + SourceIndex(0) +1 >Emitted(11, 1) Source(1, 1) + SourceIndex(0) --- >>> function AbstractGreeter() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(11, 5) Source(1, 1) + SourceIndex(0) +1->Emitted(12, 5) Source(1, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -36,16 +37,16 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts 1->class AbstractGreeter { > 2 > } -1->Emitted(12, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(12, 6) Source(2, 2) + SourceIndex(0) +1->Emitted(13, 5) Source(2, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(2, 2) + SourceIndex(0) --- >>> return AbstractGreeter; 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(13, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(13, 27) Source(2, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(2, 1) + SourceIndex(0) +2 >Emitted(14, 27) Source(2, 2) + SourceIndex(0) --- >>>}()); 1 > @@ -58,10 +59,10 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts 3 > 4 > class AbstractGreeter { > } -1 >Emitted(14, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(14, 2) Source(2, 2) + SourceIndex(0) -3 >Emitted(14, 2) Source(1, 1) + SourceIndex(0) -4 >Emitted(14, 6) Source(2, 2) + SourceIndex(0) +1 >Emitted(15, 1) Source(2, 1) + SourceIndex(0) +2 >Emitted(15, 2) Source(2, 2) + SourceIndex(0) +3 >Emitted(15, 2) Source(1, 1) + SourceIndex(0) +4 >Emitted(15, 6) Source(2, 2) + SourceIndex(0) --- >>>var Greeter = (function (_super) { 1-> @@ -69,21 +70,21 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts 1-> > > -1->Emitted(15, 1) Source(4, 1) + SourceIndex(0) +1->Emitted(16, 1) Source(4, 1) + SourceIndex(0) --- >>> __extends(Greeter, _super); 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1->class Greeter extends 2 > AbstractGreeter -1->Emitted(16, 5) Source(4, 23) + SourceIndex(0) -2 >Emitted(16, 32) Source(4, 38) + SourceIndex(0) +1->Emitted(17, 5) Source(4, 23) + SourceIndex(0) +2 >Emitted(17, 32) Source(4, 38) + SourceIndex(0) --- >>> function Greeter() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > -1 >Emitted(17, 5) Source(4, 1) + SourceIndex(0) +1 >Emitted(18, 5) Source(4, 1) + SourceIndex(0) --- >>> var _this = _super.apply(this, arguments) || this; 1->^^^^^^^^ @@ -93,8 +94,8 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts > public a = 10; > public nameA = "Ten"; > } -1->Emitted(18, 9) Source(4, 1) + SourceIndex(0) -2 >Emitted(18, 59) Source(7, 2) + SourceIndex(0) +1->Emitted(19, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(19, 59) Source(7, 2) + SourceIndex(0) --- >>> _this.a = 10; 1 >^^^^^^^^ @@ -108,11 +109,11 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts 3 > = 4 > 10 5 > ; -1 >Emitted(19, 9) Source(5, 12) + SourceIndex(0) -2 >Emitted(19, 16) Source(5, 13) + SourceIndex(0) -3 >Emitted(19, 19) Source(5, 16) + SourceIndex(0) -4 >Emitted(19, 21) Source(5, 18) + SourceIndex(0) -5 >Emitted(19, 22) Source(5, 19) + SourceIndex(0) +1 >Emitted(20, 9) Source(5, 12) + SourceIndex(0) +2 >Emitted(20, 16) Source(5, 13) + SourceIndex(0) +3 >Emitted(20, 19) Source(5, 16) + SourceIndex(0) +4 >Emitted(20, 21) Source(5, 18) + SourceIndex(0) +5 >Emitted(20, 22) Source(5, 19) + SourceIndex(0) --- >>> _this.nameA = "Ten"; 1->^^^^^^^^ @@ -126,11 +127,11 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts 3 > = 4 > "Ten" 5 > ; -1->Emitted(20, 9) Source(6, 12) + SourceIndex(0) -2 >Emitted(20, 20) Source(6, 17) + SourceIndex(0) -3 >Emitted(20, 23) Source(6, 20) + SourceIndex(0) -4 >Emitted(20, 28) Source(6, 25) + SourceIndex(0) -5 >Emitted(20, 29) Source(6, 26) + SourceIndex(0) +1->Emitted(21, 9) Source(6, 12) + SourceIndex(0) +2 >Emitted(21, 20) Source(6, 17) + SourceIndex(0) +3 >Emitted(21, 23) Source(6, 20) + SourceIndex(0) +4 >Emitted(21, 28) Source(6, 25) + SourceIndex(0) +5 >Emitted(21, 29) Source(6, 26) + SourceIndex(0) --- >>> return _this; >>> } @@ -140,8 +141,8 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts 1 > > 2 > } -1 >Emitted(22, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(22, 6) Source(7, 2) + SourceIndex(0) +1 >Emitted(23, 5) Source(7, 1) + SourceIndex(0) +2 >Emitted(23, 6) Source(7, 2) + SourceIndex(0) --- >>> return Greeter; 1->^^^^ @@ -149,8 +150,8 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts 3 > ^^^-> 1-> 2 > } -1->Emitted(23, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(23, 19) Source(7, 2) + SourceIndex(0) +1->Emitted(24, 5) Source(7, 1) + SourceIndex(0) +2 >Emitted(24, 19) Source(7, 2) + SourceIndex(0) --- >>>}(AbstractGreeter)); 1-> @@ -169,11 +170,11 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts > public a = 10; > public nameA = "Ten"; > } -1->Emitted(24, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(24, 2) Source(7, 2) + SourceIndex(0) -3 >Emitted(24, 2) Source(4, 1) + SourceIndex(0) -4 >Emitted(24, 3) Source(4, 23) + SourceIndex(0) -5 >Emitted(24, 18) Source(4, 38) + SourceIndex(0) -6 >Emitted(24, 21) Source(7, 2) + SourceIndex(0) +1->Emitted(25, 1) Source(7, 1) + SourceIndex(0) +2 >Emitted(25, 2) Source(7, 2) + SourceIndex(0) +3 >Emitted(25, 2) Source(4, 1) + SourceIndex(0) +4 >Emitted(25, 3) Source(4, 23) + SourceIndex(0) +5 >Emitted(25, 18) Source(4, 38) + SourceIndex(0) +6 >Emitted(25, 21) Source(7, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js.map \ No newline at end of file diff --git a/tests/baselines/reference/specializedInheritedConstructors1.js b/tests/baselines/reference/specializedInheritedConstructors1.js index 76d6da2d5d2d5..3904422842f63 100644 --- a/tests/baselines/reference/specializedInheritedConstructors1.js +++ b/tests/baselines/reference/specializedInheritedConstructors1.js @@ -18,15 +18,16 @@ var myView = new MyView(m); // was error //// [specializedInheritedConstructors1.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var View = (function () { function View(options) { } diff --git a/tests/baselines/reference/specializedOverloadWithRestParameters.js b/tests/baselines/reference/specializedOverloadWithRestParameters.js index d1bf0a0d6368d..a40be7711c104 100644 --- a/tests/baselines/reference/specializedOverloadWithRestParameters.js +++ b/tests/baselines/reference/specializedOverloadWithRestParameters.js @@ -13,15 +13,16 @@ function g(tagName: any): Base { } //// [specializedOverloadWithRestParameters.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/staticFactory1.js b/tests/baselines/reference/staticFactory1.js index 63ea3a01253d1..77ce4a3d8bc82 100644 --- a/tests/baselines/reference/staticFactory1.js +++ b/tests/baselines/reference/staticFactory1.js @@ -14,15 +14,16 @@ var d = Derived.create(); d.foo(); //// [staticFactory1.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/staticInheritance.js b/tests/baselines/reference/staticInheritance.js index 91fa33abd5170..a603fc607b976 100644 --- a/tests/baselines/reference/staticInheritance.js +++ b/tests/baselines/reference/staticInheritance.js @@ -12,15 +12,16 @@ doThing(B); //OK //// [staticInheritance.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); function doThing(x) { } var A = (function () { function A() { diff --git a/tests/baselines/reference/staticMemberAccessOffDerivedType1.js b/tests/baselines/reference/staticMemberAccessOffDerivedType1.js index ee1f12df69e77..f07c4e9ae0f34 100644 --- a/tests/baselines/reference/staticMemberAccessOffDerivedType1.js +++ b/tests/baselines/reference/staticMemberAccessOffDerivedType1.js @@ -10,15 +10,16 @@ class P extends SomeBase { //// [staticMemberAccessOffDerivedType1.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var SomeBase = (function () { function SomeBase() { } diff --git a/tests/baselines/reference/staticPropSuper.js b/tests/baselines/reference/staticPropSuper.js index 241ebc529fb35..dd36b0928f0f1 100644 --- a/tests/baselines/reference/staticPropSuper.js +++ b/tests/baselines/reference/staticPropSuper.js @@ -36,15 +36,16 @@ class E extends A { } //// [staticPropSuper.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/strictModeInConstructor.js b/tests/baselines/reference/strictModeInConstructor.js index 71165d41360dd..9c289a209b504 100644 --- a/tests/baselines/reference/strictModeInConstructor.js +++ b/tests/baselines/reference/strictModeInConstructor.js @@ -61,15 +61,16 @@ class Ds extends A { } //// [strictModeInConstructor.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/strictModeReservedWord.js b/tests/baselines/reference/strictModeReservedWord.js index ec07546112939..614f20eafd651 100644 --- a/tests/baselines/reference/strictModeReservedWord.js +++ b/tests/baselines/reference/strictModeReservedWord.js @@ -28,15 +28,16 @@ function foo() { //// [strictModeReservedWord.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var let = 10; function foo() { "use strict"; diff --git a/tests/baselines/reference/strictModeReservedWordInClassDeclaration.js b/tests/baselines/reference/strictModeReservedWordInClassDeclaration.js index fdf72090f2fea..344f4edb83d1c 100644 --- a/tests/baselines/reference/strictModeReservedWordInClassDeclaration.js +++ b/tests/baselines/reference/strictModeReservedWordInClassDeclaration.js @@ -29,15 +29,16 @@ class G extends package { } class H extends package.A { } //// [strictModeReservedWordInClassDeclaration.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Foo = (function () { function Foo(private, public, static) { private = public = static; diff --git a/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js b/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js index dd9341b4a429d..5fdc24447917c 100644 --- a/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js +++ b/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js @@ -41,15 +41,16 @@ var b: { [x: string]: A } = { //// [stringIndexerConstrainsPropertyDeclarations2.js] // String indexer providing a constraint of a user defined type -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/subtypesOfTypeParameter.js b/tests/baselines/reference/subtypesOfTypeParameter.js index 8abd40b7eb5e6..d5d790c4d4f69 100644 --- a/tests/baselines/reference/subtypesOfTypeParameter.js +++ b/tests/baselines/reference/subtypesOfTypeParameter.js @@ -107,15 +107,16 @@ function f2(x: T, y: U) { //// [subtypesOfTypeParameter.js] // checking whether other types are subtypes of type parameters -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C3 = (function () { function C3() { } diff --git a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints.js b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints.js index 034b55ee1fc27..20685aaf52c3d 100644 --- a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints.js +++ b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints.js @@ -169,15 +169,16 @@ class D29 extends C3 { //// [subtypesOfTypeParameterWithConstraints.js] // checking whether other types are subtypes of type parameters with constraints -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C3 = (function () { function C3() { } diff --git a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints4.js b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints4.js index b2f4f3eca493e..dbcdd47ba6d72 100644 --- a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints4.js +++ b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints4.js @@ -80,15 +80,16 @@ class D9 extends B1 { //// [subtypesOfTypeParameterWithConstraints4.js] // checking whether other types are subtypes of type parameters with constraints -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Foo = (function () { function Foo() { } diff --git a/tests/baselines/reference/subtypesOfTypeParameterWithRecursiveConstraints.js b/tests/baselines/reference/subtypesOfTypeParameterWithRecursiveConstraints.js index 413f915a61877..7b1a7738d99d0 100644 --- a/tests/baselines/reference/subtypesOfTypeParameterWithRecursiveConstraints.js +++ b/tests/baselines/reference/subtypesOfTypeParameterWithRecursiveConstraints.js @@ -159,15 +159,16 @@ module M2 { //// [subtypesOfTypeParameterWithRecursiveConstraints.js] // checking whether other types are subtypes of type parameters with constraints -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Foo = (function () { function Foo() { } diff --git a/tests/baselines/reference/subtypingTransitivity.js b/tests/baselines/reference/subtypingTransitivity.js index 23c51619c8060..82a814c9c411a 100644 --- a/tests/baselines/reference/subtypingTransitivity.js +++ b/tests/baselines/reference/subtypingTransitivity.js @@ -20,15 +20,16 @@ b.x = 1; // assigned number to string //// [subtypingTransitivity.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var B = (function () { function B() { } diff --git a/tests/baselines/reference/subtypingWithCallSignatures2.js b/tests/baselines/reference/subtypingWithCallSignatures2.js index 0e16d43f216e5..9e0809090679f 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures2.js +++ b/tests/baselines/reference/subtypingWithCallSignatures2.js @@ -174,15 +174,16 @@ var r18 = foo18(r18arg1); //// [subtypingWithCallSignatures2.js] // checking subtype relations for function types as it relates to contextual signature instantiation -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/subtypingWithCallSignatures3.js b/tests/baselines/reference/subtypingWithCallSignatures3.js index f17007cba426c..64b182872f681 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures3.js +++ b/tests/baselines/reference/subtypingWithCallSignatures3.js @@ -121,15 +121,16 @@ module WithGenericSignaturesInBaseType { //// [subtypingWithCallSignatures3.js] // checking subtype relations for function types as it relates to contextual signature instantiation // error cases, so function calls will all result in 'any' -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Errors; (function (Errors) { var Base = (function () { diff --git a/tests/baselines/reference/subtypingWithCallSignatures4.js b/tests/baselines/reference/subtypingWithCallSignatures4.js index e6030bdb12d2d..e5770b58dfc6a 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures4.js +++ b/tests/baselines/reference/subtypingWithCallSignatures4.js @@ -113,15 +113,16 @@ var r18 = foo18(r18arg); //// [subtypingWithCallSignatures4.js] // checking subtype relations for function types as it relates to contextual signature instantiation -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/subtypingWithConstructSignatures2.js b/tests/baselines/reference/subtypingWithConstructSignatures2.js index 24914baf2eda3..5961a930dca71 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures2.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures2.js @@ -174,15 +174,16 @@ var r18 = foo18(r18arg1); //// [subtypingWithConstructSignatures2.js] // checking subtype relations for function types as it relates to contextual signature instantiation -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/subtypingWithConstructSignatures3.js b/tests/baselines/reference/subtypingWithConstructSignatures3.js index f1153675c9159..62c46d8add9b0 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures3.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures3.js @@ -123,15 +123,16 @@ module WithGenericSignaturesInBaseType { //// [subtypingWithConstructSignatures3.js] // checking subtype relations for function types as it relates to contextual signature instantiation // error cases, so function calls will all result in 'any' -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Errors; (function (Errors) { var Base = (function () { diff --git a/tests/baselines/reference/subtypingWithConstructSignatures4.js b/tests/baselines/reference/subtypingWithConstructSignatures4.js index 10246582f12f2..93415f6d2e634 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures4.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures4.js @@ -113,15 +113,16 @@ var r18 = foo18(r18arg); //// [subtypingWithConstructSignatures4.js] // checking subtype relations for function types as it relates to contextual signature instantiation -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/subtypingWithConstructSignatures5.js b/tests/baselines/reference/subtypingWithConstructSignatures5.js index 7d3f9516c299f..64e9965cb85d1 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures5.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures5.js @@ -51,15 +51,16 @@ interface I extends B { //// [subtypingWithConstructSignatures5.js] // checking subtype relations for function types as it relates to contextual signature instantiation // same as subtypingWithConstructSignatures2 just with an extra level of indirection in the inheritance chain -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/subtypingWithConstructSignatures6.js b/tests/baselines/reference/subtypingWithConstructSignatures6.js index 39f4e91f01178..247fcbbd1bc08 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures6.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures6.js @@ -54,15 +54,16 @@ interface I9 extends A { // checking subtype relations for function types as it relates to contextual signature instantiation // same as subtypingWithConstructSignatures4 but using class type parameters instead of generic signatures // all are errors -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/subtypingWithNumericIndexer.js b/tests/baselines/reference/subtypingWithNumericIndexer.js index 994c559756903..835f82c72b94d 100644 --- a/tests/baselines/reference/subtypingWithNumericIndexer.js +++ b/tests/baselines/reference/subtypingWithNumericIndexer.js @@ -41,15 +41,16 @@ module Generics { //// [subtypingWithNumericIndexer.js] // Derived type indexer must be subtype of base type indexer -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/subtypingWithNumericIndexer3.js b/tests/baselines/reference/subtypingWithNumericIndexer3.js index 25963e704490e..761739f547faa 100644 --- a/tests/baselines/reference/subtypingWithNumericIndexer3.js +++ b/tests/baselines/reference/subtypingWithNumericIndexer3.js @@ -45,15 +45,16 @@ module Generics { //// [subtypingWithNumericIndexer3.js] // Derived type indexer must be subtype of base type indexer -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/subtypingWithNumericIndexer4.js b/tests/baselines/reference/subtypingWithNumericIndexer4.js index 304dbee9e6169..3d8bac24a79de 100644 --- a/tests/baselines/reference/subtypingWithNumericIndexer4.js +++ b/tests/baselines/reference/subtypingWithNumericIndexer4.js @@ -29,15 +29,16 @@ module Generics { //// [subtypingWithNumericIndexer4.js] // Derived type indexer must be subtype of base type indexer -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/subtypingWithObjectMembers.js b/tests/baselines/reference/subtypingWithObjectMembers.js index 0733679a120c6..7526548f24e8f 100644 --- a/tests/baselines/reference/subtypingWithObjectMembers.js +++ b/tests/baselines/reference/subtypingWithObjectMembers.js @@ -68,15 +68,16 @@ module TwoLevels { } //// [subtypingWithObjectMembers.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/subtypingWithObjectMembers4.js b/tests/baselines/reference/subtypingWithObjectMembers4.js index 4b41ee1aaa7f9..ae6201415878c 100644 --- a/tests/baselines/reference/subtypingWithObjectMembers4.js +++ b/tests/baselines/reference/subtypingWithObjectMembers4.js @@ -35,15 +35,16 @@ class B3 extends A3 { //// [subtypingWithObjectMembers4.js] // subtyping when property names do not match -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/subtypingWithObjectMembersAccessibility.js b/tests/baselines/reference/subtypingWithObjectMembersAccessibility.js index 976a7e1b8cd12..5499502057335 100644 --- a/tests/baselines/reference/subtypingWithObjectMembersAccessibility.js +++ b/tests/baselines/reference/subtypingWithObjectMembersAccessibility.js @@ -35,15 +35,16 @@ class B3 extends A3 { //// [subtypingWithObjectMembersAccessibility.js] // Derived member is private, base member is not causes errors -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.js b/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.js index 9c2e225711299..a2aca0d13bdf9 100644 --- a/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.js +++ b/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.js @@ -63,15 +63,16 @@ module ImplicitPublic { //// [subtypingWithObjectMembersAccessibility2.js] // Derived member is private, base member is not causes errors -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/subtypingWithStringIndexer.js b/tests/baselines/reference/subtypingWithStringIndexer.js index 042684e0c041e..7418e3dcb40bf 100644 --- a/tests/baselines/reference/subtypingWithStringIndexer.js +++ b/tests/baselines/reference/subtypingWithStringIndexer.js @@ -42,15 +42,16 @@ module Generics { //// [subtypingWithStringIndexer.js] // Derived type indexer must be subtype of base type indexer -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/subtypingWithStringIndexer3.js b/tests/baselines/reference/subtypingWithStringIndexer3.js index 23e7dbe37b6fc..081219774e5ff 100644 --- a/tests/baselines/reference/subtypingWithStringIndexer3.js +++ b/tests/baselines/reference/subtypingWithStringIndexer3.js @@ -45,15 +45,16 @@ module Generics { //// [subtypingWithStringIndexer3.js] // Derived type indexer must be subtype of base type indexer -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/subtypingWithStringIndexer4.js b/tests/baselines/reference/subtypingWithStringIndexer4.js index e17f0308609ac..b0c55cf6398fe 100644 --- a/tests/baselines/reference/subtypingWithStringIndexer4.js +++ b/tests/baselines/reference/subtypingWithStringIndexer4.js @@ -29,15 +29,16 @@ module Generics { //// [subtypingWithStringIndexer4.js] // Derived type indexer must be subtype of base type indexer -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/super.js b/tests/baselines/reference/super.js index a801d12689516..8984c5860eaea 100644 --- a/tests/baselines/reference/super.js +++ b/tests/baselines/reference/super.js @@ -38,15 +38,16 @@ s.foo() + ss.foo(); //// [super.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { var x; diff --git a/tests/baselines/reference/super1.js b/tests/baselines/reference/super1.js index bc1160411aecc..49a057a7f494b 100644 --- a/tests/baselines/reference/super1.js +++ b/tests/baselines/reference/super1.js @@ -67,15 +67,16 @@ module Base4 { //// [super1.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); // Case 1 var Base1 = (function () { function Base1() { diff --git a/tests/baselines/reference/super2.js b/tests/baselines/reference/super2.js index cac924a6b69b9..451c569c907e8 100644 --- a/tests/baselines/reference/super2.js +++ b/tests/baselines/reference/super2.js @@ -51,15 +51,16 @@ results1.x() + results1.y() + results2.y(); //// [super2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); // Case 5 var Base5 = (function () { function Base5() { diff --git a/tests/baselines/reference/superAccess.js b/tests/baselines/reference/superAccess.js index 1c37353813c0c..a218ba0968a1c 100644 --- a/tests/baselines/reference/superAccess.js +++ b/tests/baselines/reference/superAccess.js @@ -14,15 +14,16 @@ class MyDerived extends MyBase { } //// [superAccess.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var MyBase = (function () { function MyBase() { this.S2 = "test"; diff --git a/tests/baselines/reference/superAccess2.js b/tests/baselines/reference/superAccess2.js index b1476e5c8e693..d678ff22480da 100644 --- a/tests/baselines/reference/superAccess2.js +++ b/tests/baselines/reference/superAccess2.js @@ -25,15 +25,16 @@ class Q extends P { } //// [superAccess2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var P = (function () { function P() { } diff --git a/tests/baselines/reference/superAccessInFatArrow1.js b/tests/baselines/reference/superAccessInFatArrow1.js index c9208194e374a..a58b119c67f07 100644 --- a/tests/baselines/reference/superAccessInFatArrow1.js +++ b/tests/baselines/reference/superAccessInFatArrow1.js @@ -16,15 +16,16 @@ module test { } //// [superAccessInFatArrow1.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var test; (function (test) { var A = (function () { diff --git a/tests/baselines/reference/superCallArgsMustMatch.js b/tests/baselines/reference/superCallArgsMustMatch.js index a37a07439bed0..d488506e019f0 100644 --- a/tests/baselines/reference/superCallArgsMustMatch.js +++ b/tests/baselines/reference/superCallArgsMustMatch.js @@ -26,15 +26,16 @@ class T6 extends T5{ //// [superCallArgsMustMatch.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var T5 = (function () { function T5(bar) { this.bar = bar; diff --git a/tests/baselines/reference/superCallAssignResult.js b/tests/baselines/reference/superCallAssignResult.js index 6fa7738269159..50e1c20b6bc09 100644 --- a/tests/baselines/reference/superCallAssignResult.js +++ b/tests/baselines/reference/superCallAssignResult.js @@ -11,15 +11,16 @@ class H extends E { } //// [superCallAssignResult.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var E = (function () { function E(arg) { } diff --git a/tests/baselines/reference/superCallBeforeThisAccessing1.js b/tests/baselines/reference/superCallBeforeThisAccessing1.js index 9990b5e7e1a86..71c9e05e7cbbe 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing1.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing1.js @@ -17,15 +17,16 @@ class D extends Base { //// [superCallBeforeThisAccessing1.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base(c) { } diff --git a/tests/baselines/reference/superCallBeforeThisAccessing2.js b/tests/baselines/reference/superCallBeforeThisAccessing2.js index a7ef99d67ccea..a18505f820396 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing2.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing2.js @@ -11,15 +11,16 @@ class D extends Base { //// [superCallBeforeThisAccessing2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base(c) { } diff --git a/tests/baselines/reference/superCallBeforeThisAccessing3.js b/tests/baselines/reference/superCallBeforeThisAccessing3.js index 90156d199d581..61ed4fe5c4c27 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing3.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing3.js @@ -14,15 +14,16 @@ class D extends Base { //// [superCallBeforeThisAccessing3.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base(c) { } diff --git a/tests/baselines/reference/superCallBeforeThisAccessing4.js b/tests/baselines/reference/superCallBeforeThisAccessing4.js index e42decf54e8ce..cf5e9e89eba0a 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing4.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing4.js @@ -16,15 +16,16 @@ class E extends null { } //// [superCallBeforeThisAccessing4.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var D = (function (_super) { __extends(D, _super); function D() { diff --git a/tests/baselines/reference/superCallBeforeThisAccessing5.js b/tests/baselines/reference/superCallBeforeThisAccessing5.js index 8477c576c7728..31087b70094f9 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing5.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing5.js @@ -8,15 +8,16 @@ class D extends null { //// [superCallBeforeThisAccessing5.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var D = (function (_super) { __extends(D, _super); function D() { diff --git a/tests/baselines/reference/superCallBeforeThisAccessing6.js b/tests/baselines/reference/superCallBeforeThisAccessing6.js index a5e291b954342..0c3d20c102fbe 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing6.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing6.js @@ -11,15 +11,16 @@ class D extends Base { //// [superCallBeforeThisAccessing6.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base(c) { } diff --git a/tests/baselines/reference/superCallBeforeThisAccessing7.js b/tests/baselines/reference/superCallBeforeThisAccessing7.js index 69a54894cc426..ba79e0b65ae0d 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing7.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing7.js @@ -14,15 +14,16 @@ class D extends Base { //// [superCallBeforeThisAccessing7.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base(c) { } diff --git a/tests/baselines/reference/superCallBeforeThisAccessing8.js b/tests/baselines/reference/superCallBeforeThisAccessing8.js index 51c4c7277691a..4f6a383aadf3b 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing8.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing8.js @@ -14,15 +14,16 @@ class D extends Base { //// [superCallBeforeThisAccessing8.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base(c) { } diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType1.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType1.js index 1b17766faf61f..e24d0b53c1f6a 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType1.js @@ -12,15 +12,16 @@ class D extends B { //// [superCallFromClassThatDerivesFromGenericType1.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var D = (function (_super) { __extends(D, _super); function D() { diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType2.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType2.js index 159fa8786b348..3413bc1846737 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType2.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType2.js @@ -11,15 +11,16 @@ class D extends B { //// [superCallFromClassThatDerivesFromGenericType2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var D = (function (_super) { __extends(D, _super); function D() { diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js index ccf1bf3746a55..f31fd399b3618 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js @@ -11,15 +11,16 @@ class B extends A { } //// [superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A(map) { this.map = map; diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js index f109d6576543e..4c99415f6433a 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js @@ -11,15 +11,16 @@ class B extends A { } //// [superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A(map) { this.map = map; diff --git a/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js b/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js index 76fd322d519c2..bbea46b27838b 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js @@ -11,15 +11,16 @@ class B extends A { } //// [superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A(map) { this.map = map; diff --git a/tests/baselines/reference/superCallInNonStaticMethod.js b/tests/baselines/reference/superCallInNonStaticMethod.js index 737f51d9e2712..54c771575909c 100644 --- a/tests/baselines/reference/superCallInNonStaticMethod.js +++ b/tests/baselines/reference/superCallInNonStaticMethod.js @@ -51,15 +51,16 @@ class Other extends Doing { //// [superCallInNonStaticMethod.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Doing = (function () { function Doing() { } diff --git a/tests/baselines/reference/superCallInStaticMethod.js b/tests/baselines/reference/superCallInStaticMethod.js index cbd8398a20ad5..15d46bc1577a9 100644 --- a/tests/baselines/reference/superCallInStaticMethod.js +++ b/tests/baselines/reference/superCallInStaticMethod.js @@ -47,15 +47,16 @@ class Other extends Doing { //// [superCallInStaticMethod.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Doing = (function () { function Doing() { } diff --git a/tests/baselines/reference/superCallInsideClassDeclaration.js b/tests/baselines/reference/superCallInsideClassDeclaration.js index 71ef004145208..7f5913549cc99 100644 --- a/tests/baselines/reference/superCallInsideClassDeclaration.js +++ b/tests/baselines/reference/superCallInsideClassDeclaration.js @@ -17,15 +17,16 @@ class B extends A { } //// [superCallInsideClassDeclaration.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/superCallInsideClassExpression.js b/tests/baselines/reference/superCallInsideClassExpression.js index 1d6b849ae5e54..0f1fa8dc54928 100644 --- a/tests/baselines/reference/superCallInsideClassExpression.js +++ b/tests/baselines/reference/superCallInsideClassExpression.js @@ -17,15 +17,16 @@ class B extends A { } //// [superCallInsideClassExpression.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/superCallInsideObjectLiteralExpression.js b/tests/baselines/reference/superCallInsideObjectLiteralExpression.js index e479206f9c50d..0130a6c2b4860 100644 --- a/tests/baselines/reference/superCallInsideObjectLiteralExpression.js +++ b/tests/baselines/reference/superCallInsideObjectLiteralExpression.js @@ -13,15 +13,16 @@ class B extends A { } //// [superCallInsideObjectLiteralExpression.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/superCallOutsideConstructor.js b/tests/baselines/reference/superCallOutsideConstructor.js index 9e4b98997c905..0251b19231e75 100644 --- a/tests/baselines/reference/superCallOutsideConstructor.js +++ b/tests/baselines/reference/superCallOutsideConstructor.js @@ -23,15 +23,16 @@ var d = new D(); //// [superCallOutsideConstructor.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/superCallParameterContextualTyping1.js b/tests/baselines/reference/superCallParameterContextualTyping1.js index f71add3806acc..a3d5303efaa09 100644 --- a/tests/baselines/reference/superCallParameterContextualTyping1.js +++ b/tests/baselines/reference/superCallParameterContextualTyping1.js @@ -13,15 +13,16 @@ class B extends A { //// [superCallParameterContextualTyping1.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A(map) { this.map = map; diff --git a/tests/baselines/reference/superCallParameterContextualTyping2.js b/tests/baselines/reference/superCallParameterContextualTyping2.js index 5363dedff608f..e90755ffee894 100644 --- a/tests/baselines/reference/superCallParameterContextualTyping2.js +++ b/tests/baselines/reference/superCallParameterContextualTyping2.js @@ -12,15 +12,16 @@ class C extends A { } //// [superCallParameterContextualTyping2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A(map) { this.map = map; diff --git a/tests/baselines/reference/superCallParameterContextualTyping3.js b/tests/baselines/reference/superCallParameterContextualTyping3.js index c074252a69293..fe68db83a0413 100644 --- a/tests/baselines/reference/superCallParameterContextualTyping3.js +++ b/tests/baselines/reference/superCallParameterContextualTyping3.js @@ -32,15 +32,16 @@ class C extends CBase { } //// [superCallParameterContextualTyping3.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var CBase = (function () { function CBase(param) { } diff --git a/tests/baselines/reference/superCallWithCommentEmit01.js b/tests/baselines/reference/superCallWithCommentEmit01.js index 5cd354a24b40d..3a2981b84667a 100644 --- a/tests/baselines/reference/superCallWithCommentEmit01.js +++ b/tests/baselines/reference/superCallWithCommentEmit01.js @@ -11,15 +11,16 @@ class B extends A { } //// [superCallWithCommentEmit01.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A(text) { this.text = text; diff --git a/tests/baselines/reference/superCallWithMissingBaseClass.js b/tests/baselines/reference/superCallWithMissingBaseClass.js index 27ecd48bf68dd..7ae8d5b309900 100644 --- a/tests/baselines/reference/superCallWithMissingBaseClass.js +++ b/tests/baselines/reference/superCallWithMissingBaseClass.js @@ -10,15 +10,16 @@ class Foo extends Bar { } //// [superCallWithMissingBaseClass.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Foo = (function (_super) { __extends(Foo, _super); function Foo() { diff --git a/tests/baselines/reference/superCalls.js b/tests/baselines/reference/superCalls.js index e974d75176b2d..ac9b087808386 100644 --- a/tests/baselines/reference/superCalls.js +++ b/tests/baselines/reference/superCalls.js @@ -31,15 +31,16 @@ class OtherDerived extends OtherBase { //// [superCalls.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base(n) { this.x = 43; diff --git a/tests/baselines/reference/superCallsInConstructor.js b/tests/baselines/reference/superCallsInConstructor.js index 1b02c20b7a5fa..d44ae6c11ec8d 100644 --- a/tests/baselines/reference/superCallsInConstructor.js +++ b/tests/baselines/reference/superCallsInConstructor.js @@ -21,15 +21,16 @@ class Derived extends Base { } //// [superCallsInConstructor.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/superErrors.js b/tests/baselines/reference/superErrors.js index 86c1dae1a1c68..d7078f39c1688 100644 --- a/tests/baselines/reference/superErrors.js +++ b/tests/baselines/reference/superErrors.js @@ -52,15 +52,16 @@ class RegisteredUser extends User { } //// [superErrors.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); function foo() { var _this = this; // super in a non class context diff --git a/tests/baselines/reference/superInCatchBlock1.js b/tests/baselines/reference/superInCatchBlock1.js index 30d3494689aa9..b9d7c910977d6 100644 --- a/tests/baselines/reference/superInCatchBlock1.js +++ b/tests/baselines/reference/superInCatchBlock1.js @@ -14,15 +14,16 @@ class B extends A { //// [superInCatchBlock1.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/superInConstructorParam1.js b/tests/baselines/reference/superInConstructorParam1.js index a98e1fdb089ae..0f6ec4e386f3d 100644 --- a/tests/baselines/reference/superInConstructorParam1.js +++ b/tests/baselines/reference/superInConstructorParam1.js @@ -11,15 +11,16 @@ class C extends B { } //// [superInConstructorParam1.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var B = (function () { function B() { } diff --git a/tests/baselines/reference/superInLambdas.js b/tests/baselines/reference/superInLambdas.js index 384b83c723948..9eeeaa0723ca1 100644 --- a/tests/baselines/reference/superInLambdas.js +++ b/tests/baselines/reference/superInLambdas.js @@ -68,15 +68,16 @@ class RegisteredUser4 extends User { } //// [superInLambdas.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var User = (function () { function User() { this.name = "Bob"; diff --git a/tests/baselines/reference/superInObjectLiterals_ES5.js b/tests/baselines/reference/superInObjectLiterals_ES5.js index 32369a7fc85b6..cfcd7a4de2a86 100644 --- a/tests/baselines/reference/superInObjectLiterals_ES5.js +++ b/tests/baselines/reference/superInObjectLiterals_ES5.js @@ -60,15 +60,16 @@ class B extends A { } //// [superInObjectLiterals_ES5.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var _this = this; var obj = { __proto__: { diff --git a/tests/baselines/reference/superNewCall1.js b/tests/baselines/reference/superNewCall1.js index eee25fd2acccb..5a5a91cd8f700 100644 --- a/tests/baselines/reference/superNewCall1.js +++ b/tests/baselines/reference/superNewCall1.js @@ -13,15 +13,16 @@ class B extends A { } //// [superNewCall1.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A(map) { this.map = map; diff --git a/tests/baselines/reference/superPropertyAccess.js b/tests/baselines/reference/superPropertyAccess.js index 39e8098407c7a..f6c09ab9092ba 100644 --- a/tests/baselines/reference/superPropertyAccess.js +++ b/tests/baselines/reference/superPropertyAccess.js @@ -37,15 +37,16 @@ class MyDerived extends MyBase { } //// [superPropertyAccess.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var MyBase = (function () { function MyBase() { this.m2 = function () { }; diff --git a/tests/baselines/reference/superPropertyAccess1.js b/tests/baselines/reference/superPropertyAccess1.js index 77d6a4b1c12a6..3eef279e45460 100644 --- a/tests/baselines/reference/superPropertyAccess1.js +++ b/tests/baselines/reference/superPropertyAccess1.js @@ -28,15 +28,16 @@ class D extends C { } //// [superPropertyAccess1.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/superPropertyAccess2.js b/tests/baselines/reference/superPropertyAccess2.js index 1b9c056d3b2f3..767b08dc2b9b9 100644 --- a/tests/baselines/reference/superPropertyAccess2.js +++ b/tests/baselines/reference/superPropertyAccess2.js @@ -28,15 +28,16 @@ class D extends C { } //// [superPropertyAccess2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/superPropertyAccessInComputedPropertiesOfNestedType_ES5.js b/tests/baselines/reference/superPropertyAccessInComputedPropertiesOfNestedType_ES5.js index 5506bedbcb6af..014110485e6fa 100644 --- a/tests/baselines/reference/superPropertyAccessInComputedPropertiesOfNestedType_ES5.js +++ b/tests/baselines/reference/superPropertyAccessInComputedPropertiesOfNestedType_ES5.js @@ -15,15 +15,16 @@ class B extends A { } //// [superPropertyAccessInComputedPropertiesOfNestedType_ES5.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/superPropertyAccessNoError.js b/tests/baselines/reference/superPropertyAccessNoError.js index e91603f20d893..10e64d97a9227 100644 --- a/tests/baselines/reference/superPropertyAccessNoError.js +++ b/tests/baselines/reference/superPropertyAccessNoError.js @@ -77,15 +77,16 @@ instance.returnThis().fn(); //super.publicInstanceMemberFunction in lambda in member function //super.publicStaticMemberFunction in static member function of derived class //super.publicStaticMemberFunction in static member accessor(get and set) of derived class -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var SomeBaseClass = (function () { function SomeBaseClass() { } diff --git a/tests/baselines/reference/superPropertyAccess_ES5.js b/tests/baselines/reference/superPropertyAccess_ES5.js index 4e67455900aaa..2a48bfbdba7b7 100644 --- a/tests/baselines/reference/superPropertyAccess_ES5.js +++ b/tests/baselines/reference/superPropertyAccess_ES5.js @@ -30,15 +30,16 @@ class B extends A { } //// [superPropertyAccess_ES5.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var MyBase = (function () { function MyBase() { } diff --git a/tests/baselines/reference/superPropertyInConstructorBeforeSuperCall.js b/tests/baselines/reference/superPropertyInConstructorBeforeSuperCall.js index 1686be4e2e93a..3188e79bd7e64 100644 --- a/tests/baselines/reference/superPropertyInConstructorBeforeSuperCall.js +++ b/tests/baselines/reference/superPropertyInConstructorBeforeSuperCall.js @@ -16,15 +16,16 @@ class C2 extends B { } //// [superPropertyInConstructorBeforeSuperCall.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var B = (function () { function B(x) { } diff --git a/tests/baselines/reference/superSymbolIndexedAccess5.js b/tests/baselines/reference/superSymbolIndexedAccess5.js index c933334a50673..ec26d7dd67f0f 100644 --- a/tests/baselines/reference/superSymbolIndexedAccess5.js +++ b/tests/baselines/reference/superSymbolIndexedAccess5.js @@ -14,15 +14,16 @@ class Bar extends Foo { } //// [superSymbolIndexedAccess5.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var symbol; var Foo = (function () { function Foo() { diff --git a/tests/baselines/reference/superSymbolIndexedAccess6.js b/tests/baselines/reference/superSymbolIndexedAccess6.js index 61f9888544371..09bef412516ba 100644 --- a/tests/baselines/reference/superSymbolIndexedAccess6.js +++ b/tests/baselines/reference/superSymbolIndexedAccess6.js @@ -14,15 +14,16 @@ class Bar extends Foo { } //// [superSymbolIndexedAccess6.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var symbol; var Foo = (function () { function Foo() { diff --git a/tests/baselines/reference/superWithGenericSpecialization.js b/tests/baselines/reference/superWithGenericSpecialization.js index 645007e5a091f..afd049ed8a2f1 100644 --- a/tests/baselines/reference/superWithGenericSpecialization.js +++ b/tests/baselines/reference/superWithGenericSpecialization.js @@ -15,15 +15,16 @@ var r: string = d.x; var r2: number = d.y; //// [superWithGenericSpecialization.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/superWithGenerics.js b/tests/baselines/reference/superWithGenerics.js index f0e9cacf8aaef..148fac45a70ce 100644 --- a/tests/baselines/reference/superWithGenerics.js +++ b/tests/baselines/reference/superWithGenerics.js @@ -12,15 +12,16 @@ class D extends B { //// [superWithGenerics.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var D = (function (_super) { __extends(D, _super); function D() { diff --git a/tests/baselines/reference/superWithTypeArgument.js b/tests/baselines/reference/superWithTypeArgument.js index 8b7c07a27a527..22b802ec2dfb9 100644 --- a/tests/baselines/reference/superWithTypeArgument.js +++ b/tests/baselines/reference/superWithTypeArgument.js @@ -10,15 +10,16 @@ class D extends C { } //// [superWithTypeArgument.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/superWithTypeArgument2.js b/tests/baselines/reference/superWithTypeArgument2.js index 349ead6b381de..ace1355c3748a 100644 --- a/tests/baselines/reference/superWithTypeArgument2.js +++ b/tests/baselines/reference/superWithTypeArgument2.js @@ -10,15 +10,16 @@ class D extends C { } //// [superWithTypeArgument2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/superWithTypeArgument3.js b/tests/baselines/reference/superWithTypeArgument3.js index 6e09952749c11..318b45a9981ca 100644 --- a/tests/baselines/reference/superWithTypeArgument3.js +++ b/tests/baselines/reference/superWithTypeArgument3.js @@ -14,15 +14,16 @@ class D extends C { } //// [superWithTypeArgument3.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/super_inside-object-literal-getters-and-setters.js b/tests/baselines/reference/super_inside-object-literal-getters-and-setters.js index d7bab4380b4b1..2fca7ec7fe46e 100644 --- a/tests/baselines/reference/super_inside-object-literal-getters-and-setters.js +++ b/tests/baselines/reference/super_inside-object-literal-getters-and-setters.js @@ -28,15 +28,16 @@ class SuperObjectTest extends F { //// [super_inside-object-literal-getters-and-setters.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var ObjectLiteral; (function (ObjectLiteral) { var ThisInObjectLiteral = { diff --git a/tests/baselines/reference/switchStatements.js b/tests/baselines/reference/switchStatements.js index d2754225e5b41..5af42176dfc3f 100644 --- a/tests/baselines/reference/switchStatements.js +++ b/tests/baselines/reference/switchStatements.js @@ -56,15 +56,16 @@ switch (((x: T) => '')(1)) { } //// [switchStatements.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var M; (function (M) { function fn(x) { diff --git a/tests/baselines/reference/systemModuleWithSuperClass.js b/tests/baselines/reference/systemModuleWithSuperClass.js index c146e495c8005..c9adf13f48c9f 100644 --- a/tests/baselines/reference/systemModuleWithSuperClass.js +++ b/tests/baselines/reference/systemModuleWithSuperClass.js @@ -32,15 +32,16 @@ System.register([], function (exports_1, context_1) { //// [bar.js] System.register(["./foo"], function (exports_1, context_1) { "use strict"; - var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; + 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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })(); var __moduleName = context_1 && context_1.id; var foo_1, Bar; return { diff --git a/tests/baselines/reference/targetTypeBaseCalls.js b/tests/baselines/reference/targetTypeBaseCalls.js index a0faadf78a647..92ad5afba94a1 100644 --- a/tests/baselines/reference/targetTypeBaseCalls.js +++ b/tests/baselines/reference/targetTypeBaseCalls.js @@ -19,15 +19,16 @@ class Bar extends Foo { constructor() { super(function(s) { s = 5 }) } } // err //// [targetTypeBaseCalls.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); function foo(x) { } var Foo = (function () { function Foo(x) { diff --git a/tests/baselines/reference/thisInInvalidContexts.js b/tests/baselines/reference/thisInInvalidContexts.js index 1b969e2654784..a2237177f8429 100644 --- a/tests/baselines/reference/thisInInvalidContexts.js +++ b/tests/baselines/reference/thisInInvalidContexts.js @@ -49,15 +49,16 @@ enum SomeEnum { //// [thisInInvalidContexts.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); //'this' in static member initializer var ErrClass1 = (function () { function ErrClass1() { diff --git a/tests/baselines/reference/thisInInvalidContextsExternalModule.js b/tests/baselines/reference/thisInInvalidContextsExternalModule.js index ee517c6e36f26..ccb2a71080fb5 100644 --- a/tests/baselines/reference/thisInInvalidContextsExternalModule.js +++ b/tests/baselines/reference/thisInInvalidContextsExternalModule.js @@ -50,15 +50,16 @@ export = this; // Should be an error //// [thisInInvalidContextsExternalModule.js] "use strict"; -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); //'this' in static member initializer var ErrClass1 = (function () { function ErrClass1() { diff --git a/tests/baselines/reference/thisInSuperCall.js b/tests/baselines/reference/thisInSuperCall.js index 80795c91e6784..b537231f74ba6 100644 --- a/tests/baselines/reference/thisInSuperCall.js +++ b/tests/baselines/reference/thisInSuperCall.js @@ -23,15 +23,16 @@ class Foo3 extends Base { } //// [thisInSuperCall.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base(x) { } diff --git a/tests/baselines/reference/thisInSuperCall1.js b/tests/baselines/reference/thisInSuperCall1.js index f5e4e131cfc4b..9f40814cc5f6c 100644 --- a/tests/baselines/reference/thisInSuperCall1.js +++ b/tests/baselines/reference/thisInSuperCall1.js @@ -11,15 +11,16 @@ class Foo extends Base { //// [thisInSuperCall1.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base(a) { } diff --git a/tests/baselines/reference/thisInSuperCall2.js b/tests/baselines/reference/thisInSuperCall2.js index 663826999d377..ebbb974f23f58 100644 --- a/tests/baselines/reference/thisInSuperCall2.js +++ b/tests/baselines/reference/thisInSuperCall2.js @@ -20,15 +20,16 @@ class Foo2 extends Base { //// [thisInSuperCall2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base(a) { } diff --git a/tests/baselines/reference/thisInSuperCall3.js b/tests/baselines/reference/thisInSuperCall3.js index abba0499608cf..5c9405534f4ba 100644 --- a/tests/baselines/reference/thisInSuperCall3.js +++ b/tests/baselines/reference/thisInSuperCall3.js @@ -13,15 +13,16 @@ class Foo extends Base { //// [thisInSuperCall3.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base(a) { } diff --git a/tests/baselines/reference/thisTypeInFunctions.js b/tests/baselines/reference/thisTypeInFunctions.js index 27aae06ccf859..21714308cb11b 100644 --- a/tests/baselines/reference/thisTypeInFunctions.js +++ b/tests/baselines/reference/thisTypeInFunctions.js @@ -195,15 +195,16 @@ function missingTypeIsImplicitAny(this, a: number) { return this.anything + a; } //// [thisTypeInFunctions.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var _this = this; // body checking var B = (function () { diff --git a/tests/baselines/reference/thisTypeInFunctionsNegative.js b/tests/baselines/reference/thisTypeInFunctionsNegative.js index ca9eeb60feee0..27bc47b84d23f 100644 --- a/tests/baselines/reference/thisTypeInFunctionsNegative.js +++ b/tests/baselines/reference/thisTypeInFunctionsNegative.js @@ -177,15 +177,16 @@ c.explicitProperty = (this, m) => m + this.n; //// [thisTypeInFunctionsNegative.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var _this = this; var C = (function () { function C() { diff --git a/tests/baselines/reference/tsxCorrectlyParseLessThanComparison1.js b/tests/baselines/reference/tsxCorrectlyParseLessThanComparison1.js index 9c5c848b78135..55d3ba5422183 100644 --- a/tests/baselines/reference/tsxCorrectlyParseLessThanComparison1.js +++ b/tests/baselines/reference/tsxCorrectlyParseLessThanComparison1.js @@ -21,15 +21,16 @@ export class ShortDetails extends React.Component<{ id: number }, {}> { //// [tsxCorrectlyParseLessThanComparison1.js] "use strict"; -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var ShortDetails = (function (_super) { __extends(ShortDetails, _super); function ShortDetails() { diff --git a/tests/baselines/reference/tsxDynamicTagName5.js b/tests/baselines/reference/tsxDynamicTagName5.js index a895c2ec4dded..2b055cd5a5a5d 100644 --- a/tests/baselines/reference/tsxDynamicTagName5.js +++ b/tests/baselines/reference/tsxDynamicTagName5.js @@ -21,15 +21,16 @@ export class Text extends React.Component<{}, {}> { //// [app.jsx] "use strict"; -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var React = require("react"); var Text = (function (_super) { __extends(Text, _super); diff --git a/tests/baselines/reference/tsxDynamicTagName7.js b/tests/baselines/reference/tsxDynamicTagName7.js index 845eb400818a6..3108566db8500 100644 --- a/tests/baselines/reference/tsxDynamicTagName7.js +++ b/tests/baselines/reference/tsxDynamicTagName7.js @@ -21,15 +21,16 @@ export class Text extends React.Component<{}, {}> { //// [app.jsx] "use strict"; -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var React = require("react"); var Text = (function (_super) { __extends(Text, _super); diff --git a/tests/baselines/reference/tsxDynamicTagName8.js b/tests/baselines/reference/tsxDynamicTagName8.js index 7e1511af79a53..8859061b4630f 100644 --- a/tests/baselines/reference/tsxDynamicTagName8.js +++ b/tests/baselines/reference/tsxDynamicTagName8.js @@ -21,15 +21,16 @@ export class Text extends React.Component<{}, {}> { //// [app.jsx] "use strict"; -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var React = require("react"); var Text = (function (_super) { __extends(Text, _super); diff --git a/tests/baselines/reference/tsxDynamicTagName9.js b/tests/baselines/reference/tsxDynamicTagName9.js index 7867bea3873d3..818e384fdf627 100644 --- a/tests/baselines/reference/tsxDynamicTagName9.js +++ b/tests/baselines/reference/tsxDynamicTagName9.js @@ -21,15 +21,16 @@ export class Text extends React.Component<{}, {}> { //// [app.jsx] "use strict"; -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var React = require("react"); var Text = (function (_super) { __extends(Text, _super); diff --git a/tests/baselines/reference/tsxExternalModuleEmit1.js b/tests/baselines/reference/tsxExternalModuleEmit1.js index 5f594b4d1d583..559306b800ba9 100644 --- a/tests/baselines/reference/tsxExternalModuleEmit1.js +++ b/tests/baselines/reference/tsxExternalModuleEmit1.js @@ -33,15 +33,16 @@ export class Button extends React.Component { //// [button.jsx] "use strict"; -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var React = require("react"); var Button = (function (_super) { __extends(Button, _super); @@ -56,15 +57,16 @@ var Button = (function (_super) { exports.Button = Button; //// [app.jsx] "use strict"; -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var React = require("react"); // Should see var button_1 = require('./button') here var button_1 = require("./button"); diff --git a/tests/baselines/reference/tsxStatelessFunctionComponents2.js b/tests/baselines/reference/tsxStatelessFunctionComponents2.js index c3ed400f65c97..12c2f1f9ab3ed 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponents2.js +++ b/tests/baselines/reference/tsxStatelessFunctionComponents2.js @@ -40,15 +40,16 @@ let i =
x.propertyNotOnHtmlDivElement} />; //// [file.jsx] "use strict"; -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var React = require("react"); function Greet(x) { return
Hello, {x}
; diff --git a/tests/baselines/reference/tsxUnionTypeComponent1.js b/tests/baselines/reference/tsxUnionTypeComponent1.js index 93b810483b6b8..2b1634555ef1e 100644 --- a/tests/baselines/reference/tsxUnionTypeComponent1.js +++ b/tests/baselines/reference/tsxUnionTypeComponent1.js @@ -26,15 +26,16 @@ class MyButtonComponent extends React.Component<{},{}> { //// [file.js] "use strict"; -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var React = require("react"); var MyComponent = (function (_super) { __extends(MyComponent, _super); diff --git a/tests/baselines/reference/typeAssertions.js b/tests/baselines/reference/typeAssertions.js index e9ab0f69449ab..3107a196f2a69 100644 --- a/tests/baselines/reference/typeAssertions.js +++ b/tests/baselines/reference/typeAssertions.js @@ -52,15 +52,16 @@ if((numOrStr === undefined) as numOrStr is string) { // Error //// [typeAssertions.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); // Function call whose argument is a 1 arg generic function call with explicit type arguments function fn1(t) { } function fn2(t) { } diff --git a/tests/baselines/reference/typeGuardFunction.js b/tests/baselines/reference/typeGuardFunction.js index b38de5abcd297..0eb332af60ebe 100644 --- a/tests/baselines/reference/typeGuardFunction.js +++ b/tests/baselines/reference/typeGuardFunction.js @@ -84,15 +84,16 @@ let union2: C | B; let union3: boolean | B = isA(union2) || union2; //// [typeGuardFunction.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/typeGuardFunctionErrors.js b/tests/baselines/reference/typeGuardFunctionErrors.js index 4a1f85e3e7125..21d9dfeebf109 100644 --- a/tests/baselines/reference/typeGuardFunctionErrors.js +++ b/tests/baselines/reference/typeGuardFunctionErrors.js @@ -146,15 +146,16 @@ if (hasMissingParameter()) { } //// [typeGuardFunctionErrors.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/typeGuardFunctionGenerics.js b/tests/baselines/reference/typeGuardFunctionGenerics.js index ce30137e322b6..0344e168c5325 100644 --- a/tests/baselines/reference/typeGuardFunctionGenerics.js +++ b/tests/baselines/reference/typeGuardFunctionGenerics.js @@ -34,15 +34,16 @@ if (funD(isC, a)) { let test3: B = funE(isB, 1); //// [typeGuardFunctionGenerics.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/typeGuardFunctionOfFormThis.js b/tests/baselines/reference/typeGuardFunctionOfFormThis.js index c3e2d851db2ac..54110ba24d851 100644 --- a/tests/baselines/reference/typeGuardFunctionOfFormThis.js +++ b/tests/baselines/reference/typeGuardFunctionOfFormThis.js @@ -142,15 +142,16 @@ interface MimicGuardInterface { //// [typeGuardFunctionOfFormThis.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var RoyalGuard = (function () { function RoyalGuard() { } diff --git a/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.js b/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.js index 753a41b8e4231..a79efd94c8f5f 100644 --- a/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.js +++ b/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.js @@ -60,15 +60,16 @@ else { } //// [typeGuardFunctionOfFormThisErrors.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var RoyalGuard = (function () { function RoyalGuard() { } diff --git a/tests/baselines/reference/typeGuardOfFormInstanceOf.js b/tests/baselines/reference/typeGuardOfFormInstanceOf.js index 55d28ea2a58ca..fa99dbd87cf55 100644 --- a/tests/baselines/reference/typeGuardOfFormInstanceOf.js +++ b/tests/baselines/reference/typeGuardOfFormInstanceOf.js @@ -73,15 +73,16 @@ else { // - when true, narrows the type of x to the type of the 'prototype' property in C provided // it is a subtype of the type of x, or // - when false, has no effect on the type of x. -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C1 = (function () { function C1() { } diff --git a/tests/baselines/reference/typeGuardOfFormIsType.js b/tests/baselines/reference/typeGuardOfFormIsType.js index f9b90888a9255..f1a94c5167a43 100644 --- a/tests/baselines/reference/typeGuardOfFormIsType.js +++ b/tests/baselines/reference/typeGuardOfFormIsType.js @@ -38,15 +38,16 @@ str = isD1(c2Ord1) && c2Ord1.p1; // D1 var r2: C2 | D1 = isC1(c2Ord1) && c2Ord1; // C2 | D1 //// [typeGuardOfFormIsType.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C1 = (function () { function C1() { } diff --git a/tests/baselines/reference/typeGuardOfFormThisMember.js b/tests/baselines/reference/typeGuardOfFormThisMember.js index 1e96d089f1b53..b7d442711d700 100644 --- a/tests/baselines/reference/typeGuardOfFormThisMember.js +++ b/tests/baselines/reference/typeGuardOfFormThisMember.js @@ -83,15 +83,16 @@ namespace Test { //// [typeGuardOfFormThisMember.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); // There's a 'File' class in the stdlib, wrap with a namespace to avoid collision var Test; (function (Test) { diff --git a/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js b/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js index 0212d05c52370..e2b8b8ec168bf 100644 --- a/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js +++ b/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js @@ -33,15 +33,16 @@ namespace Test { } //// [typeGuardOfFormThisMemberErrors.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); // There's a 'File' class in the stdlib, wrap with a namespace to avoid collision var Test; (function (Test) { diff --git a/tests/baselines/reference/typeMatch2.js b/tests/baselines/reference/typeMatch2.js index 9a75ed6616d58..84ff8f72c5c97 100644 --- a/tests/baselines/reference/typeMatch2.js +++ b/tests/baselines/reference/typeMatch2.js @@ -45,15 +45,16 @@ function f4() { //// [typeMatch2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); function f1() { var a = { x: 1, y: 2 }; a = {}; // error diff --git a/tests/baselines/reference/typeOfSuperCall.js b/tests/baselines/reference/typeOfSuperCall.js index f02a7c7de79d0..eca6ad1bc0a16 100644 --- a/tests/baselines/reference/typeOfSuperCall.js +++ b/tests/baselines/reference/typeOfSuperCall.js @@ -9,15 +9,16 @@ class D extends C { } //// [typeOfSuperCall.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/typeParameterAsBaseClass.js b/tests/baselines/reference/typeParameterAsBaseClass.js index 8b40f439ba2e8..dc579b7b62fe7 100644 --- a/tests/baselines/reference/typeParameterAsBaseClass.js +++ b/tests/baselines/reference/typeParameterAsBaseClass.js @@ -3,15 +3,16 @@ class C extends T {} class C2 implements T {} //// [typeParameterAsBaseClass.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function (_super) { __extends(C, _super); function C() { diff --git a/tests/baselines/reference/typeParameterAsBaseType.js b/tests/baselines/reference/typeParameterAsBaseType.js index 97627b41f105c..8031782373111 100644 --- a/tests/baselines/reference/typeParameterAsBaseType.js +++ b/tests/baselines/reference/typeParameterAsBaseType.js @@ -13,15 +13,16 @@ interface I2 extends U { } //// [typeParameterAsBaseType.js] // type parameters cannot be used as base types // these are all errors -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function (_super) { __extends(C, _super); function C() { diff --git a/tests/baselines/reference/typeParameterExtendingUnion1.js b/tests/baselines/reference/typeParameterExtendingUnion1.js index 6a189dc0ace04..80fd91c64b88f 100644 --- a/tests/baselines/reference/typeParameterExtendingUnion1.js +++ b/tests/baselines/reference/typeParameterExtendingUnion1.js @@ -13,15 +13,16 @@ function f(a: T) { } //// [typeParameterExtendingUnion1.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Animal = (function () { function Animal() { } diff --git a/tests/baselines/reference/typeParameterExtendingUnion2.js b/tests/baselines/reference/typeParameterExtendingUnion2.js index bf929f42c6aea..8dc8db48ed853 100644 --- a/tests/baselines/reference/typeParameterExtendingUnion2.js +++ b/tests/baselines/reference/typeParameterExtendingUnion2.js @@ -13,15 +13,16 @@ function f(a: T) { } //// [typeParameterExtendingUnion2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Animal = (function () { function Animal() { } diff --git a/tests/baselines/reference/typeRelationships.js b/tests/baselines/reference/typeRelationships.js index 2bdb91818a2e1..42ff32f9ab150 100644 --- a/tests/baselines/reference/typeRelationships.js +++ b/tests/baselines/reference/typeRelationships.js @@ -41,15 +41,16 @@ class D extends C { //// [typeRelationships.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { this.self = this; diff --git a/tests/baselines/reference/typeValueConflict1.js b/tests/baselines/reference/typeValueConflict1.js index 467781c8c266e..a84939d2e10cf 100644 --- a/tests/baselines/reference/typeValueConflict1.js +++ b/tests/baselines/reference/typeValueConflict1.js @@ -12,15 +12,16 @@ module M2 { //// [typeValueConflict1.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var M1; (function (M1) { var A = (function () { diff --git a/tests/baselines/reference/typeValueConflict2.js b/tests/baselines/reference/typeValueConflict2.js index 0220bda6f9bcc..40bdb36421858 100644 --- a/tests/baselines/reference/typeValueConflict2.js +++ b/tests/baselines/reference/typeValueConflict2.js @@ -19,15 +19,16 @@ module M3 { //// [typeValueConflict2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var M1; (function (M1) { var A = (function () { diff --git a/tests/baselines/reference/typeofClass2.js b/tests/baselines/reference/typeofClass2.js index 929472aefeefb..d7e92bd6a8f4c 100644 --- a/tests/baselines/reference/typeofClass2.js +++ b/tests/baselines/reference/typeofClass2.js @@ -22,15 +22,16 @@ var r1: typeof D; var r2: typeof d; //// [typeofClass2.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C(x) { } diff --git a/tests/baselines/reference/typesWithSpecializedCallSignatures.js b/tests/baselines/reference/typesWithSpecializedCallSignatures.js index 3403dc447a693..24ea5d0ed646e 100644 --- a/tests/baselines/reference/typesWithSpecializedCallSignatures.js +++ b/tests/baselines/reference/typesWithSpecializedCallSignatures.js @@ -43,15 +43,16 @@ var r3: Base = c.foo('hm'); //// [typesWithSpecializedCallSignatures.js] // basic uses of specialized signatures without errors -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/typesWithSpecializedConstructSignatures.js b/tests/baselines/reference/typesWithSpecializedConstructSignatures.js index 29c7eb186fa8a..396f24805eb97 100644 --- a/tests/baselines/reference/typesWithSpecializedConstructSignatures.js +++ b/tests/baselines/reference/typesWithSpecializedConstructSignatures.js @@ -41,15 +41,16 @@ var r3: Base = new a('hm'); //// [typesWithSpecializedConstructSignatures.js] // basic uses of specialized signatures without errors -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/undeclaredBase.js b/tests/baselines/reference/undeclaredBase.js index 60fa6a01f633a..a280e90e75cfd 100644 --- a/tests/baselines/reference/undeclaredBase.js +++ b/tests/baselines/reference/undeclaredBase.js @@ -4,15 +4,16 @@ module M { export class C extends M.I { } } //// [undeclaredBase.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var M; (function (M) { var C = (function (_super) { diff --git a/tests/baselines/reference/undefinedIsSubtypeOfEverything.js b/tests/baselines/reference/undefinedIsSubtypeOfEverything.js index fbfe9f3b46652..56ae1ae24474a 100644 --- a/tests/baselines/reference/undefinedIsSubtypeOfEverything.js +++ b/tests/baselines/reference/undefinedIsSubtypeOfEverything.js @@ -123,15 +123,16 @@ class D17 extends Base { //// [undefinedIsSubtypeOfEverything.js] // undefined is a subtype of every other types, no errors expected below -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/underscoreMapFirst.js b/tests/baselines/reference/underscoreMapFirst.js index 760cc6a1ba70d..dea8545ce6f14 100644 --- a/tests/baselines/reference/underscoreMapFirst.js +++ b/tests/baselines/reference/underscoreMapFirst.js @@ -49,15 +49,16 @@ class MyView extends View { //// [underscoreMapFirst.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var MyView = (function (_super) { __extends(MyView, _super); function MyView() { diff --git a/tests/baselines/reference/underscoreThisInDerivedClass01.js b/tests/baselines/reference/underscoreThisInDerivedClass01.js index 2828c8dc2878b..0528b29220872 100644 --- a/tests/baselines/reference/underscoreThisInDerivedClass01.js +++ b/tests/baselines/reference/underscoreThisInDerivedClass01.js @@ -25,15 +25,16 @@ class D extends C { //// [underscoreThisInDerivedClass01.js] // @target es5 -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); // Original test intent: // When arrow functions capture 'this', the lexical 'this' owner // currently captures 'this' using a variable named '_this'. diff --git a/tests/baselines/reference/underscoreThisInDerivedClass02.js b/tests/baselines/reference/underscoreThisInDerivedClass02.js index 4d7a69b60c5a1..5901d6e2a7cf8 100644 --- a/tests/baselines/reference/underscoreThisInDerivedClass02.js +++ b/tests/baselines/reference/underscoreThisInDerivedClass02.js @@ -19,15 +19,16 @@ class D extends C { //// [underscoreThisInDerivedClass02.js] // @target es5 -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); // Original test intent: // Errors on '_this' should be reported in derived constructors, // even if 'super()' is not called. diff --git a/tests/baselines/reference/unionTypeEquivalence.js b/tests/baselines/reference/unionTypeEquivalence.js index 9de5ad9d470c7..28401c6db6b99 100644 --- a/tests/baselines/reference/unionTypeEquivalence.js +++ b/tests/baselines/reference/unionTypeEquivalence.js @@ -20,15 +20,16 @@ var z1: string | typeof BC; //// [unionTypeEquivalence.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); // A | B is equivalent to A if B is a subtype of A var C = (function () { function C() { diff --git a/tests/baselines/reference/unionTypeFromArrayLiteral.js b/tests/baselines/reference/unionTypeFromArrayLiteral.js index f6c1489ceeec0..bf882f163eb4b 100644 --- a/tests/baselines/reference/unionTypeFromArrayLiteral.js +++ b/tests/baselines/reference/unionTypeFromArrayLiteral.js @@ -28,15 +28,16 @@ var arr9 = [e, f]; // (E|F)[] // If the array literal is empty, the resulting type is an array type with the element type Undefined. // Otherwise, if the array literal is contextually typed by a type that has a property with the numeric name ‘0’, the resulting type is a tuple type constructed from the types of the element expressions. // Otherwise, the resulting type is an array type with an element type that is the union of the types of the element expressions. -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var arr1 = [1, 2]; // number[] var arr2 = ["hello", true]; // (string | number)[] var arr3Tuple = [3, "three"]; // [number, string] diff --git a/tests/baselines/reference/unionTypesAssignability.js b/tests/baselines/reference/unionTypesAssignability.js index 8fc5f1e8f7131..837116d719d3c 100644 --- a/tests/baselines/reference/unionTypesAssignability.js +++ b/tests/baselines/reference/unionTypesAssignability.js @@ -74,15 +74,16 @@ function foo(t: T, u: U) { //// [unionTypesAssignability.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var unionNumberString; var C = (function () { function C() { diff --git a/tests/baselines/reference/unknownSymbols1.js b/tests/baselines/reference/unknownSymbols1.js index c64cc7224ba8a..540d80583314d 100644 --- a/tests/baselines/reference/unknownSymbols1.js +++ b/tests/baselines/reference/unknownSymbols1.js @@ -33,15 +33,16 @@ class C5 { } //// [unknownSymbols1.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var x = asdf; var y; function foo(x, y) { } diff --git a/tests/baselines/reference/unspecializedConstraints.js b/tests/baselines/reference/unspecializedConstraints.js index ddc7d6e75986c..2094404dd0aa1 100644 --- a/tests/baselines/reference/unspecializedConstraints.js +++ b/tests/baselines/reference/unspecializedConstraints.js @@ -154,15 +154,16 @@ module ts { //// [unspecializedConstraints.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var ts; (function (ts) { var Symbol = (function () { diff --git a/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js b/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js index c46afba64404d..12dd53ebea935 100644 --- a/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js +++ b/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js @@ -44,15 +44,16 @@ c5(1); // error //// [untypedFunctionCallsWithTypeParameters1.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); // none of these function calls should be allowed var x = function () { return; }; var r1 = x(); diff --git a/tests/baselines/reference/unusedClassesinNamespace4.js b/tests/baselines/reference/unusedClassesinNamespace4.js index e3af0dd85677c..7b97612fa61fe 100644 --- a/tests/baselines/reference/unusedClassesinNamespace4.js +++ b/tests/baselines/reference/unusedClassesinNamespace4.js @@ -15,15 +15,16 @@ namespace Validation { } //// [unusedClassesinNamespace4.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Validation; (function (Validation) { var c1 = (function () { diff --git a/tests/baselines/reference/unusedIdentifiersConsolidated1.js b/tests/baselines/reference/unusedIdentifiersConsolidated1.js index 37317f9fbe9ee..2d89558f83d2c 100644 --- a/tests/baselines/reference/unusedIdentifiersConsolidated1.js +++ b/tests/baselines/reference/unusedIdentifiersConsolidated1.js @@ -103,15 +103,16 @@ namespace Greeter { } //// [unusedIdentifiersConsolidated1.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); function greeter(person) { var unused = 20; } diff --git a/tests/baselines/reference/validUseOfThisInSuper.js b/tests/baselines/reference/validUseOfThisInSuper.js index a80a72f434aeb..ad56ae8cdd3b6 100644 --- a/tests/baselines/reference/validUseOfThisInSuper.js +++ b/tests/baselines/reference/validUseOfThisInSuper.js @@ -10,15 +10,16 @@ class Super extends Base { } //// [validUseOfThisInSuper.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base(b) { this.b = b; diff --git a/tests/baselines/reference/varArgsOnConstructorTypes.js b/tests/baselines/reference/varArgsOnConstructorTypes.js index 9cb0dc7781165..0577bdb645a54 100644 --- a/tests/baselines/reference/varArgsOnConstructorTypes.js +++ b/tests/baselines/reference/varArgsOnConstructorTypes.js @@ -25,15 +25,16 @@ reg.register(B); //// [varArgsOnConstructorTypes.js] -var __extendStatics = (this && this.__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 __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); define(["require", "exports"], function (require, exports) { "use strict"; var A = (function () { From a89bb82929afb3a58998c07ed7311225999575d8 Mon Sep 17 00:00:00 2001 From: vvakame Date: Sat, 31 Dec 2016 22:26:39 +0900 Subject: [PATCH 6/7] address feedback --- src/compiler/transformers/es2015.ts | 4 ++-- ...sClassHeritageListMemberTypeAnnotations.js | 4 ++-- ...accessibleTypeInTypeParameterConstraint.js | 4 ++-- .../reference/abstractClassInLocalScope.js | 4 ++-- .../abstractClassInLocalScopeIsAbstract.js | 4 ++-- tests/baselines/reference/abstractProperty.js | 4 ++-- .../reference/abstractPropertyNegative.js | 4 ++-- .../accessOverriddenBaseClassMember1.js | 4 ++-- .../accessors_spec_section-4.5_inference.js | 4 ++-- .../reference/aliasUsageInAccessorsOfClass.js | 4 ++-- .../baselines/reference/aliasUsageInArray.js | 4 ++-- .../aliasUsageInFunctionExpression.js | 4 ++-- .../reference/aliasUsageInGenericFunction.js | 4 ++-- .../reference/aliasUsageInIndexerOfClass.js | 4 ++-- .../reference/aliasUsageInObjectLiteral.js | 4 ++-- .../reference/aliasUsageInOrExpression.js | 4 ++-- ...aliasUsageInTypeArgumentOfExtendsClause.js | 8 +++---- .../reference/aliasUsageInVarAssignment.js | 4 ++-- .../reference/ambiguousOverloadResolution.js | 4 ++-- .../reference/apparentTypeSubtyping.js | 4 ++-- .../reference/apparentTypeSupertype.js | 4 ++-- .../reference/arrayAssignmentTest1.js | 4 ++-- .../reference/arrayAssignmentTest2.js | 4 ++-- .../reference/arrayBestCommonTypes.js | 4 ++-- .../reference/arrayLiteralTypeInference.js | 4 ++-- tests/baselines/reference/arrayLiterals.js | 4 ++-- .../arrayLiteralsWithRecursiveGenerics.js | 4 ++-- ...rayOfSubtypeIsAssignableToReadonlyArray.js | 4 ++-- .../reference/arrowFunctionContexts.js | 4 ++-- .../assignmentCompatWithCallSignatures3.js | 4 ++-- .../assignmentCompatWithCallSignatures4.js | 4 ++-- .../assignmentCompatWithCallSignatures5.js | 4 ++-- .../assignmentCompatWithCallSignatures6.js | 4 ++-- ...ssignmentCompatWithConstructSignatures3.js | 4 ++-- ...ssignmentCompatWithConstructSignatures4.js | 4 ++-- ...ssignmentCompatWithConstructSignatures5.js | 4 ++-- ...ssignmentCompatWithConstructSignatures6.js | 4 ++-- .../assignmentCompatWithNumericIndexer.js | 4 ++-- .../assignmentCompatWithNumericIndexer3.js | 4 ++-- .../assignmentCompatWithObjectMembers4.js | 4 ++-- ...nmentCompatWithObjectMembersOptionality.js | 4 ++-- ...mentCompatWithObjectMembersOptionality2.js | 4 ++-- .../assignmentCompatWithStringIndexer.js | 4 ++-- .../reference/assignmentLHSIsValue.js | 4 ++-- .../reference/asyncImportedPromise_es5.js | 4 ++-- tests/baselines/reference/autolift4.js | 4 ++-- tests/baselines/reference/baseCheck.js | 4 ++-- .../reference/baseIndexSignatureResolution.js | 4 ++-- .../reference/baseTypeOrderChecking.js | 4 ++-- .../baseTypeWrappingInstantiationChain.js | 4 ++-- tests/baselines/reference/bases.js | 4 ++-- .../bestCommonTypeOfConditionalExpressions.js | 4 ++-- ...bestCommonTypeOfConditionalExpressions2.js | 4 ++-- .../reference/bestCommonTypeOfTuple2.js | 4 ++-- ...allSignatureAssignabilityInInheritance2.js | 4 ++-- ...allSignatureAssignabilityInInheritance3.js | 4 ++-- ...allSignatureAssignabilityInInheritance4.js | 4 ++-- ...allSignatureAssignabilityInInheritance5.js | 4 ++-- ...allSignatureAssignabilityInInheritance6.js | 4 ++-- tests/baselines/reference/callWithSpread.js | 4 ++-- .../reference/captureThisInSuperCall.js | 4 ++-- tests/baselines/reference/castingTuple.js | 4 ++-- .../baselines/reference/chainedAssignment3.js | 4 ++-- ...arameterConstrainedToOtherTypeParameter.js | 4 ++-- .../reference/checkForObjectTooStrict.js | 4 ++-- .../checkSuperCallBeforeThisAccessing1.js | 4 ++-- .../checkSuperCallBeforeThisAccessing2.js | 4 ++-- .../checkSuperCallBeforeThisAccessing3.js | 4 ++-- .../checkSuperCallBeforeThisAccessing4.js | 4 ++-- .../checkSuperCallBeforeThisAccessing5.js | 4 ++-- .../checkSuperCallBeforeThisAccessing6.js | 4 ++-- .../checkSuperCallBeforeThisAccessing7.js | 4 ++-- .../checkSuperCallBeforeThisAccessing8.js | 4 ++-- .../reference/circularImportAlias.js | 4 ++-- .../circularTypeofWithFunctionModule.js | 4 ++-- .../classAbstractConstructorAssignability.js | 4 ++-- .../reference/classAbstractCrashedOnce.js | 4 ++-- .../reference/classAbstractExtends.js | 4 ++-- .../reference/classAbstractFactoryFunction.js | 4 ++-- .../reference/classAbstractGeneric.js | 4 ++-- .../reference/classAbstractInAModule.js | 4 ++-- .../reference/classAbstractInheritance.js | 4 ++-- .../reference/classAbstractInstantiations1.js | 4 ++-- .../reference/classAbstractInstantiations2.js | 4 ++-- .../classAbstractOverrideWithAbstract.js | 4 ++-- .../reference/classAbstractSuperCalls.js | 4 ++-- .../classAbstractUsingAbstractMethod1.js | 4 ++-- .../classAbstractUsingAbstractMethods2.js | 4 ++-- .../classConstructorAccessibility2.js | 4 ++-- .../classConstructorAccessibility4.js | 4 ++-- .../classConstructorAccessibility5.js | 4 ++-- ...classConstructorParametersAccessibility.js | 4 ++-- ...lassConstructorParametersAccessibility2.js | 4 ++-- ...lassConstructorParametersAccessibility3.js | 4 ++-- ...clarationMergedInModuleWithContinuation.js | 4 ++-- .../classDeclaredBeforeClassFactory.js | 4 ++-- .../classDoesNotDependOnBaseTypes.js | 4 ++-- tests/baselines/reference/classExpression2.js | 4 ++-- tests/baselines/reference/classExpression3.js | 4 ++-- .../classExpressionExtendingAbstractClass.js | 4 ++-- .../reference/classExtendingBuiltinType.js | 4 ++-- .../reference/classExtendingClass.js | 4 ++-- .../reference/classExtendingClassLikeType.js | 4 ++-- .../reference/classExtendingNonConstructor.js | 4 ++-- .../baselines/reference/classExtendingNull.js | 4 ++-- .../reference/classExtendingPrimitive.js | 4 ++-- .../reference/classExtendingPrimitive2.js | 4 ++-- .../reference/classExtendingQualifiedName.js | 4 ++-- .../reference/classExtendingQualifiedName2.js | 4 ++-- .../reference/classExtendsAcrossFiles.js | 8 +++---- ...sMergedWithModuleNotReferingConstructor.js | 4 ++-- ...tendsClauseClassNotReferringConstructor.js | 4 ++-- .../reference/classExtendsEveryObjectType.js | 4 ++-- .../reference/classExtendsEveryObjectType2.js | 4 ++-- .../reference/classExtendsInterface.js | 4 ++-- .../classExtendsInterfaceInExpression.js | 4 ++-- .../classExtendsInterfaceInModule.js | 4 ++-- .../baselines/reference/classExtendsItself.js | 4 ++-- .../reference/classExtendsItselfIndirectly.js | 4 ++-- .../classExtendsItselfIndirectly2.js | 4 ++-- .../classExtendsItselfIndirectly3.js | 24 +++++++++---------- .../classExtendsMultipleBaseClasses.js | 4 ++-- tests/baselines/reference/classExtendsNull.js | 4 ++-- ...classExtendsShadowedConstructorFunction.js | 4 ++-- .../classExtendsValidConstructorFunction.js | 4 ++-- .../classHeritageWithTrailingSeparator.js | 4 ++-- .../reference/classImplementsClass2.js | 4 ++-- .../reference/classImplementsClass3.js | 4 ++-- .../reference/classImplementsClass4.js | 4 ++-- .../reference/classImplementsClass5.js | 4 ++-- .../reference/classImplementsClass6.js | 4 ++-- tests/baselines/reference/classIndexer3.js | 4 ++-- tests/baselines/reference/classInheritence.js | 4 ++-- .../reference/classIsSubtypeOfBaseType.js | 4 ++-- tests/baselines/reference/classOrder2.js | 4 ++-- tests/baselines/reference/classOrderBug.js | 4 ++-- .../reference/classSideInheritance1.js | 4 ++-- .../reference/classSideInheritance2.js | 4 ++-- .../reference/classSideInheritance3.js | 4 ++-- tests/baselines/reference/classUpdateTests.js | 4 ++-- .../classWithBaseClassButNoConstructor.js | 4 ++-- .../reference/classWithConstructors.js | 4 ++-- .../reference/classWithProtectedProperty.js | 4 ++-- .../reference/classWithStaticMembers.js | 4 ++-- tests/baselines/reference/classdecl.js | 4 ++-- .../reference/clodulesDerivedClasses.js | 4 ++-- ...llisionSuperAndLocalFunctionInAccessors.js | 4 ++-- ...isionSuperAndLocalFunctionInConstructor.js | 4 ++-- .../collisionSuperAndLocalFunctionInMethod.js | 4 ++-- ...ollisionSuperAndLocalFunctionInProperty.js | 4 ++-- .../collisionSuperAndLocalVarInAccessors.js | 4 ++-- .../collisionSuperAndLocalVarInConstructor.js | 4 ++-- .../collisionSuperAndLocalVarInMethod.js | 4 ++-- .../collisionSuperAndLocalVarInProperty.js | 4 ++-- .../collisionSuperAndNameResolution.js | 4 ++-- .../reference/collisionSuperAndParameter.js | 4 ++-- .../reference/collisionSuperAndParameter1.js | 4 ++-- ...perAndPropertyNameAsConstuctorParameter.js | 4 ++-- ...xpressionAndLocalVarWithSuperExperssion.js | 4 ++-- .../reference/commentsInheritance.js | 4 ++-- .../comparisonOperatorWithIdenticalObjects.js | 4 ++-- ...ithNoRelationshipObjectsOnCallSignature.js | 4 ++-- ...lationshipObjectsOnConstructorSignature.js | 4 ++-- ...thNoRelationshipObjectsOnIndexSignature.js | 4 ++-- ...nshipObjectsOnInstantiatedCallSignature.js | 4 ++-- ...jectsOnInstantiatedConstructorSignature.js | 4 ++-- ...peratorWithSubtypeObjectOnCallSignature.js | 4 ++-- ...WithSubtypeObjectOnConstructorSignature.js | 4 ++-- ...eratorWithSubtypeObjectOnIndexSignature.js | 4 ++-- ...ubtypeObjectOnInstantiatedCallSignature.js | 4 ++-- ...bjectOnInstantiatedConstructorSignature.js | 4 ++-- ...isonOperatorWithSubtypeObjectOnProperty.js | 4 ++-- .../reference/complexClassRelationships.js | 4 ++-- ...catedGenericRecursiveBaseClassReference.js | 4 ++-- .../reference/compoundAssignmentLHSIsValue.js | 4 ++-- ...poundExponentiationAssignmentLHSIsValue.js | 4 ++-- .../reference/computedPropertyNames24_ES5.js | 4 ++-- .../reference/computedPropertyNames25_ES5.js | 4 ++-- .../reference/computedPropertyNames26_ES5.js | 4 ++-- .../reference/computedPropertyNames27_ES5.js | 4 ++-- .../reference/computedPropertyNames28_ES5.js | 4 ++-- .../reference/computedPropertyNames30_ES5.js | 4 ++-- .../reference/computedPropertyNames31_ES5.js | 4 ++-- .../reference/computedPropertyNames43_ES5.js | 4 ++-- .../reference/computedPropertyNames44_ES5.js | 4 ++-- .../reference/computedPropertyNames45_ES5.js | 4 ++-- .../conditionalOperatorWithIdenticalBCT.js | 4 ++-- .../conditionalOperatorWithoutIdenticalBCT.js | 4 ++-- .../reference/constantOverloadFunction.js | 4 ++-- .../constantOverloadFunctionNoSubtypeError.js | 4 ++-- ...nstraintCheckInGenericBaseTypeReference.js | 4 ++-- ...uctSignatureAssignabilityInInheritance2.js | 4 ++-- ...uctSignatureAssignabilityInInheritance3.js | 4 ++-- ...uctSignatureAssignabilityInInheritance4.js | 4 ++-- ...uctSignatureAssignabilityInInheritance5.js | 4 ++-- ...uctSignatureAssignabilityInInheritance6.js | 4 ++-- tests/baselines/reference/constructorArgs.js | 4 ++-- ...uctorFunctionTypeIsAssignableToBaseType.js | 4 ++-- ...ctorFunctionTypeIsAssignableToBaseType2.js | 4 ++-- .../constructorHasPrototypeProperty.js | 4 ++-- .../reference/constructorOverloads2.js | 4 ++-- .../reference/constructorOverloads3.js | 4 ++-- .../reference/constructorWithCapturedSuper.js | 4 ++-- ...constructorWithIncompleteTypeAnnotation.js | 4 ++-- .../contextualTypingArrayOfLambdas.js | 4 ++-- ...contextualTypingOfConditionalExpression.js | 4 ++-- ...ontextualTypingOfConditionalExpression2.js | 4 ++-- ...urcePropertyIsRelatableToTargetProperty.js | 4 ++-- .../reference/declFileClassExtendsNull.js | 4 ++-- .../declFileForFunctionTypeAsTypeParameter.js | 4 ++-- ...ileGenericClassWithGenericExtendedClass.js | 4 ++-- .../reference/declFileGenericType.js | 4 ++-- .../reference/declFileGenericType2.js | 4 ++-- ...lictingWithClassReferredByExtendsClause.js | 4 ++-- ...dsClauseThatHasItsContainerNameConflict.js | 4 ++-- .../declarationEmitExpressionInExtends.js | 4 ++-- .../declarationEmitExpressionInExtends2.js | 4 ++-- .../declarationEmitExpressionInExtends3.js | 4 ++-- .../declarationEmitExpressionInExtends4.js | 4 ++-- .../declarationEmitNameConflicts3.js | 4 ++-- .../declarationEmitProtectedMembers.js | 4 ++-- .../declarationEmitThisPredicates01.js | 4 ++-- ...tionEmitThisPredicatesWithPrivateName01.js | 4 ++-- .../reference/declareDottedExtend.js | 4 ++-- .../reference/decoratorOnClassConstructor2.js | 4 ++-- .../reference/decoratorOnClassConstructor3.js | 4 ++-- .../reference/decoratorOnClassMethod12.js | 4 ++-- ...edClassConstructorWithExplicitReturns01.js | 4 ++-- ...tructorWithExplicitReturns01.sourcemap.txt | 4 ++-- ...derivedClassConstructorWithoutSuperCall.js | 4 ++-- ...ClassFunctionOverridesBaseClassAccessor.js | 4 ++-- .../derivedClassIncludesInheritedMembers.js | 4 ++-- ...idesIndexersWithAssignmentCompatibility.js | 4 ++-- .../derivedClassOverridesPrivateFunction1.js | 4 ++-- .../derivedClassOverridesPrivates.js | 4 ++-- .../derivedClassOverridesProtectedMembers.js | 4 ++-- .../derivedClassOverridesProtectedMembers2.js | 4 ++-- .../derivedClassOverridesProtectedMembers3.js | 4 ++-- .../derivedClassOverridesProtectedMembers4.js | 4 ++-- .../derivedClassOverridesPublicMembers.js | 4 ++-- .../derivedClassOverridesWithoutSubtype.js | 4 ++-- .../derivedClassParameterProperties.js | 4 ++-- ...dClassSuperCallsInNonConstructorMembers.js | 4 ++-- .../derivedClassSuperCallsWithThisArg.js | 4 ++-- .../reference/derivedClassTransitivity.js | 4 ++-- .../reference/derivedClassTransitivity2.js | 4 ++-- .../reference/derivedClassTransitivity3.js | 4 ++-- .../reference/derivedClassTransitivity4.js | 4 ++-- .../reference/derivedClassWithAny.js | 4 ++-- ...ivateInstanceShadowingProtectedInstance.js | 4 ++-- ...hPrivateInstanceShadowingPublicInstance.js | 4 ++-- ...thPrivateStaticShadowingProtectedStatic.js | 4 ++-- ...sWithPrivateStaticShadowingPublicStatic.js | 4 ++-- .../derivedClassWithoutExplicitConstructor.js | 4 ++-- ...derivedClassWithoutExplicitConstructor2.js | 4 ++-- ...derivedClassWithoutExplicitConstructor3.js | 4 ++-- tests/baselines/reference/derivedClasses.js | 4 ++-- .../reference/derivedGenericClassWithAny.js | 4 ++-- ...sesHiddenBaseCallViaSuperPropertyAccess.js | 4 ++-- .../derivedTypeDoesNotRequireExtendsClause.js | 4 ++-- .../destructuringParameterDeclaration5.js | 4 ++-- ...BeforeEmitParameterPropertyDeclaration1.js | 4 ++-- ...SuperCallBeforeEmitPropertyDeclaration1.js | 4 ++-- ...arationAndParameterPropertyDeclaration1.js | 4 ++-- .../reference/emitThisInSuperMethodCall.js | 4 ++-- tests/baselines/reference/emptyModuleName.js | 4 ++-- ...rorForwardReferenceForwadingConstructor.js | 4 ++-- tests/baselines/reference/errorSuperCalls.js | 4 ++-- .../reference/errorSuperPropertyAccess.js | 4 ++-- .../reference/errorsInGenericTypeReference.js | 4 ++-- .../reference/es6ClassSuperCodegenBug.js | 4 ++-- tests/baselines/reference/es6ClassTest.js | 4 ++-- tests/baselines/reference/es6ClassTest2.js | 4 ++-- tests/baselines/reference/es6ClassTest7.js | 4 ++-- .../exportAssignmentOfGenericType1.js | 4 ++-- .../exportDeclarationInInternalModule.js | 4 ++-- tests/baselines/reference/extBaseClass1.js | 4 ++-- tests/baselines/reference/extBaseClass2.js | 4 ++-- .../extendAndImplementTheSameBaseType.js | 4 ++-- .../extendAndImplementTheSameBaseType2.js | 4 ++-- .../extendBaseClassBeforeItsDeclared.js | 4 ++-- .../extendClassExpressionFromModule.js | 4 ++-- .../extendConstructSignatureInInterface.js | 4 ++-- .../reference/extendNonClassSymbol1.js | 4 ++-- .../reference/extendNonClassSymbol2.js | 4 ++-- .../extendPrivateConstructorClass.js | 4 ++-- ...xtendingClassFromAliasAndUsageInIndexer.js | 8 +++---- .../reference/extendsClauseAlreadySeen.js | 4 ++-- .../reference/extendsClauseAlreadySeen2.js | 4 ++-- tests/baselines/reference/fluentClasses.js | 4 ++-- tests/baselines/reference/for-inStatements.js | 4 ++-- .../reference/for-inStatementsInvalid.js | 4 ++-- .../forStatementsMultipleInvalidDecl.js | 4 ++-- .../reference/functionImplementationErrors.js | 4 ++-- .../reference/functionImplementations.js | 4 ++-- .../reference/functionSubtypingOfVarArgs.js | 4 ++-- .../reference/functionSubtypingOfVarArgs2.js | 4 ++-- .../reference/generatedContextualTyping.js | 4 ++-- .../genericBaseClassLiteralProperty.js | 4 ++-- .../genericBaseClassLiteralProperty2.js | 4 ++-- ...allWithConstraintsTypeArgumentInference.js | 4 ++-- .../genericCallWithObjectTypeArgs2.js | 4 ++-- ...icCallWithObjectTypeArgsAndConstraints2.js | 4 ++-- ...icCallWithObjectTypeArgsAndConstraints3.js | 4 ++-- .../genericCallbacksAndClassHierarchy.js | 4 ++-- .../genericClassExpressionInFunction.js | 4 ++-- ...sInheritsConstructorFromNonGenericClass.js | 4 ++-- ...cClassPropertyInheritanceSpecialization.js | 4 ++-- .../reference/genericClassStaticMethod.js | 4 ++-- tests/baselines/reference/genericClasses3.js | 4 ++-- ...genericConstraintOnExtendedBuiltinTypes.js | 4 ++-- ...enericConstraintOnExtendedBuiltinTypes2.js | 4 ++-- .../genericDerivedTypeWithSpecializedBase.js | 4 ++-- .../genericDerivedTypeWithSpecializedBase2.js | 4 ++-- .../genericInheritedDefaultConstructors.js | 4 ++-- .../reference/genericPrototypeProperty2.js | 4 ++-- .../reference/genericPrototypeProperty3.js | 4 ++-- ...ericRecursiveImplicitConstructorErrors2.js | 4 ++-- ...ericRecursiveImplicitConstructorErrors3.js | 4 ++-- .../reference/genericTypeAssertions2.js | 4 ++-- .../reference/genericTypeAssertions4.js | 4 ++-- .../reference/genericTypeAssertions6.js | 4 ++-- .../reference/genericTypeConstraints.js | 4 ++-- ...genericTypeReferenceWithoutTypeArgument.js | 4 ++-- ...enericTypeReferenceWithoutTypeArgument2.js | 4 ++-- .../genericWithIndexerOfTypeParameterType2.js | 4 ++-- .../reference/heterogeneousArrayLiterals.js | 4 ++-- .../reference/ifDoWhileStatements.js | 4 ++-- .../illegalSuperCallsInConstructor.js | 4 ++-- .../implementClausePrecedingExtends.js | 4 ++-- ...gAnInterfaceExtendingClassWithPrivates2.js | 4 ++-- ...AnInterfaceExtendingClassWithProtecteds.js | 4 ++-- .../baselines/reference/importAsBaseClass.js | 4 ++-- tests/baselines/reference/importHelpers.js | 4 ++-- .../reference/importHelpersNoHelpers.js | 4 ++-- .../reference/importHelpersNoModule.js | 4 ++-- .../reference/importShadowsGlobalName.js | 4 ++-- .../reference/importUsedInExtendsList1.js | 4 ++-- .../reference/indexerConstraints2.js | 4 ++-- .../reference/indirectSelfReference.js | 4 ++-- .../reference/indirectSelfReferenceGeneric.js | 4 ++-- .../infinitelyExpandingTypesNonGenericBase.js | 4 ++-- .../inheritFromGenericTypeParameter.js | 4 ++-- ...SameNamePrivatePropertiesFromSameOrigin.js | 4 ++-- tests/baselines/reference/inheritance.js | 4 ++-- tests/baselines/reference/inheritance1.js | 4 ++-- ...itanceGrandParentPrivateMemberCollision.js | 4 ++-- ...tPrivateMemberCollisionWithPublicMember.js | 4 ++-- ...tPublicMemberCollisionWithPrivateMember.js | 4 ++-- ...ritanceMemberAccessorOverridingAccessor.js | 4 ++-- ...heritanceMemberAccessorOverridingMethod.js | 4 ++-- ...ritanceMemberAccessorOverridingProperty.js | 4 ++-- ...inheritanceMemberFuncOverridingAccessor.js | 4 ++-- .../inheritanceMemberFuncOverridingMethod.js | 4 ++-- ...inheritanceMemberFuncOverridingProperty.js | 4 ++-- ...ritanceMemberPropertyOverridingAccessor.js | 4 ++-- ...heritanceMemberPropertyOverridingMethod.js | 4 ++-- ...ritanceMemberPropertyOverridingProperty.js | 4 ++-- .../inheritanceOfGenericConstructorMethod1.js | 4 ++-- .../inheritanceOfGenericConstructorMethod2.js | 4 ++-- ...ritanceStaticAccessorOverridingAccessor.js | 4 ++-- ...heritanceStaticAccessorOverridingMethod.js | 4 ++-- ...ritanceStaticAccessorOverridingProperty.js | 4 ++-- ...inheritanceStaticFuncOverridingAccessor.js | 4 ++-- ...eStaticFuncOverridingAccessorOfFuncType.js | 4 ++-- .../inheritanceStaticFuncOverridingMethod.js | 4 ++-- ...inheritanceStaticFuncOverridingProperty.js | 4 ++-- ...eStaticFuncOverridingPropertyOfFuncType.js | 4 ++-- ...taticFunctionOverridingInstanceProperty.js | 4 ++-- .../inheritanceStaticMembersCompatible.js | 4 ++-- .../inheritanceStaticMembersIncompatible.js | 4 ++-- ...ritanceStaticPropertyOverridingAccessor.js | 4 ++-- ...heritanceStaticPropertyOverridingMethod.js | 4 ++-- ...ritanceStaticPropertyOverridingProperty.js | 4 ++-- .../inheritedConstructorWithRestParams.js | 4 ++-- .../inheritedConstructorWithRestParams2.js | 4 ++-- .../inheritedModuleMembersForClodule.js | 4 ++-- .../reference/instanceOfAssignability.js | 4 ++-- ...nstancePropertiesInheritedIntoClassType.js | 4 ++-- .../reference/instanceSubtypeCheck2.js | 4 ++-- ...nstanceofWithStructurallyIdenticalTypes.js | 4 ++-- .../instantiatedReturnTypeContravariance.js | 4 ++-- .../reference/interfaceClassMerging.js | 4 ++-- .../reference/interfaceClassMerging2.js | 4 ++-- .../reference/interfaceExtendsClass1.js | 4 ++-- .../interfaceExtendsClassWithPrivate1.js | 4 ++-- .../interfaceExtendsClassWithPrivate2.js | 4 ++-- .../reference/interfaceImplementation8.js | 4 ++-- .../invalidModuleWithStatementsOfEveryKind.js | 4 ++-- .../invalidMultipleVariableDeclarations.js | 4 ++-- .../reference/invalidReturnStatements.js | 4 ++-- .../isolatedModulesImportExportElision.js | 4 ++-- tests/baselines/reference/jsxViaImport.js | 4 ++-- .../reference/keyofAndIndexedAccess.js | 4 ++-- tests/baselines/reference/lambdaArgCrash.js | 4 ++-- tests/baselines/reference/lift.js | 4 ++-- tests/baselines/reference/localTypes1.js | 4 ++-- tests/baselines/reference/m7Bugs.js | 4 ++-- .../reference/mergedDeclarations5.js | 4 ++-- .../reference/mergedDeclarations6.js | 4 ++-- .../mergedInheritedClassInterface.js | 4 ++-- .../mergedInterfacesWithInheritedPrivates2.js | 4 ++-- .../mergedInterfacesWithInheritedPrivates3.js | 4 ++-- .../missingPropertiesOfClassExpression.js | 4 ++-- tests/baselines/reference/moduleAsBaseType.js | 4 ++-- .../moduleImportedForTypeArgumentPosition.js | 4 ++-- .../moduleWithStatementsOfEveryKind.js | 4 ++-- .../reference/multipleInheritance.js | 4 ++-- .../mutuallyRecursiveGenericBaseTypes2.js | 4 ++-- .../noImplicitAnyMissingGetAccessor.js | 4 ++-- .../noImplicitAnyMissingSetAccessor.js | 4 ++-- ...enericClassExtendingGenericClassWithAny.js | 4 ++-- ...cIndexerConstrainsPropertyDeclarations2.js | 4 ++-- .../reference/numericIndexerConstraint3.js | 4 ++-- .../reference/numericIndexerConstraint4.js | 4 ++-- .../reference/numericIndexerTyping2.js | 4 ++-- ...objectCreationOfElementAccessExpression.js | 4 ++-- ...objectTypeHidingMembersOfExtendedObject.js | 4 ++-- ...objectTypesIdentityWithNumericIndexers1.js | 4 ++-- ...objectTypesIdentityWithNumericIndexers2.js | 4 ++-- ...objectTypesIdentityWithNumericIndexers3.js | 4 ++-- .../objectTypesIdentityWithPrivates.js | 4 ++-- .../objectTypesIdentityWithPrivates2.js | 4 ++-- .../objectTypesIdentityWithPrivates3.js | 4 ++-- .../objectTypesIdentityWithStringIndexers.js | 4 ++-- .../objectTypesIdentityWithStringIndexers2.js | 4 ++-- .../optionalConstructorArgInSuper.js | 4 ++-- tests/baselines/reference/optionalMethods.js | 4 ++-- .../reference/optionalParamArgsTest.js | 4 ++-- .../reference/optionalParamInOverride.js | 4 ++-- .../reference/optionalParameterProperty.js | 4 ++-- .../baselines/reference/outModuleConcatAmd.js | 4 ++-- .../outModuleConcatAmd.sourcemap.txt | 4 ++-- .../reference/outModuleConcatSystem.js | 4 ++-- .../outModuleConcatSystem.sourcemap.txt | 4 ++-- .../reference/outModuleTripleSlashRefs.js | 4 ++-- .../outModuleTripleSlashRefs.sourcemap.txt | 4 ++-- tests/baselines/reference/overload1.js | 4 ++-- .../overloadOnConstConstraintChecks1.js | 4 ++-- .../overloadOnConstConstraintChecks2.js | 4 ++-- .../overloadOnConstConstraintChecks3.js | 4 ++-- .../overloadOnConstConstraintChecks4.js | 4 ++-- .../overloadOnConstantsInvalidOverload1.js | 4 ++-- .../baselines/reference/overloadResolution.js | 4 ++-- .../overloadResolutionClassConstructors.js | 4 ++-- .../overloadResolutionConstructors.js | 4 ++-- .../reference/overloadingOnConstants1.js | 4 ++-- .../reference/overloadingOnConstants2.js | 4 ++-- .../overridingPrivateStaticMembers.js | 4 ++-- .../reference/parseErrorInHeritageClause1.js | 4 ++-- tests/baselines/reference/parser509630.js | 4 ++-- tests/baselines/reference/parserAstSpans1.js | 4 ++-- .../reference/parserClassDeclaration1.js | 4 ++-- .../reference/parserClassDeclaration3.js | 4 ++-- .../reference/parserClassDeclaration4.js | 4 ++-- .../reference/parserClassDeclaration5.js | 4 ++-- .../reference/parserClassDeclaration6.js | 4 ++-- ...rrorRecovery_ExtendsOrImplementsClause2.js | 4 ++-- ...rrorRecovery_ExtendsOrImplementsClause4.js | 4 ++-- ...rrorRecovery_ExtendsOrImplementsClause5.js | 4 ++-- .../parserGenericsInTypeContexts1.js | 4 ++-- .../parserGenericsInTypeContexts2.js | 4 ++-- .../baselines/reference/parserRealSource10.js | 4 ++-- .../baselines/reference/parserRealSource11.js | 4 ++-- tests/baselines/reference/parserharness.js | 4 ++-- ...artiallyAnnotatedFunctionInferenceError.js | 4 ++-- ...tatedFunctionInferenceWithTypeParameter.js | 4 ++-- tests/baselines/reference/primitiveMembers.js | 4 ++-- tests/baselines/reference/privacyClass.js | 4 ++-- .../privacyClassExtendsClauseDeclFile.js | 8 +++---- tests/baselines/reference/privacyGloClass.js | 4 ++-- .../reference/privateAccessInSubclass1.js | 4 ++-- .../privateInstanceMemberAccessibility.js | 4 ++-- ...tedMembersAreNotAccessibleDestructuring.js | 4 ++-- .../privateStaticMemberAccessibility.js | 4 ++-- .../privateStaticNotAccessibleInClodule2.js | 4 ++-- .../amd/testGlo.js | 4 ++-- .../node/testGlo.js | 4 ++-- .../reference/project/prologueEmit/amd/out.js | 4 ++-- .../project/prologueEmit/node/out.js | 4 ++-- .../amd/m'ain.js | 4 ++-- .../node/m'ain.js | 4 ++-- .../reference/propertiesAndIndexers.js | 4 ++-- tests/baselines/reference/propertyAccess.js | 4 ++-- ...tyAccessOnTypeParameterWithConstraints2.js | 4 ++-- ...tyAccessOnTypeParameterWithConstraints3.js | 4 ++-- ...tyAccessOnTypeParameterWithConstraints5.js | 4 ++-- ...sPropertyAccessibleWithinNestedSubclass.js | 4 ++-- ...PropertyAccessibleWithinNestedSubclass1.js | 4 ++-- ...edClassPropertyAccessibleWithinSubclass.js | 4 ++-- ...dClassPropertyAccessibleWithinSubclass2.js | 4 ++-- ...dClassPropertyAccessibleWithinSubclass3.js | 4 ++-- .../protectedInstanceMemberAccessibility.js | 4 ++-- tests/baselines/reference/protectedMembers.js | 4 ++-- ...icClassPropertyAccessibleWithinSubclass.js | 4 ++-- ...cClassPropertyAccessibleWithinSubclass2.js | 4 ++-- ...solution-does-not-affect-class-heritage.js | 4 ++-- .../readonlyConstructorAssignment.js | 4 ++-- .../reference/recursiveBaseCheck3.js | 4 ++-- .../reference/recursiveBaseCheck4.js | 4 ++-- .../reference/recursiveBaseCheck6.js | 4 ++-- .../recursiveBaseConstructorCreation1.js | 4 ++-- ...ssInstantiationsWithDefaultConstructors.js | 4 ++-- .../reference/recursiveClassReferenceTest.js | 4 ++-- .../recursiveClassReferenceTest.sourcemap.txt | 4 ++-- .../reference/recursiveComplicatedClasses.js | 4 ++-- ...sivelySpecializedConstructorDeclaration.js | 4 ++-- .../reference/reexportClassDefinition.js | 4 ++-- ...lassDeclarationWhenInBaseTypeResolution.js | 4 ++-- .../reference/returnInConstructor1.js | 4 ++-- tests/baselines/reference/returnStatements.js | 4 ++-- ...peCheckExtendedClassInsidePublicMethod2.js | 4 ++-- ...peCheckExtendedClassInsideStaticMethod1.js | 4 ++-- tests/baselines/reference/scopeTests.js | 4 ++-- .../reference/shadowPrivateMembers.js | 4 ++-- ...sWithDefaultConstructorAndExtendsClause.js | 4 ++-- ...tConstructorAndExtendsClause.sourcemap.txt | 4 ++-- .../specializedInheritedConstructors1.js | 4 ++-- .../specializedOverloadWithRestParameters.js | 4 ++-- tests/baselines/reference/staticFactory1.js | 4 ++-- .../baselines/reference/staticInheritance.js | 4 ++-- .../staticMemberAccessOffDerivedType1.js | 4 ++-- tests/baselines/reference/staticPropSuper.js | 4 ++-- .../reference/strictModeInConstructor.js | 4 ++-- .../reference/strictModeReservedWord.js | 4 ++-- ...trictModeReservedWordInClassDeclaration.js | 4 ++-- ...gIndexerConstrainsPropertyDeclarations2.js | 4 ++-- .../reference/subtypesOfTypeParameter.js | 4 ++-- .../subtypesOfTypeParameterWithConstraints.js | 4 ++-- ...subtypesOfTypeParameterWithConstraints4.js | 4 ++-- ...OfTypeParameterWithRecursiveConstraints.js | 4 ++-- .../reference/subtypingTransitivity.js | 4 ++-- .../reference/subtypingWithCallSignatures2.js | 4 ++-- .../reference/subtypingWithCallSignatures3.js | 4 ++-- .../reference/subtypingWithCallSignatures4.js | 4 ++-- .../subtypingWithConstructSignatures2.js | 4 ++-- .../subtypingWithConstructSignatures3.js | 4 ++-- .../subtypingWithConstructSignatures4.js | 4 ++-- .../subtypingWithConstructSignatures5.js | 4 ++-- .../subtypingWithConstructSignatures6.js | 4 ++-- .../reference/subtypingWithNumericIndexer.js | 4 ++-- .../reference/subtypingWithNumericIndexer3.js | 4 ++-- .../reference/subtypingWithNumericIndexer4.js | 4 ++-- .../reference/subtypingWithObjectMembers.js | 4 ++-- .../reference/subtypingWithObjectMembers4.js | 4 ++-- ...subtypingWithObjectMembersAccessibility.js | 4 ++-- ...ubtypingWithObjectMembersAccessibility2.js | 4 ++-- .../reference/subtypingWithStringIndexer.js | 4 ++-- .../reference/subtypingWithStringIndexer3.js | 4 ++-- .../reference/subtypingWithStringIndexer4.js | 4 ++-- tests/baselines/reference/super.js | 4 ++-- tests/baselines/reference/super1.js | 4 ++-- tests/baselines/reference/super2.js | 4 ++-- tests/baselines/reference/superAccess.js | 4 ++-- tests/baselines/reference/superAccess2.js | 4 ++-- .../reference/superAccessInFatArrow1.js | 4 ++-- .../reference/superCallArgsMustMatch.js | 4 ++-- .../reference/superCallAssignResult.js | 4 ++-- .../superCallBeforeThisAccessing1.js | 4 ++-- .../superCallBeforeThisAccessing2.js | 4 ++-- .../superCallBeforeThisAccessing3.js | 4 ++-- .../superCallBeforeThisAccessing4.js | 4 ++-- .../superCallBeforeThisAccessing5.js | 4 ++-- .../superCallBeforeThisAccessing6.js | 4 ++-- .../superCallBeforeThisAccessing7.js | 4 ++-- .../superCallBeforeThisAccessing8.js | 4 ++-- ...allFromClassThatDerivesFromGenericType1.js | 4 ++-- ...allFromClassThatDerivesFromGenericType2.js | 4 ++-- ...eButWithIncorrectNumberOfTypeArguments1.js | 4 ++-- ...sFromGenericTypeButWithNoTypeArguments1.js | 4 ++-- ...ivesNonGenericTypeButWithTypeArguments1.js | 4 ++-- .../reference/superCallInNonStaticMethod.js | 4 ++-- .../reference/superCallInStaticMethod.js | 4 ++-- .../superCallInsideClassDeclaration.js | 4 ++-- .../superCallInsideClassExpression.js | 4 ++-- .../superCallInsideObjectLiteralExpression.js | 4 ++-- .../reference/superCallOutsideConstructor.js | 4 ++-- .../superCallParameterContextualTyping1.js | 4 ++-- .../superCallParameterContextualTyping2.js | 4 ++-- .../superCallParameterContextualTyping3.js | 4 ++-- .../reference/superCallWithCommentEmit01.js | 4 ++-- .../superCallWithMissingBaseClass.js | 4 ++-- tests/baselines/reference/superCalls.js | 4 ++-- .../reference/superCallsInConstructor.js | 4 ++-- tests/baselines/reference/superErrors.js | 4 ++-- .../baselines/reference/superInCatchBlock1.js | 4 ++-- .../reference/superInConstructorParam1.js | 4 ++-- tests/baselines/reference/superInLambdas.js | 4 ++-- .../reference/superInObjectLiterals_ES5.js | 4 ++-- tests/baselines/reference/superNewCall1.js | 4 ++-- .../reference/superPropertyAccess.js | 4 ++-- .../reference/superPropertyAccess1.js | 4 ++-- .../reference/superPropertyAccess2.js | 4 ++-- ...essInComputedPropertiesOfNestedType_ES5.js | 4 ++-- .../reference/superPropertyAccessNoError.js | 4 ++-- .../reference/superPropertyAccess_ES5.js | 4 ++-- ...perPropertyInConstructorBeforeSuperCall.js | 4 ++-- .../reference/superSymbolIndexedAccess5.js | 4 ++-- .../reference/superSymbolIndexedAccess6.js | 4 ++-- .../superWithGenericSpecialization.js | 4 ++-- .../baselines/reference/superWithGenerics.js | 4 ++-- .../reference/superWithTypeArgument.js | 4 ++-- .../reference/superWithTypeArgument2.js | 4 ++-- .../reference/superWithTypeArgument3.js | 4 ++-- ...side-object-literal-getters-and-setters.js | 4 ++-- tests/baselines/reference/switchStatements.js | 4 ++-- .../reference/systemModuleWithSuperClass.js | 4 ++-- .../reference/targetTypeBaseCalls.js | 4 ++-- .../reference/thisInInvalidContexts.js | 4 ++-- .../thisInInvalidContextsExternalModule.js | 4 ++-- tests/baselines/reference/thisInSuperCall.js | 4 ++-- tests/baselines/reference/thisInSuperCall1.js | 4 ++-- tests/baselines/reference/thisInSuperCall2.js | 4 ++-- tests/baselines/reference/thisInSuperCall3.js | 4 ++-- .../reference/thisTypeInFunctions.js | 4 ++-- .../reference/thisTypeInFunctionsNegative.js | 4 ++-- .../tsxCorrectlyParseLessThanComparison1.js | 4 ++-- .../baselines/reference/tsxDynamicTagName5.js | 4 ++-- .../baselines/reference/tsxDynamicTagName7.js | 4 ++-- .../baselines/reference/tsxDynamicTagName8.js | 4 ++-- .../baselines/reference/tsxDynamicTagName9.js | 4 ++-- .../reference/tsxExternalModuleEmit1.js | 8 +++---- .../tsxStatelessFunctionComponents2.js | 4 ++-- .../reference/tsxUnionTypeComponent1.js | 4 ++-- tests/baselines/reference/typeAssertions.js | 4 ++-- .../baselines/reference/typeGuardFunction.js | 4 ++-- .../reference/typeGuardFunctionErrors.js | 4 ++-- .../reference/typeGuardFunctionGenerics.js | 4 ++-- .../reference/typeGuardFunctionOfFormThis.js | 4 ++-- .../typeGuardFunctionOfFormThisErrors.js | 4 ++-- .../reference/typeGuardOfFormInstanceOf.js | 4 ++-- .../reference/typeGuardOfFormIsType.js | 4 ++-- .../reference/typeGuardOfFormThisMember.js | 4 ++-- .../typeGuardOfFormThisMemberErrors.js | 4 ++-- tests/baselines/reference/typeMatch2.js | 4 ++-- tests/baselines/reference/typeOfSuperCall.js | 4 ++-- .../reference/typeParameterAsBaseClass.js | 4 ++-- .../reference/typeParameterAsBaseType.js | 4 ++-- .../reference/typeParameterExtendingUnion1.js | 4 ++-- .../reference/typeParameterExtendingUnion2.js | 4 ++-- .../baselines/reference/typeRelationships.js | 4 ++-- .../baselines/reference/typeValueConflict1.js | 4 ++-- .../baselines/reference/typeValueConflict2.js | 4 ++-- tests/baselines/reference/typeofClass2.js | 4 ++-- .../typesWithSpecializedCallSignatures.js | 4 ++-- ...typesWithSpecializedConstructSignatures.js | 4 ++-- tests/baselines/reference/undeclaredBase.js | 4 ++-- .../undefinedIsSubtypeOfEverything.js | 4 ++-- .../baselines/reference/underscoreMapFirst.js | 4 ++-- .../underscoreThisInDerivedClass01.js | 4 ++-- .../underscoreThisInDerivedClass02.js | 4 ++-- .../reference/unionTypeEquivalence.js | 4 ++-- .../reference/unionTypeFromArrayLiteral.js | 4 ++-- .../reference/unionTypesAssignability.js | 4 ++-- tests/baselines/reference/unknownSymbols1.js | 4 ++-- .../reference/unspecializedConstraints.js | 4 ++-- ...untypedFunctionCallsWithTypeParameters1.js | 4 ++-- .../reference/unusedClassesinNamespace4.js | 4 ++-- .../unusedIdentifiersConsolidated1.js | 4 ++-- .../reference/validUseOfThisInSuper.js | 4 ++-- .../reference/varArgsOnConstructorTypes.js | 4 ++-- 661 files changed, 1342 insertions(+), 1342 deletions(-) diff --git a/src/compiler/transformers/es2015.ts b/src/compiler/transformers/es2015.ts index 1fb777e11f317..d97cbeb09d85d 100644 --- a/src/compiler/transformers/es2015.ts +++ b/src/compiler/transformers/es2015.ts @@ -3337,11 +3337,11 @@ namespace ts { priority: 0, text: ` var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js b/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js index 13af9d453226a..abdbe37f2e61c 100644 --- a/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js +++ b/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js @@ -22,11 +22,11 @@ module A { //// [ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js b/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js index b3ff0c58e11ff..c674c23ab840d 100644 --- a/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js +++ b/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js @@ -26,11 +26,11 @@ module A { //// [ExportClassWithInaccessibleTypeInTypeParameterConstraint.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/abstractClassInLocalScope.js b/tests/baselines/reference/abstractClassInLocalScope.js index 501743c1ad71d..111714fcc139c 100644 --- a/tests/baselines/reference/abstractClassInLocalScope.js +++ b/tests/baselines/reference/abstractClassInLocalScope.js @@ -9,11 +9,11 @@ //// [abstractClassInLocalScope.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js b/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js index c63088fcbbea9..16e3e7c497d4b 100644 --- a/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js +++ b/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js @@ -9,11 +9,11 @@ //// [abstractClassInLocalScopeIsAbstract.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/abstractProperty.js b/tests/baselines/reference/abstractProperty.js index 87c67d18205f6..0cb89665b9464 100644 --- a/tests/baselines/reference/abstractProperty.js +++ b/tests/baselines/reference/abstractProperty.js @@ -23,11 +23,11 @@ class C extends B { //// [abstractProperty.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/abstractPropertyNegative.js b/tests/baselines/reference/abstractPropertyNegative.js index 9728e047bf183..1b0898de8e369 100644 --- a/tests/baselines/reference/abstractPropertyNegative.js +++ b/tests/baselines/reference/abstractPropertyNegative.js @@ -45,11 +45,11 @@ abstract class AbstractAccessorMismatch { //// [abstractPropertyNegative.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/accessOverriddenBaseClassMember1.js b/tests/baselines/reference/accessOverriddenBaseClassMember1.js index 9afff0a8ff9b8..1fdf137a7e751 100644 --- a/tests/baselines/reference/accessOverriddenBaseClassMember1.js +++ b/tests/baselines/reference/accessOverriddenBaseClassMember1.js @@ -17,11 +17,11 @@ class ColoredPoint extends Point { //// [accessOverriddenBaseClassMember1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; 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 eec92837d9531..50a498e278c65 100644 --- a/tests/baselines/reference/accessors_spec_section-4.5_inference.js +++ b/tests/baselines/reference/accessors_spec_section-4.5_inference.js @@ -26,11 +26,11 @@ class LanguageSpec_section_4_5_inference { //// [accessors_spec_section-4.5_inference.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInAccessorsOfClass.js b/tests/baselines/reference/aliasUsageInAccessorsOfClass.js index 9ccd5c16666db..87ce93aa104ca 100644 --- a/tests/baselines/reference/aliasUsageInAccessorsOfClass.js +++ b/tests/baselines/reference/aliasUsageInAccessorsOfClass.js @@ -38,11 +38,11 @@ exports.Model = Model; //// [aliasUsage1_moduleA.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInArray.js b/tests/baselines/reference/aliasUsageInArray.js index f08236bbf413e..fa93daad9bcb2 100644 --- a/tests/baselines/reference/aliasUsageInArray.js +++ b/tests/baselines/reference/aliasUsageInArray.js @@ -32,11 +32,11 @@ exports.Model = Model; //// [aliasUsageInArray_moduleA.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInFunctionExpression.js b/tests/baselines/reference/aliasUsageInFunctionExpression.js index c0f537ac0dd9a..908480fb5b22d 100644 --- a/tests/baselines/reference/aliasUsageInFunctionExpression.js +++ b/tests/baselines/reference/aliasUsageInFunctionExpression.js @@ -31,11 +31,11 @@ exports.Model = Model; //// [aliasUsageInFunctionExpression_moduleA.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInGenericFunction.js b/tests/baselines/reference/aliasUsageInGenericFunction.js index 222c8a78643a7..f0625fde40af3 100644 --- a/tests/baselines/reference/aliasUsageInGenericFunction.js +++ b/tests/baselines/reference/aliasUsageInGenericFunction.js @@ -35,11 +35,11 @@ exports.Model = Model; //// [aliasUsageInGenericFunction_moduleA.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInIndexerOfClass.js b/tests/baselines/reference/aliasUsageInIndexerOfClass.js index c2ed9f345a004..11a9a969a491c 100644 --- a/tests/baselines/reference/aliasUsageInIndexerOfClass.js +++ b/tests/baselines/reference/aliasUsageInIndexerOfClass.js @@ -37,11 +37,11 @@ exports.Model = Model; //// [aliasUsageInIndexerOfClass_moduleA.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInObjectLiteral.js b/tests/baselines/reference/aliasUsageInObjectLiteral.js index d5ad53a981cde..e82b58bab8f55 100644 --- a/tests/baselines/reference/aliasUsageInObjectLiteral.js +++ b/tests/baselines/reference/aliasUsageInObjectLiteral.js @@ -32,11 +32,11 @@ exports.Model = Model; //// [aliasUsageInObjectLiteral_moduleA.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInOrExpression.js b/tests/baselines/reference/aliasUsageInOrExpression.js index 2864b71595ff4..4dc10ee726ba4 100644 --- a/tests/baselines/reference/aliasUsageInOrExpression.js +++ b/tests/baselines/reference/aliasUsageInOrExpression.js @@ -35,11 +35,11 @@ exports.Model = Model; //// [aliasUsageInOrExpression_moduleA.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js b/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js index 8fc0815fcff7e..e7c42281f4f59 100644 --- a/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js +++ b/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js @@ -35,11 +35,11 @@ exports.Model = Model; //// [aliasUsageInTypeArgumentOfExtendsClause_moduleA.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -56,11 +56,11 @@ exports.VisualizationModel = VisualizationModel; //// [aliasUsageInTypeArgumentOfExtendsClause_main.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInVarAssignment.js b/tests/baselines/reference/aliasUsageInVarAssignment.js index 0b42447701b82..1d1b1c51f2c23 100644 --- a/tests/baselines/reference/aliasUsageInVarAssignment.js +++ b/tests/baselines/reference/aliasUsageInVarAssignment.js @@ -31,11 +31,11 @@ exports.Model = Model; //// [aliasUsageInVarAssignment_moduleA.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/ambiguousOverloadResolution.js b/tests/baselines/reference/ambiguousOverloadResolution.js index 7adda16b65f85..1f24276e2fbe1 100644 --- a/tests/baselines/reference/ambiguousOverloadResolution.js +++ b/tests/baselines/reference/ambiguousOverloadResolution.js @@ -10,11 +10,11 @@ var t: number = f(x, x); // Not an error //// [ambiguousOverloadResolution.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/apparentTypeSubtyping.js b/tests/baselines/reference/apparentTypeSubtyping.js index 2c4b343c813eb..7bbd61d668948 100644 --- a/tests/baselines/reference/apparentTypeSubtyping.js +++ b/tests/baselines/reference/apparentTypeSubtyping.js @@ -25,11 +25,11 @@ 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 || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/apparentTypeSupertype.js b/tests/baselines/reference/apparentTypeSupertype.js index 028935c28c1cf..2b835917fb48e 100644 --- a/tests/baselines/reference/apparentTypeSupertype.js +++ b/tests/baselines/reference/apparentTypeSupertype.js @@ -15,11 +15,11 @@ 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 || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/arrayAssignmentTest1.js b/tests/baselines/reference/arrayAssignmentTest1.js index ad1c748be75f8..c080b83957b6e 100644 --- a/tests/baselines/reference/arrayAssignmentTest1.js +++ b/tests/baselines/reference/arrayAssignmentTest1.js @@ -87,11 +87,11 @@ arr_any = i1; // should be an error - is //// [arrayAssignmentTest1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/arrayAssignmentTest2.js b/tests/baselines/reference/arrayAssignmentTest2.js index 34c5c921bd381..5e2911b13fb41 100644 --- a/tests/baselines/reference/arrayAssignmentTest2.js +++ b/tests/baselines/reference/arrayAssignmentTest2.js @@ -61,11 +61,11 @@ arr_any = i1; // should be an error - is //// [arrayAssignmentTest2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/arrayBestCommonTypes.js b/tests/baselines/reference/arrayBestCommonTypes.js index f232b44ce286a..bc78f629bcba9 100644 --- a/tests/baselines/reference/arrayBestCommonTypes.js +++ b/tests/baselines/reference/arrayBestCommonTypes.js @@ -109,11 +109,11 @@ module NonEmptyTypes { //// [arrayBestCommonTypes.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/arrayLiteralTypeInference.js b/tests/baselines/reference/arrayLiteralTypeInference.js index 95e4d98574dae..fc62da7d3a288 100644 --- a/tests/baselines/reference/arrayLiteralTypeInference.js +++ b/tests/baselines/reference/arrayLiteralTypeInference.js @@ -53,11 +53,11 @@ var z3: { id: number }[] = //// [arrayLiteralTypeInference.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/arrayLiterals.js b/tests/baselines/reference/arrayLiterals.js index 001e0ff525fbc..8d69ab90dcf6f 100644 --- a/tests/baselines/reference/arrayLiterals.js +++ b/tests/baselines/reference/arrayLiterals.js @@ -39,11 +39,11 @@ var context4: Base[] = [new Derived1(), new Derived1()]; //// [arrayLiterals.js] // Empty array literal with no contextual type has type Undefined[] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js b/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js index b092fe4da3298..bd1d38de4cb5c 100644 --- a/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js +++ b/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js @@ -27,11 +27,11 @@ var as = [list, myDerivedList]; // List[] //// [arrayLiteralsWithRecursiveGenerics.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js b/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js index fcc3ab99d3c61..3e4e6d6a148f0 100644 --- a/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js +++ b/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js @@ -21,11 +21,11 @@ rrb = cra; // error: 'A' is not assignable to 'B' //// [arrayOfSubtypeIsAssignableToReadonlyArray.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/arrowFunctionContexts.js b/tests/baselines/reference/arrowFunctionContexts.js index 5b1daa5b594e1..8f3364bd6d544 100644 --- a/tests/baselines/reference/arrowFunctionContexts.js +++ b/tests/baselines/reference/arrowFunctionContexts.js @@ -98,11 +98,11 @@ var asserted2: any; //// [arrowFunctionContexts.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures3.js b/tests/baselines/reference/assignmentCompatWithCallSignatures3.js index a748ec873ae8b..f0c8557659bef 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures3.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures3.js @@ -102,11 +102,11 @@ b18 = a18; // ok //// [assignmentCompatWithCallSignatures3.js] // these are all permitted with the current rules, since we do not do contextual signature instantiation var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures4.js b/tests/baselines/reference/assignmentCompatWithCallSignatures4.js index 409a7f5ceae21..40c98239cbccf 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures4.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures4.js @@ -101,11 +101,11 @@ module Errors { //// [assignmentCompatWithCallSignatures4.js] // These are mostly permitted with the current loose rules. All ok unless otherwise noted. var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures5.js b/tests/baselines/reference/assignmentCompatWithCallSignatures5.js index 00acd326ba87a..2ac6493af4d3e 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures5.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures5.js @@ -68,11 +68,11 @@ 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 || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures6.js b/tests/baselines/reference/assignmentCompatWithCallSignatures6.js index f8fbe3b0b8427..1281cfc0f5d39 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures6.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures6.js @@ -45,11 +45,11 @@ b16 = x.a16; //// [assignmentCompatWithCallSignatures6.js] // checking assignment compatibility relations for function types. All valid var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js index fb991a85f0564..888a493985453 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js @@ -102,11 +102,11 @@ b18 = a18; // ok //// [assignmentCompatWithConstructSignatures3.js] // checking assignment compatibility relations for function types. All of these are valid. var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js index eb406898854dd..32081f035e653 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js @@ -101,11 +101,11 @@ module Errors { //// [assignmentCompatWithConstructSignatures4.js] // checking assignment compatibility relations for function types. var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js index d246aec2509be..7c4e7ca53f36c 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js @@ -68,11 +68,11 @@ b18 = a18; // ok //// [assignmentCompatWithConstructSignatures5.js] // checking assignment compat for function types. All valid var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js index f3149664bc687..5ac28d5802450 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js @@ -45,11 +45,11 @@ b16 = x.a16; //// [assignmentCompatWithConstructSignatures6.js] // checking assignment compatibility relations for function types. All valid. var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer.js b/tests/baselines/reference/assignmentCompatWithNumericIndexer.js index 127f21bbfd773..59d173ebd71de 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer.js +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer.js @@ -46,11 +46,11 @@ module Generics { //// [assignmentCompatWithNumericIndexer.js] // Derived type indexer must be subtype of base type indexer var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js b/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js index 704cf67ec83c0..afac7265036c7 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js @@ -43,11 +43,11 @@ module Generics { //// [assignmentCompatWithNumericIndexer3.js] // Derived type indexer must be subtype of base type indexer var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers4.js b/tests/baselines/reference/assignmentCompatWithObjectMembers4.js index 88c77f2fb357a..9204c87a172e2 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers4.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers4.js @@ -94,11 +94,11 @@ module WithBase { //// [assignmentCompatWithObjectMembers4.js] // members N and M of types S and T have the same name, same accessibility, same optionality, and N is not assignable M var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js index 328b5192d969d..1e539a9713bd2 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js @@ -91,11 +91,11 @@ 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 || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js index 730fd15be7a3e..3387a818b6f29 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js @@ -93,11 +93,11 @@ module SourceHasOptional { // M is optional and S contains no property with the same name as M // N is optional and T contains no property with the same name as N var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithStringIndexer.js b/tests/baselines/reference/assignmentCompatWithStringIndexer.js index 7b871a20b3ac0..d296c256d17c8 100644 --- a/tests/baselines/reference/assignmentCompatWithStringIndexer.js +++ b/tests/baselines/reference/assignmentCompatWithStringIndexer.js @@ -56,11 +56,11 @@ module Generics { //// [assignmentCompatWithStringIndexer.js] // index signatures must be compatible in assignments var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentLHSIsValue.js b/tests/baselines/reference/assignmentLHSIsValue.js index 1cf7c2ac317ef..34e0df7cacd88 100644 --- a/tests/baselines/reference/assignmentLHSIsValue.js +++ b/tests/baselines/reference/assignmentLHSIsValue.js @@ -72,11 +72,11 @@ foo() = value; //// [assignmentLHSIsValue.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/asyncImportedPromise_es5.js b/tests/baselines/reference/asyncImportedPromise_es5.js index 9a6ef70582a5e..0185fcaf4e2c4 100644 --- a/tests/baselines/reference/asyncImportedPromise_es5.js +++ b/tests/baselines/reference/asyncImportedPromise_es5.js @@ -12,11 +12,11 @@ class Test { //// [task.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/autolift4.js b/tests/baselines/reference/autolift4.js index aff1ce9986f46..6d91c61d59dc8 100644 --- a/tests/baselines/reference/autolift4.js +++ b/tests/baselines/reference/autolift4.js @@ -25,11 +25,11 @@ class Point3D extends Point { //// [autolift4.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/baseCheck.js b/tests/baselines/reference/baseCheck.js index c8145c170b614..2b4f90d27b127 100644 --- a/tests/baselines/reference/baseCheck.js +++ b/tests/baselines/reference/baseCheck.js @@ -31,11 +31,11 @@ function f() { //// [baseCheck.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/baseIndexSignatureResolution.js b/tests/baselines/reference/baseIndexSignatureResolution.js index 7389e2afe8b4b..82818ecafbe32 100644 --- a/tests/baselines/reference/baseIndexSignatureResolution.js +++ b/tests/baselines/reference/baseIndexSignatureResolution.js @@ -26,11 +26,11 @@ var z: Derived = b.foo(); //// [baseIndexSignatureResolution.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/baseTypeOrderChecking.js b/tests/baselines/reference/baseTypeOrderChecking.js index c2eb77a3b9ece..57ee369a03c66 100644 --- a/tests/baselines/reference/baseTypeOrderChecking.js +++ b/tests/baselines/reference/baseTypeOrderChecking.js @@ -38,11 +38,11 @@ class Class4 extends Class3 //// [baseTypeOrderChecking.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/baseTypeWrappingInstantiationChain.js b/tests/baselines/reference/baseTypeWrappingInstantiationChain.js index 308637b576c70..d2087b3100a19 100644 --- a/tests/baselines/reference/baseTypeWrappingInstantiationChain.js +++ b/tests/baselines/reference/baseTypeWrappingInstantiationChain.js @@ -29,11 +29,11 @@ class C extends CBase { //// [baseTypeWrappingInstantiationChain.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/bases.js b/tests/baselines/reference/bases.js index 201d0e7ac2736..a1499143fd417 100644 --- a/tests/baselines/reference/bases.js +++ b/tests/baselines/reference/bases.js @@ -22,11 +22,11 @@ new C().y; //// [bases.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js index af0c24ca5d5da..b31e773ff24ee 100644 --- a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js +++ b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js @@ -30,11 +30,11 @@ 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 || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js index bf3c8b830aab7..31d0c03a5dc1d 100644 --- a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js +++ b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js @@ -28,11 +28,11 @@ 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 || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/bestCommonTypeOfTuple2.js b/tests/baselines/reference/bestCommonTypeOfTuple2.js index 3bac937c8aeb9..9b0c2be7b7686 100644 --- a/tests/baselines/reference/bestCommonTypeOfTuple2.js +++ b/tests/baselines/reference/bestCommonTypeOfTuple2.js @@ -24,11 +24,11 @@ var e51 = t5[2]; // {} //// [bestCommonTypeOfTuple2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js index 662bfa931fb7a..74b5bafad3834 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js @@ -72,11 +72,11 @@ interface I extends A { //// [callSignatureAssignabilityInInheritance2.js] // checking subtype relations for function types as it relates to contextual signature instantiation var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js index e27e4729cd410..84b7e2d0a5248 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js @@ -117,11 +117,11 @@ module Errors { // checking subtype relations for function types as it relates to contextual signature instantiation // error cases var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js index 687cc9aa0e192..04e8e2d6a2a37 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js @@ -52,11 +52,11 @@ interface I extends A { //// [callSignatureAssignabilityInInheritance4.js] // checking subtype relations for function types as it relates to contextual signature instantiation var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js index 16e50218cd90e..9fabe405db081 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js @@ -52,11 +52,11 @@ interface I extends B { // checking subtype relations for function types as it relates to contextual signature instantiation // same as subtypingWithCallSignatures2 just with an extra level of indirection in the inheritance chain var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js index 717fe64da4ec2..52e08ae440123 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js @@ -55,11 +55,11 @@ 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 || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/callWithSpread.js b/tests/baselines/reference/callWithSpread.js index 06ca3e91d0270..23c1fff2d09e6 100644 --- a/tests/baselines/reference/callWithSpread.js +++ b/tests/baselines/reference/callWithSpread.js @@ -60,11 +60,11 @@ class D extends C { //// [callWithSpread.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/captureThisInSuperCall.js b/tests/baselines/reference/captureThisInSuperCall.js index c218c8b1687ca..4682a50a2e667 100644 --- a/tests/baselines/reference/captureThisInSuperCall.js +++ b/tests/baselines/reference/captureThisInSuperCall.js @@ -10,11 +10,11 @@ class B extends A { //// [captureThisInSuperCall.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/castingTuple.js b/tests/baselines/reference/castingTuple.js index 04965748c0da3..4cff94b3b90ff 100644 --- a/tests/baselines/reference/castingTuple.js +++ b/tests/baselines/reference/castingTuple.js @@ -34,11 +34,11 @@ t4[2] = 10; //// [castingTuple.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/chainedAssignment3.js b/tests/baselines/reference/chainedAssignment3.js index 2ddd0f7577ec9..116fcd0f83d31 100644 --- a/tests/baselines/reference/chainedAssignment3.js +++ b/tests/baselines/reference/chainedAssignment3.js @@ -24,11 +24,11 @@ a = b = new A(); //// [chainedAssignment3.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js index f820e6c39a3da..fc23b30e19722 100644 --- a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js +++ b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js @@ -21,11 +21,11 @@ class C extends B { //// [chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkForObjectTooStrict.js b/tests/baselines/reference/checkForObjectTooStrict.js index dbf1a34b46574..6d330285f6e5b 100644 --- a/tests/baselines/reference/checkForObjectTooStrict.js +++ b/tests/baselines/reference/checkForObjectTooStrict.js @@ -33,11 +33,11 @@ class Baz extends Object { //// [checkForObjectTooStrict.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js index 8322bb8178325..40717cb47590f 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js @@ -12,11 +12,11 @@ class Derived extends Based { //// [checkSuperCallBeforeThisAccessing1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js index 6d787a70b8c32..8c59c4d6682fd 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js @@ -12,11 +12,11 @@ class Derived extends Based { //// [checkSuperCallBeforeThisAccessing2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js index 41092fcd9845e..1699b3a0f3528 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js @@ -17,11 +17,11 @@ class Derived extends Based { //// [checkSuperCallBeforeThisAccessing3.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js index 9bc5cc6f82b22..49dfb6e4a22fc 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js @@ -21,11 +21,11 @@ class Derived extends Based { //// [checkSuperCallBeforeThisAccessing4.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js index c178a78e84ebb..49f1e81d1a183 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js @@ -9,11 +9,11 @@ class Derived extends Based { //// [checkSuperCallBeforeThisAccessing5.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js index 14cbda775d5da..8931b0090cfd1 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js @@ -12,11 +12,11 @@ class Super extends Base { //// [checkSuperCallBeforeThisAccessing6.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js index ad85fa1736c5f..38a37e03cf33f 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js @@ -11,11 +11,11 @@ class Super extends Base { //// [checkSuperCallBeforeThisAccessing7.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js index 3f824a00c96ec..77e4a4096d034 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js @@ -12,11 +12,11 @@ class Super extends Base { //// [checkSuperCallBeforeThisAccessing8.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/circularImportAlias.js b/tests/baselines/reference/circularImportAlias.js index 2ca47382b3284..27be18c2a2825 100644 --- a/tests/baselines/reference/circularImportAlias.js +++ b/tests/baselines/reference/circularImportAlias.js @@ -22,11 +22,11 @@ var c = new B.a.C(); //// [circularImportAlias.js] // expected no error var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/circularTypeofWithFunctionModule.js b/tests/baselines/reference/circularTypeofWithFunctionModule.js index e1e3c1efe5841..38bced0860858 100644 --- a/tests/baselines/reference/circularTypeofWithFunctionModule.js +++ b/tests/baselines/reference/circularTypeofWithFunctionModule.js @@ -15,11 +15,11 @@ namespace maker { //// [circularTypeofWithFunctionModule.js] // Repro from #6072 var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractConstructorAssignability.js b/tests/baselines/reference/classAbstractConstructorAssignability.js index e9beaced63dd9..52335c203b2c6 100644 --- a/tests/baselines/reference/classAbstractConstructorAssignability.js +++ b/tests/baselines/reference/classAbstractConstructorAssignability.js @@ -16,11 +16,11 @@ new CC; //// [classAbstractConstructorAssignability.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractCrashedOnce.js b/tests/baselines/reference/classAbstractCrashedOnce.js index 319c6c237dcf5..dbad78fbd00fc 100644 --- a/tests/baselines/reference/classAbstractCrashedOnce.js +++ b/tests/baselines/reference/classAbstractCrashedOnce.js @@ -12,11 +12,11 @@ var x = new bar(); //// [classAbstractCrashedOnce.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractExtends.js b/tests/baselines/reference/classAbstractExtends.js index 9b4faff67c3b9..e0fb7ad8189c6 100644 --- a/tests/baselines/reference/classAbstractExtends.js +++ b/tests/baselines/reference/classAbstractExtends.js @@ -18,11 +18,11 @@ class E extends B { //// [classAbstractExtends.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractFactoryFunction.js b/tests/baselines/reference/classAbstractFactoryFunction.js index e7ddb867d2848..89b77b62a9a09 100644 --- a/tests/baselines/reference/classAbstractFactoryFunction.js +++ b/tests/baselines/reference/classAbstractFactoryFunction.js @@ -19,11 +19,11 @@ NewB(B); //// [classAbstractFactoryFunction.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractGeneric.js b/tests/baselines/reference/classAbstractGeneric.js index 5063d7fcdd69c..df6222f649530 100644 --- a/tests/baselines/reference/classAbstractGeneric.js +++ b/tests/baselines/reference/classAbstractGeneric.js @@ -27,11 +27,11 @@ class G extends A { //// [classAbstractGeneric.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractInAModule.js b/tests/baselines/reference/classAbstractInAModule.js index 73ff32d3d5efc..86e6b8e31530d 100644 --- a/tests/baselines/reference/classAbstractInAModule.js +++ b/tests/baselines/reference/classAbstractInAModule.js @@ -9,11 +9,11 @@ new M.B; //// [classAbstractInAModule.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractInheritance.js b/tests/baselines/reference/classAbstractInheritance.js index 8a173bb1bf4cb..a26a8170f537e 100644 --- a/tests/baselines/reference/classAbstractInheritance.js +++ b/tests/baselines/reference/classAbstractInheritance.js @@ -23,11 +23,11 @@ abstract class GG extends CC {} //// [classAbstractInheritance.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractInstantiations1.js b/tests/baselines/reference/classAbstractInstantiations1.js index 094bc7555593b..101dca316dfcc 100644 --- a/tests/baselines/reference/classAbstractInstantiations1.js +++ b/tests/baselines/reference/classAbstractInstantiations1.js @@ -29,11 +29,11 @@ c = new B; // Calling new with (non)abstract classes. // var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractInstantiations2.js b/tests/baselines/reference/classAbstractInstantiations2.js index 01277eb034a6e..8449689f84ac6 100644 --- a/tests/baselines/reference/classAbstractInstantiations2.js +++ b/tests/baselines/reference/classAbstractInstantiations2.js @@ -53,11 +53,11 @@ class H { // error -- not declared abstract //// [classAbstractInstantiations2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractOverrideWithAbstract.js b/tests/baselines/reference/classAbstractOverrideWithAbstract.js index 8f304c709cfe4..345ce20ca1fa6 100644 --- a/tests/baselines/reference/classAbstractOverrideWithAbstract.js +++ b/tests/baselines/reference/classAbstractOverrideWithAbstract.js @@ -25,11 +25,11 @@ class DD extends BB { //// [classAbstractOverrideWithAbstract.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractSuperCalls.js b/tests/baselines/reference/classAbstractSuperCalls.js index ba9ed10795bb0..e569f90528e09 100644 --- a/tests/baselines/reference/classAbstractSuperCalls.js +++ b/tests/baselines/reference/classAbstractSuperCalls.js @@ -29,11 +29,11 @@ abstract class BB extends AA { //// [classAbstractSuperCalls.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractUsingAbstractMethod1.js b/tests/baselines/reference/classAbstractUsingAbstractMethod1.js index 8e23906e1492a..61b5fd6fd13c4 100644 --- a/tests/baselines/reference/classAbstractUsingAbstractMethod1.js +++ b/tests/baselines/reference/classAbstractUsingAbstractMethod1.js @@ -19,11 +19,11 @@ a.foo(); //// [classAbstractUsingAbstractMethod1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractUsingAbstractMethods2.js b/tests/baselines/reference/classAbstractUsingAbstractMethods2.js index 3d09949c0aef2..bd17fa96091fc 100644 --- a/tests/baselines/reference/classAbstractUsingAbstractMethods2.js +++ b/tests/baselines/reference/classAbstractUsingAbstractMethods2.js @@ -29,11 +29,11 @@ class DD extends AA { //// [classAbstractUsingAbstractMethods2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classConstructorAccessibility2.js b/tests/baselines/reference/classConstructorAccessibility2.js index e16a623ef43fc..7c77d13dffbee 100644 --- a/tests/baselines/reference/classConstructorAccessibility2.js +++ b/tests/baselines/reference/classConstructorAccessibility2.js @@ -48,11 +48,11 @@ var dc = new DerivedC(1); //// [classConstructorAccessibility2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classConstructorAccessibility4.js b/tests/baselines/reference/classConstructorAccessibility4.js index 0680f590ef440..73451f5fab40f 100644 --- a/tests/baselines/reference/classConstructorAccessibility4.js +++ b/tests/baselines/reference/classConstructorAccessibility4.js @@ -32,11 +32,11 @@ class D { //// [classConstructorAccessibility4.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classConstructorAccessibility5.js b/tests/baselines/reference/classConstructorAccessibility5.js index 671530694e79f..a6738e229e0ab 100644 --- a/tests/baselines/reference/classConstructorAccessibility5.js +++ b/tests/baselines/reference/classConstructorAccessibility5.js @@ -13,11 +13,11 @@ class Unrelated { //// [classConstructorAccessibility5.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classConstructorParametersAccessibility.js b/tests/baselines/reference/classConstructorParametersAccessibility.js index 4c3d374715745..497f662a8b05f 100644 --- a/tests/baselines/reference/classConstructorParametersAccessibility.js +++ b/tests/baselines/reference/classConstructorParametersAccessibility.js @@ -28,11 +28,11 @@ class Derived extends C3 { //// [classConstructorParametersAccessibility.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classConstructorParametersAccessibility2.js b/tests/baselines/reference/classConstructorParametersAccessibility2.js index 14f7a33a6b346..7a885bbd8d61f 100644 --- a/tests/baselines/reference/classConstructorParametersAccessibility2.js +++ b/tests/baselines/reference/classConstructorParametersAccessibility2.js @@ -28,11 +28,11 @@ class Derived extends C3 { //// [classConstructorParametersAccessibility2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classConstructorParametersAccessibility3.js b/tests/baselines/reference/classConstructorParametersAccessibility3.js index 1f02b7a75b5ac..f96f0171046d9 100644 --- a/tests/baselines/reference/classConstructorParametersAccessibility3.js +++ b/tests/baselines/reference/classConstructorParametersAccessibility3.js @@ -15,11 +15,11 @@ d.p; // public, OK //// [classConstructorParametersAccessibility3.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js b/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js index bf15fcf8fadb5..a7fa44091c8b4 100644 --- a/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js +++ b/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js @@ -13,11 +13,11 @@ module M { //// [classDeclarationMergedInModuleWithContinuation.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classDeclaredBeforeClassFactory.js b/tests/baselines/reference/classDeclaredBeforeClassFactory.js index 8a49c6ca13899..f6cc69037c455 100644 --- a/tests/baselines/reference/classDeclaredBeforeClassFactory.js +++ b/tests/baselines/reference/classDeclaredBeforeClassFactory.js @@ -9,11 +9,11 @@ function makeBaseClass() { //// [classDeclaredBeforeClassFactory.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classDoesNotDependOnBaseTypes.js b/tests/baselines/reference/classDoesNotDependOnBaseTypes.js index 17dc38502145e..9fc1aecd9b206 100644 --- a/tests/baselines/reference/classDoesNotDependOnBaseTypes.js +++ b/tests/baselines/reference/classDoesNotDependOnBaseTypes.js @@ -14,11 +14,11 @@ class StringTreeCollection extends StringTreeCollectionBase { } //// [classDoesNotDependOnBaseTypes.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExpression2.js b/tests/baselines/reference/classExpression2.js index 016858652650e..6973fbec81646 100644 --- a/tests/baselines/reference/classExpression2.js +++ b/tests/baselines/reference/classExpression2.js @@ -4,11 +4,11 @@ var v = class C extends D {}; //// [classExpression2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExpression3.js b/tests/baselines/reference/classExpression3.js index 3acbcef1ab889..858238d24ee2e 100644 --- a/tests/baselines/reference/classExpression3.js +++ b/tests/baselines/reference/classExpression3.js @@ -8,11 +8,11 @@ c.c; //// [classExpression3.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExpressionExtendingAbstractClass.js b/tests/baselines/reference/classExpressionExtendingAbstractClass.js index 1d661cafb65c8..1ce5078ed6343 100644 --- a/tests/baselines/reference/classExpressionExtendingAbstractClass.js +++ b/tests/baselines/reference/classExpressionExtendingAbstractClass.js @@ -10,11 +10,11 @@ var C = class extends A { // no error reported! //// [classExpressionExtendingAbstractClass.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingBuiltinType.js b/tests/baselines/reference/classExtendingBuiltinType.js index 902b3327754a1..2ddf4c8961dde 100644 --- a/tests/baselines/reference/classExtendingBuiltinType.js +++ b/tests/baselines/reference/classExtendingBuiltinType.js @@ -13,11 +13,11 @@ class C10 extends Array { } //// [classExtendingBuiltinType.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingClass.js b/tests/baselines/reference/classExtendingClass.js index f9085262904c1..22bb12d95ec37 100644 --- a/tests/baselines/reference/classExtendingClass.js +++ b/tests/baselines/reference/classExtendingClass.js @@ -33,11 +33,11 @@ var r8 = D2.other(1); //// [classExtendingClass.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingClassLikeType.js b/tests/baselines/reference/classExtendingClassLikeType.js index d793534bd18ed..564fd14da51c0 100644 --- a/tests/baselines/reference/classExtendingClassLikeType.js +++ b/tests/baselines/reference/classExtendingClassLikeType.js @@ -60,11 +60,11 @@ class D5 extends getBadBase() { //// [classExtendingClassLikeType.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingNonConstructor.js b/tests/baselines/reference/classExtendingNonConstructor.js index 43112c4076bbb..2a2e0b5eebc0d 100644 --- a/tests/baselines/reference/classExtendingNonConstructor.js +++ b/tests/baselines/reference/classExtendingNonConstructor.js @@ -16,11 +16,11 @@ class C7 extends foo { } //// [classExtendingNonConstructor.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingNull.js b/tests/baselines/reference/classExtendingNull.js index 44fd8a51a862d..4d9eaba615e25 100644 --- a/tests/baselines/reference/classExtendingNull.js +++ b/tests/baselines/reference/classExtendingNull.js @@ -5,11 +5,11 @@ class C2 extends (null) { } //// [classExtendingNull.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingPrimitive.js b/tests/baselines/reference/classExtendingPrimitive.js index 15f225a6dbe53..ade53d91a74a2 100644 --- a/tests/baselines/reference/classExtendingPrimitive.js +++ b/tests/baselines/reference/classExtendingPrimitive.js @@ -17,11 +17,11 @@ class C8 extends E { } //// [classExtendingPrimitive.js] // classes cannot extend primitives var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingPrimitive2.js b/tests/baselines/reference/classExtendingPrimitive2.js index 49fbce51aa28d..4e2c314b2dd66 100644 --- a/tests/baselines/reference/classExtendingPrimitive2.js +++ b/tests/baselines/reference/classExtendingPrimitive2.js @@ -7,11 +7,11 @@ class C5a extends null { } //// [classExtendingPrimitive2.js] // classes cannot extend primitives var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingQualifiedName.js b/tests/baselines/reference/classExtendingQualifiedName.js index 02346427ed3ca..59a84ba3e0a40 100644 --- a/tests/baselines/reference/classExtendingQualifiedName.js +++ b/tests/baselines/reference/classExtendingQualifiedName.js @@ -9,11 +9,11 @@ module M { //// [classExtendingQualifiedName.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingQualifiedName2.js b/tests/baselines/reference/classExtendingQualifiedName2.js index 8add304601371..b2b91a9aedbe4 100644 --- a/tests/baselines/reference/classExtendingQualifiedName2.js +++ b/tests/baselines/reference/classExtendingQualifiedName2.js @@ -9,11 +9,11 @@ module M { //// [classExtendingQualifiedName2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsAcrossFiles.js b/tests/baselines/reference/classExtendsAcrossFiles.js index 0f0fb5ba2d94b..e8d4c530da1e7 100644 --- a/tests/baselines/reference/classExtendsAcrossFiles.js +++ b/tests/baselines/reference/classExtendsAcrossFiles.js @@ -22,11 +22,11 @@ export const b = { //// [b.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -52,11 +52,11 @@ exports.b = { //// [a.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js b/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js index 9bca40631f937..fb44ad9469afd 100644 --- a/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js +++ b/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js @@ -15,11 +15,11 @@ module Foo { //// [classExtendsClauseClassMergedWithModuleNotReferingConstructor.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.js b/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.js index 3d02e381da93e..d70305fe5ba7e 100644 --- a/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.js +++ b/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.js @@ -8,11 +8,11 @@ module Foo { //// [classExtendsClauseClassNotReferringConstructor.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsEveryObjectType.js b/tests/baselines/reference/classExtendsEveryObjectType.js index 91ccc496fcb57..ef16075c7279a 100644 --- a/tests/baselines/reference/classExtendsEveryObjectType.js +++ b/tests/baselines/reference/classExtendsEveryObjectType.js @@ -18,11 +18,11 @@ class C6 extends []{ } // error //// [classExtendsEveryObjectType.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsEveryObjectType2.js b/tests/baselines/reference/classExtendsEveryObjectType2.js index a30b3d8c8d8d1..507a9bbfcf936 100644 --- a/tests/baselines/reference/classExtendsEveryObjectType2.js +++ b/tests/baselines/reference/classExtendsEveryObjectType2.js @@ -5,11 +5,11 @@ class C6 extends []{ } // error //// [classExtendsEveryObjectType2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsInterface.js b/tests/baselines/reference/classExtendsInterface.js index e5710190673fe..f291aedb4ece9 100644 --- a/tests/baselines/reference/classExtendsInterface.js +++ b/tests/baselines/reference/classExtendsInterface.js @@ -10,11 +10,11 @@ class B2 implements Comparable2 {} //// [classExtendsInterface.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsInterfaceInExpression.js b/tests/baselines/reference/classExtendsInterfaceInExpression.js index e017ebb8e0653..b37daba7f7a00 100644 --- a/tests/baselines/reference/classExtendsInterfaceInExpression.js +++ b/tests/baselines/reference/classExtendsInterfaceInExpression.js @@ -10,11 +10,11 @@ class C extends factory(A) {} //// [classExtendsInterfaceInExpression.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsInterfaceInModule.js b/tests/baselines/reference/classExtendsInterfaceInModule.js index 3d100bcfb679c..2299df89ab7a2 100644 --- a/tests/baselines/reference/classExtendsInterfaceInModule.js +++ b/tests/baselines/reference/classExtendsInterfaceInModule.js @@ -17,11 +17,11 @@ class D extends Mod.Nested.I {} //// [classExtendsInterfaceInModule.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsItself.js b/tests/baselines/reference/classExtendsItself.js index 2f32d827dcbcf..8f6aecec8439e 100644 --- a/tests/baselines/reference/classExtendsItself.js +++ b/tests/baselines/reference/classExtendsItself.js @@ -7,11 +7,11 @@ class E extends E { } // error //// [classExtendsItself.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsItselfIndirectly.js b/tests/baselines/reference/classExtendsItselfIndirectly.js index d6ca939a910ba..4ca9186f89c2f 100644 --- a/tests/baselines/reference/classExtendsItselfIndirectly.js +++ b/tests/baselines/reference/classExtendsItselfIndirectly.js @@ -13,11 +13,11 @@ class E2 extends D2 { baz: T; } //// [classExtendsItselfIndirectly.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsItselfIndirectly2.js b/tests/baselines/reference/classExtendsItselfIndirectly2.js index 6587c65a5fad5..86d2cd6088742 100644 --- a/tests/baselines/reference/classExtendsItselfIndirectly2.js +++ b/tests/baselines/reference/classExtendsItselfIndirectly2.js @@ -24,11 +24,11 @@ module O { //// [classExtendsItselfIndirectly2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsItselfIndirectly3.js b/tests/baselines/reference/classExtendsItselfIndirectly3.js index d36545bafd378..1c42dc28634ea 100644 --- a/tests/baselines/reference/classExtendsItselfIndirectly3.js +++ b/tests/baselines/reference/classExtendsItselfIndirectly3.js @@ -20,11 +20,11 @@ class E2 extends D2 { baz: T; } //// [classExtendsItselfIndirectly_file1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -38,11 +38,11 @@ var C = (function (_super) { }(E)); // error //// [classExtendsItselfIndirectly_file2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -56,11 +56,11 @@ var D = (function (_super) { }(C)); //// [classExtendsItselfIndirectly_file3.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -74,11 +74,11 @@ var E = (function (_super) { }(D)); //// [classExtendsItselfIndirectly_file4.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -92,11 +92,11 @@ var C2 = (function (_super) { }(E2)); // error //// [classExtendsItselfIndirectly_file5.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -110,11 +110,11 @@ var D2 = (function (_super) { }(C2)); //// [classExtendsItselfIndirectly_file6.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsMultipleBaseClasses.js b/tests/baselines/reference/classExtendsMultipleBaseClasses.js index 3b1fd2de5cfe9..a36ab4355ad10 100644 --- a/tests/baselines/reference/classExtendsMultipleBaseClasses.js +++ b/tests/baselines/reference/classExtendsMultipleBaseClasses.js @@ -5,11 +5,11 @@ class C extends A,B { } //// [classExtendsMultipleBaseClasses.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsNull.js b/tests/baselines/reference/classExtendsNull.js index d8cadbbe32b79..07618bead380a 100644 --- a/tests/baselines/reference/classExtendsNull.js +++ b/tests/baselines/reference/classExtendsNull.js @@ -14,11 +14,11 @@ class D extends null { //// [classExtendsNull.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsShadowedConstructorFunction.js b/tests/baselines/reference/classExtendsShadowedConstructorFunction.js index 79ae0cf243ffd..908c91850e8ee 100644 --- a/tests/baselines/reference/classExtendsShadowedConstructorFunction.js +++ b/tests/baselines/reference/classExtendsShadowedConstructorFunction.js @@ -10,11 +10,11 @@ module M { //// [classExtendsShadowedConstructorFunction.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsValidConstructorFunction.js b/tests/baselines/reference/classExtendsValidConstructorFunction.js index b2a38318babad..fbbb91d29eab1 100644 --- a/tests/baselines/reference/classExtendsValidConstructorFunction.js +++ b/tests/baselines/reference/classExtendsValidConstructorFunction.js @@ -7,11 +7,11 @@ class C extends foo { } // error, cannot extend it though //// [classExtendsValidConstructorFunction.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classHeritageWithTrailingSeparator.js b/tests/baselines/reference/classHeritageWithTrailingSeparator.js index bd9f925b7d66a..72779e9eb9797 100644 --- a/tests/baselines/reference/classHeritageWithTrailingSeparator.js +++ b/tests/baselines/reference/classHeritageWithTrailingSeparator.js @@ -5,11 +5,11 @@ class D extends C, { //// [classHeritageWithTrailingSeparator.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classImplementsClass2.js b/tests/baselines/reference/classImplementsClass2.js index e564beda16437..80acbd8d20471 100644 --- a/tests/baselines/reference/classImplementsClass2.js +++ b/tests/baselines/reference/classImplementsClass2.js @@ -15,11 +15,11 @@ c2 = c; //// [classImplementsClass2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classImplementsClass3.js b/tests/baselines/reference/classImplementsClass3.js index 707a9dbe6b923..4c2d096f46587 100644 --- a/tests/baselines/reference/classImplementsClass3.js +++ b/tests/baselines/reference/classImplementsClass3.js @@ -16,11 +16,11 @@ c2 = c; //// [classImplementsClass3.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classImplementsClass4.js b/tests/baselines/reference/classImplementsClass4.js index 5748fbb30f52b..49c43b8ef3aa0 100644 --- a/tests/baselines/reference/classImplementsClass4.js +++ b/tests/baselines/reference/classImplementsClass4.js @@ -18,11 +18,11 @@ c2 = c; //// [classImplementsClass4.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classImplementsClass5.js b/tests/baselines/reference/classImplementsClass5.js index 12388b65a1756..a10b08fad2d8b 100644 --- a/tests/baselines/reference/classImplementsClass5.js +++ b/tests/baselines/reference/classImplementsClass5.js @@ -19,11 +19,11 @@ c2 = c; //// [classImplementsClass5.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classImplementsClass6.js b/tests/baselines/reference/classImplementsClass6.js index 52959ed351a71..ec81446480119 100644 --- a/tests/baselines/reference/classImplementsClass6.js +++ b/tests/baselines/reference/classImplementsClass6.js @@ -23,11 +23,11 @@ c2.bar(); // should error //// [classImplementsClass6.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classIndexer3.js b/tests/baselines/reference/classIndexer3.js index 29dd552da9c7e..f50c50e4c901b 100644 --- a/tests/baselines/reference/classIndexer3.js +++ b/tests/baselines/reference/classIndexer3.js @@ -12,11 +12,11 @@ class D123 extends C123 { //// [classIndexer3.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classInheritence.js b/tests/baselines/reference/classInheritence.js index d53bdbd821411..61a2ce9f262b8 100644 --- a/tests/baselines/reference/classInheritence.js +++ b/tests/baselines/reference/classInheritence.js @@ -4,11 +4,11 @@ class A extends A { } //// [classInheritence.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classIsSubtypeOfBaseType.js b/tests/baselines/reference/classIsSubtypeOfBaseType.js index f8a691ead9a31..ec7a1f1babfaf 100644 --- a/tests/baselines/reference/classIsSubtypeOfBaseType.js +++ b/tests/baselines/reference/classIsSubtypeOfBaseType.js @@ -17,11 +17,11 @@ class Derived2 extends Base<{ bar: string; }> { //// [classIsSubtypeOfBaseType.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classOrder2.js b/tests/baselines/reference/classOrder2.js index c9859337efe70..e7dd695973182 100644 --- a/tests/baselines/reference/classOrder2.js +++ b/tests/baselines/reference/classOrder2.js @@ -21,11 +21,11 @@ a.foo(); //// [classOrder2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classOrderBug.js b/tests/baselines/reference/classOrderBug.js index 14ab934d77cfe..5631152514f47 100644 --- a/tests/baselines/reference/classOrderBug.js +++ b/tests/baselines/reference/classOrderBug.js @@ -17,11 +17,11 @@ class foo extends baz {} //// [classOrderBug.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classSideInheritance1.js b/tests/baselines/reference/classSideInheritance1.js index da6e44e42fe86..cb958b2e12ee9 100644 --- a/tests/baselines/reference/classSideInheritance1.js +++ b/tests/baselines/reference/classSideInheritance1.js @@ -17,11 +17,11 @@ C2.bar(); // valid //// [classSideInheritance1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classSideInheritance2.js b/tests/baselines/reference/classSideInheritance2.js index a75bef9fbafee..9887472615f4d 100644 --- a/tests/baselines/reference/classSideInheritance2.js +++ b/tests/baselines/reference/classSideInheritance2.js @@ -22,11 +22,11 @@ class TextBase implements IText { //// [classSideInheritance2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classSideInheritance3.js b/tests/baselines/reference/classSideInheritance3.js index 1538ed6e07ee1..9ce60d012f40d 100644 --- a/tests/baselines/reference/classSideInheritance3.js +++ b/tests/baselines/reference/classSideInheritance3.js @@ -20,11 +20,11 @@ var r3: typeof A = C; // ok //// [classSideInheritance3.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classUpdateTests.js b/tests/baselines/reference/classUpdateTests.js index 5e11c44830775..eb9541ab7370c 100644 --- a/tests/baselines/reference/classUpdateTests.js +++ b/tests/baselines/reference/classUpdateTests.js @@ -115,11 +115,11 @@ class R { //// [classUpdateTests.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classWithBaseClassButNoConstructor.js b/tests/baselines/reference/classWithBaseClassButNoConstructor.js index d6638d88ceca6..249fa099007a3 100644 --- a/tests/baselines/reference/classWithBaseClassButNoConstructor.js +++ b/tests/baselines/reference/classWithBaseClassButNoConstructor.js @@ -42,11 +42,11 @@ var d6 = new D(1); // ok //// [classWithBaseClassButNoConstructor.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classWithConstructors.js b/tests/baselines/reference/classWithConstructors.js index fde7ad2da3238..07b592bf730ba 100644 --- a/tests/baselines/reference/classWithConstructors.js +++ b/tests/baselines/reference/classWithConstructors.js @@ -51,11 +51,11 @@ module Generics { //// [classWithConstructors.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classWithProtectedProperty.js b/tests/baselines/reference/classWithProtectedProperty.js index 0188835fdac55..0a2bb39b4493d 100644 --- a/tests/baselines/reference/classWithProtectedProperty.js +++ b/tests/baselines/reference/classWithProtectedProperty.js @@ -30,11 +30,11 @@ class D extends C { //// [classWithProtectedProperty.js] // accessing any protected outside the class is an error var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classWithStaticMembers.js b/tests/baselines/reference/classWithStaticMembers.js index 1ed38d2fee8cc..0e08046f8c258 100644 --- a/tests/baselines/reference/classWithStaticMembers.js +++ b/tests/baselines/reference/classWithStaticMembers.js @@ -21,11 +21,11 @@ var r3 = r.foo; //// [classWithStaticMembers.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classdecl.js b/tests/baselines/reference/classdecl.js index ef7490f572d20..97ccd8e1410b5 100644 --- a/tests/baselines/reference/classdecl.js +++ b/tests/baselines/reference/classdecl.js @@ -95,11 +95,11 @@ class e { //// [classdecl.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/clodulesDerivedClasses.js b/tests/baselines/reference/clodulesDerivedClasses.js index 3fd40d61762ca..a622261b685c3 100644 --- a/tests/baselines/reference/clodulesDerivedClasses.js +++ b/tests/baselines/reference/clodulesDerivedClasses.js @@ -24,11 +24,11 @@ module Path.Utils { //// [clodulesDerivedClasses.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js index 77025b6aa0c4b..5f7fc0cccdf8a 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js @@ -41,11 +41,11 @@ class c extends Foo { //// [collisionSuperAndLocalFunctionInAccessors.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.js index 02e88a6076181..d516c06ad1871 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.js +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.js @@ -26,11 +26,11 @@ class c extends Foo { //// [collisionSuperAndLocalFunctionInConstructor.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.js index 91f9f5617dfa3..1401411ad8ee4 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.js +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.js @@ -30,11 +30,11 @@ class c extends Foo { //// [collisionSuperAndLocalFunctionInMethod.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js index 520367125fe7a..99fe7e8dcef74 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js @@ -20,11 +20,11 @@ class b extends Foo { //// [collisionSuperAndLocalFunctionInProperty.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js b/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js index e77c21c058e17..3278f9bd3a835 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js +++ b/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js @@ -34,11 +34,11 @@ class c extends Foo { //// [collisionSuperAndLocalVarInAccessors.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js b/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js index 1a2f6b3580083..dcbf08024a953 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js +++ b/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js @@ -22,11 +22,11 @@ class c extends Foo { //// [collisionSuperAndLocalVarInConstructor.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js b/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js index 028ce3ae4a98f..541035dd43b92 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js +++ b/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js @@ -20,11 +20,11 @@ class c extends Foo { //// [collisionSuperAndLocalVarInMethod.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js b/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js index c8ed5fc9d8f4b..8371687ff3475 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js +++ b/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js @@ -19,11 +19,11 @@ class b extends Foo { //// [collisionSuperAndLocalVarInProperty.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndNameResolution.js b/tests/baselines/reference/collisionSuperAndNameResolution.js index 2c0316dc66b8c..165943ec132f5 100644 --- a/tests/baselines/reference/collisionSuperAndNameResolution.js +++ b/tests/baselines/reference/collisionSuperAndNameResolution.js @@ -13,11 +13,11 @@ class Foo extends base { //// [collisionSuperAndNameResolution.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndParameter.js b/tests/baselines/reference/collisionSuperAndParameter.js index ef86232c1f16c..e2771fadf1fa6 100644 --- a/tests/baselines/reference/collisionSuperAndParameter.js +++ b/tests/baselines/reference/collisionSuperAndParameter.js @@ -64,11 +64,11 @@ class Foo4 extends Foo { //// [collisionSuperAndParameter.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndParameter1.js b/tests/baselines/reference/collisionSuperAndParameter1.js index d70f7da34e873..818f15b3f1571 100644 --- a/tests/baselines/reference/collisionSuperAndParameter1.js +++ b/tests/baselines/reference/collisionSuperAndParameter1.js @@ -11,11 +11,11 @@ class Foo2 extends Foo { //// [collisionSuperAndParameter1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js b/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js index 919265f587efe..f905e5208662a 100644 --- a/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js +++ b/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js @@ -32,11 +32,11 @@ class b4 extends a { //// [collisionSuperAndPropertyNameAsConstuctorParameter.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js b/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js index f380d8dc4ba09..a5e68e4eaab45 100644 --- a/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js +++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js @@ -20,11 +20,11 @@ class b2 extends a { //// [collisionThisExpressionAndLocalVarWithSuperExperssion.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/commentsInheritance.js b/tests/baselines/reference/commentsInheritance.js index e7feed00b6af7..26150c60d1266 100644 --- a/tests/baselines/reference/commentsInheritance.js +++ b/tests/baselines/reference/commentsInheritance.js @@ -153,11 +153,11 @@ i2_i = i3_i; //// [commentsInheritance.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.js b/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.js index 15b82315972ad..39a53a241c943 100644 --- a/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.js +++ b/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.js @@ -196,11 +196,11 @@ var r8b7 = b6 !== a6; //// [comparisonOperatorWithIdenticalObjects.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js index 7b541b2c304e2..63bd4442479bc 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js @@ -170,11 +170,11 @@ var r8b7 = b7 !== a7; //// [comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js index 9cf6be1f116e4..05657e3ec5e01 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js @@ -170,11 +170,11 @@ var r8b7 = b7 !== a7; //// [comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js index f0fe513de271a..685fb769e996f 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js @@ -113,11 +113,11 @@ var r8b4 = b4 !== a4; //// [comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js index 4b31f7403e191..48d598efe262d 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js @@ -151,11 +151,11 @@ var r8b6 = b6 !== a6; //// [comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js index 06472bc1527d6..c5e512a735bcf 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js @@ -151,11 +151,11 @@ var r8b6 = b6 !== a6; //// [comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnCallSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnCallSignature.js index 91fa37507bf85..e93fc8c7b50a8 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnCallSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnCallSignature.js @@ -261,11 +261,11 @@ var r8b11 = b11 !== a11; //// [comparisonOperatorWithSubtypeObjectOnCallSignature.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnConstructorSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnConstructorSignature.js index 2eb5c7de9e8e1..a0e7b1a424e7a 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnConstructorSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnConstructorSignature.js @@ -223,11 +223,11 @@ var r8b9 = b9 !== a9; //// [comparisonOperatorWithSubtypeObjectOnConstructorSignature.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnIndexSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnIndexSignature.js index a5287dcb0af30..e8d706eb29088 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnIndexSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnIndexSignature.js @@ -109,11 +109,11 @@ var r8b1 = b4 !== a4; //// [comparisonOperatorWithSubtypeObjectOnIndexSignature.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js index c34ed06252f37..51e077113dd2a 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js @@ -166,11 +166,11 @@ var r8b6 = b6 !== a6; //// [comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js index 0056917d60d13..86c6fb86be295 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js @@ -166,11 +166,11 @@ var r8b6 = b6 !== a6; //// [comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.js index 73c2b62cd3a07..2cd9fc1bb290a 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.js @@ -80,11 +80,11 @@ var rh4 = b2 !== a2; //// [comparisonOperatorWithSubtypeObjectOnProperty.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/complexClassRelationships.js b/tests/baselines/reference/complexClassRelationships.js index bfbbbab2bc50a..8a865e2d0240f 100644 --- a/tests/baselines/reference/complexClassRelationships.js +++ b/tests/baselines/reference/complexClassRelationships.js @@ -49,11 +49,11 @@ class FooBase { //// [complexClassRelationships.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.js b/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.js index 187a4389261b2..5af6a97f7815a 100644 --- a/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.js +++ b/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.js @@ -7,11 +7,11 @@ class S18 extends S18 //// [complicatedGenericRecursiveBaseClassReference.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/compoundAssignmentLHSIsValue.js b/tests/baselines/reference/compoundAssignmentLHSIsValue.js index ec8610a11641f..064f2157c1ecc 100644 --- a/tests/baselines/reference/compoundAssignmentLHSIsValue.js +++ b/tests/baselines/reference/compoundAssignmentLHSIsValue.js @@ -125,11 +125,11 @@ foo() += value; //// [compoundAssignmentLHSIsValue.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js b/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js index c7060a5120ddb..bd152ea11ad75 100644 --- a/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js +++ b/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js @@ -87,11 +87,11 @@ foo() **= value; //// [compoundExponentiationAssignmentLHSIsValue.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames24_ES5.js b/tests/baselines/reference/computedPropertyNames24_ES5.js index 75c032d7f91f0..ab1d81e8fb0a8 100644 --- a/tests/baselines/reference/computedPropertyNames24_ES5.js +++ b/tests/baselines/reference/computedPropertyNames24_ES5.js @@ -10,11 +10,11 @@ class C extends Base { //// [computedPropertyNames24_ES5.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames25_ES5.js b/tests/baselines/reference/computedPropertyNames25_ES5.js index a300b687f53bf..6443c3cedb232 100644 --- a/tests/baselines/reference/computedPropertyNames25_ES5.js +++ b/tests/baselines/reference/computedPropertyNames25_ES5.js @@ -15,11 +15,11 @@ class C extends Base { //// [computedPropertyNames25_ES5.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames26_ES5.js b/tests/baselines/reference/computedPropertyNames26_ES5.js index 16566ec14e786..a34bcef3b3d5e 100644 --- a/tests/baselines/reference/computedPropertyNames26_ES5.js +++ b/tests/baselines/reference/computedPropertyNames26_ES5.js @@ -12,11 +12,11 @@ class C extends Base { //// [computedPropertyNames26_ES5.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames27_ES5.js b/tests/baselines/reference/computedPropertyNames27_ES5.js index a7d16a4d18ead..00d9c9f0f4341 100644 --- a/tests/baselines/reference/computedPropertyNames27_ES5.js +++ b/tests/baselines/reference/computedPropertyNames27_ES5.js @@ -7,11 +7,11 @@ class C extends Base { //// [computedPropertyNames27_ES5.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames28_ES5.js b/tests/baselines/reference/computedPropertyNames28_ES5.js index 5eb7b307b623f..c6e2c5d77320f 100644 --- a/tests/baselines/reference/computedPropertyNames28_ES5.js +++ b/tests/baselines/reference/computedPropertyNames28_ES5.js @@ -12,11 +12,11 @@ class C extends Base { //// [computedPropertyNames28_ES5.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames30_ES5.js b/tests/baselines/reference/computedPropertyNames30_ES5.js index 44b748a0af2fe..f029b9b865132 100644 --- a/tests/baselines/reference/computedPropertyNames30_ES5.js +++ b/tests/baselines/reference/computedPropertyNames30_ES5.js @@ -17,11 +17,11 @@ class C extends Base { //// [computedPropertyNames30_ES5.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames31_ES5.js b/tests/baselines/reference/computedPropertyNames31_ES5.js index 97f03e7192352..fd0db774e71d3 100644 --- a/tests/baselines/reference/computedPropertyNames31_ES5.js +++ b/tests/baselines/reference/computedPropertyNames31_ES5.js @@ -17,11 +17,11 @@ class C extends Base { //// [computedPropertyNames31_ES5.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames43_ES5.js b/tests/baselines/reference/computedPropertyNames43_ES5.js index 100258284ba0e..e49d4426cf7be 100644 --- a/tests/baselines/reference/computedPropertyNames43_ES5.js +++ b/tests/baselines/reference/computedPropertyNames43_ES5.js @@ -14,11 +14,11 @@ class D extends C { //// [computedPropertyNames43_ES5.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames44_ES5.js b/tests/baselines/reference/computedPropertyNames44_ES5.js index 6064411248d82..46029ee54759d 100644 --- a/tests/baselines/reference/computedPropertyNames44_ES5.js +++ b/tests/baselines/reference/computedPropertyNames44_ES5.js @@ -13,11 +13,11 @@ class D extends C { //// [computedPropertyNames44_ES5.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames45_ES5.js b/tests/baselines/reference/computedPropertyNames45_ES5.js index d3b6ccc755276..7108935ab9e9d 100644 --- a/tests/baselines/reference/computedPropertyNames45_ES5.js +++ b/tests/baselines/reference/computedPropertyNames45_ES5.js @@ -14,11 +14,11 @@ class D extends C { //// [computedPropertyNames45_ES5.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js b/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js index 609c81f173dd0..5c948261bb244 100644 --- a/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js +++ b/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js @@ -49,11 +49,11 @@ var result11: any = true ? 1 : 'string'; //// [conditionalOperatorWithIdenticalBCT.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js b/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js index df5c7aac44f01..01b0fe327fa62 100644 --- a/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js +++ b/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js @@ -25,11 +25,11 @@ var result61: (t: X) => number| string = true ? (m) => m.propertyX1 : (n) => n.p //// [conditionalOperatorWithoutIdenticalBCT.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constantOverloadFunction.js b/tests/baselines/reference/constantOverloadFunction.js index 70effecc4986a..e204db38c28d3 100644 --- a/tests/baselines/reference/constantOverloadFunction.js +++ b/tests/baselines/reference/constantOverloadFunction.js @@ -15,11 +15,11 @@ function foo(tagName: any): Base { //// [constantOverloadFunction.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js b/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js index 74e70d97bd94e..22ca8603ffb5d 100644 --- a/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js +++ b/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js @@ -16,11 +16,11 @@ function foo(tagName: any): Base { //// [constantOverloadFunctionNoSubtypeError.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js b/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js index 49f93e2497ecd..074cfa49b4763 100644 --- a/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js +++ b/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js @@ -21,11 +21,11 @@ class Container { //// [constraintCheckInGenericBaseTypeReference.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.js index e2a884c458972..53ba73b8ba924 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.js @@ -72,11 +72,11 @@ interface I extends A { //// [constructSignatureAssignabilityInInheritance2.js] // checking subtype relations for function types as it relates to contextual signature instantiation var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.js index 87392413b1b91..f6629487ff50f 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.js @@ -115,11 +115,11 @@ 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 || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance4.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance4.js index fb09253688dd7..3c20e2f96b57b 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance4.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance4.js @@ -62,11 +62,11 @@ interface I extends A { //// [constructSignatureAssignabilityInInheritance4.js] // checking subtype relations for function types as it relates to contextual signature instantiation var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.js index 6ad855c7d32fc..1d8efafc234d5 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.js @@ -52,11 +52,11 @@ interface I extends B { // checking subtype relations for function types as it relates to contextual signature instantiation // same as subtypingWithConstructSignatures2 just with an extra level of indirection in the inheritance chain var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.js index 5e768b4a41b6c..f6436b7d3e2de 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.js @@ -55,11 +55,11 @@ interface I9 extends A { // same as subtypingWithConstructSignatures4 but using class type parameters instead of generic signatures // all are errors var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructorArgs.js b/tests/baselines/reference/constructorArgs.js index 47c508cab0681..877cef3dd0a9e 100644 --- a/tests/baselines/reference/constructorArgs.js +++ b/tests/baselines/reference/constructorArgs.js @@ -17,11 +17,11 @@ class Sub extends Super { //// [constructorArgs.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType.js b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType.js index 633a7a155c5fa..27ed085a00943 100644 --- a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType.js +++ b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType.js @@ -21,11 +21,11 @@ class Derived2 extends Base { //// [constructorFunctionTypeIsAssignableToBaseType.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js index 07e11b5c681f1..56891defbe031 100644 --- a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js +++ b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js @@ -35,11 +35,11 @@ class Derived2 extends Base { //// [constructorFunctionTypeIsAssignableToBaseType2.js] // the constructor function itself does not need to be a subtype of the base type constructor function var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructorHasPrototypeProperty.js b/tests/baselines/reference/constructorHasPrototypeProperty.js index f2b90a571613b..dae4e0bab23d8 100644 --- a/tests/baselines/reference/constructorHasPrototypeProperty.js +++ b/tests/baselines/reference/constructorHasPrototypeProperty.js @@ -33,11 +33,11 @@ module Generic { //// [constructorHasPrototypeProperty.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructorOverloads2.js b/tests/baselines/reference/constructorOverloads2.js index 67df7fb4e228a..291ea54573393 100644 --- a/tests/baselines/reference/constructorOverloads2.js +++ b/tests/baselines/reference/constructorOverloads2.js @@ -27,11 +27,11 @@ f1.bar1(); //// [constructorOverloads2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructorOverloads3.js b/tests/baselines/reference/constructorOverloads3.js index 79b648e0cbbf1..8ba67658a08e5 100644 --- a/tests/baselines/reference/constructorOverloads3.js +++ b/tests/baselines/reference/constructorOverloads3.js @@ -24,11 +24,11 @@ f1.bar1(); //// [constructorOverloads3.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructorWithCapturedSuper.js b/tests/baselines/reference/constructorWithCapturedSuper.js index 2034ea11c4f94..503742de9fecc 100644 --- a/tests/baselines/reference/constructorWithCapturedSuper.js +++ b/tests/baselines/reference/constructorWithCapturedSuper.js @@ -54,11 +54,11 @@ class D extends A { //// [constructorWithCapturedSuper.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js index dbeed3de1fd0d..3193d69ed3ceb 100644 --- a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js +++ b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js @@ -282,11 +282,11 @@ TypeScriptAllInOne.Program.Main(); //// [constructorWithIncompleteTypeAnnotation.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/contextualTypingArrayOfLambdas.js b/tests/baselines/reference/contextualTypingArrayOfLambdas.js index 60cc6d9977154..4fda0eca21433 100644 --- a/tests/baselines/reference/contextualTypingArrayOfLambdas.js +++ b/tests/baselines/reference/contextualTypingArrayOfLambdas.js @@ -16,11 +16,11 @@ var xs = [(x: A) => { }, (x: B) => { }, (x: C) => { }]; //// [contextualTypingArrayOfLambdas.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/contextualTypingOfConditionalExpression.js b/tests/baselines/reference/contextualTypingOfConditionalExpression.js index 063ae781b6fc3..6e6ea60691c4d 100644 --- a/tests/baselines/reference/contextualTypingOfConditionalExpression.js +++ b/tests/baselines/reference/contextualTypingOfConditionalExpression.js @@ -16,11 +16,11 @@ var x2: (a: A) => void = true ? (a) => a.foo : (b) => b.foo; //// [contextualTypingOfConditionalExpression.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/contextualTypingOfConditionalExpression2.js b/tests/baselines/reference/contextualTypingOfConditionalExpression2.js index c2bf66b2973c5..0678ff5bf7421 100644 --- a/tests/baselines/reference/contextualTypingOfConditionalExpression2.js +++ b/tests/baselines/reference/contextualTypingOfConditionalExpression2.js @@ -14,11 +14,11 @@ var x2: (a: A) => void = true ? (a: C) => a.foo : (b: number) => { }; //// [contextualTypingOfConditionalExpression2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.js b/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.js index 8c6de85ca93c2..b71997f21fe34 100644 --- a/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.js +++ b/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.js @@ -12,11 +12,11 @@ var a: D = foo("hi", []); //// [crashInsourcePropertyIsRelatableToTargetProperty.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declFileClassExtendsNull.js b/tests/baselines/reference/declFileClassExtendsNull.js index b5d473c86ce76..d46ff63f62a7e 100644 --- a/tests/baselines/reference/declFileClassExtendsNull.js +++ b/tests/baselines/reference/declFileClassExtendsNull.js @@ -5,11 +5,11 @@ class ExtendsNull extends null { //// [declFileClassExtendsNull.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declFileForFunctionTypeAsTypeParameter.js b/tests/baselines/reference/declFileForFunctionTypeAsTypeParameter.js index 3262454f72db0..3d90e148d42e9 100644 --- a/tests/baselines/reference/declFileForFunctionTypeAsTypeParameter.js +++ b/tests/baselines/reference/declFileForFunctionTypeAsTypeParameter.js @@ -11,11 +11,11 @@ interface I extends X<() => number> { //// [declFileForFunctionTypeAsTypeParameter.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declFileGenericClassWithGenericExtendedClass.js b/tests/baselines/reference/declFileGenericClassWithGenericExtendedClass.js index 0333bf19d21c5..c2d7a1faf33e3 100644 --- a/tests/baselines/reference/declFileGenericClassWithGenericExtendedClass.js +++ b/tests/baselines/reference/declFileGenericClassWithGenericExtendedClass.js @@ -14,11 +14,11 @@ class Baz implements IBar { //// [declFileGenericClassWithGenericExtendedClass.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declFileGenericType.js b/tests/baselines/reference/declFileGenericType.js index 6946e840dbe84..8d7f16745c084 100644 --- a/tests/baselines/reference/declFileGenericType.js +++ b/tests/baselines/reference/declFileGenericType.js @@ -42,11 +42,11 @@ export var j = C.F6; //// [declFileGenericType.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declFileGenericType2.js b/tests/baselines/reference/declFileGenericType2.js index 1b9a79e95cb22..1c6f2002da21c 100644 --- a/tests/baselines/reference/declFileGenericType2.js +++ b/tests/baselines/reference/declFileGenericType2.js @@ -44,11 +44,11 @@ module templa.dom.mvc.composite { //// [declFileGenericType2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js b/tests/baselines/reference/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js index 5edd9c8c19d3a..da5177c89df40 100644 --- a/tests/baselines/reference/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js +++ b/tests/baselines/reference/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js @@ -22,11 +22,11 @@ module X.Y.base.Z { //// [declFileWithClassNameConflictingWithClassReferredByExtendsClause.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declFileWithExtendsClauseThatHasItsContainerNameConflict.js b/tests/baselines/reference/declFileWithExtendsClauseThatHasItsContainerNameConflict.js index 07809bc8dec1a..a396c81c27fac 100644 --- a/tests/baselines/reference/declFileWithExtendsClauseThatHasItsContainerNameConflict.js +++ b/tests/baselines/reference/declFileWithExtendsClauseThatHasItsContainerNameConflict.js @@ -20,11 +20,11 @@ module A.B.C { //// [declFileWithExtendsClauseThatHasItsContainerNameConflict.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declarationEmitExpressionInExtends.js b/tests/baselines/reference/declarationEmitExpressionInExtends.js index e3ebe2d0a4243..7a0fe6ed603e5 100644 --- a/tests/baselines/reference/declarationEmitExpressionInExtends.js +++ b/tests/baselines/reference/declarationEmitExpressionInExtends.js @@ -16,11 +16,11 @@ q.s; //// [declarationEmitExpressionInExtends.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declarationEmitExpressionInExtends2.js b/tests/baselines/reference/declarationEmitExpressionInExtends2.js index 284b0ca83cea1..1df6168f09b38 100644 --- a/tests/baselines/reference/declarationEmitExpressionInExtends2.js +++ b/tests/baselines/reference/declarationEmitExpressionInExtends2.js @@ -14,11 +14,11 @@ class MyClass extends getClass(2) { //// [declarationEmitExpressionInExtends2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declarationEmitExpressionInExtends3.js b/tests/baselines/reference/declarationEmitExpressionInExtends3.js index 41383d43d9e38..2a291f273dc32 100644 --- a/tests/baselines/reference/declarationEmitExpressionInExtends3.js +++ b/tests/baselines/reference/declarationEmitExpressionInExtends3.js @@ -46,11 +46,11 @@ export class MyClass4 extends getExportedClass(undefined)>>var __extends = (this && this.__extends) || (function () { ->>> var __extendStatics = Object.setPrototypeOf || +>>> 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]; }; >>> return function (d, b) { ->>> __extendStatics(d, b); +>>> extendStatics(d, b); >>> function __() { this.constructor = d; } >>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); >>> }; diff --git a/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js b/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js index 9c295b584adf6..51cca070d1fe4 100644 --- a/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js +++ b/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js @@ -35,11 +35,11 @@ class Derived4 extends Base2 { //// [derivedClassConstructorWithoutSuperCall.js] // derived class constructors must contain a super call var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.js b/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.js index bb9fcbc19523c..35dd1e197e28e 100644 --- a/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.js +++ b/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.js @@ -16,11 +16,11 @@ class Derived extends Base { //// [derivedClassFunctionOverridesBaseClassAccessor.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassIncludesInheritedMembers.js b/tests/baselines/reference/derivedClassIncludesInheritedMembers.js index 10cad78a322d1..03310fcfc4c6a 100644 --- a/tests/baselines/reference/derivedClassIncludesInheritedMembers.js +++ b/tests/baselines/reference/derivedClassIncludesInheritedMembers.js @@ -42,11 +42,11 @@ var r8 = d2[1]; //// [derivedClassIncludesInheritedMembers.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesIndexersWithAssignmentCompatibility.js b/tests/baselines/reference/derivedClassOverridesIndexersWithAssignmentCompatibility.js index 875270b57f382..36ad6580c1867 100644 --- a/tests/baselines/reference/derivedClassOverridesIndexersWithAssignmentCompatibility.js +++ b/tests/baselines/reference/derivedClassOverridesIndexersWithAssignmentCompatibility.js @@ -19,11 +19,11 @@ class Derived2 extends Base2 { //// [derivedClassOverridesIndexersWithAssignmentCompatibility.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesPrivateFunction1.js b/tests/baselines/reference/derivedClassOverridesPrivateFunction1.js index cd04b7ede3712..a7c35a96ac385 100644 --- a/tests/baselines/reference/derivedClassOverridesPrivateFunction1.js +++ b/tests/baselines/reference/derivedClassOverridesPrivateFunction1.js @@ -17,11 +17,11 @@ new DerivedClass(); //// [derivedClassOverridesPrivateFunction1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesPrivates.js b/tests/baselines/reference/derivedClassOverridesPrivates.js index 9dc81e9b5ade9..c14783c83377e 100644 --- a/tests/baselines/reference/derivedClassOverridesPrivates.js +++ b/tests/baselines/reference/derivedClassOverridesPrivates.js @@ -17,11 +17,11 @@ class Derived2 extends Base2 { //// [derivedClassOverridesPrivates.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers.js index 2ae532f0c84ee..9230a295f5bf4 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers.js @@ -38,11 +38,11 @@ class Derived extends Base { //// [derivedClassOverridesProtectedMembers.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js index 0f321c1824133..dc9059f956ee8 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js @@ -65,11 +65,11 @@ var r8 = d2[1]; //// [derivedClassOverridesProtectedMembers2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js index 014cea9753ea7..615bdcddcf052 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js @@ -73,11 +73,11 @@ class Derived10 extends Base { //// [derivedClassOverridesProtectedMembers3.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers4.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers4.js index 5e4804b5bacdb..8e90218b06398 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers4.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers4.js @@ -16,11 +16,11 @@ class Derived2 extends Derived1 { //// [derivedClassOverridesProtectedMembers4.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesPublicMembers.js b/tests/baselines/reference/derivedClassOverridesPublicMembers.js index 73d620ce2f55c..3bbd661c70496 100644 --- a/tests/baselines/reference/derivedClassOverridesPublicMembers.js +++ b/tests/baselines/reference/derivedClassOverridesPublicMembers.js @@ -64,11 +64,11 @@ var r8 = d2[1]; //// [derivedClassOverridesPublicMembers.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesWithoutSubtype.js b/tests/baselines/reference/derivedClassOverridesWithoutSubtype.js index 81fda59ae7844..b53c736b8573a 100644 --- a/tests/baselines/reference/derivedClassOverridesWithoutSubtype.js +++ b/tests/baselines/reference/derivedClassOverridesWithoutSubtype.js @@ -25,11 +25,11 @@ class Derived2 extends Base2 { //// [derivedClassOverridesWithoutSubtype.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassParameterProperties.js b/tests/baselines/reference/derivedClassParameterProperties.js index 26bf27bd023c4..c127b1993efd0 100644 --- a/tests/baselines/reference/derivedClassParameterProperties.js +++ b/tests/baselines/reference/derivedClassParameterProperties.js @@ -97,11 +97,11 @@ class Derived10 extends Base2 { //// [derivedClassParameterProperties.js] // ordering of super calls in derived constructors matters depending on other class contents var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js b/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js index 5c29ea9ed89fa..92ef489cd4c32 100644 --- a/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js +++ b/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js @@ -34,11 +34,11 @@ class Derived extends Base { //// [derivedClassSuperCallsInNonConstructorMembers.js] // error to use super calls outside a constructor var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js b/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js index bce8697a7e83b..787bdefc79ca3 100644 --- a/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js +++ b/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js @@ -30,11 +30,11 @@ class Derived4 extends Base { //// [derivedClassSuperCallsWithThisArg.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassTransitivity.js b/tests/baselines/reference/derivedClassTransitivity.js index 997d25693a698..2809d89935139 100644 --- a/tests/baselines/reference/derivedClassTransitivity.js +++ b/tests/baselines/reference/derivedClassTransitivity.js @@ -23,11 +23,11 @@ var r2 = e.foo(''); //// [derivedClassTransitivity.js] // subclassing is not transitive when you can remove required parameters and add optional parameters var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassTransitivity2.js b/tests/baselines/reference/derivedClassTransitivity2.js index c1304ad5242ec..8b69ea00102ca 100644 --- a/tests/baselines/reference/derivedClassTransitivity2.js +++ b/tests/baselines/reference/derivedClassTransitivity2.js @@ -23,11 +23,11 @@ var r2 = e.foo(1, ''); //// [derivedClassTransitivity2.js] // subclassing is not transitive when you can remove required parameters and add optional parameters var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassTransitivity3.js b/tests/baselines/reference/derivedClassTransitivity3.js index 264616cea7f00..98e4bdd4b43aa 100644 --- a/tests/baselines/reference/derivedClassTransitivity3.js +++ b/tests/baselines/reference/derivedClassTransitivity3.js @@ -23,11 +23,11 @@ var r2 = e.foo('', 1); //// [derivedClassTransitivity3.js] // subclassing is not transitive when you can remove required parameters and add optional parameters var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassTransitivity4.js b/tests/baselines/reference/derivedClassTransitivity4.js index 63a78e3d3b630..315d0322ed28a 100644 --- a/tests/baselines/reference/derivedClassTransitivity4.js +++ b/tests/baselines/reference/derivedClassTransitivity4.js @@ -23,11 +23,11 @@ var r2 = e.foo(''); //// [derivedClassTransitivity4.js] // subclassing is not transitive when you can remove required parameters and add optional parameters on protected members var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassWithAny.js b/tests/baselines/reference/derivedClassWithAny.js index 01d7c130f94ef..dd89a166cc106 100644 --- a/tests/baselines/reference/derivedClassWithAny.js +++ b/tests/baselines/reference/derivedClassWithAny.js @@ -61,11 +61,11 @@ var r = c.foo(); // e.foo would return string //// [derivedClassWithAny.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js index 1b8cca7a0a811..c38b9b3bd0073 100644 --- a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js +++ b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js @@ -24,11 +24,11 @@ class Derived extends Base { //// [derivedClassWithPrivateInstanceShadowingProtectedInstance.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js index e2ecad8be4b52..a50008d414206 100644 --- a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js +++ b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js @@ -34,11 +34,11 @@ Derived.a = 2; // error //// [derivedClassWithPrivateInstanceShadowingPublicInstance.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js index 26095ed66287e..1680b9178ff63 100644 --- a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js +++ b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js @@ -23,11 +23,11 @@ class Derived extends Base { //// [derivedClassWithPrivateStaticShadowingProtectedStatic.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js index f01edcc8a3ab9..2b65181cea968 100644 --- a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js +++ b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js @@ -35,11 +35,11 @@ Derived.a = 2; // error //// [derivedClassWithPrivateStaticShadowingPublicStatic.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js b/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js index d3ce1f3cdbfe1..ca746223e1be6 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js @@ -27,11 +27,11 @@ var d2 = new D(new Date()); // ok //// [derivedClassWithoutExplicitConstructor.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js b/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js index c15ac71c5735e..492682b67bcc0 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js @@ -35,11 +35,11 @@ var d4 = new D(new Date(), new Date(), new Date()); //// [derivedClassWithoutExplicitConstructor2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js b/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js index fe02d135c2413..cf4d5cadecc5e 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js @@ -49,11 +49,11 @@ var d3 = new D2(new Date(), new Date()); // ok //// [derivedClassWithoutExplicitConstructor3.js] // automatic constructors with a class hieararchy of depth > 2 var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClasses.js b/tests/baselines/reference/derivedClasses.js index f310c0e5fd214..3bb1f7793efdb 100644 --- a/tests/baselines/reference/derivedClasses.js +++ b/tests/baselines/reference/derivedClasses.js @@ -32,11 +32,11 @@ b.hue(); //// [derivedClasses.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedGenericClassWithAny.js b/tests/baselines/reference/derivedGenericClassWithAny.js index abd8954fe2258..bab2879b229a3 100644 --- a/tests/baselines/reference/derivedGenericClassWithAny.js +++ b/tests/baselines/reference/derivedGenericClassWithAny.js @@ -44,11 +44,11 @@ var r = c.foo(); // e.foo would return string //// [derivedGenericClassWithAny.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js b/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js index b32d0a79d6bbd..9d076ad63a7aa 100644 --- a/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js +++ b/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js @@ -19,11 +19,11 @@ class Derived extends Base { //// [derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js b/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js index b5ef2f8109943..faa148c65a5cc 100644 --- a/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js +++ b/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js @@ -22,11 +22,11 @@ var r: Base[] = [d1, d2]; //// [derivedTypeDoesNotRequireExtendsClause.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/destructuringParameterDeclaration5.js b/tests/baselines/reference/destructuringParameterDeclaration5.js index a00fc2489395e..d249952873591 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration5.js +++ b/tests/baselines/reference/destructuringParameterDeclaration5.js @@ -53,11 +53,11 @@ d3({ y: "world" }); //// [destructuringParameterDeclaration5.js] // Parameter Declaration with generic var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js b/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js index 325a15007c8b4..3a8bbdb0c739e 100644 --- a/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js +++ b/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js @@ -15,11 +15,11 @@ class B extends A { //// [emitSuperCallBeforeEmitParameterPropertyDeclaration1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js index 2d97d0a986510..d8145f6dc27f7 100644 --- a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js +++ b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js @@ -17,11 +17,11 @@ class B extends A { //// [emitSuperCallBeforeEmitPropertyDeclaration1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js index 63de121ed4d20..75c618d84dbb0 100644 --- a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js +++ b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js @@ -15,11 +15,11 @@ class B extends A { //// [emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/emitThisInSuperMethodCall.js b/tests/baselines/reference/emitThisInSuperMethodCall.js index 5488e3aa00571..16712fb82cf3b 100644 --- a/tests/baselines/reference/emitThisInSuperMethodCall.js +++ b/tests/baselines/reference/emitThisInSuperMethodCall.js @@ -29,11 +29,11 @@ class RegisteredUser extends User { //// [emitThisInSuperMethodCall.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/emptyModuleName.js b/tests/baselines/reference/emptyModuleName.js index 16493baae98b1..7a22f87cfb486 100644 --- a/tests/baselines/reference/emptyModuleName.js +++ b/tests/baselines/reference/emptyModuleName.js @@ -6,11 +6,11 @@ class B extends A { //// [emptyModuleName.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/errorForwardReferenceForwadingConstructor.js b/tests/baselines/reference/errorForwardReferenceForwadingConstructor.js index 98eb91ce417ce..c5403b4d68578 100644 --- a/tests/baselines/reference/errorForwardReferenceForwadingConstructor.js +++ b/tests/baselines/reference/errorForwardReferenceForwadingConstructor.js @@ -13,11 +13,11 @@ class derived extends base { } //// [errorForwardReferenceForwadingConstructor.js] // Error forward referencing derived class with forwarding constructor var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/errorSuperCalls.js b/tests/baselines/reference/errorSuperCalls.js index 6c7a1441b05fd..17a96d335f39c 100644 --- a/tests/baselines/reference/errorSuperCalls.js +++ b/tests/baselines/reference/errorSuperCalls.js @@ -76,11 +76,11 @@ class OtherDerived extends OtherBase { //// [errorSuperCalls.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/errorSuperPropertyAccess.js b/tests/baselines/reference/errorSuperPropertyAccess.js index 70d777644c60e..04ce626be322e 100644 --- a/tests/baselines/reference/errorSuperPropertyAccess.js +++ b/tests/baselines/reference/errorSuperPropertyAccess.js @@ -130,11 +130,11 @@ var obj = { n: super.wat, p: super.foo() }; //// [errorSuperPropertyAccess.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/errorsInGenericTypeReference.js b/tests/baselines/reference/errorsInGenericTypeReference.js index d7797d7e35048..49ddbe58dacd1 100644 --- a/tests/baselines/reference/errorsInGenericTypeReference.js +++ b/tests/baselines/reference/errorsInGenericTypeReference.js @@ -74,11 +74,11 @@ interface testInterface2 { //// [errorsInGenericTypeReference.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/es6ClassSuperCodegenBug.js b/tests/baselines/reference/es6ClassSuperCodegenBug.js index c958470d077b9..c909a68ccf765 100644 --- a/tests/baselines/reference/es6ClassSuperCodegenBug.js +++ b/tests/baselines/reference/es6ClassSuperCodegenBug.js @@ -16,11 +16,11 @@ class B extends A { //// [es6ClassSuperCodegenBug.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/es6ClassTest.js b/tests/baselines/reference/es6ClassTest.js index 6834e6139aa24..9d66d2d8dc801 100644 --- a/tests/baselines/reference/es6ClassTest.js +++ b/tests/baselines/reference/es6ClassTest.js @@ -86,11 +86,11 @@ declare module AmbientMod { //// [es6ClassTest.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/es6ClassTest2.js b/tests/baselines/reference/es6ClassTest2.js index c456f270d6ed9..5133757348be2 100644 --- a/tests/baselines/reference/es6ClassTest2.js +++ b/tests/baselines/reference/es6ClassTest2.js @@ -160,11 +160,11 @@ var ccwc = new ChildClassWithoutConstructor(1, "s"); //// [es6ClassTest2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/es6ClassTest7.js b/tests/baselines/reference/es6ClassTest7.js index 899ac4100eb66..48937285684b7 100644 --- a/tests/baselines/reference/es6ClassTest7.js +++ b/tests/baselines/reference/es6ClassTest7.js @@ -10,11 +10,11 @@ class Bar extends M.Foo { //// [es6ClassTest7.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/exportAssignmentOfGenericType1.js b/tests/baselines/reference/exportAssignmentOfGenericType1.js index 4be64d6774588..f9ffa44e82cd5 100644 --- a/tests/baselines/reference/exportAssignmentOfGenericType1.js +++ b/tests/baselines/reference/exportAssignmentOfGenericType1.js @@ -25,11 +25,11 @@ define(["require", "exports"], function (require, exports) { }); //// [exportAssignmentOfGenericType1_1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/exportDeclarationInInternalModule.js b/tests/baselines/reference/exportDeclarationInInternalModule.js index c9c593606217a..c1827d0df9e7e 100644 --- a/tests/baselines/reference/exportDeclarationInInternalModule.js +++ b/tests/baselines/reference/exportDeclarationInInternalModule.js @@ -20,11 +20,11 @@ var a: Bbb.SomeType; //// [exportDeclarationInInternalModule.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extBaseClass1.js b/tests/baselines/reference/extBaseClass1.js index c05c43c1d27db..3424f39bd168f 100644 --- a/tests/baselines/reference/extBaseClass1.js +++ b/tests/baselines/reference/extBaseClass1.js @@ -21,11 +21,11 @@ module N { //// [extBaseClass1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extBaseClass2.js b/tests/baselines/reference/extBaseClass2.js index d55b201a72894..ffc3249d7bf7f 100644 --- a/tests/baselines/reference/extBaseClass2.js +++ b/tests/baselines/reference/extBaseClass2.js @@ -12,11 +12,11 @@ module M { //// [extBaseClass2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendAndImplementTheSameBaseType.js b/tests/baselines/reference/extendAndImplementTheSameBaseType.js index 1a6900949257e..ed5232d88c993 100644 --- a/tests/baselines/reference/extendAndImplementTheSameBaseType.js +++ b/tests/baselines/reference/extendAndImplementTheSameBaseType.js @@ -15,11 +15,11 @@ d.foo; //// [extendAndImplementTheSameBaseType.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendAndImplementTheSameBaseType2.js b/tests/baselines/reference/extendAndImplementTheSameBaseType2.js index d262bcae95fe9..e9f37d718ff52 100644 --- a/tests/baselines/reference/extendAndImplementTheSameBaseType2.js +++ b/tests/baselines/reference/extendAndImplementTheSameBaseType2.js @@ -18,11 +18,11 @@ var r4: number = d.bar(); //// [extendAndImplementTheSameBaseType2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendBaseClassBeforeItsDeclared.js b/tests/baselines/reference/extendBaseClassBeforeItsDeclared.js index 25be2160ecb4d..3a755b0e6f616 100644 --- a/tests/baselines/reference/extendBaseClassBeforeItsDeclared.js +++ b/tests/baselines/reference/extendBaseClassBeforeItsDeclared.js @@ -5,11 +5,11 @@ class base { constructor (public n: number) { } } //// [extendBaseClassBeforeItsDeclared.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendClassExpressionFromModule.js b/tests/baselines/reference/extendClassExpressionFromModule.js index 746379cc73c37..6e6943d5766bb 100644 --- a/tests/baselines/reference/extendClassExpressionFromModule.js +++ b/tests/baselines/reference/extendClassExpressionFromModule.js @@ -22,11 +22,11 @@ module.exports = x; //// [foo2.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendConstructSignatureInInterface.js b/tests/baselines/reference/extendConstructSignatureInInterface.js index d8562243c6688..30c1151c33250 100644 --- a/tests/baselines/reference/extendConstructSignatureInInterface.js +++ b/tests/baselines/reference/extendConstructSignatureInInterface.js @@ -12,11 +12,11 @@ var e: E = new E(1); //// [extendConstructSignatureInInterface.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendNonClassSymbol1.js b/tests/baselines/reference/extendNonClassSymbol1.js index ac2f6c7ff9374..066d19560b60a 100644 --- a/tests/baselines/reference/extendNonClassSymbol1.js +++ b/tests/baselines/reference/extendNonClassSymbol1.js @@ -5,11 +5,11 @@ class C extends x { } // error, could not find symbol xs //// [extendNonClassSymbol1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendNonClassSymbol2.js b/tests/baselines/reference/extendNonClassSymbol2.js index 5b8800a553d59..b82c3e2233bac 100644 --- a/tests/baselines/reference/extendNonClassSymbol2.js +++ b/tests/baselines/reference/extendNonClassSymbol2.js @@ -7,11 +7,11 @@ class C extends Foo {} // error, could not find symbol Foo //// [extendNonClassSymbol2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendPrivateConstructorClass.js b/tests/baselines/reference/extendPrivateConstructorClass.js index 96b1bf985388b..21968a3c47b15 100644 --- a/tests/baselines/reference/extendPrivateConstructorClass.js +++ b/tests/baselines/reference/extendPrivateConstructorClass.js @@ -11,11 +11,11 @@ class C extends abc.XYZ { //// [extendPrivateConstructorClass.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js b/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js index 5e5f09622ee45..b689e9b2640f2 100644 --- a/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js +++ b/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js @@ -43,11 +43,11 @@ exports.Model = Model; //// [extendingClassFromAliasAndUsageInIndexer_moduleA.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -64,11 +64,11 @@ exports.VisualizationModel = VisualizationModel; //// [extendingClassFromAliasAndUsageInIndexer_moduleB.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendsClauseAlreadySeen.js b/tests/baselines/reference/extendsClauseAlreadySeen.js index cf06895cb8688..ec727e6b7575f 100644 --- a/tests/baselines/reference/extendsClauseAlreadySeen.js +++ b/tests/baselines/reference/extendsClauseAlreadySeen.js @@ -8,11 +8,11 @@ class D extends C extends C { //// [extendsClauseAlreadySeen.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendsClauseAlreadySeen2.js b/tests/baselines/reference/extendsClauseAlreadySeen2.js index 3dd977b657a28..7b960bb97ebc5 100644 --- a/tests/baselines/reference/extendsClauseAlreadySeen2.js +++ b/tests/baselines/reference/extendsClauseAlreadySeen2.js @@ -8,11 +8,11 @@ class D extends C extends C { //// [extendsClauseAlreadySeen2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/fluentClasses.js b/tests/baselines/reference/fluentClasses.js index 34e8b10d70cf8..ae117674a8193 100644 --- a/tests/baselines/reference/fluentClasses.js +++ b/tests/baselines/reference/fluentClasses.js @@ -20,11 +20,11 @@ var z = c.foo().bar().baz(); // Fluent pattern //// [fluentClasses.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/for-inStatements.js b/tests/baselines/reference/for-inStatements.js index b57d6383d9665..44e7cf24bf4a4 100644 --- a/tests/baselines/reference/for-inStatements.js +++ b/tests/baselines/reference/for-inStatements.js @@ -82,11 +82,11 @@ for (var x in Color.Blue) { } //// [for-inStatements.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/for-inStatementsInvalid.js b/tests/baselines/reference/for-inStatementsInvalid.js index 4670bf17807b9..437e3fb9aef44 100644 --- a/tests/baselines/reference/for-inStatementsInvalid.js +++ b/tests/baselines/reference/for-inStatementsInvalid.js @@ -65,11 +65,11 @@ for (var x in i[42]) { } //// [for-inStatementsInvalid.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/forStatementsMultipleInvalidDecl.js b/tests/baselines/reference/forStatementsMultipleInvalidDecl.js index 5f40059174154..ea3bee7b12b91 100644 --- a/tests/baselines/reference/forStatementsMultipleInvalidDecl.js +++ b/tests/baselines/reference/forStatementsMultipleInvalidDecl.js @@ -56,11 +56,11 @@ for( var m = M.A;;){} //// [forStatementsMultipleInvalidDecl.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/functionImplementationErrors.js b/tests/baselines/reference/functionImplementationErrors.js index 67f13db465e89..4a64145181519 100644 --- a/tests/baselines/reference/functionImplementationErrors.js +++ b/tests/baselines/reference/functionImplementationErrors.js @@ -76,11 +76,11 @@ var f13 = () => { //// [functionImplementationErrors.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/functionImplementations.js b/tests/baselines/reference/functionImplementations.js index 9fd603f16d314..26468d8af8095 100644 --- a/tests/baselines/reference/functionImplementations.js +++ b/tests/baselines/reference/functionImplementations.js @@ -159,11 +159,11 @@ var f12: (x: number) => any = x => { // should be (x: number) => Base | AnotherC //// [functionImplementations.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/functionSubtypingOfVarArgs.js b/tests/baselines/reference/functionSubtypingOfVarArgs.js index f7365781a2cfe..83b889fa22bbb 100644 --- a/tests/baselines/reference/functionSubtypingOfVarArgs.js +++ b/tests/baselines/reference/functionSubtypingOfVarArgs.js @@ -16,11 +16,11 @@ class StringEvent extends EventBase { // should work //// [functionSubtypingOfVarArgs.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/functionSubtypingOfVarArgs2.js b/tests/baselines/reference/functionSubtypingOfVarArgs2.js index 6f534e64e883c..bc49c602acb70 100644 --- a/tests/baselines/reference/functionSubtypingOfVarArgs2.js +++ b/tests/baselines/reference/functionSubtypingOfVarArgs2.js @@ -16,11 +16,11 @@ class StringEvent extends EventBase { //// [functionSubtypingOfVarArgs2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/generatedContextualTyping.js b/tests/baselines/reference/generatedContextualTyping.js index 43aa5dd6e9a98..782f3e985a16a 100644 --- a/tests/baselines/reference/generatedContextualTyping.js +++ b/tests/baselines/reference/generatedContextualTyping.js @@ -357,11 +357,11 @@ var x356 = function(n: Genric) { }; x356({ func: n => { return [d1, d2]; } //// [generatedContextualTyping.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericBaseClassLiteralProperty.js b/tests/baselines/reference/genericBaseClassLiteralProperty.js index 73f5cb87bed60..35c31bb667755 100644 --- a/tests/baselines/reference/genericBaseClassLiteralProperty.js +++ b/tests/baselines/reference/genericBaseClassLiteralProperty.js @@ -14,11 +14,11 @@ class SubClass extends BaseClass { //// [genericBaseClassLiteralProperty.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericBaseClassLiteralProperty2.js b/tests/baselines/reference/genericBaseClassLiteralProperty2.js index fb4f51749cde1..8e91f9e228d22 100644 --- a/tests/baselines/reference/genericBaseClassLiteralProperty2.js +++ b/tests/baselines/reference/genericBaseClassLiteralProperty2.js @@ -17,11 +17,11 @@ class DataView2 extends BaseCollection2 { //// [genericBaseClassLiteralProperty2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.js b/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.js index d625797ea535e..d7564d3e0523c 100644 --- a/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.js +++ b/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.js @@ -110,11 +110,11 @@ var r11 = i.foo8(); // Base //// [genericCallWithConstraintsTypeArgumentInference.js] // Basic type inference with generic calls and constraints, no errors expected var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgs2.js b/tests/baselines/reference/genericCallWithObjectTypeArgs2.js index ae844d043e652..28c0fbcec7ed2 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgs2.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgs2.js @@ -34,11 +34,11 @@ var r4 = f2(i); // Base => Derived //// [genericCallWithObjectTypeArgs2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js index e3d80ebd572ba..32e7bc1e74cf1 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js @@ -42,11 +42,11 @@ var r7 = f3(null, x => x); // any // Generic call with constraints infering type parameter from object member properties // No errors expected var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js index 387c4526764bd..f54727317e5aa 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js @@ -40,11 +40,11 @@ var r6 = f3(x => x, null); //// [genericCallWithObjectTypeArgsAndConstraints3.js] // Generic call with constraints infering type parameter from object member properties var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericCallbacksAndClassHierarchy.js b/tests/baselines/reference/genericCallbacksAndClassHierarchy.js index d4d86fe57931a..cba1152fb0298 100644 --- a/tests/baselines/reference/genericCallbacksAndClassHierarchy.js +++ b/tests/baselines/reference/genericCallbacksAndClassHierarchy.js @@ -25,11 +25,11 @@ module M { //// [genericCallbacksAndClassHierarchy.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericClassExpressionInFunction.js b/tests/baselines/reference/genericClassExpressionInFunction.js index 152237d458ddb..4125232241495 100644 --- a/tests/baselines/reference/genericClassExpressionInFunction.js +++ b/tests/baselines/reference/genericClassExpressionInFunction.js @@ -33,11 +33,11 @@ s.genericVar = 12; //// [genericClassExpressionInFunction.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericClassInheritsConstructorFromNonGenericClass.js b/tests/baselines/reference/genericClassInheritsConstructorFromNonGenericClass.js index aa3e06cf57e92..d91a43805e30a 100644 --- a/tests/baselines/reference/genericClassInheritsConstructorFromNonGenericClass.js +++ b/tests/baselines/reference/genericClassInheritsConstructorFromNonGenericClass.js @@ -7,11 +7,11 @@ class C { //// [genericClassInheritsConstructorFromNonGenericClass.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js b/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js index 4efb95cdebaf9..b5c8f47bfd4b2 100644 --- a/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js +++ b/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js @@ -77,11 +77,11 @@ class ViewModel implements Contract { //// [genericClassPropertyInheritanceSpecialization.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericClassStaticMethod.js b/tests/baselines/reference/genericClassStaticMethod.js index 32b29319c1215..ea236e402034d 100644 --- a/tests/baselines/reference/genericClassStaticMethod.js +++ b/tests/baselines/reference/genericClassStaticMethod.js @@ -12,11 +12,11 @@ class Bar extends Foo { //// [genericClassStaticMethod.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericClasses3.js b/tests/baselines/reference/genericClasses3.js index a8a3db2f3a048..94c22c1241f4f 100644 --- a/tests/baselines/reference/genericClasses3.js +++ b/tests/baselines/reference/genericClasses3.js @@ -19,11 +19,11 @@ var z = v2.b; //// [genericClasses3.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js index 97bc5d27ee0d3..c66279ec8734e 100644 --- a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js +++ b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js @@ -28,11 +28,11 @@ module EndGate.Tweening { //// [genericConstraintOnExtendedBuiltinTypes.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js index 66df407444199..af5f46c3c57cc 100644 --- a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js +++ b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js @@ -27,11 +27,11 @@ module EndGate.Tweening { //// [genericConstraintOnExtendedBuiltinTypes2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.js b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.js index edd74ea92e481..1e231a172c3b1 100644 --- a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.js +++ b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.js @@ -14,11 +14,11 @@ x = y; // error //// [genericDerivedTypeWithSpecializedBase.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.js b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.js index 9fb286b1c400c..2438206cbf29a 100644 --- a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.js +++ b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.js @@ -14,11 +14,11 @@ x = y; // error //// [genericDerivedTypeWithSpecializedBase2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericInheritedDefaultConstructors.js b/tests/baselines/reference/genericInheritedDefaultConstructors.js index 7ed0c8179dd82..6d4112fb6666c 100644 --- a/tests/baselines/reference/genericInheritedDefaultConstructors.js +++ b/tests/baselines/reference/genericInheritedDefaultConstructors.js @@ -12,11 +12,11 @@ var c:Constructor> = B; // shouldn't error here //// [genericInheritedDefaultConstructors.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericPrototypeProperty2.js b/tests/baselines/reference/genericPrototypeProperty2.js index 73a64a657636e..dd494b1bdcdac 100644 --- a/tests/baselines/reference/genericPrototypeProperty2.js +++ b/tests/baselines/reference/genericPrototypeProperty2.js @@ -17,11 +17,11 @@ class MyEventWrapper extends BaseEventWrapper { //// [genericPrototypeProperty2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericPrototypeProperty3.js b/tests/baselines/reference/genericPrototypeProperty3.js index 48e8b367486aa..45e39d173a19d 100644 --- a/tests/baselines/reference/genericPrototypeProperty3.js +++ b/tests/baselines/reference/genericPrototypeProperty3.js @@ -16,11 +16,11 @@ class MyEventWrapper extends BaseEventWrapper { //// [genericPrototypeProperty3.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js index a9ea14337f4f2..558f6034b1671 100644 --- a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js +++ b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js @@ -28,11 +28,11 @@ module TypeScript2 { //// [genericRecursiveImplicitConstructorErrors2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js index 60d214a191467..bea6d81dbaaec 100644 --- a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js +++ b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js @@ -32,11 +32,11 @@ module TypeScript { //// [genericRecursiveImplicitConstructorErrors3.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericTypeAssertions2.js b/tests/baselines/reference/genericTypeAssertions2.js index 416317ea9f60a..bcdaaa3958b37 100644 --- a/tests/baselines/reference/genericTypeAssertions2.js +++ b/tests/baselines/reference/genericTypeAssertions2.js @@ -15,11 +15,11 @@ var r5: A = >[]; // error //// [genericTypeAssertions2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericTypeAssertions4.js b/tests/baselines/reference/genericTypeAssertions4.js index a857ae3ef8d86..a2a7548bb6325 100644 --- a/tests/baselines/reference/genericTypeAssertions4.js +++ b/tests/baselines/reference/genericTypeAssertions4.js @@ -27,11 +27,11 @@ function foo2(x: T) { //// [genericTypeAssertions4.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericTypeAssertions6.js b/tests/baselines/reference/genericTypeAssertions6.js index 8e69ccdbbc33f..cdeb709fdfbc8 100644 --- a/tests/baselines/reference/genericTypeAssertions6.js +++ b/tests/baselines/reference/genericTypeAssertions6.js @@ -26,11 +26,11 @@ var c: A = >b; //// [genericTypeAssertions6.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericTypeConstraints.js b/tests/baselines/reference/genericTypeConstraints.js index 48baec0e6f6af..cbb03b683a82a 100644 --- a/tests/baselines/reference/genericTypeConstraints.js +++ b/tests/baselines/reference/genericTypeConstraints.js @@ -15,11 +15,11 @@ class BarExtended extends Bar { //// [genericTypeConstraints.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js index d123ce1bd2e5c..8704103d530d1 100644 --- a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js +++ b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js @@ -41,11 +41,11 @@ var k = null; // it is an error to use a generic type without type arguments // all of these are errors var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js index e03295d50864b..75317fe0c8175 100644 --- a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js +++ b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js @@ -41,11 +41,11 @@ var k = null; // it is an error to use a generic type without type arguments // all of these are errors var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js b/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js index 25f443c9bf49f..f91d9b5d6cf25 100644 --- a/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js +++ b/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js @@ -16,11 +16,11 @@ export class ListItem extends CollectionItem { //// [genericWithIndexerOfTypeParameterType2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/heterogeneousArrayLiterals.js b/tests/baselines/reference/heterogeneousArrayLiterals.js index 828a2894ed0f0..e15125ed70e17 100644 --- a/tests/baselines/reference/heterogeneousArrayLiterals.js +++ b/tests/baselines/reference/heterogeneousArrayLiterals.js @@ -134,11 +134,11 @@ function foo4(t: T, u: U) { //// [heterogeneousArrayLiterals.js] // type of an array is the best common type of its elements (plus its contextual type if it exists) var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/ifDoWhileStatements.js b/tests/baselines/reference/ifDoWhileStatements.js index 527e241c35ca9..83e4017743450 100644 --- a/tests/baselines/reference/ifDoWhileStatements.js +++ b/tests/baselines/reference/ifDoWhileStatements.js @@ -165,11 +165,11 @@ do { }while(fn) //// [ifDoWhileStatements.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/illegalSuperCallsInConstructor.js b/tests/baselines/reference/illegalSuperCallsInConstructor.js index 37fa76388f01d..7e138dbf4a10c 100644 --- a/tests/baselines/reference/illegalSuperCallsInConstructor.js +++ b/tests/baselines/reference/illegalSuperCallsInConstructor.js @@ -22,11 +22,11 @@ class Derived extends Base { //// [illegalSuperCallsInConstructor.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/implementClausePrecedingExtends.js b/tests/baselines/reference/implementClausePrecedingExtends.js index 916bbaebf7a29..20a95fbcdc8fe 100644 --- a/tests/baselines/reference/implementClausePrecedingExtends.js +++ b/tests/baselines/reference/implementClausePrecedingExtends.js @@ -4,11 +4,11 @@ class D implements C extends C { } //// [implementClausePrecedingExtends.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.js b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.js index e6831db5f9cc3..07819ad752c70 100644 --- a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.js +++ b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.js @@ -87,11 +87,11 @@ module M2 { //// [implementingAnInterfaceExtendingClassWithPrivates2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.js b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.js index 4e2dc2514d291..d79ae31ac25f9 100644 --- a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.js +++ b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.js @@ -43,11 +43,11 @@ class Bar8 extends Foo implements I { //// [implementingAnInterfaceExtendingClassWithProtecteds.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/importAsBaseClass.js b/tests/baselines/reference/importAsBaseClass.js index 9f2461ebd42d3..290e331b3f108 100644 --- a/tests/baselines/reference/importAsBaseClass.js +++ b/tests/baselines/reference/importAsBaseClass.js @@ -22,11 +22,11 @@ exports.Greeter = Greeter; //// [importAsBaseClass_1.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/importHelpers.js b/tests/baselines/reference/importHelpers.js index 7a28d8087103e..f5214bcceb87e 100644 --- a/tests/baselines/reference/importHelpers.js +++ b/tests/baselines/reference/importHelpers.js @@ -69,11 +69,11 @@ C = tslib_1.__decorate([ ], C); //// [script.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/importHelpersNoHelpers.js b/tests/baselines/reference/importHelpersNoHelpers.js index 7fc3f22e1e22e..0e87f20cb790f 100644 --- a/tests/baselines/reference/importHelpersNoHelpers.js +++ b/tests/baselines/reference/importHelpersNoHelpers.js @@ -71,11 +71,11 @@ var y = tslib_1.__assign({}, o); var x = tslib_1.__rest(y, []); //// [script.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/importHelpersNoModule.js b/tests/baselines/reference/importHelpersNoModule.js index 820913a0f944c..b7944b45867e1 100644 --- a/tests/baselines/reference/importHelpersNoModule.js +++ b/tests/baselines/reference/importHelpersNoModule.js @@ -61,11 +61,11 @@ C = tslib_1.__decorate([ ], C); //// [script.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/importShadowsGlobalName.js b/tests/baselines/reference/importShadowsGlobalName.js index 0c6a299ee5a90..cb3f037832859 100644 --- a/tests/baselines/reference/importShadowsGlobalName.js +++ b/tests/baselines/reference/importShadowsGlobalName.js @@ -22,11 +22,11 @@ define(["require", "exports"], function (require, exports) { }); //// [Bar.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/importUsedInExtendsList1.js b/tests/baselines/reference/importUsedInExtendsList1.js index 25c82b8cb7bb0..c19e5be7e13fe 100644 --- a/tests/baselines/reference/importUsedInExtendsList1.js +++ b/tests/baselines/reference/importUsedInExtendsList1.js @@ -22,11 +22,11 @@ exports.Super = Super; //// [importUsedInExtendsList1_1.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/indexerConstraints2.js b/tests/baselines/reference/indexerConstraints2.js index 8a9b10c34c72b..2dfc6d69e0653 100644 --- a/tests/baselines/reference/indexerConstraints2.js +++ b/tests/baselines/reference/indexerConstraints2.js @@ -30,11 +30,11 @@ class K extends J { //// [indexerConstraints2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/indirectSelfReference.js b/tests/baselines/reference/indirectSelfReference.js index dbf484907e725..d912f07c145c2 100644 --- a/tests/baselines/reference/indirectSelfReference.js +++ b/tests/baselines/reference/indirectSelfReference.js @@ -4,11 +4,11 @@ class b extends a{ } //// [indirectSelfReference.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/indirectSelfReferenceGeneric.js b/tests/baselines/reference/indirectSelfReferenceGeneric.js index 6c73f2fa095c1..7c362a384aafc 100644 --- a/tests/baselines/reference/indirectSelfReferenceGeneric.js +++ b/tests/baselines/reference/indirectSelfReferenceGeneric.js @@ -4,11 +4,11 @@ class b extends a { } //// [indirectSelfReferenceGeneric.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/infinitelyExpandingTypesNonGenericBase.js b/tests/baselines/reference/infinitelyExpandingTypesNonGenericBase.js index 7fb9d28679104..4589d2d967182 100644 --- a/tests/baselines/reference/infinitelyExpandingTypesNonGenericBase.js +++ b/tests/baselines/reference/infinitelyExpandingTypesNonGenericBase.js @@ -26,11 +26,11 @@ o(A); //// [infinitelyExpandingTypesNonGenericBase.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritFromGenericTypeParameter.js b/tests/baselines/reference/inheritFromGenericTypeParameter.js index aadf2edb3141a..4e58f0b490d99 100644 --- a/tests/baselines/reference/inheritFromGenericTypeParameter.js +++ b/tests/baselines/reference/inheritFromGenericTypeParameter.js @@ -4,11 +4,11 @@ interface I extends T { } //// [inheritFromGenericTypeParameter.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritSameNamePrivatePropertiesFromSameOrigin.js b/tests/baselines/reference/inheritSameNamePrivatePropertiesFromSameOrigin.js index 81717bfec0580..15cdaba7d01d3 100644 --- a/tests/baselines/reference/inheritSameNamePrivatePropertiesFromSameOrigin.js +++ b/tests/baselines/reference/inheritSameNamePrivatePropertiesFromSameOrigin.js @@ -12,11 +12,11 @@ interface A extends C, C2 { // ok //// [inheritSameNamePrivatePropertiesFromSameOrigin.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritance.js b/tests/baselines/reference/inheritance.js index b619542312826..72fa6c80a811c 100644 --- a/tests/baselines/reference/inheritance.js +++ b/tests/baselines/reference/inheritance.js @@ -36,11 +36,11 @@ class Baad extends Good { //// [inheritance.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritance1.js b/tests/baselines/reference/inheritance1.js index 6f1e76e89257a..b3d87d0452fa4 100644 --- a/tests/baselines/reference/inheritance1.js +++ b/tests/baselines/reference/inheritance1.js @@ -63,11 +63,11 @@ l1 = c; //// [inheritance1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js index 3a79d28b51e8d..5c1568663dc4f 100644 --- a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js +++ b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js @@ -12,11 +12,11 @@ class C extends B { //// [inheritanceGrandParentPrivateMemberCollision.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js index 6b49c0fb9b564..f35305b2bcccf 100644 --- a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js +++ b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js @@ -12,11 +12,11 @@ class C extends B { //// [inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js b/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js index f801c6cdd0d4f..8a6de50ee60be 100644 --- a/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js +++ b/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js @@ -12,11 +12,11 @@ class C extends B { //// [inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js b/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js index b85a1f7d99e28..be1cecd939d2c 100644 --- a/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js @@ -19,11 +19,11 @@ class b extends a { //// [inheritanceMemberAccessorOverridingAccessor.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.js b/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.js index ac0b0376749c0..76829925c62f4 100644 --- a/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.js +++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.js @@ -16,11 +16,11 @@ class b extends a { //// [inheritanceMemberAccessorOverridingMethod.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js b/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js index eaae0a3c126f4..fff0dd7b83271 100644 --- a/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js +++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js @@ -14,11 +14,11 @@ class b extends a { //// [inheritanceMemberAccessorOverridingProperty.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js b/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js index 8ed9f07dbb689..085b3966541b7 100644 --- a/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js @@ -16,11 +16,11 @@ class b extends a { //// [inheritanceMemberFuncOverridingAccessor.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.js b/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.js index a05acd4752f7c..fc405638f0fe2 100644 --- a/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.js +++ b/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.js @@ -13,11 +13,11 @@ class b extends a { //// [inheritanceMemberFuncOverridingMethod.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.js b/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.js index 1b27447d3dc37..94ea69a7fba6c 100644 --- a/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.js +++ b/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.js @@ -11,11 +11,11 @@ class b extends a { //// [inheritanceMemberFuncOverridingProperty.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js b/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js index c18e12d38cb49..866323cd2044c 100644 --- a/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js @@ -15,11 +15,11 @@ class b extends a { //// [inheritanceMemberPropertyOverridingAccessor.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.js b/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.js index e9b333ddee102..fe8c045724041 100644 --- a/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.js +++ b/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.js @@ -11,11 +11,11 @@ class b extends a { //// [inheritanceMemberPropertyOverridingMethod.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberPropertyOverridingProperty.js b/tests/baselines/reference/inheritanceMemberPropertyOverridingProperty.js index 0ccfa544a7c0b..e431d295d015c 100644 --- a/tests/baselines/reference/inheritanceMemberPropertyOverridingProperty.js +++ b/tests/baselines/reference/inheritanceMemberPropertyOverridingProperty.js @@ -9,11 +9,11 @@ class b extends a { //// [inheritanceMemberPropertyOverridingProperty.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js b/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js index c150ef6434d5b..1e1a7c69a08a9 100644 --- a/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js +++ b/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js @@ -9,11 +9,11 @@ var b3 = new B(); // error, could not select overload for 'new' expression //// [inheritanceOfGenericConstructorMethod1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js b/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js index 8753fbe9b463e..01370a3183c61 100644 --- a/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js +++ b/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js @@ -16,11 +16,11 @@ var n3 = new N.D2(); // no error, D2 //// [inheritanceOfGenericConstructorMethod2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js b/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js index 3abc4b6d453f4..bff113f80e3b7 100644 --- a/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js @@ -19,11 +19,11 @@ class b extends a { //// [inheritanceStaticAccessorOverridingAccessor.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js b/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js index 8215f4fdf0e3c..773f97c2bc981 100644 --- a/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js +++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js @@ -16,11 +16,11 @@ class b extends a { //// [inheritanceStaticAccessorOverridingMethod.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js b/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js index 3375597f114b8..73eb1021d6212 100644 --- a/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js +++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js @@ -14,11 +14,11 @@ class b extends a { //// [inheritanceStaticAccessorOverridingProperty.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js index 7f27718a1fb3e..8d2aab0bbd1eb 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js @@ -16,11 +16,11 @@ class b extends a { //// [inheritanceStaticFuncOverridingAccessor.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js index 03de6f62af45b..c41281eecc417 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js @@ -13,11 +13,11 @@ class b extends a { //// [inheritanceStaticFuncOverridingAccessorOfFuncType.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.js b/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.js index a1380343bee16..cdbc3913a220a 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.js @@ -13,11 +13,11 @@ class b extends a { //// [inheritanceStaticFuncOverridingMethod.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.js b/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.js index e28d0a026dd24..77a8e21dc74d9 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.js @@ -11,11 +11,11 @@ class b extends a { //// [inheritanceStaticFuncOverridingProperty.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.js b/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.js index d8155525444f6..0f0eb43fdd63e 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.js @@ -11,11 +11,11 @@ class b extends a { //// [inheritanceStaticFuncOverridingPropertyOfFuncType.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticFunctionOverridingInstanceProperty.js b/tests/baselines/reference/inheritanceStaticFunctionOverridingInstanceProperty.js index 9b696526a4453..fd92a88721907 100644 --- a/tests/baselines/reference/inheritanceStaticFunctionOverridingInstanceProperty.js +++ b/tests/baselines/reference/inheritanceStaticFunctionOverridingInstanceProperty.js @@ -11,11 +11,11 @@ class b extends a { //// [inheritanceStaticFunctionOverridingInstanceProperty.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticMembersCompatible.js b/tests/baselines/reference/inheritanceStaticMembersCompatible.js index 59dc7e5fff1c7..7a74aea52d69b 100644 --- a/tests/baselines/reference/inheritanceStaticMembersCompatible.js +++ b/tests/baselines/reference/inheritanceStaticMembersCompatible.js @@ -9,11 +9,11 @@ class b extends a { //// [inheritanceStaticMembersCompatible.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticMembersIncompatible.js b/tests/baselines/reference/inheritanceStaticMembersIncompatible.js index e6e2edf0d5b43..f18058113453d 100644 --- a/tests/baselines/reference/inheritanceStaticMembersIncompatible.js +++ b/tests/baselines/reference/inheritanceStaticMembersIncompatible.js @@ -9,11 +9,11 @@ class b extends a { //// [inheritanceStaticMembersIncompatible.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js b/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js index 7872f35ae90fc..435bf6d0a8de5 100644 --- a/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js @@ -14,11 +14,11 @@ class b extends a { //// [inheritanceStaticPropertyOverridingAccessor.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.js b/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.js index 24a6135b30c26..ee69b89dd4c73 100644 --- a/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.js +++ b/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.js @@ -11,11 +11,11 @@ class b extends a { //// [inheritanceStaticPropertyOverridingMethod.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticPropertyOverridingProperty.js b/tests/baselines/reference/inheritanceStaticPropertyOverridingProperty.js index 182fb27a9705b..7fd7cca98c427 100644 --- a/tests/baselines/reference/inheritanceStaticPropertyOverridingProperty.js +++ b/tests/baselines/reference/inheritanceStaticPropertyOverridingProperty.js @@ -9,11 +9,11 @@ class b extends a { //// [inheritanceStaticPropertyOverridingProperty.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritedConstructorWithRestParams.js b/tests/baselines/reference/inheritedConstructorWithRestParams.js index a2538cf999d6b..a11136ba6b7bc 100644 --- a/tests/baselines/reference/inheritedConstructorWithRestParams.js +++ b/tests/baselines/reference/inheritedConstructorWithRestParams.js @@ -16,11 +16,11 @@ new Derived(3); //// [inheritedConstructorWithRestParams.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritedConstructorWithRestParams2.js b/tests/baselines/reference/inheritedConstructorWithRestParams2.js index 17cca41912d48..7d06886f56265 100644 --- a/tests/baselines/reference/inheritedConstructorWithRestParams2.js +++ b/tests/baselines/reference/inheritedConstructorWithRestParams2.js @@ -36,11 +36,11 @@ new Derived("", 3, "", ""); //// [inheritedConstructorWithRestParams2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritedModuleMembersForClodule.js b/tests/baselines/reference/inheritedModuleMembersForClodule.js index 5e7f49be55970..3a20f4313b645 100644 --- a/tests/baselines/reference/inheritedModuleMembersForClodule.js +++ b/tests/baselines/reference/inheritedModuleMembersForClodule.js @@ -23,11 +23,11 @@ class E extends D { //// [inheritedModuleMembersForClodule.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/instanceOfAssignability.js b/tests/baselines/reference/instanceOfAssignability.js index c85caf07e53b9..a0b15b0e287c9 100644 --- a/tests/baselines/reference/instanceOfAssignability.js +++ b/tests/baselines/reference/instanceOfAssignability.js @@ -91,11 +91,11 @@ function fn8(x: Alpha|Beta|Gamma) { //// [instanceOfAssignability.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js b/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js index 8eb7e3321f940..b80c8f0ff13b5 100644 --- a/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js +++ b/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js @@ -44,11 +44,11 @@ module Generic { //// [instancePropertiesInheritedIntoClassType.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/instanceSubtypeCheck2.js b/tests/baselines/reference/instanceSubtypeCheck2.js index 581921446129a..c42f071ddb93a 100644 --- a/tests/baselines/reference/instanceSubtypeCheck2.js +++ b/tests/baselines/reference/instanceSubtypeCheck2.js @@ -9,11 +9,11 @@ class C2 extends C1 { //// [instanceSubtypeCheck2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/instanceofWithStructurallyIdenticalTypes.js b/tests/baselines/reference/instanceofWithStructurallyIdenticalTypes.js index 8eefac932235e..32c156749844b 100644 --- a/tests/baselines/reference/instanceofWithStructurallyIdenticalTypes.js +++ b/tests/baselines/reference/instanceofWithStructurallyIdenticalTypes.js @@ -73,11 +73,11 @@ function goo(x: A) { //// [instanceofWithStructurallyIdenticalTypes.js] // Repro from #7271 var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/instantiatedReturnTypeContravariance.js b/tests/baselines/reference/instantiatedReturnTypeContravariance.js index 01b8da419c4c7..7eed6d7f5fcfd 100644 --- a/tests/baselines/reference/instantiatedReturnTypeContravariance.js +++ b/tests/baselines/reference/instantiatedReturnTypeContravariance.js @@ -32,11 +32,11 @@ return null; //// [instantiatedReturnTypeContravariance.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/interfaceClassMerging.js b/tests/baselines/reference/interfaceClassMerging.js index 9b75b9e4d105c..4cca8c1c8b9eb 100644 --- a/tests/baselines/reference/interfaceClassMerging.js +++ b/tests/baselines/reference/interfaceClassMerging.js @@ -42,11 +42,11 @@ obj = bar; //// [interfaceClassMerging.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/interfaceClassMerging2.js b/tests/baselines/reference/interfaceClassMerging2.js index 93c05759367b0..8d860ae95e728 100644 --- a/tests/baselines/reference/interfaceClassMerging2.js +++ b/tests/baselines/reference/interfaceClassMerging2.js @@ -38,11 +38,11 @@ foo = bar; //// [interfaceClassMerging2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/interfaceExtendsClass1.js b/tests/baselines/reference/interfaceExtendsClass1.js index 5e8d36136a81e..fc5afcdddacdf 100644 --- a/tests/baselines/reference/interfaceExtendsClass1.js +++ b/tests/baselines/reference/interfaceExtendsClass1.js @@ -20,11 +20,11 @@ class Location { //// [interfaceExtendsClass1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js b/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js index d567d5661d94e..334ac5cd29228 100644 --- a/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js +++ b/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js @@ -29,11 +29,11 @@ d = c; // error //// [interfaceExtendsClassWithPrivate1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js b/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js index b7e2fe715cbd8..cc3e8163d1807 100644 --- a/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js +++ b/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js @@ -25,11 +25,11 @@ class D2 extends C implements I { // error //// [interfaceExtendsClassWithPrivate2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/interfaceImplementation8.js b/tests/baselines/reference/interfaceImplementation8.js index f90d58edd4f51..aa9bf7b4cf87d 100644 --- a/tests/baselines/reference/interfaceImplementation8.js +++ b/tests/baselines/reference/interfaceImplementation8.js @@ -42,11 +42,11 @@ class C8 extends C7 implements i2{ //// [interfaceImplementation8.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.js b/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.js index 4b88d58fd184b..897fa17c4e539 100644 --- a/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.js +++ b/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.js @@ -81,11 +81,11 @@ module YYY4 { //// [invalidModuleWithStatementsOfEveryKind.js] // All of these should be an error var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/invalidMultipleVariableDeclarations.js b/tests/baselines/reference/invalidMultipleVariableDeclarations.js index 4e473a95bf5fc..466d7eb904919 100644 --- a/tests/baselines/reference/invalidMultipleVariableDeclarations.js +++ b/tests/baselines/reference/invalidMultipleVariableDeclarations.js @@ -55,11 +55,11 @@ var m = M.A; //// [invalidMultipleVariableDeclarations.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/invalidReturnStatements.js b/tests/baselines/reference/invalidReturnStatements.js index 7dc01b18b5b2e..a61d036d9ed41 100644 --- a/tests/baselines/reference/invalidReturnStatements.js +++ b/tests/baselines/reference/invalidReturnStatements.js @@ -22,11 +22,11 @@ function fn11(): D { return new C(); } //// [invalidReturnStatements.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/isolatedModulesImportExportElision.js b/tests/baselines/reference/isolatedModulesImportExportElision.js index e430e1eda1b01..7c295a315f954 100644 --- a/tests/baselines/reference/isolatedModulesImportExportElision.js +++ b/tests/baselines/reference/isolatedModulesImportExportElision.js @@ -16,11 +16,11 @@ export var z = x; //// [file1.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/jsxViaImport.js b/tests/baselines/reference/jsxViaImport.js index 7955a6e65b9d0..92d8b063a44b4 100644 --- a/tests/baselines/reference/jsxViaImport.js +++ b/tests/baselines/reference/jsxViaImport.js @@ -26,11 +26,11 @@ class TestComponent extends React.Component { //// [consumer.jsx] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/keyofAndIndexedAccess.js b/tests/baselines/reference/keyofAndIndexedAccess.js index e9d76ee4d7ff2..173b5a4734788 100644 --- a/tests/baselines/reference/keyofAndIndexedAccess.js +++ b/tests/baselines/reference/keyofAndIndexedAccess.js @@ -368,11 +368,11 @@ function f(p: K) { //// [keyofAndIndexedAccess.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/lambdaArgCrash.js b/tests/baselines/reference/lambdaArgCrash.js index cdc03b555efbe..f138aa162bd17 100644 --- a/tests/baselines/reference/lambdaArgCrash.js +++ b/tests/baselines/reference/lambdaArgCrash.js @@ -36,11 +36,11 @@ class ItemSetEvent extends Event { //// [lambdaArgCrash.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/lift.js b/tests/baselines/reference/lift.js index d2f2ed8dc0dc4..80eebe9cb00bc 100644 --- a/tests/baselines/reference/lift.js +++ b/tests/baselines/reference/lift.js @@ -19,11 +19,11 @@ class C extends B { //// [lift.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/localTypes1.js b/tests/baselines/reference/localTypes1.js index 27045613c817f..b0aaed7906a86 100644 --- a/tests/baselines/reference/localTypes1.js +++ b/tests/baselines/reference/localTypes1.js @@ -143,11 +143,11 @@ function f6() { //// [localTypes1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/m7Bugs.js b/tests/baselines/reference/m7Bugs.js index 86504bdf8f979..be611c2e5cd02 100644 --- a/tests/baselines/reference/m7Bugs.js +++ b/tests/baselines/reference/m7Bugs.js @@ -28,11 +28,11 @@ var y3: C1 = {}; //// [m7Bugs.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/mergedDeclarations5.js b/tests/baselines/reference/mergedDeclarations5.js index 886afebe35866..d393ec00e2ca6 100644 --- a/tests/baselines/reference/mergedDeclarations5.js +++ b/tests/baselines/reference/mergedDeclarations5.js @@ -20,11 +20,11 @@ var A = (function () { }()); //// [b.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/mergedDeclarations6.js b/tests/baselines/reference/mergedDeclarations6.js index 445fbac34b70b..2b1f468c873de 100644 --- a/tests/baselines/reference/mergedDeclarations6.js +++ b/tests/baselines/reference/mergedDeclarations6.js @@ -38,11 +38,11 @@ define(["require", "exports"], function (require, exports) { }); //// [b.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/mergedInheritedClassInterface.js b/tests/baselines/reference/mergedInheritedClassInterface.js index 1772d6139d846..29d140f3f68d1 100644 --- a/tests/baselines/reference/mergedInheritedClassInterface.js +++ b/tests/baselines/reference/mergedInheritedClassInterface.js @@ -48,11 +48,11 @@ grandchild.method2(); //// [mergedInheritedClassInterface.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.js b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.js index 65477941c0a3e..b705d58e1ebdf 100644 --- a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.js +++ b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.js @@ -33,11 +33,11 @@ var r2 = a.w; // error //// [mergedInterfacesWithInheritedPrivates2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.js b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.js index c3d2cc0ea571b..c002a30a828ce 100644 --- a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.js +++ b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.js @@ -40,11 +40,11 @@ module M { //// [mergedInterfacesWithInheritedPrivates3.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/missingPropertiesOfClassExpression.js b/tests/baselines/reference/missingPropertiesOfClassExpression.js index a2d38f47c6240..7f468d14def32 100644 --- a/tests/baselines/reference/missingPropertiesOfClassExpression.js +++ b/tests/baselines/reference/missingPropertiesOfClassExpression.js @@ -8,11 +8,11 @@ class George extends class { reset() { return this.y; } } { //// [missingPropertiesOfClassExpression.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/moduleAsBaseType.js b/tests/baselines/reference/moduleAsBaseType.js index 99553e041084a..24a04eff87284 100644 --- a/tests/baselines/reference/moduleAsBaseType.js +++ b/tests/baselines/reference/moduleAsBaseType.js @@ -6,11 +6,11 @@ class C2 implements M { } //// [moduleAsBaseType.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/moduleImportedForTypeArgumentPosition.js b/tests/baselines/reference/moduleImportedForTypeArgumentPosition.js index 6471abaf13d32..57087e49aa178 100644 --- a/tests/baselines/reference/moduleImportedForTypeArgumentPosition.js +++ b/tests/baselines/reference/moduleImportedForTypeArgumentPosition.js @@ -17,11 +17,11 @@ define(["require", "exports"], function (require, exports) { }); //// [moduleImportedForTypeArgumentPosition_1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/moduleWithStatementsOfEveryKind.js b/tests/baselines/reference/moduleWithStatementsOfEveryKind.js index f75324420203d..cedfcd8b86cc4 100644 --- a/tests/baselines/reference/moduleWithStatementsOfEveryKind.js +++ b/tests/baselines/reference/moduleWithStatementsOfEveryKind.js @@ -60,11 +60,11 @@ module Y { //// [moduleWithStatementsOfEveryKind.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/multipleInheritance.js b/tests/baselines/reference/multipleInheritance.js index f0074664ad158..536f694ba174c 100644 --- a/tests/baselines/reference/multipleInheritance.js +++ b/tests/baselines/reference/multipleInheritance.js @@ -40,11 +40,11 @@ class Baad extends Good { //// [multipleInheritance.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/mutuallyRecursiveGenericBaseTypes2.js b/tests/baselines/reference/mutuallyRecursiveGenericBaseTypes2.js index 90ffbf5148f1a..0e846877cb85a 100644 --- a/tests/baselines/reference/mutuallyRecursiveGenericBaseTypes2.js +++ b/tests/baselines/reference/mutuallyRecursiveGenericBaseTypes2.js @@ -12,11 +12,11 @@ var test = new foo(); //// [mutuallyRecursiveGenericBaseTypes2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/noImplicitAnyMissingGetAccessor.js b/tests/baselines/reference/noImplicitAnyMissingGetAccessor.js index 25815641e9564..128591000096e 100644 --- a/tests/baselines/reference/noImplicitAnyMissingGetAccessor.js +++ b/tests/baselines/reference/noImplicitAnyMissingGetAccessor.js @@ -14,11 +14,11 @@ class Child extends Parent { //// [noImplicitAnyMissingGetAccessor.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/noImplicitAnyMissingSetAccessor.js b/tests/baselines/reference/noImplicitAnyMissingSetAccessor.js index cb37fafd9f9fe..bb6e1e53f0fbf 100644 --- a/tests/baselines/reference/noImplicitAnyMissingSetAccessor.js +++ b/tests/baselines/reference/noImplicitAnyMissingSetAccessor.js @@ -13,11 +13,11 @@ class Child extends Parent { //// [noImplicitAnyMissingSetAccessor.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/nonGenericClassExtendingGenericClassWithAny.js b/tests/baselines/reference/nonGenericClassExtendingGenericClassWithAny.js index 49a3a7e05eb12..132145dbf3f48 100644 --- a/tests/baselines/reference/nonGenericClassExtendingGenericClassWithAny.js +++ b/tests/baselines/reference/nonGenericClassExtendingGenericClassWithAny.js @@ -7,11 +7,11 @@ class Bar extends Foo { } // Valid //// [nonGenericClassExtendingGenericClassWithAny.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js index 9c44df837570d..046414eba3435 100644 --- a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js +++ b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js @@ -48,11 +48,11 @@ var b: { [x: number]: A } = { //// [numericIndexerConstrainsPropertyDeclarations2.js] // String indexer providing a constraint of a user defined type var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/numericIndexerConstraint3.js b/tests/baselines/reference/numericIndexerConstraint3.js index 4a8c3caf12bde..ebe02d70f7da0 100644 --- a/tests/baselines/reference/numericIndexerConstraint3.js +++ b/tests/baselines/reference/numericIndexerConstraint3.js @@ -14,11 +14,11 @@ class C { //// [numericIndexerConstraint3.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/numericIndexerConstraint4.js b/tests/baselines/reference/numericIndexerConstraint4.js index 4fe10b54ee416..fda23bce27cf5 100644 --- a/tests/baselines/reference/numericIndexerConstraint4.js +++ b/tests/baselines/reference/numericIndexerConstraint4.js @@ -14,11 +14,11 @@ var x: { //// [numericIndexerConstraint4.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/numericIndexerTyping2.js b/tests/baselines/reference/numericIndexerTyping2.js index e6fce38d81853..f87198f32a7cc 100644 --- a/tests/baselines/reference/numericIndexerTyping2.js +++ b/tests/baselines/reference/numericIndexerTyping2.js @@ -14,11 +14,11 @@ var r2: string = i2[1]; // error: numeric indexer returns the type of the string //// [numericIndexerTyping2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectCreationOfElementAccessExpression.js b/tests/baselines/reference/objectCreationOfElementAccessExpression.js index 7d192f7ee9a0f..72645662e01da 100644 --- a/tests/baselines/reference/objectCreationOfElementAccessExpression.js +++ b/tests/baselines/reference/objectCreationOfElementAccessExpression.js @@ -57,11 +57,11 @@ var foods2: MonsterFood[] = new PetFood[new IceCream('Mint chocolate chip') , Co //// [objectCreationOfElementAccessExpression.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js b/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js index 84caecad63aa8..ffe2ca6ab7e6d 100644 --- a/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js +++ b/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js @@ -56,11 +56,11 @@ var r4: void = b.valueOf(); //// [objectTypeHidingMembersOfExtendedObject.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js index a00f33b2a9775..550ef48125d6c 100644 --- a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js +++ b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js @@ -125,11 +125,11 @@ function foo16(x: any) { } //// [objectTypesIdentityWithNumericIndexers1.js] // object types are identical structurally var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js index fa176f483d740..249c39be6d395 100644 --- a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js +++ b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js @@ -128,11 +128,11 @@ function foo16(x: any) { } //// [objectTypesIdentityWithNumericIndexers2.js] // object types are identical structurally var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js index a09e844b6c4be..7f16c30799f9d 100644 --- a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js +++ b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js @@ -125,11 +125,11 @@ function foo16(x: any) { } //// [objectTypesIdentityWithNumericIndexers3.js] // object types are identical structurally var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypesIdentityWithPrivates.js b/tests/baselines/reference/objectTypesIdentityWithPrivates.js index a187c353056f6..b190292227784 100644 --- a/tests/baselines/reference/objectTypesIdentityWithPrivates.js +++ b/tests/baselines/reference/objectTypesIdentityWithPrivates.js @@ -123,11 +123,11 @@ function foo16(x: any) { } //// [objectTypesIdentityWithPrivates.js] // object types are identical structurally var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypesIdentityWithPrivates2.js b/tests/baselines/reference/objectTypesIdentityWithPrivates2.js index 5d130734c7bb8..8de254e15c15f 100644 --- a/tests/baselines/reference/objectTypesIdentityWithPrivates2.js +++ b/tests/baselines/reference/objectTypesIdentityWithPrivates2.js @@ -41,11 +41,11 @@ function foo6(x: any): any { } //// [objectTypesIdentityWithPrivates2.js] // object types are identical structurally var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypesIdentityWithPrivates3.js b/tests/baselines/reference/objectTypesIdentityWithPrivates3.js index f28147ba50ddf..6970f06854b6c 100644 --- a/tests/baselines/reference/objectTypesIdentityWithPrivates3.js +++ b/tests/baselines/reference/objectTypesIdentityWithPrivates3.js @@ -27,11 +27,11 @@ var c3: C3; //// [objectTypesIdentityWithPrivates3.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js b/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js index a561df31753dc..3c45a453d880c 100644 --- a/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js +++ b/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js @@ -125,11 +125,11 @@ function foo16(x: any) { } //// [objectTypesIdentityWithStringIndexers.js] // object types are identical structurally var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js b/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js index 282ec34ea5f46..e9dce1d5366c7 100644 --- a/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js +++ b/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js @@ -128,11 +128,11 @@ function foo16(x: any) { } //// [objectTypesIdentityWithStringIndexers2.js] // object types are identical structurally var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/optionalConstructorArgInSuper.js b/tests/baselines/reference/optionalConstructorArgInSuper.js index 5033f9d1581e1..c18a38ec343df 100644 --- a/tests/baselines/reference/optionalConstructorArgInSuper.js +++ b/tests/baselines/reference/optionalConstructorArgInSuper.js @@ -12,11 +12,11 @@ d2.foo(); //// [optionalConstructorArgInSuper.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/optionalMethods.js b/tests/baselines/reference/optionalMethods.js index 3af46d7e41a7b..e79c6f85fd3db 100644 --- a/tests/baselines/reference/optionalMethods.js +++ b/tests/baselines/reference/optionalMethods.js @@ -59,11 +59,11 @@ class Derived extends Base { //// [optionalMethods.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/optionalParamArgsTest.js b/tests/baselines/reference/optionalParamArgsTest.js index 2bcfbd44da5f5..5c8503a9bef77 100644 --- a/tests/baselines/reference/optionalParamArgsTest.js +++ b/tests/baselines/reference/optionalParamArgsTest.js @@ -126,11 +126,11 @@ fnOpt2(1, [2, 3], [1], true); //// [optionalParamArgsTest.js] // Optional parameter and default argument tests var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/optionalParamInOverride.js b/tests/baselines/reference/optionalParamInOverride.js index 52fa0a385176e..03db09eac1a96 100644 --- a/tests/baselines/reference/optionalParamInOverride.js +++ b/tests/baselines/reference/optionalParamInOverride.js @@ -9,11 +9,11 @@ class Y extends Z { //// [optionalParamInOverride.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/optionalParameterProperty.js b/tests/baselines/reference/optionalParameterProperty.js index ed1b910241d53..fc288d0976723 100644 --- a/tests/baselines/reference/optionalParameterProperty.js +++ b/tests/baselines/reference/optionalParameterProperty.js @@ -13,11 +13,11 @@ class D extends C { //// [optionalParameterProperty.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/outModuleConcatAmd.js b/tests/baselines/reference/outModuleConcatAmd.js index 398978793c128..810cd73b5025d 100644 --- a/tests/baselines/reference/outModuleConcatAmd.js +++ b/tests/baselines/reference/outModuleConcatAmd.js @@ -10,11 +10,11 @@ export class B extends A { } //// [all.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt b/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt index f220eb3e0edf8..6e905832277bc 100644 --- a/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt +++ b/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt @@ -9,11 +9,11 @@ emittedFile:all.js sourceFile:tests/cases/compiler/ref/a.ts ------------------------------------------------------------------- >>>var __extends = (this && this.__extends) || (function () { ->>> var __extendStatics = Object.setPrototypeOf || +>>> 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]; }; >>> return function (d, b) { ->>> __extendStatics(d, b); +>>> extendStatics(d, b); >>> function __() { this.constructor = d; } >>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); >>> }; diff --git a/tests/baselines/reference/outModuleConcatSystem.js b/tests/baselines/reference/outModuleConcatSystem.js index e5a1bd65cadca..ff8f1f6fd0a0a 100644 --- a/tests/baselines/reference/outModuleConcatSystem.js +++ b/tests/baselines/reference/outModuleConcatSystem.js @@ -10,11 +10,11 @@ export class B extends A { } //// [all.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt b/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt index 72b6bf09dd140..1a25b6358fa25 100644 --- a/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt +++ b/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt @@ -9,11 +9,11 @@ emittedFile:all.js sourceFile:tests/cases/compiler/ref/a.ts ------------------------------------------------------------------- >>>var __extends = (this && this.__extends) || (function () { ->>> var __extendStatics = Object.setPrototypeOf || +>>> 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]; }; >>> return function (d, b) { ->>> __extendStatics(d, b); +>>> extendStatics(d, b); >>> function __() { this.constructor = d; } >>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); >>> }; diff --git a/tests/baselines/reference/outModuleTripleSlashRefs.js b/tests/baselines/reference/outModuleTripleSlashRefs.js index 8308f58cc99c2..b144c6e74c81a 100644 --- a/tests/baselines/reference/outModuleTripleSlashRefs.js +++ b/tests/baselines/reference/outModuleTripleSlashRefs.js @@ -32,11 +32,11 @@ export class B extends A { } //// [all.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt b/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt index 102664ea71a36..0f20e86cd005e 100644 --- a/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt +++ b/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt @@ -9,11 +9,11 @@ emittedFile:all.js sourceFile:tests/cases/compiler/ref/b.ts ------------------------------------------------------------------- >>>var __extends = (this && this.__extends) || (function () { ->>> var __extendStatics = Object.setPrototypeOf || +>>> 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]; }; >>> return function (d, b) { ->>> __extendStatics(d, b); +>>> extendStatics(d, b); >>> function __() { this.constructor = d; } >>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); >>> }; diff --git a/tests/baselines/reference/overload1.js b/tests/baselines/reference/overload1.js index e73c84abb14e2..eddb4181ad6c5 100644 --- a/tests/baselines/reference/overload1.js +++ b/tests/baselines/reference/overload1.js @@ -41,11 +41,11 @@ var v=x.g; //// [overload1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks1.js b/tests/baselines/reference/overloadOnConstConstraintChecks1.js index 18d16ef99138f..058a294833ce4 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks1.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks1.js @@ -24,11 +24,11 @@ class D implements MyDoc { //// [overloadOnConstConstraintChecks1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks2.js b/tests/baselines/reference/overloadOnConstConstraintChecks2.js index f78ed9a7d50c3..9cbbedfabb36a 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks2.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks2.js @@ -13,11 +13,11 @@ function foo(name: any): A { //// [overloadOnConstConstraintChecks2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks3.js b/tests/baselines/reference/overloadOnConstConstraintChecks3.js index b26d1067f5572..5f710f178373b 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks3.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks3.js @@ -14,11 +14,11 @@ function foo(name: any): A { //// [overloadOnConstConstraintChecks3.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks4.js b/tests/baselines/reference/overloadOnConstConstraintChecks4.js index db2d6e9adbaad..afa8d83cb136e 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks4.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks4.js @@ -15,11 +15,11 @@ function foo(name: any): Z { //// [overloadOnConstConstraintChecks4.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js b/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js index 438c41fa8bdc6..534a4f9dde807 100644 --- a/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js +++ b/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js @@ -13,11 +13,11 @@ foo("HI"); //// [overloadOnConstantsInvalidOverload1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadResolution.js b/tests/baselines/reference/overloadResolution.js index 24de159979675..b154ceff837fa 100644 --- a/tests/baselines/reference/overloadResolution.js +++ b/tests/baselines/reference/overloadResolution.js @@ -96,11 +96,11 @@ var s = fn5((n) => n.substr(0)); //// [overloadResolution.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadResolutionClassConstructors.js b/tests/baselines/reference/overloadResolutionClassConstructors.js index 5f81c47c9ff1b..45d07483f4fdf 100644 --- a/tests/baselines/reference/overloadResolutionClassConstructors.js +++ b/tests/baselines/reference/overloadResolutionClassConstructors.js @@ -103,11 +103,11 @@ new fn5((n) => n.blah); // Error //// [overloadResolutionClassConstructors.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadResolutionConstructors.js b/tests/baselines/reference/overloadResolutionConstructors.js index 02cc668c64d8a..4a64e8be9179d 100644 --- a/tests/baselines/reference/overloadResolutionConstructors.js +++ b/tests/baselines/reference/overloadResolutionConstructors.js @@ -104,11 +104,11 @@ var s = new fn5((n) => n.substr(0)); //// [overloadResolutionConstructors.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadingOnConstants1.js b/tests/baselines/reference/overloadingOnConstants1.js index 606d4aa674ce1..774436ba5eec9 100644 --- a/tests/baselines/reference/overloadingOnConstants1.js +++ b/tests/baselines/reference/overloadingOnConstants1.js @@ -27,11 +27,11 @@ var htmlSpanElement2: Derived1 = d2.createElement("span"); //// [overloadingOnConstants1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadingOnConstants2.js b/tests/baselines/reference/overloadingOnConstants2.js index 7beb3662ff19f..6cc20caa80ec0 100644 --- a/tests/baselines/reference/overloadingOnConstants2.js +++ b/tests/baselines/reference/overloadingOnConstants2.js @@ -29,11 +29,11 @@ var f: C = bar("um", []); // C //// [overloadingOnConstants2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overridingPrivateStaticMembers.js b/tests/baselines/reference/overridingPrivateStaticMembers.js index b5bfa6ac62748..f7fb709cda251 100644 --- a/tests/baselines/reference/overridingPrivateStaticMembers.js +++ b/tests/baselines/reference/overridingPrivateStaticMembers.js @@ -9,11 +9,11 @@ class Derived2 extends Base2 { //// [overridingPrivateStaticMembers.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parseErrorInHeritageClause1.js b/tests/baselines/reference/parseErrorInHeritageClause1.js index 293309025fe87..647ddb733a705 100644 --- a/tests/baselines/reference/parseErrorInHeritageClause1.js +++ b/tests/baselines/reference/parseErrorInHeritageClause1.js @@ -4,11 +4,11 @@ class C extends A # { //// [parseErrorInHeritageClause1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parser509630.js b/tests/baselines/reference/parser509630.js index 482a078f3d124..6676b2499dd70 100644 --- a/tests/baselines/reference/parser509630.js +++ b/tests/baselines/reference/parser509630.js @@ -8,11 +8,11 @@ class Any extends Type { //// [parser509630.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserAstSpans1.js b/tests/baselines/reference/parserAstSpans1.js index fd9c5822dd898..ae274f3dcbba0 100644 --- a/tests/baselines/reference/parserAstSpans1.js +++ b/tests/baselines/reference/parserAstSpans1.js @@ -221,11 +221,11 @@ class c6 extends c5 { //// [parserAstSpans1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserClassDeclaration1.js b/tests/baselines/reference/parserClassDeclaration1.js index 5b8ea6c183a27..11c087cf5689f 100644 --- a/tests/baselines/reference/parserClassDeclaration1.js +++ b/tests/baselines/reference/parserClassDeclaration1.js @@ -4,11 +4,11 @@ class C extends A extends B { //// [parserClassDeclaration1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserClassDeclaration3.js b/tests/baselines/reference/parserClassDeclaration3.js index a419598461f67..886fce518929a 100644 --- a/tests/baselines/reference/parserClassDeclaration3.js +++ b/tests/baselines/reference/parserClassDeclaration3.js @@ -4,11 +4,11 @@ class C implements A extends B { //// [parserClassDeclaration3.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserClassDeclaration4.js b/tests/baselines/reference/parserClassDeclaration4.js index 6ed902beed05f..d9f1f1acbedf9 100644 --- a/tests/baselines/reference/parserClassDeclaration4.js +++ b/tests/baselines/reference/parserClassDeclaration4.js @@ -4,11 +4,11 @@ class C extends A implements B extends C { //// [parserClassDeclaration4.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserClassDeclaration5.js b/tests/baselines/reference/parserClassDeclaration5.js index a8e54191fee4f..38fa87e2ce143 100644 --- a/tests/baselines/reference/parserClassDeclaration5.js +++ b/tests/baselines/reference/parserClassDeclaration5.js @@ -4,11 +4,11 @@ class C extends A implements B implements C { //// [parserClassDeclaration5.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserClassDeclaration6.js b/tests/baselines/reference/parserClassDeclaration6.js index 648213d1516cc..a4720967984f0 100644 --- a/tests/baselines/reference/parserClassDeclaration6.js +++ b/tests/baselines/reference/parserClassDeclaration6.js @@ -4,11 +4,11 @@ class C extends A, B { //// [parserClassDeclaration6.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause2.js b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause2.js index 5cd993caf708d..231b4fb3d0605 100644 --- a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause2.js +++ b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause2.js @@ -4,11 +4,11 @@ class C extends A, { //// [parserErrorRecovery_ExtendsOrImplementsClause2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause4.js b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause4.js index 9d5b039321883..584088cd51126 100644 --- a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause4.js +++ b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause4.js @@ -4,11 +4,11 @@ class C extends A implements { //// [parserErrorRecovery_ExtendsOrImplementsClause4.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause5.js b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause5.js index 010eace1920ee..97dd2af292587 100644 --- a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause5.js +++ b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause5.js @@ -4,11 +4,11 @@ class C extends A, implements B, { //// [parserErrorRecovery_ExtendsOrImplementsClause5.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserGenericsInTypeContexts1.js b/tests/baselines/reference/parserGenericsInTypeContexts1.js index f85f5b6fd1a9e..a072e9c356519 100644 --- a/tests/baselines/reference/parserGenericsInTypeContexts1.js +++ b/tests/baselines/reference/parserGenericsInTypeContexts1.js @@ -19,11 +19,11 @@ function f2(): F { //// [parserGenericsInTypeContexts1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserGenericsInTypeContexts2.js b/tests/baselines/reference/parserGenericsInTypeContexts2.js index 1491fd37b5fd5..7e8694e9416d6 100644 --- a/tests/baselines/reference/parserGenericsInTypeContexts2.js +++ b/tests/baselines/reference/parserGenericsInTypeContexts2.js @@ -19,11 +19,11 @@ function f2(): F, Y>> { //// [parserGenericsInTypeContexts2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserRealSource10.js b/tests/baselines/reference/parserRealSource10.js index d2e8c5ff1f738..0d42dc5f47b72 100644 --- a/tests/baselines/reference/parserRealSource10.js +++ b/tests/baselines/reference/parserRealSource10.js @@ -459,11 +459,11 @@ module TypeScript { // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. // See LICENSE.txt in the project root for complete license information. var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserRealSource11.js b/tests/baselines/reference/parserRealSource11.js index 0e39573238c43..0d942cb1c68d4 100644 --- a/tests/baselines/reference/parserRealSource11.js +++ b/tests/baselines/reference/parserRealSource11.js @@ -2368,11 +2368,11 @@ module TypeScript { // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. // See LICENSE.txt in the project root for complete license information. var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserharness.js b/tests/baselines/reference/parserharness.js index f173052a11257..5090c33bdc8ca 100644 --- a/tests/baselines/reference/parserharness.js +++ b/tests/baselines/reference/parserharness.js @@ -2097,11 +2097,11 @@ module Harness { // limitations under the License. // var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/partiallyAnnotatedFunctionInferenceError.js b/tests/baselines/reference/partiallyAnnotatedFunctionInferenceError.js index 0d1097b4773a5..e09713cfdfa41 100644 --- a/tests/baselines/reference/partiallyAnnotatedFunctionInferenceError.js +++ b/tests/baselines/reference/partiallyAnnotatedFunctionInferenceError.js @@ -17,11 +17,11 @@ testError((t1, t2, t3: D) => {}) //// [partiallyAnnotatedFunctionInferenceError.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/partiallyAnnotatedFunctionInferenceWithTypeParameter.js b/tests/baselines/reference/partiallyAnnotatedFunctionInferenceWithTypeParameter.js index c55721cb64739..2647bd4d8eefb 100644 --- a/tests/baselines/reference/partiallyAnnotatedFunctionInferenceWithTypeParameter.js +++ b/tests/baselines/reference/partiallyAnnotatedFunctionInferenceWithTypeParameter.js @@ -36,11 +36,11 @@ testRest((t2, ...t3: D[]) => {}) //// [partiallyAnnotatedFunctionInferenceWithTypeParameter.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/primitiveMembers.js b/tests/baselines/reference/primitiveMembers.js index 6ef048203ae0e..d378e5abee042 100644 --- a/tests/baselines/reference/primitiveMembers.js +++ b/tests/baselines/reference/primitiveMembers.js @@ -33,11 +33,11 @@ class foo extends baz { public bar(){ return undefined}; } //// [primitiveMembers.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/privacyClass.js b/tests/baselines/reference/privacyClass.js index 07ea7691ac2ac..154e4ad453dee 100644 --- a/tests/baselines/reference/privacyClass.js +++ b/tests/baselines/reference/privacyClass.js @@ -130,11 +130,11 @@ export class glo_C12_public extends glo_c_private implements glo_i_private, glo //// [privacyClass.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js b/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js index c1b219a3eaf40..04f18d61340c0 100644 --- a/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js +++ b/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js @@ -100,11 +100,11 @@ class publicClassExtendingPublicClassInGlobal extends publicClassInGlobal { //// [privacyClassExtendsClauseDeclFile_externalModule.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -291,11 +291,11 @@ var publicClassExtendingFromPrivateModuleClass = (function (_super) { exports.publicClassExtendingFromPrivateModuleClass = publicClassExtendingFromPrivateModuleClass; //// [privacyClassExtendsClauseDeclFile_GlobalFile.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/privacyGloClass.js b/tests/baselines/reference/privacyGloClass.js index 9698b1a097767..017bd375b540f 100644 --- a/tests/baselines/reference/privacyGloClass.js +++ b/tests/baselines/reference/privacyGloClass.js @@ -62,11 +62,11 @@ class glo_C11_public extends glo_c_public implements glo_i_public { //// [privacyGloClass.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/privateAccessInSubclass1.js b/tests/baselines/reference/privateAccessInSubclass1.js index 0f02de4ad4d6a..cf1a6cb1d44f3 100644 --- a/tests/baselines/reference/privateAccessInSubclass1.js +++ b/tests/baselines/reference/privateAccessInSubclass1.js @@ -11,11 +11,11 @@ class D extends Base { //// [privateAccessInSubclass1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/privateInstanceMemberAccessibility.js b/tests/baselines/reference/privateInstanceMemberAccessibility.js index 5f9a857269e5e..72f1ea01f0deb 100644 --- a/tests/baselines/reference/privateInstanceMemberAccessibility.js +++ b/tests/baselines/reference/privateInstanceMemberAccessibility.js @@ -15,11 +15,11 @@ class Derived extends Base { //// [privateInstanceMemberAccessibility.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/privateProtectedMembersAreNotAccessibleDestructuring.js b/tests/baselines/reference/privateProtectedMembersAreNotAccessibleDestructuring.js index f9d4fe56c392c..96808c3daeb12 100644 --- a/tests/baselines/reference/privateProtectedMembersAreNotAccessibleDestructuring.js +++ b/tests/baselines/reference/privateProtectedMembersAreNotAccessibleDestructuring.js @@ -23,11 +23,11 @@ let { priv: a, prot: b, privateMethod: f } = k; // error //// [privateProtectedMembersAreNotAccessibleDestructuring.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/privateStaticMemberAccessibility.js b/tests/baselines/reference/privateStaticMemberAccessibility.js index 548b08b9b92e9..19da5064fbb92 100644 --- a/tests/baselines/reference/privateStaticMemberAccessibility.js +++ b/tests/baselines/reference/privateStaticMemberAccessibility.js @@ -10,11 +10,11 @@ class Derived extends Base { //// [privateStaticMemberAccessibility.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/privateStaticNotAccessibleInClodule2.js b/tests/baselines/reference/privateStaticNotAccessibleInClodule2.js index a417144143052..eceda3830920c 100644 --- a/tests/baselines/reference/privateStaticNotAccessibleInClodule2.js +++ b/tests/baselines/reference/privateStaticNotAccessibleInClodule2.js @@ -17,11 +17,11 @@ module D { //// [privateStaticNotAccessibleInClodule2.js] // Any attempt to access a private property member outside the class body that contains its declaration results in a compile-time error. var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/amd/testGlo.js b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/amd/testGlo.js index 26700d01d5970..bf8401f6b4db4 100644 --- a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/amd/testGlo.js +++ b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/amd/testGlo.js @@ -1,9 +1,9 @@ var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/node/testGlo.js b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/node/testGlo.js index 26700d01d5970..bf8401f6b4db4 100644 --- a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/node/testGlo.js +++ b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/node/testGlo.js @@ -1,9 +1,9 @@ var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/project/prologueEmit/amd/out.js b/tests/baselines/reference/project/prologueEmit/amd/out.js index 5d13ff191f093..5fdfd47518642 100644 --- a/tests/baselines/reference/project/prologueEmit/amd/out.js +++ b/tests/baselines/reference/project/prologueEmit/amd/out.js @@ -1,9 +1,9 @@ var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/project/prologueEmit/node/out.js b/tests/baselines/reference/project/prologueEmit/node/out.js index 5d13ff191f093..5fdfd47518642 100644 --- a/tests/baselines/reference/project/prologueEmit/node/out.js +++ b/tests/baselines/reference/project/prologueEmit/node/out.js @@ -1,9 +1,9 @@ var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/project/quotesInFileAndDirectoryNames/amd/m'ain.js b/tests/baselines/reference/project/quotesInFileAndDirectoryNames/amd/m'ain.js index 859117be88075..2fe4870822f09 100644 --- a/tests/baselines/reference/project/quotesInFileAndDirectoryNames/amd/m'ain.js +++ b/tests/baselines/reference/project/quotesInFileAndDirectoryNames/amd/m'ain.js @@ -1,10 +1,10 @@ /// var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/project/quotesInFileAndDirectoryNames/node/m'ain.js b/tests/baselines/reference/project/quotesInFileAndDirectoryNames/node/m'ain.js index 859117be88075..2fe4870822f09 100644 --- a/tests/baselines/reference/project/quotesInFileAndDirectoryNames/node/m'ain.js +++ b/tests/baselines/reference/project/quotesInFileAndDirectoryNames/node/m'ain.js @@ -1,10 +1,10 @@ /// var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/propertiesAndIndexers.js b/tests/baselines/reference/propertiesAndIndexers.js index 9ea39c60dfb2b..899390cc913cb 100644 --- a/tests/baselines/reference/propertiesAndIndexers.js +++ b/tests/baselines/reference/propertiesAndIndexers.js @@ -53,11 +53,11 @@ var c: { //// [propertiesAndIndexers.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/propertyAccess.js b/tests/baselines/reference/propertyAccess.js index 4a3910e8594b5..f9b92420a70db 100644 --- a/tests/baselines/reference/propertyAccess.js +++ b/tests/baselines/reference/propertyAccess.js @@ -152,11 +152,11 @@ var x3: A; //// [propertyAccess.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js index 665550081b30f..b3464d30f9c84 100644 --- a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js @@ -84,11 +84,11 @@ var r4 = b.foo(aB, aB); // no inferences for T so constraint isn't satisfied, er //// [propertyAccessOnTypeParameterWithConstraints2.js] // generic types should behave as if they have properties of their constraint type var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js index a79ba9ed75cac..a43b44c4b2b21 100644 --- a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js @@ -59,11 +59,11 @@ var r4 = b.foo(new B()); // valid call to an invalid function //// [propertyAccessOnTypeParameterWithConstraints3.js] // generic types should behave as if they have properties of their constraint type var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js index 41de2d8c0e03f..604131ef7b715 100644 --- a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js @@ -46,11 +46,11 @@ var r4 = b.foo(new B()); // error after constraints above made illegal, doesn't //// [propertyAccessOnTypeParameterWithConstraints5.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass.js index a94af12901d24..0756ef8ca9b4f 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass.js @@ -40,11 +40,11 @@ class E extends C { //// [protectedClassPropertyAccessibleWithinNestedSubclass.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass1.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass1.js index d26f70b75bd32..6d0c068039fb7 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass1.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass1.js @@ -116,11 +116,11 @@ d4.x; // Error, neither within their declaring class nor class //// [protectedClassPropertyAccessibleWithinNestedSubclass1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js index 330f73bca191e..c2f072b213b0c 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js @@ -22,11 +22,11 @@ class C extends B { //// [protectedClassPropertyAccessibleWithinSubclass.js] // no errors var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass2.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass2.js index cbde651add9b8..b7421c6161cba 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass2.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass2.js @@ -96,11 +96,11 @@ d4.x; // Error, neither within their declaring class nor class //// [protectedClassPropertyAccessibleWithinSubclass2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass3.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass3.js index a2cb66b2997c9..72cf5039e6c6c 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass3.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass3.js @@ -15,11 +15,11 @@ class Derived extends Base { //// [protectedClassPropertyAccessibleWithinSubclass3.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedInstanceMemberAccessibility.js b/tests/baselines/reference/protectedInstanceMemberAccessibility.js index abe608b1ed4e7..dc74f3ed1905f 100644 --- a/tests/baselines/reference/protectedInstanceMemberAccessibility.js +++ b/tests/baselines/reference/protectedInstanceMemberAccessibility.js @@ -46,11 +46,11 @@ class C extends A { //// [protectedInstanceMemberAccessibility.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedMembers.js b/tests/baselines/reference/protectedMembers.js index 689d11be3c359..fddbdf80bcc7e 100644 --- a/tests/baselines/reference/protectedMembers.js +++ b/tests/baselines/reference/protectedMembers.js @@ -117,11 +117,11 @@ class B3 extends A3 { //// [protectedMembers.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass.js b/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass.js index f681073d629bb..9564b6e35b980 100644 --- a/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass.js +++ b/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass.js @@ -45,11 +45,11 @@ Derived3.x; // Error, neither within their declaring class nor classes deriv //// [protectedStaticClassPropertyAccessibleWithinSubclass.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass2.js b/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass2.js index 3096ea6aa3ce9..ca6af2bc4edfc 100644 --- a/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass2.js +++ b/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass2.js @@ -23,11 +23,11 @@ class Derived2 extends Derived1 { //// [protectedStaticClassPropertyAccessibleWithinSubclass2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/qualifiedName_entity-name-resolution-does-not-affect-class-heritage.js b/tests/baselines/reference/qualifiedName_entity-name-resolution-does-not-affect-class-heritage.js index 96df9d1d85b91..ff51753f68306 100644 --- a/tests/baselines/reference/qualifiedName_entity-name-resolution-does-not-affect-class-heritage.js +++ b/tests/baselines/reference/qualifiedName_entity-name-resolution-does-not-affect-class-heritage.js @@ -8,11 +8,11 @@ class Beta extends Alpha.x { //// [qualifiedName_entity-name-resolution-does-not-affect-class-heritage.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/readonlyConstructorAssignment.js b/tests/baselines/reference/readonlyConstructorAssignment.js index 42f88abcf5407..bb4ddec93a832 100644 --- a/tests/baselines/reference/readonlyConstructorAssignment.js +++ b/tests/baselines/reference/readonlyConstructorAssignment.js @@ -42,11 +42,11 @@ class E extends D { //// [readonlyConstructorAssignment.js] // Tests that readonly parameter properties behave like regular readonly properties var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/recursiveBaseCheck3.js b/tests/baselines/reference/recursiveBaseCheck3.js index 3e2cbcee520eb..84b40e2f0353c 100644 --- a/tests/baselines/reference/recursiveBaseCheck3.js +++ b/tests/baselines/reference/recursiveBaseCheck3.js @@ -6,11 +6,11 @@ class C extends A { } //// [recursiveBaseCheck3.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/recursiveBaseCheck4.js b/tests/baselines/reference/recursiveBaseCheck4.js index 5bcf5bb63a787..5db14dcf42d26 100644 --- a/tests/baselines/reference/recursiveBaseCheck4.js +++ b/tests/baselines/reference/recursiveBaseCheck4.js @@ -4,11 +4,11 @@ class M extends M { } //// [recursiveBaseCheck4.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/recursiveBaseCheck6.js b/tests/baselines/reference/recursiveBaseCheck6.js index 7c5134c397c40..e1ac79b3a6337 100644 --- a/tests/baselines/reference/recursiveBaseCheck6.js +++ b/tests/baselines/reference/recursiveBaseCheck6.js @@ -4,11 +4,11 @@ class S18
extends S18<{ S19: A; }>{ } //// [recursiveBaseCheck6.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/recursiveBaseConstructorCreation1.js b/tests/baselines/reference/recursiveBaseConstructorCreation1.js index 0caeb0b3b675d..32a6a6c4de190 100644 --- a/tests/baselines/reference/recursiveBaseConstructorCreation1.js +++ b/tests/baselines/reference/recursiveBaseConstructorCreation1.js @@ -8,11 +8,11 @@ var x = new C2(); // Valid //// [recursiveBaseConstructorCreation1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/recursiveClassInstantiationsWithDefaultConstructors.js b/tests/baselines/reference/recursiveClassInstantiationsWithDefaultConstructors.js index 2b0c30072dc07..1c33cf9f2c7b5 100644 --- a/tests/baselines/reference/recursiveClassInstantiationsWithDefaultConstructors.js +++ b/tests/baselines/reference/recursiveClassInstantiationsWithDefaultConstructors.js @@ -11,11 +11,11 @@ export class MemberNameArray extends MemberName { //// [recursiveClassInstantiationsWithDefaultConstructors.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/recursiveClassReferenceTest.js b/tests/baselines/reference/recursiveClassReferenceTest.js index 8469935d13bc2..bb711d95ce73a 100644 --- a/tests/baselines/reference/recursiveClassReferenceTest.js +++ b/tests/baselines/reference/recursiveClassReferenceTest.js @@ -106,11 +106,11 @@ module Sample.Thing.Languages.PlainText { // Scenario 1: Test reqursive function call with "this" parameter // Scenario 2: Test recursive function call with cast and "this" parameter var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt b/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt index c1c4865024160..10d04ca9719f5 100644 --- a/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt +++ b/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt @@ -27,11 +27,11 @@ sourceFile:recursiveClassReferenceTest.ts 2 >Emitted(2, 75) Source(2, 75) + SourceIndex(0) --- >>>var __extends = (this && this.__extends) || (function () { ->>> var __extendStatics = Object.setPrototypeOf || +>>> 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]; }; >>> return function (d, b) { ->>> __extendStatics(d, b); +>>> extendStatics(d, b); >>> function __() { this.constructor = d; } >>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); >>> }; diff --git a/tests/baselines/reference/recursiveComplicatedClasses.js b/tests/baselines/reference/recursiveComplicatedClasses.js index f1f34e272f120..c81d10ed99beb 100644 --- a/tests/baselines/reference/recursiveComplicatedClasses.js +++ b/tests/baselines/reference/recursiveComplicatedClasses.js @@ -26,11 +26,11 @@ class TypeSymbol extends InferenceSymbol { //// [recursiveComplicatedClasses.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/recursivelySpecializedConstructorDeclaration.js b/tests/baselines/reference/recursivelySpecializedConstructorDeclaration.js index e2a2e8dccffb7..e75661c2ea989 100644 --- a/tests/baselines/reference/recursivelySpecializedConstructorDeclaration.js +++ b/tests/baselines/reference/recursivelySpecializedConstructorDeclaration.js @@ -31,11 +31,11 @@ declare module MsPortal.Controls.Base.ItemList { //// [recursivelySpecializedConstructorDeclaration.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/reexportClassDefinition.js b/tests/baselines/reference/reexportClassDefinition.js index bbaf78a0283cf..5566d2968834f 100644 --- a/tests/baselines/reference/reexportClassDefinition.js +++ b/tests/baselines/reference/reexportClassDefinition.js @@ -34,11 +34,11 @@ module.exports = { //// [foo3.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js b/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js index cf9592ab4b2b0..6145c8927e01d 100644 --- a/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js +++ b/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js @@ -1021,11 +1021,11 @@ module caurinus { //// [resolvingClassDeclarationWhenInBaseTypeResolution.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/returnInConstructor1.js b/tests/baselines/reference/returnInConstructor1.js index 0a71ab129a800..6bdcc0cb6a29d 100644 --- a/tests/baselines/reference/returnInConstructor1.js +++ b/tests/baselines/reference/returnInConstructor1.js @@ -68,11 +68,11 @@ class I extends G { //// [returnInConstructor1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/returnStatements.js b/tests/baselines/reference/returnStatements.js index 999d12f15f838..d3ebb90435539 100644 --- a/tests/baselines/reference/returnStatements.js +++ b/tests/baselines/reference/returnStatements.js @@ -26,11 +26,11 @@ function fn13(): C { return null; } //// [returnStatements.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.js b/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.js index 33723f36d6ae0..81f97455a1f07 100644 --- a/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.js +++ b/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.js @@ -10,11 +10,11 @@ class D extends C { //// [scopeCheckExtendedClassInsidePublicMethod2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.js b/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.js index bac44a57ac032..5532c363050c9 100644 --- a/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.js +++ b/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.js @@ -10,11 +10,11 @@ class D extends C { //// [scopeCheckExtendedClassInsideStaticMethod1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/scopeTests.js b/tests/baselines/reference/scopeTests.js index 0086a0b08ce4e..b60242c07147b 100644 --- a/tests/baselines/reference/scopeTests.js +++ b/tests/baselines/reference/scopeTests.js @@ -13,11 +13,11 @@ class D extends C { //// [scopeTests.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/shadowPrivateMembers.js b/tests/baselines/reference/shadowPrivateMembers.js index 2c56c8ddada05..20be8a6028759 100644 --- a/tests/baselines/reference/shadowPrivateMembers.js +++ b/tests/baselines/reference/shadowPrivateMembers.js @@ -5,11 +5,11 @@ class derived extends base { private n() {} } //// [shadowPrivateMembers.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js index b07cc2e8d8ee2..177c96a551a58 100644 --- a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js +++ b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js @@ -9,11 +9,11 @@ class Greeter extends AbstractGreeter { //// [sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt index 00e15a91e19e8..94fa02e8e6ba0 100644 --- a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt @@ -9,11 +9,11 @@ emittedFile:tests/cases/compiler/sourceMapValidationClassWithDefaultConstructorA sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts ------------------------------------------------------------------- >>>var __extends = (this && this.__extends) || (function () { ->>> var __extendStatics = Object.setPrototypeOf || +>>> 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]; }; >>> return function (d, b) { ->>> __extendStatics(d, b); +>>> extendStatics(d, b); >>> function __() { this.constructor = d; } >>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); >>> }; diff --git a/tests/baselines/reference/specializedInheritedConstructors1.js b/tests/baselines/reference/specializedInheritedConstructors1.js index 3904422842f63..1a9b07b4ca105 100644 --- a/tests/baselines/reference/specializedInheritedConstructors1.js +++ b/tests/baselines/reference/specializedInheritedConstructors1.js @@ -19,11 +19,11 @@ var myView = new MyView(m); // was error //// [specializedInheritedConstructors1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/specializedOverloadWithRestParameters.js b/tests/baselines/reference/specializedOverloadWithRestParameters.js index a40be7711c104..245fe1d40a96f 100644 --- a/tests/baselines/reference/specializedOverloadWithRestParameters.js +++ b/tests/baselines/reference/specializedOverloadWithRestParameters.js @@ -14,11 +14,11 @@ function g(tagName: any): Base { //// [specializedOverloadWithRestParameters.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/staticFactory1.js b/tests/baselines/reference/staticFactory1.js index 77ce4a3d8bc82..9e0d218ca509a 100644 --- a/tests/baselines/reference/staticFactory1.js +++ b/tests/baselines/reference/staticFactory1.js @@ -15,11 +15,11 @@ d.foo(); //// [staticFactory1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/staticInheritance.js b/tests/baselines/reference/staticInheritance.js index a603fc607b976..6e76a0b3155e0 100644 --- a/tests/baselines/reference/staticInheritance.js +++ b/tests/baselines/reference/staticInheritance.js @@ -13,11 +13,11 @@ doThing(B); //OK //// [staticInheritance.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/staticMemberAccessOffDerivedType1.js b/tests/baselines/reference/staticMemberAccessOffDerivedType1.js index f07c4e9ae0f34..ae6e906c6354d 100644 --- a/tests/baselines/reference/staticMemberAccessOffDerivedType1.js +++ b/tests/baselines/reference/staticMemberAccessOffDerivedType1.js @@ -11,11 +11,11 @@ class P extends SomeBase { //// [staticMemberAccessOffDerivedType1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/staticPropSuper.js b/tests/baselines/reference/staticPropSuper.js index dd36b0928f0f1..ba54ed851c186 100644 --- a/tests/baselines/reference/staticPropSuper.js +++ b/tests/baselines/reference/staticPropSuper.js @@ -37,11 +37,11 @@ class E extends A { //// [staticPropSuper.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/strictModeInConstructor.js b/tests/baselines/reference/strictModeInConstructor.js index 9c289a209b504..83ddc4bcf4e5d 100644 --- a/tests/baselines/reference/strictModeInConstructor.js +++ b/tests/baselines/reference/strictModeInConstructor.js @@ -62,11 +62,11 @@ class Ds extends A { //// [strictModeInConstructor.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/strictModeReservedWord.js b/tests/baselines/reference/strictModeReservedWord.js index 614f20eafd651..ed33097cb8378 100644 --- a/tests/baselines/reference/strictModeReservedWord.js +++ b/tests/baselines/reference/strictModeReservedWord.js @@ -29,11 +29,11 @@ function foo() { //// [strictModeReservedWord.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/strictModeReservedWordInClassDeclaration.js b/tests/baselines/reference/strictModeReservedWordInClassDeclaration.js index 344f4edb83d1c..d40175b6d77d7 100644 --- a/tests/baselines/reference/strictModeReservedWordInClassDeclaration.js +++ b/tests/baselines/reference/strictModeReservedWordInClassDeclaration.js @@ -30,11 +30,11 @@ class H extends package.A { } //// [strictModeReservedWordInClassDeclaration.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js b/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js index 5fdc24447917c..376574cc3dd56 100644 --- a/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js +++ b/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js @@ -42,11 +42,11 @@ var b: { [x: string]: A } = { //// [stringIndexerConstrainsPropertyDeclarations2.js] // String indexer providing a constraint of a user defined type var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypesOfTypeParameter.js b/tests/baselines/reference/subtypesOfTypeParameter.js index d5d790c4d4f69..469288cc968f1 100644 --- a/tests/baselines/reference/subtypesOfTypeParameter.js +++ b/tests/baselines/reference/subtypesOfTypeParameter.js @@ -108,11 +108,11 @@ function f2(x: T, y: U) { //// [subtypesOfTypeParameter.js] // checking whether other types are subtypes of type parameters var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints.js b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints.js index 20685aaf52c3d..90f362d9bc61c 100644 --- a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints.js +++ b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints.js @@ -170,11 +170,11 @@ class D29 extends C3 { //// [subtypesOfTypeParameterWithConstraints.js] // checking whether other types are subtypes of type parameters with constraints var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints4.js b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints4.js index dbcdd47ba6d72..3239afebe415b 100644 --- a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints4.js +++ b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints4.js @@ -81,11 +81,11 @@ class D9 extends B1 { //// [subtypesOfTypeParameterWithConstraints4.js] // checking whether other types are subtypes of type parameters with constraints var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypesOfTypeParameterWithRecursiveConstraints.js b/tests/baselines/reference/subtypesOfTypeParameterWithRecursiveConstraints.js index 7b1a7738d99d0..d55bffe2c80e3 100644 --- a/tests/baselines/reference/subtypesOfTypeParameterWithRecursiveConstraints.js +++ b/tests/baselines/reference/subtypesOfTypeParameterWithRecursiveConstraints.js @@ -160,11 +160,11 @@ module M2 { //// [subtypesOfTypeParameterWithRecursiveConstraints.js] // checking whether other types are subtypes of type parameters with constraints var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingTransitivity.js b/tests/baselines/reference/subtypingTransitivity.js index 82a814c9c411a..9292d1fb8781a 100644 --- a/tests/baselines/reference/subtypingTransitivity.js +++ b/tests/baselines/reference/subtypingTransitivity.js @@ -21,11 +21,11 @@ b.x = 1; // assigned number to string //// [subtypingTransitivity.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithCallSignatures2.js b/tests/baselines/reference/subtypingWithCallSignatures2.js index 9e0809090679f..aa919f2e737f4 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures2.js +++ b/tests/baselines/reference/subtypingWithCallSignatures2.js @@ -175,11 +175,11 @@ var r18 = foo18(r18arg1); //// [subtypingWithCallSignatures2.js] // checking subtype relations for function types as it relates to contextual signature instantiation var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithCallSignatures3.js b/tests/baselines/reference/subtypingWithCallSignatures3.js index 64b182872f681..c597a841828c4 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures3.js +++ b/tests/baselines/reference/subtypingWithCallSignatures3.js @@ -122,11 +122,11 @@ module WithGenericSignaturesInBaseType { // checking subtype relations for function types as it relates to contextual signature instantiation // error cases, so function calls will all result in 'any' var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithCallSignatures4.js b/tests/baselines/reference/subtypingWithCallSignatures4.js index e5770b58dfc6a..9b6939167efff 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures4.js +++ b/tests/baselines/reference/subtypingWithCallSignatures4.js @@ -114,11 +114,11 @@ var r18 = foo18(r18arg); //// [subtypingWithCallSignatures4.js] // checking subtype relations for function types as it relates to contextual signature instantiation var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithConstructSignatures2.js b/tests/baselines/reference/subtypingWithConstructSignatures2.js index 5961a930dca71..e2653d7759377 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures2.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures2.js @@ -175,11 +175,11 @@ var r18 = foo18(r18arg1); //// [subtypingWithConstructSignatures2.js] // checking subtype relations for function types as it relates to contextual signature instantiation var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithConstructSignatures3.js b/tests/baselines/reference/subtypingWithConstructSignatures3.js index 62c46d8add9b0..820d222163854 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures3.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures3.js @@ -124,11 +124,11 @@ module WithGenericSignaturesInBaseType { // checking subtype relations for function types as it relates to contextual signature instantiation // error cases, so function calls will all result in 'any' var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithConstructSignatures4.js b/tests/baselines/reference/subtypingWithConstructSignatures4.js index 93415f6d2e634..604604a59cf7b 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures4.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures4.js @@ -114,11 +114,11 @@ var r18 = foo18(r18arg); //// [subtypingWithConstructSignatures4.js] // checking subtype relations for function types as it relates to contextual signature instantiation var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithConstructSignatures5.js b/tests/baselines/reference/subtypingWithConstructSignatures5.js index 64e9965cb85d1..6473bbeafd889 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures5.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures5.js @@ -52,11 +52,11 @@ interface I extends B { // checking subtype relations for function types as it relates to contextual signature instantiation // same as subtypingWithConstructSignatures2 just with an extra level of indirection in the inheritance chain var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithConstructSignatures6.js b/tests/baselines/reference/subtypingWithConstructSignatures6.js index 247fcbbd1bc08..dba21a9a3e282 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures6.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures6.js @@ -55,11 +55,11 @@ interface I9 extends A { // same as subtypingWithConstructSignatures4 but using class type parameters instead of generic signatures // all are errors var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithNumericIndexer.js b/tests/baselines/reference/subtypingWithNumericIndexer.js index 835f82c72b94d..ceae3b0f84e4a 100644 --- a/tests/baselines/reference/subtypingWithNumericIndexer.js +++ b/tests/baselines/reference/subtypingWithNumericIndexer.js @@ -42,11 +42,11 @@ module Generics { //// [subtypingWithNumericIndexer.js] // Derived type indexer must be subtype of base type indexer var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithNumericIndexer3.js b/tests/baselines/reference/subtypingWithNumericIndexer3.js index 761739f547faa..6f77e8a5d13cb 100644 --- a/tests/baselines/reference/subtypingWithNumericIndexer3.js +++ b/tests/baselines/reference/subtypingWithNumericIndexer3.js @@ -46,11 +46,11 @@ module Generics { //// [subtypingWithNumericIndexer3.js] // Derived type indexer must be subtype of base type indexer var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithNumericIndexer4.js b/tests/baselines/reference/subtypingWithNumericIndexer4.js index 3d8bac24a79de..c25e7abb3296c 100644 --- a/tests/baselines/reference/subtypingWithNumericIndexer4.js +++ b/tests/baselines/reference/subtypingWithNumericIndexer4.js @@ -30,11 +30,11 @@ module Generics { //// [subtypingWithNumericIndexer4.js] // Derived type indexer must be subtype of base type indexer var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithObjectMembers.js b/tests/baselines/reference/subtypingWithObjectMembers.js index 7526548f24e8f..c7a2c5a938eb2 100644 --- a/tests/baselines/reference/subtypingWithObjectMembers.js +++ b/tests/baselines/reference/subtypingWithObjectMembers.js @@ -69,11 +69,11 @@ module TwoLevels { //// [subtypingWithObjectMembers.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithObjectMembers4.js b/tests/baselines/reference/subtypingWithObjectMembers4.js index ae6201415878c..4952a1e25ffa0 100644 --- a/tests/baselines/reference/subtypingWithObjectMembers4.js +++ b/tests/baselines/reference/subtypingWithObjectMembers4.js @@ -36,11 +36,11 @@ class B3 extends A3 { //// [subtypingWithObjectMembers4.js] // subtyping when property names do not match var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithObjectMembersAccessibility.js b/tests/baselines/reference/subtypingWithObjectMembersAccessibility.js index 5499502057335..3b7b643b35e35 100644 --- a/tests/baselines/reference/subtypingWithObjectMembersAccessibility.js +++ b/tests/baselines/reference/subtypingWithObjectMembersAccessibility.js @@ -36,11 +36,11 @@ class B3 extends A3 { //// [subtypingWithObjectMembersAccessibility.js] // Derived member is private, base member is not causes errors var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.js b/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.js index a2aca0d13bdf9..40910f393f797 100644 --- a/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.js +++ b/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.js @@ -64,11 +64,11 @@ module ImplicitPublic { //// [subtypingWithObjectMembersAccessibility2.js] // Derived member is private, base member is not causes errors var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithStringIndexer.js b/tests/baselines/reference/subtypingWithStringIndexer.js index 7418e3dcb40bf..bfdb583ac8d82 100644 --- a/tests/baselines/reference/subtypingWithStringIndexer.js +++ b/tests/baselines/reference/subtypingWithStringIndexer.js @@ -43,11 +43,11 @@ module Generics { //// [subtypingWithStringIndexer.js] // Derived type indexer must be subtype of base type indexer var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithStringIndexer3.js b/tests/baselines/reference/subtypingWithStringIndexer3.js index 081219774e5ff..3385ea5a7928f 100644 --- a/tests/baselines/reference/subtypingWithStringIndexer3.js +++ b/tests/baselines/reference/subtypingWithStringIndexer3.js @@ -46,11 +46,11 @@ module Generics { //// [subtypingWithStringIndexer3.js] // Derived type indexer must be subtype of base type indexer var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithStringIndexer4.js b/tests/baselines/reference/subtypingWithStringIndexer4.js index b0c55cf6398fe..04075c906f41a 100644 --- a/tests/baselines/reference/subtypingWithStringIndexer4.js +++ b/tests/baselines/reference/subtypingWithStringIndexer4.js @@ -30,11 +30,11 @@ module Generics { //// [subtypingWithStringIndexer4.js] // Derived type indexer must be subtype of base type indexer var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/super.js b/tests/baselines/reference/super.js index 8984c5860eaea..98c38569c37a1 100644 --- a/tests/baselines/reference/super.js +++ b/tests/baselines/reference/super.js @@ -39,11 +39,11 @@ s.foo() + ss.foo(); //// [super.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/super1.js b/tests/baselines/reference/super1.js index 49a057a7f494b..7d695c2aeca0a 100644 --- a/tests/baselines/reference/super1.js +++ b/tests/baselines/reference/super1.js @@ -68,11 +68,11 @@ module Base4 { //// [super1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/super2.js b/tests/baselines/reference/super2.js index 451c569c907e8..80bfbe0d8bec0 100644 --- a/tests/baselines/reference/super2.js +++ b/tests/baselines/reference/super2.js @@ -52,11 +52,11 @@ results1.x() + results1.y() + results2.y(); //// [super2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superAccess.js b/tests/baselines/reference/superAccess.js index a218ba0968a1c..a1303185739c6 100644 --- a/tests/baselines/reference/superAccess.js +++ b/tests/baselines/reference/superAccess.js @@ -15,11 +15,11 @@ class MyDerived extends MyBase { //// [superAccess.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superAccess2.js b/tests/baselines/reference/superAccess2.js index d678ff22480da..b4766c67bdd4d 100644 --- a/tests/baselines/reference/superAccess2.js +++ b/tests/baselines/reference/superAccess2.js @@ -26,11 +26,11 @@ class Q extends P { //// [superAccess2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superAccessInFatArrow1.js b/tests/baselines/reference/superAccessInFatArrow1.js index a58b119c67f07..b4e81c65da5b3 100644 --- a/tests/baselines/reference/superAccessInFatArrow1.js +++ b/tests/baselines/reference/superAccessInFatArrow1.js @@ -17,11 +17,11 @@ module test { //// [superAccessInFatArrow1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallArgsMustMatch.js b/tests/baselines/reference/superCallArgsMustMatch.js index d488506e019f0..113fbd6962565 100644 --- a/tests/baselines/reference/superCallArgsMustMatch.js +++ b/tests/baselines/reference/superCallArgsMustMatch.js @@ -27,11 +27,11 @@ class T6 extends T5{ //// [superCallArgsMustMatch.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallAssignResult.js b/tests/baselines/reference/superCallAssignResult.js index 50e1c20b6bc09..ef0493d3b2b28 100644 --- a/tests/baselines/reference/superCallAssignResult.js +++ b/tests/baselines/reference/superCallAssignResult.js @@ -12,11 +12,11 @@ class H extends E { //// [superCallAssignResult.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing1.js b/tests/baselines/reference/superCallBeforeThisAccessing1.js index 71c9e05e7cbbe..3045968da16cd 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing1.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing1.js @@ -18,11 +18,11 @@ class D extends Base { //// [superCallBeforeThisAccessing1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing2.js b/tests/baselines/reference/superCallBeforeThisAccessing2.js index a18505f820396..da634558f1258 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing2.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing2.js @@ -12,11 +12,11 @@ class D extends Base { //// [superCallBeforeThisAccessing2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing3.js b/tests/baselines/reference/superCallBeforeThisAccessing3.js index 61ed4fe5c4c27..99feb79042c43 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing3.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing3.js @@ -15,11 +15,11 @@ class D extends Base { //// [superCallBeforeThisAccessing3.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing4.js b/tests/baselines/reference/superCallBeforeThisAccessing4.js index cf5e9e89eba0a..0ee568c527e46 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing4.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing4.js @@ -17,11 +17,11 @@ class E extends null { //// [superCallBeforeThisAccessing4.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing5.js b/tests/baselines/reference/superCallBeforeThisAccessing5.js index 31087b70094f9..8cd5cda05200f 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing5.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing5.js @@ -9,11 +9,11 @@ class D extends null { //// [superCallBeforeThisAccessing5.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing6.js b/tests/baselines/reference/superCallBeforeThisAccessing6.js index 0c3d20c102fbe..d5c6fd9c68430 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing6.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing6.js @@ -12,11 +12,11 @@ class D extends Base { //// [superCallBeforeThisAccessing6.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing7.js b/tests/baselines/reference/superCallBeforeThisAccessing7.js index ba79e0b65ae0d..af649aa4c3086 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing7.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing7.js @@ -15,11 +15,11 @@ class D extends Base { //// [superCallBeforeThisAccessing7.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing8.js b/tests/baselines/reference/superCallBeforeThisAccessing8.js index 4f6a383aadf3b..ae115d0ffbd26 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing8.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing8.js @@ -15,11 +15,11 @@ class D extends Base { //// [superCallBeforeThisAccessing8.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType1.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType1.js index e24d0b53c1f6a..4ee302020ef6f 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType1.js @@ -13,11 +13,11 @@ class D extends B { //// [superCallFromClassThatDerivesFromGenericType1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType2.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType2.js index 3413bc1846737..3d9c8ff717e75 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType2.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType2.js @@ -12,11 +12,11 @@ class D extends B { //// [superCallFromClassThatDerivesFromGenericType2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js index f31fd399b3618..1803820712557 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js @@ -12,11 +12,11 @@ class B extends A { //// [superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js index 4c99415f6433a..77b0f4af212e7 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js @@ -12,11 +12,11 @@ class B extends A { //// [superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js b/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js index bbea46b27838b..861bd9b470cb5 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js @@ -12,11 +12,11 @@ class B extends A { //// [superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallInNonStaticMethod.js b/tests/baselines/reference/superCallInNonStaticMethod.js index 54c771575909c..056dda2bf3392 100644 --- a/tests/baselines/reference/superCallInNonStaticMethod.js +++ b/tests/baselines/reference/superCallInNonStaticMethod.js @@ -52,11 +52,11 @@ class Other extends Doing { //// [superCallInNonStaticMethod.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallInStaticMethod.js b/tests/baselines/reference/superCallInStaticMethod.js index 15d46bc1577a9..4e2610414b7fe 100644 --- a/tests/baselines/reference/superCallInStaticMethod.js +++ b/tests/baselines/reference/superCallInStaticMethod.js @@ -48,11 +48,11 @@ class Other extends Doing { //// [superCallInStaticMethod.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallInsideClassDeclaration.js b/tests/baselines/reference/superCallInsideClassDeclaration.js index 7f5913549cc99..1533df5f305b3 100644 --- a/tests/baselines/reference/superCallInsideClassDeclaration.js +++ b/tests/baselines/reference/superCallInsideClassDeclaration.js @@ -18,11 +18,11 @@ class B extends A { //// [superCallInsideClassDeclaration.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallInsideClassExpression.js b/tests/baselines/reference/superCallInsideClassExpression.js index 0f1fa8dc54928..1f3242c8b1e4f 100644 --- a/tests/baselines/reference/superCallInsideClassExpression.js +++ b/tests/baselines/reference/superCallInsideClassExpression.js @@ -18,11 +18,11 @@ class B extends A { //// [superCallInsideClassExpression.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallInsideObjectLiteralExpression.js b/tests/baselines/reference/superCallInsideObjectLiteralExpression.js index 0130a6c2b4860..eb7df511e05fd 100644 --- a/tests/baselines/reference/superCallInsideObjectLiteralExpression.js +++ b/tests/baselines/reference/superCallInsideObjectLiteralExpression.js @@ -14,11 +14,11 @@ class B extends A { //// [superCallInsideObjectLiteralExpression.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallOutsideConstructor.js b/tests/baselines/reference/superCallOutsideConstructor.js index 0251b19231e75..60e9411d4142d 100644 --- a/tests/baselines/reference/superCallOutsideConstructor.js +++ b/tests/baselines/reference/superCallOutsideConstructor.js @@ -24,11 +24,11 @@ var d = new D(); //// [superCallOutsideConstructor.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallParameterContextualTyping1.js b/tests/baselines/reference/superCallParameterContextualTyping1.js index a3d5303efaa09..cfb0efa9d3de0 100644 --- a/tests/baselines/reference/superCallParameterContextualTyping1.js +++ b/tests/baselines/reference/superCallParameterContextualTyping1.js @@ -14,11 +14,11 @@ class B extends A { //// [superCallParameterContextualTyping1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallParameterContextualTyping2.js b/tests/baselines/reference/superCallParameterContextualTyping2.js index e90755ffee894..f1180347142ff 100644 --- a/tests/baselines/reference/superCallParameterContextualTyping2.js +++ b/tests/baselines/reference/superCallParameterContextualTyping2.js @@ -13,11 +13,11 @@ class C extends A { //// [superCallParameterContextualTyping2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallParameterContextualTyping3.js b/tests/baselines/reference/superCallParameterContextualTyping3.js index fe68db83a0413..c955f210779ba 100644 --- a/tests/baselines/reference/superCallParameterContextualTyping3.js +++ b/tests/baselines/reference/superCallParameterContextualTyping3.js @@ -33,11 +33,11 @@ class C extends CBase { //// [superCallParameterContextualTyping3.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallWithCommentEmit01.js b/tests/baselines/reference/superCallWithCommentEmit01.js index 3a2981b84667a..993776f0057a0 100644 --- a/tests/baselines/reference/superCallWithCommentEmit01.js +++ b/tests/baselines/reference/superCallWithCommentEmit01.js @@ -12,11 +12,11 @@ class B extends A { //// [superCallWithCommentEmit01.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallWithMissingBaseClass.js b/tests/baselines/reference/superCallWithMissingBaseClass.js index 7ae8d5b309900..a10281c4d3cfe 100644 --- a/tests/baselines/reference/superCallWithMissingBaseClass.js +++ b/tests/baselines/reference/superCallWithMissingBaseClass.js @@ -11,11 +11,11 @@ class Foo extends Bar { //// [superCallWithMissingBaseClass.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCalls.js b/tests/baselines/reference/superCalls.js index ac9b087808386..e5c014a4e1618 100644 --- a/tests/baselines/reference/superCalls.js +++ b/tests/baselines/reference/superCalls.js @@ -32,11 +32,11 @@ class OtherDerived extends OtherBase { //// [superCalls.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallsInConstructor.js b/tests/baselines/reference/superCallsInConstructor.js index d44ae6c11ec8d..2290ff746cd02 100644 --- a/tests/baselines/reference/superCallsInConstructor.js +++ b/tests/baselines/reference/superCallsInConstructor.js @@ -22,11 +22,11 @@ class Derived extends Base { //// [superCallsInConstructor.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superErrors.js b/tests/baselines/reference/superErrors.js index d7078f39c1688..cf7edc83a63a2 100644 --- a/tests/baselines/reference/superErrors.js +++ b/tests/baselines/reference/superErrors.js @@ -53,11 +53,11 @@ class RegisteredUser extends User { //// [superErrors.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superInCatchBlock1.js b/tests/baselines/reference/superInCatchBlock1.js index b9d7c910977d6..31015ee9cfc03 100644 --- a/tests/baselines/reference/superInCatchBlock1.js +++ b/tests/baselines/reference/superInCatchBlock1.js @@ -15,11 +15,11 @@ class B extends A { //// [superInCatchBlock1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superInConstructorParam1.js b/tests/baselines/reference/superInConstructorParam1.js index 0f6ec4e386f3d..940559c682836 100644 --- a/tests/baselines/reference/superInConstructorParam1.js +++ b/tests/baselines/reference/superInConstructorParam1.js @@ -12,11 +12,11 @@ class C extends B { //// [superInConstructorParam1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superInLambdas.js b/tests/baselines/reference/superInLambdas.js index 9eeeaa0723ca1..83dad0b32515c 100644 --- a/tests/baselines/reference/superInLambdas.js +++ b/tests/baselines/reference/superInLambdas.js @@ -69,11 +69,11 @@ class RegisteredUser4 extends User { //// [superInLambdas.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superInObjectLiterals_ES5.js b/tests/baselines/reference/superInObjectLiterals_ES5.js index cfcd7a4de2a86..f86052cb92362 100644 --- a/tests/baselines/reference/superInObjectLiterals_ES5.js +++ b/tests/baselines/reference/superInObjectLiterals_ES5.js @@ -61,11 +61,11 @@ class B extends A { //// [superInObjectLiterals_ES5.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superNewCall1.js b/tests/baselines/reference/superNewCall1.js index 5a5a91cd8f700..311f3bb6acc9a 100644 --- a/tests/baselines/reference/superNewCall1.js +++ b/tests/baselines/reference/superNewCall1.js @@ -14,11 +14,11 @@ class B extends A { //// [superNewCall1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superPropertyAccess.js b/tests/baselines/reference/superPropertyAccess.js index f6c09ab9092ba..0c01882e6ad3b 100644 --- a/tests/baselines/reference/superPropertyAccess.js +++ b/tests/baselines/reference/superPropertyAccess.js @@ -38,11 +38,11 @@ class MyDerived extends MyBase { //// [superPropertyAccess.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superPropertyAccess1.js b/tests/baselines/reference/superPropertyAccess1.js index 3eef279e45460..8779dd7069b36 100644 --- a/tests/baselines/reference/superPropertyAccess1.js +++ b/tests/baselines/reference/superPropertyAccess1.js @@ -29,11 +29,11 @@ class D extends C { //// [superPropertyAccess1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superPropertyAccess2.js b/tests/baselines/reference/superPropertyAccess2.js index 767b08dc2b9b9..a6fb7c95b0c81 100644 --- a/tests/baselines/reference/superPropertyAccess2.js +++ b/tests/baselines/reference/superPropertyAccess2.js @@ -29,11 +29,11 @@ class D extends C { //// [superPropertyAccess2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superPropertyAccessInComputedPropertiesOfNestedType_ES5.js b/tests/baselines/reference/superPropertyAccessInComputedPropertiesOfNestedType_ES5.js index 014110485e6fa..1b906baa3bb5a 100644 --- a/tests/baselines/reference/superPropertyAccessInComputedPropertiesOfNestedType_ES5.js +++ b/tests/baselines/reference/superPropertyAccessInComputedPropertiesOfNestedType_ES5.js @@ -16,11 +16,11 @@ class B extends A { //// [superPropertyAccessInComputedPropertiesOfNestedType_ES5.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superPropertyAccessNoError.js b/tests/baselines/reference/superPropertyAccessNoError.js index 10e64d97a9227..d2e3d7aad4148 100644 --- a/tests/baselines/reference/superPropertyAccessNoError.js +++ b/tests/baselines/reference/superPropertyAccessNoError.js @@ -78,11 +78,11 @@ instance.returnThis().fn(); //super.publicStaticMemberFunction in static member function of derived class //super.publicStaticMemberFunction in static member accessor(get and set) of derived class var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superPropertyAccess_ES5.js b/tests/baselines/reference/superPropertyAccess_ES5.js index 2a48bfbdba7b7..6d10e60f1c063 100644 --- a/tests/baselines/reference/superPropertyAccess_ES5.js +++ b/tests/baselines/reference/superPropertyAccess_ES5.js @@ -31,11 +31,11 @@ class B extends A { //// [superPropertyAccess_ES5.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superPropertyInConstructorBeforeSuperCall.js b/tests/baselines/reference/superPropertyInConstructorBeforeSuperCall.js index 3188e79bd7e64..6e87bfc97c55b 100644 --- a/tests/baselines/reference/superPropertyInConstructorBeforeSuperCall.js +++ b/tests/baselines/reference/superPropertyInConstructorBeforeSuperCall.js @@ -17,11 +17,11 @@ class C2 extends B { //// [superPropertyInConstructorBeforeSuperCall.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superSymbolIndexedAccess5.js b/tests/baselines/reference/superSymbolIndexedAccess5.js index ec26d7dd67f0f..715c6568a2fc5 100644 --- a/tests/baselines/reference/superSymbolIndexedAccess5.js +++ b/tests/baselines/reference/superSymbolIndexedAccess5.js @@ -15,11 +15,11 @@ class Bar extends Foo { //// [superSymbolIndexedAccess5.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superSymbolIndexedAccess6.js b/tests/baselines/reference/superSymbolIndexedAccess6.js index 09bef412516ba..c92ecda44c180 100644 --- a/tests/baselines/reference/superSymbolIndexedAccess6.js +++ b/tests/baselines/reference/superSymbolIndexedAccess6.js @@ -15,11 +15,11 @@ class Bar extends Foo { //// [superSymbolIndexedAccess6.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superWithGenericSpecialization.js b/tests/baselines/reference/superWithGenericSpecialization.js index afd049ed8a2f1..6f3cee935ef57 100644 --- a/tests/baselines/reference/superWithGenericSpecialization.js +++ b/tests/baselines/reference/superWithGenericSpecialization.js @@ -16,11 +16,11 @@ var r2: number = d.y; //// [superWithGenericSpecialization.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superWithGenerics.js b/tests/baselines/reference/superWithGenerics.js index 148fac45a70ce..a66656832f43f 100644 --- a/tests/baselines/reference/superWithGenerics.js +++ b/tests/baselines/reference/superWithGenerics.js @@ -13,11 +13,11 @@ class D extends B { //// [superWithGenerics.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superWithTypeArgument.js b/tests/baselines/reference/superWithTypeArgument.js index 22b802ec2dfb9..158799cc93d8c 100644 --- a/tests/baselines/reference/superWithTypeArgument.js +++ b/tests/baselines/reference/superWithTypeArgument.js @@ -11,11 +11,11 @@ class D extends C { //// [superWithTypeArgument.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superWithTypeArgument2.js b/tests/baselines/reference/superWithTypeArgument2.js index ace1355c3748a..349589625fbd3 100644 --- a/tests/baselines/reference/superWithTypeArgument2.js +++ b/tests/baselines/reference/superWithTypeArgument2.js @@ -11,11 +11,11 @@ class D extends C { //// [superWithTypeArgument2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superWithTypeArgument3.js b/tests/baselines/reference/superWithTypeArgument3.js index 318b45a9981ca..a8325a5a5945a 100644 --- a/tests/baselines/reference/superWithTypeArgument3.js +++ b/tests/baselines/reference/superWithTypeArgument3.js @@ -15,11 +15,11 @@ class D extends C { //// [superWithTypeArgument3.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/super_inside-object-literal-getters-and-setters.js b/tests/baselines/reference/super_inside-object-literal-getters-and-setters.js index 2fca7ec7fe46e..0547650c7d8fc 100644 --- a/tests/baselines/reference/super_inside-object-literal-getters-and-setters.js +++ b/tests/baselines/reference/super_inside-object-literal-getters-and-setters.js @@ -29,11 +29,11 @@ class SuperObjectTest extends F { //// [super_inside-object-literal-getters-and-setters.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/switchStatements.js b/tests/baselines/reference/switchStatements.js index 5af42176dfc3f..7d8c2477b68b7 100644 --- a/tests/baselines/reference/switchStatements.js +++ b/tests/baselines/reference/switchStatements.js @@ -57,11 +57,11 @@ switch (((x: T) => '')(1)) { } //// [switchStatements.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/systemModuleWithSuperClass.js b/tests/baselines/reference/systemModuleWithSuperClass.js index c9adf13f48c9f..76c4648daa10e 100644 --- a/tests/baselines/reference/systemModuleWithSuperClass.js +++ b/tests/baselines/reference/systemModuleWithSuperClass.js @@ -33,11 +33,11 @@ System.register([], function (exports_1, context_1) { System.register(["./foo"], function (exports_1, context_1) { "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/targetTypeBaseCalls.js b/tests/baselines/reference/targetTypeBaseCalls.js index 92ad5afba94a1..70e14fd521f68 100644 --- a/tests/baselines/reference/targetTypeBaseCalls.js +++ b/tests/baselines/reference/targetTypeBaseCalls.js @@ -20,11 +20,11 @@ class Bar extends Foo { constructor() { super(function(s) { s = 5 }) } } // err //// [targetTypeBaseCalls.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/thisInInvalidContexts.js b/tests/baselines/reference/thisInInvalidContexts.js index a2237177f8429..59530b8903eed 100644 --- a/tests/baselines/reference/thisInInvalidContexts.js +++ b/tests/baselines/reference/thisInInvalidContexts.js @@ -50,11 +50,11 @@ enum SomeEnum { //// [thisInInvalidContexts.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/thisInInvalidContextsExternalModule.js b/tests/baselines/reference/thisInInvalidContextsExternalModule.js index ccb2a71080fb5..37a1fb596d4ca 100644 --- a/tests/baselines/reference/thisInInvalidContextsExternalModule.js +++ b/tests/baselines/reference/thisInInvalidContextsExternalModule.js @@ -51,11 +51,11 @@ export = this; // Should be an error //// [thisInInvalidContextsExternalModule.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/thisInSuperCall.js b/tests/baselines/reference/thisInSuperCall.js index b537231f74ba6..58eadaf874f3c 100644 --- a/tests/baselines/reference/thisInSuperCall.js +++ b/tests/baselines/reference/thisInSuperCall.js @@ -24,11 +24,11 @@ class Foo3 extends Base { //// [thisInSuperCall.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/thisInSuperCall1.js b/tests/baselines/reference/thisInSuperCall1.js index 9f40814cc5f6c..c975c10927e9e 100644 --- a/tests/baselines/reference/thisInSuperCall1.js +++ b/tests/baselines/reference/thisInSuperCall1.js @@ -12,11 +12,11 @@ class Foo extends Base { //// [thisInSuperCall1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/thisInSuperCall2.js b/tests/baselines/reference/thisInSuperCall2.js index ebbb974f23f58..be9b2bbb9f3a7 100644 --- a/tests/baselines/reference/thisInSuperCall2.js +++ b/tests/baselines/reference/thisInSuperCall2.js @@ -21,11 +21,11 @@ class Foo2 extends Base { //// [thisInSuperCall2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/thisInSuperCall3.js b/tests/baselines/reference/thisInSuperCall3.js index 5c9405534f4ba..2e07d2948433a 100644 --- a/tests/baselines/reference/thisInSuperCall3.js +++ b/tests/baselines/reference/thisInSuperCall3.js @@ -14,11 +14,11 @@ class Foo extends Base { //// [thisInSuperCall3.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/thisTypeInFunctions.js b/tests/baselines/reference/thisTypeInFunctions.js index 21714308cb11b..8a09f18b3f18f 100644 --- a/tests/baselines/reference/thisTypeInFunctions.js +++ b/tests/baselines/reference/thisTypeInFunctions.js @@ -196,11 +196,11 @@ function missingTypeIsImplicitAny(this, a: number) { return this.anything + a; } //// [thisTypeInFunctions.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/thisTypeInFunctionsNegative.js b/tests/baselines/reference/thisTypeInFunctionsNegative.js index 27bc47b84d23f..c68aa2ee0a026 100644 --- a/tests/baselines/reference/thisTypeInFunctionsNegative.js +++ b/tests/baselines/reference/thisTypeInFunctionsNegative.js @@ -178,11 +178,11 @@ c.explicitProperty = (this, m) => m + this.n; //// [thisTypeInFunctionsNegative.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/tsxCorrectlyParseLessThanComparison1.js b/tests/baselines/reference/tsxCorrectlyParseLessThanComparison1.js index 55d3ba5422183..b092b4c96d514 100644 --- a/tests/baselines/reference/tsxCorrectlyParseLessThanComparison1.js +++ b/tests/baselines/reference/tsxCorrectlyParseLessThanComparison1.js @@ -22,11 +22,11 @@ export class ShortDetails extends React.Component<{ id: number }, {}> { //// [tsxCorrectlyParseLessThanComparison1.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/tsxDynamicTagName5.js b/tests/baselines/reference/tsxDynamicTagName5.js index 2b055cd5a5a5d..d40e84c907850 100644 --- a/tests/baselines/reference/tsxDynamicTagName5.js +++ b/tests/baselines/reference/tsxDynamicTagName5.js @@ -22,11 +22,11 @@ export class Text extends React.Component<{}, {}> { //// [app.jsx] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/tsxDynamicTagName7.js b/tests/baselines/reference/tsxDynamicTagName7.js index 3108566db8500..8e051ec9012d5 100644 --- a/tests/baselines/reference/tsxDynamicTagName7.js +++ b/tests/baselines/reference/tsxDynamicTagName7.js @@ -22,11 +22,11 @@ export class Text extends React.Component<{}, {}> { //// [app.jsx] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/tsxDynamicTagName8.js b/tests/baselines/reference/tsxDynamicTagName8.js index 8859061b4630f..6f24711305569 100644 --- a/tests/baselines/reference/tsxDynamicTagName8.js +++ b/tests/baselines/reference/tsxDynamicTagName8.js @@ -22,11 +22,11 @@ export class Text extends React.Component<{}, {}> { //// [app.jsx] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/tsxDynamicTagName9.js b/tests/baselines/reference/tsxDynamicTagName9.js index 818e384fdf627..652d633421638 100644 --- a/tests/baselines/reference/tsxDynamicTagName9.js +++ b/tests/baselines/reference/tsxDynamicTagName9.js @@ -22,11 +22,11 @@ export class Text extends React.Component<{}, {}> { //// [app.jsx] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/tsxExternalModuleEmit1.js b/tests/baselines/reference/tsxExternalModuleEmit1.js index 559306b800ba9..b030df4f253ba 100644 --- a/tests/baselines/reference/tsxExternalModuleEmit1.js +++ b/tests/baselines/reference/tsxExternalModuleEmit1.js @@ -34,11 +34,11 @@ export class Button extends React.Component { //// [button.jsx] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -58,11 +58,11 @@ exports.Button = Button; //// [app.jsx] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/tsxStatelessFunctionComponents2.js b/tests/baselines/reference/tsxStatelessFunctionComponents2.js index 12c2f1f9ab3ed..e0165faa36a04 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponents2.js +++ b/tests/baselines/reference/tsxStatelessFunctionComponents2.js @@ -41,11 +41,11 @@ let i =
x.propertyNotOnHtmlDivElement} />; //// [file.jsx] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/tsxUnionTypeComponent1.js b/tests/baselines/reference/tsxUnionTypeComponent1.js index 2b1634555ef1e..601be253e50ec 100644 --- a/tests/baselines/reference/tsxUnionTypeComponent1.js +++ b/tests/baselines/reference/tsxUnionTypeComponent1.js @@ -27,11 +27,11 @@ class MyButtonComponent extends React.Component<{},{}> { //// [file.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeAssertions.js b/tests/baselines/reference/typeAssertions.js index 3107a196f2a69..84101c7db2d40 100644 --- a/tests/baselines/reference/typeAssertions.js +++ b/tests/baselines/reference/typeAssertions.js @@ -53,11 +53,11 @@ if((numOrStr === undefined) as numOrStr is string) { // Error //// [typeAssertions.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardFunction.js b/tests/baselines/reference/typeGuardFunction.js index 0eb332af60ebe..8ce969eaa80c2 100644 --- a/tests/baselines/reference/typeGuardFunction.js +++ b/tests/baselines/reference/typeGuardFunction.js @@ -85,11 +85,11 @@ let union3: boolean | B = isA(union2) || union2; //// [typeGuardFunction.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardFunctionErrors.js b/tests/baselines/reference/typeGuardFunctionErrors.js index 21d9dfeebf109..1471a235b899f 100644 --- a/tests/baselines/reference/typeGuardFunctionErrors.js +++ b/tests/baselines/reference/typeGuardFunctionErrors.js @@ -147,11 +147,11 @@ if (hasMissingParameter()) { //// [typeGuardFunctionErrors.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardFunctionGenerics.js b/tests/baselines/reference/typeGuardFunctionGenerics.js index 0344e168c5325..9fec88b19597f 100644 --- a/tests/baselines/reference/typeGuardFunctionGenerics.js +++ b/tests/baselines/reference/typeGuardFunctionGenerics.js @@ -35,11 +35,11 @@ let test3: B = funE(isB, 1); //// [typeGuardFunctionGenerics.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardFunctionOfFormThis.js b/tests/baselines/reference/typeGuardFunctionOfFormThis.js index 54110ba24d851..58b9c9027fa9d 100644 --- a/tests/baselines/reference/typeGuardFunctionOfFormThis.js +++ b/tests/baselines/reference/typeGuardFunctionOfFormThis.js @@ -143,11 +143,11 @@ interface MimicGuardInterface { //// [typeGuardFunctionOfFormThis.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.js b/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.js index a79efd94c8f5f..b53f3ca511acb 100644 --- a/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.js +++ b/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.js @@ -61,11 +61,11 @@ else { //// [typeGuardFunctionOfFormThisErrors.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardOfFormInstanceOf.js b/tests/baselines/reference/typeGuardOfFormInstanceOf.js index fa99dbd87cf55..23a1770d56444 100644 --- a/tests/baselines/reference/typeGuardOfFormInstanceOf.js +++ b/tests/baselines/reference/typeGuardOfFormInstanceOf.js @@ -74,11 +74,11 @@ else { // it is a subtype of the type of x, or // - when false, has no effect on the type of x. var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardOfFormIsType.js b/tests/baselines/reference/typeGuardOfFormIsType.js index f1a94c5167a43..3ea3839651eb2 100644 --- a/tests/baselines/reference/typeGuardOfFormIsType.js +++ b/tests/baselines/reference/typeGuardOfFormIsType.js @@ -39,11 +39,11 @@ var r2: C2 | D1 = isC1(c2Ord1) && c2Ord1; // C2 | D1 //// [typeGuardOfFormIsType.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardOfFormThisMember.js b/tests/baselines/reference/typeGuardOfFormThisMember.js index b7d442711d700..6540c298766ba 100644 --- a/tests/baselines/reference/typeGuardOfFormThisMember.js +++ b/tests/baselines/reference/typeGuardOfFormThisMember.js @@ -84,11 +84,11 @@ namespace Test { //// [typeGuardOfFormThisMember.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js b/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js index e2b8b8ec168bf..9e4fd71e1ec08 100644 --- a/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js +++ b/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js @@ -34,11 +34,11 @@ namespace Test { //// [typeGuardOfFormThisMemberErrors.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeMatch2.js b/tests/baselines/reference/typeMatch2.js index 84ff8f72c5c97..b051cdf506f9a 100644 --- a/tests/baselines/reference/typeMatch2.js +++ b/tests/baselines/reference/typeMatch2.js @@ -46,11 +46,11 @@ function f4() { //// [typeMatch2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeOfSuperCall.js b/tests/baselines/reference/typeOfSuperCall.js index eca6ad1bc0a16..48f57c4c9f7d5 100644 --- a/tests/baselines/reference/typeOfSuperCall.js +++ b/tests/baselines/reference/typeOfSuperCall.js @@ -10,11 +10,11 @@ class D extends C { //// [typeOfSuperCall.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeParameterAsBaseClass.js b/tests/baselines/reference/typeParameterAsBaseClass.js index dc579b7b62fe7..444e44c368731 100644 --- a/tests/baselines/reference/typeParameterAsBaseClass.js +++ b/tests/baselines/reference/typeParameterAsBaseClass.js @@ -4,11 +4,11 @@ class C2 implements T {} //// [typeParameterAsBaseClass.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeParameterAsBaseType.js b/tests/baselines/reference/typeParameterAsBaseType.js index 8031782373111..00d8781efcaa6 100644 --- a/tests/baselines/reference/typeParameterAsBaseType.js +++ b/tests/baselines/reference/typeParameterAsBaseType.js @@ -14,11 +14,11 @@ interface I2 extends U { } // type parameters cannot be used as base types // these are all errors var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeParameterExtendingUnion1.js b/tests/baselines/reference/typeParameterExtendingUnion1.js index 80fd91c64b88f..7b456983f2e65 100644 --- a/tests/baselines/reference/typeParameterExtendingUnion1.js +++ b/tests/baselines/reference/typeParameterExtendingUnion1.js @@ -14,11 +14,11 @@ function f(a: T) { //// [typeParameterExtendingUnion1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeParameterExtendingUnion2.js b/tests/baselines/reference/typeParameterExtendingUnion2.js index 8dc8db48ed853..508eb8e0616be 100644 --- a/tests/baselines/reference/typeParameterExtendingUnion2.js +++ b/tests/baselines/reference/typeParameterExtendingUnion2.js @@ -14,11 +14,11 @@ function f(a: T) { //// [typeParameterExtendingUnion2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeRelationships.js b/tests/baselines/reference/typeRelationships.js index 42ff32f9ab150..93d920a6c8cb4 100644 --- a/tests/baselines/reference/typeRelationships.js +++ b/tests/baselines/reference/typeRelationships.js @@ -42,11 +42,11 @@ class D extends C { //// [typeRelationships.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeValueConflict1.js b/tests/baselines/reference/typeValueConflict1.js index a84939d2e10cf..065c2968a12ef 100644 --- a/tests/baselines/reference/typeValueConflict1.js +++ b/tests/baselines/reference/typeValueConflict1.js @@ -13,11 +13,11 @@ module M2 { //// [typeValueConflict1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeValueConflict2.js b/tests/baselines/reference/typeValueConflict2.js index 40bdb36421858..6cbcc708a0d9e 100644 --- a/tests/baselines/reference/typeValueConflict2.js +++ b/tests/baselines/reference/typeValueConflict2.js @@ -20,11 +20,11 @@ module M3 { //// [typeValueConflict2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeofClass2.js b/tests/baselines/reference/typeofClass2.js index d7e92bd6a8f4c..e829411ed320e 100644 --- a/tests/baselines/reference/typeofClass2.js +++ b/tests/baselines/reference/typeofClass2.js @@ -23,11 +23,11 @@ var r2: typeof d; //// [typeofClass2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typesWithSpecializedCallSignatures.js b/tests/baselines/reference/typesWithSpecializedCallSignatures.js index 24ea5d0ed646e..282a3f72f1554 100644 --- a/tests/baselines/reference/typesWithSpecializedCallSignatures.js +++ b/tests/baselines/reference/typesWithSpecializedCallSignatures.js @@ -44,11 +44,11 @@ var r3: Base = c.foo('hm'); //// [typesWithSpecializedCallSignatures.js] // basic uses of specialized signatures without errors var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typesWithSpecializedConstructSignatures.js b/tests/baselines/reference/typesWithSpecializedConstructSignatures.js index 396f24805eb97..b27eaf2725c7f 100644 --- a/tests/baselines/reference/typesWithSpecializedConstructSignatures.js +++ b/tests/baselines/reference/typesWithSpecializedConstructSignatures.js @@ -42,11 +42,11 @@ var r3: Base = new a('hm'); //// [typesWithSpecializedConstructSignatures.js] // basic uses of specialized signatures without errors var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/undeclaredBase.js b/tests/baselines/reference/undeclaredBase.js index a280e90e75cfd..ed2f2d66d93da 100644 --- a/tests/baselines/reference/undeclaredBase.js +++ b/tests/baselines/reference/undeclaredBase.js @@ -5,11 +5,11 @@ module M { export class C extends M.I { } } //// [undeclaredBase.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/undefinedIsSubtypeOfEverything.js b/tests/baselines/reference/undefinedIsSubtypeOfEverything.js index 56ae1ae24474a..c00281f2b8c82 100644 --- a/tests/baselines/reference/undefinedIsSubtypeOfEverything.js +++ b/tests/baselines/reference/undefinedIsSubtypeOfEverything.js @@ -124,11 +124,11 @@ class D17 extends Base { //// [undefinedIsSubtypeOfEverything.js] // undefined is a subtype of every other types, no errors expected below var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/underscoreMapFirst.js b/tests/baselines/reference/underscoreMapFirst.js index dea8545ce6f14..c0b6cf1b6dad8 100644 --- a/tests/baselines/reference/underscoreMapFirst.js +++ b/tests/baselines/reference/underscoreMapFirst.js @@ -50,11 +50,11 @@ class MyView extends View { //// [underscoreMapFirst.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/underscoreThisInDerivedClass01.js b/tests/baselines/reference/underscoreThisInDerivedClass01.js index 0528b29220872..410503dc6fcfc 100644 --- a/tests/baselines/reference/underscoreThisInDerivedClass01.js +++ b/tests/baselines/reference/underscoreThisInDerivedClass01.js @@ -26,11 +26,11 @@ class D extends C { //// [underscoreThisInDerivedClass01.js] // @target es5 var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/underscoreThisInDerivedClass02.js b/tests/baselines/reference/underscoreThisInDerivedClass02.js index 5901d6e2a7cf8..365ba64a2c644 100644 --- a/tests/baselines/reference/underscoreThisInDerivedClass02.js +++ b/tests/baselines/reference/underscoreThisInDerivedClass02.js @@ -20,11 +20,11 @@ class D extends C { //// [underscoreThisInDerivedClass02.js] // @target es5 var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/unionTypeEquivalence.js b/tests/baselines/reference/unionTypeEquivalence.js index 28401c6db6b99..a11476152f9ba 100644 --- a/tests/baselines/reference/unionTypeEquivalence.js +++ b/tests/baselines/reference/unionTypeEquivalence.js @@ -21,11 +21,11 @@ var z1: string | typeof BC; //// [unionTypeEquivalence.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/unionTypeFromArrayLiteral.js b/tests/baselines/reference/unionTypeFromArrayLiteral.js index bf882f163eb4b..9b42b1b7532f1 100644 --- a/tests/baselines/reference/unionTypeFromArrayLiteral.js +++ b/tests/baselines/reference/unionTypeFromArrayLiteral.js @@ -29,11 +29,11 @@ var arr9 = [e, f]; // (E|F)[] // Otherwise, if the array literal is contextually typed by a type that has a property with the numeric name ‘0’, the resulting type is a tuple type constructed from the types of the element expressions. // Otherwise, the resulting type is an array type with an element type that is the union of the types of the element expressions. var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/unionTypesAssignability.js b/tests/baselines/reference/unionTypesAssignability.js index 837116d719d3c..87be4dbb4fd69 100644 --- a/tests/baselines/reference/unionTypesAssignability.js +++ b/tests/baselines/reference/unionTypesAssignability.js @@ -75,11 +75,11 @@ function foo(t: T, u: U) { //// [unionTypesAssignability.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/unknownSymbols1.js b/tests/baselines/reference/unknownSymbols1.js index 540d80583314d..7ec636f672a93 100644 --- a/tests/baselines/reference/unknownSymbols1.js +++ b/tests/baselines/reference/unknownSymbols1.js @@ -34,11 +34,11 @@ class C5 { //// [unknownSymbols1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/unspecializedConstraints.js b/tests/baselines/reference/unspecializedConstraints.js index 2094404dd0aa1..53b4fcf2f22ba 100644 --- a/tests/baselines/reference/unspecializedConstraints.js +++ b/tests/baselines/reference/unspecializedConstraints.js @@ -155,11 +155,11 @@ module ts { //// [unspecializedConstraints.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js b/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js index 12dd53ebea935..2adb8dae89f18 100644 --- a/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js +++ b/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js @@ -45,11 +45,11 @@ c5(1); // error //// [untypedFunctionCallsWithTypeParameters1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/unusedClassesinNamespace4.js b/tests/baselines/reference/unusedClassesinNamespace4.js index 7b97612fa61fe..85c5cc6aae7eb 100644 --- a/tests/baselines/reference/unusedClassesinNamespace4.js +++ b/tests/baselines/reference/unusedClassesinNamespace4.js @@ -16,11 +16,11 @@ namespace Validation { //// [unusedClassesinNamespace4.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/unusedIdentifiersConsolidated1.js b/tests/baselines/reference/unusedIdentifiersConsolidated1.js index 2d89558f83d2c..6615c45cf294c 100644 --- a/tests/baselines/reference/unusedIdentifiersConsolidated1.js +++ b/tests/baselines/reference/unusedIdentifiersConsolidated1.js @@ -104,11 +104,11 @@ namespace Greeter { //// [unusedIdentifiersConsolidated1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/validUseOfThisInSuper.js b/tests/baselines/reference/validUseOfThisInSuper.js index ad56ae8cdd3b6..869e848ad6278 100644 --- a/tests/baselines/reference/validUseOfThisInSuper.js +++ b/tests/baselines/reference/validUseOfThisInSuper.js @@ -11,11 +11,11 @@ class Super extends Base { //// [validUseOfThisInSuper.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/varArgsOnConstructorTypes.js b/tests/baselines/reference/varArgsOnConstructorTypes.js index 0577bdb645a54..c859b4f8260d8 100644 --- a/tests/baselines/reference/varArgsOnConstructorTypes.js +++ b/tests/baselines/reference/varArgsOnConstructorTypes.js @@ -26,11 +26,11 @@ reg.register(B); //// [varArgsOnConstructorTypes.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + 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]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; From 4affef2f2abecda2d65bda02cdf2bedbb1204661 Mon Sep 17 00:00:00 2001 From: vvakame Date: Sat, 31 Dec 2016 22:31:48 +0900 Subject: [PATCH 7/7] update baselines --- .../captureSuperPropertyAccessInSuperCall01.js | 15 ++++++++++----- .../reference/decoratorOnClassConstructor4.js | 15 ++++++++++----- tests/baselines/reference/jsxInExtendsClause.js | 15 ++++++++++----- tests/baselines/reference/jsxViaImport.2.js | 15 ++++++++++----- tests/baselines/reference/newTarget.es5.js | 15 ++++++++++----- .../subSubClassCanAccessProtectedConstructor.js | 15 ++++++++++----- .../reference/superPropertyAccessInSuperCall01.js | 15 ++++++++++----- 7 files changed, 70 insertions(+), 35 deletions(-) diff --git a/tests/baselines/reference/captureSuperPropertyAccessInSuperCall01.js b/tests/baselines/reference/captureSuperPropertyAccessInSuperCall01.js index 4f350c1a3a39a..98ca7cb47d7e0 100644 --- a/tests/baselines/reference/captureSuperPropertyAccessInSuperCall01.js +++ b/tests/baselines/reference/captureSuperPropertyAccessInSuperCall01.js @@ -12,11 +12,16 @@ class B extends A { } //// [captureSuperPropertyAccessInSuperCall01.js] -var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A(f) { } diff --git a/tests/baselines/reference/decoratorOnClassConstructor4.js b/tests/baselines/reference/decoratorOnClassConstructor4.js index 22414e89e4346..a9b30440f6b47 100644 --- a/tests/baselines/reference/decoratorOnClassConstructor4.js +++ b/tests/baselines/reference/decoratorOnClassConstructor4.js @@ -15,11 +15,16 @@ class C extends A { } //// [decoratorOnClassConstructor4.js] -var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); diff --git a/tests/baselines/reference/jsxInExtendsClause.js b/tests/baselines/reference/jsxInExtendsClause.js index 8204067cb04f9..aa1c611783a92 100644 --- a/tests/baselines/reference/jsxInExtendsClause.js +++ b/tests/baselines/reference/jsxInExtendsClause.js @@ -12,11 +12,16 @@ class Foo extends createComponentClass(() => class extends React.Component<{}, { }) {} //// [jsxInExtendsClause.js] -var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Foo = (function (_super) { __extends(Foo, _super); function Foo() { diff --git a/tests/baselines/reference/jsxViaImport.2.js b/tests/baselines/reference/jsxViaImport.2.js index 19432238e0bb3..635754599b169 100644 --- a/tests/baselines/reference/jsxViaImport.2.js +++ b/tests/baselines/reference/jsxViaImport.2.js @@ -25,11 +25,16 @@ class TestComponent extends React.Component { //// [consumer.jsx] "use strict"; -var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); /// var BaseComponent_1 = require("BaseComponent"); var TestComponent = (function (_super) { diff --git a/tests/baselines/reference/newTarget.es5.js b/tests/baselines/reference/newTarget.es5.js index 0de967d547754..2ebe4bfcadcbc 100644 --- a/tests/baselines/reference/newTarget.es5.js +++ b/tests/baselines/reference/newTarget.es5.js @@ -33,11 +33,16 @@ const O = { //// [newTarget.es5.js] -var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { var _newTarget = this.constructor; diff --git a/tests/baselines/reference/subSubClassCanAccessProtectedConstructor.js b/tests/baselines/reference/subSubClassCanAccessProtectedConstructor.js index 15d6fc70da5f3..f3e5175c4a30b 100644 --- a/tests/baselines/reference/subSubClassCanAccessProtectedConstructor.js +++ b/tests/baselines/reference/subSubClassCanAccessProtectedConstructor.js @@ -17,11 +17,16 @@ class SubclassOfSubclass extends Subclass { //// [subSubClassCanAccessProtectedConstructor.js] -var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { this.instance1 = new Base(); // allowed diff --git a/tests/baselines/reference/superPropertyAccessInSuperCall01.js b/tests/baselines/reference/superPropertyAccessInSuperCall01.js index de96b2bbc5e0b..d5800323de250 100644 --- a/tests/baselines/reference/superPropertyAccessInSuperCall01.js +++ b/tests/baselines/reference/superPropertyAccessInSuperCall01.js @@ -12,11 +12,16 @@ class B extends A { } //// [superPropertyAccessInSuperCall01.js] -var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +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]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A(f) { }