From 570575ad43678509f94ce6cbc49b292be6440e9e Mon Sep 17 00:00:00 2001 From: vvakame Date: Sat, 3 Dec 2016 11:30:36 +0900 Subject: [PATCH] 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 __()); };