From 9e6a83db20478303aa00b2161081302bdd08ec05 Mon Sep 17 00:00:00 2001 From: vvakame Date: Fri, 25 Nov 2016 00:53:42 +0900 Subject: [PATCH 01/15] change class inheritance code --- src/compiler/transformers/es2015.ts | 2 +- ...straintsClassHeritageListMemberTypeAnnotations.js | 2 +- ...sWithInaccessibleTypeInTypeParameterConstraint.js | 2 +- .../baselines/reference/abstractClassInLocalScope.js | 2 +- .../reference/abstractClassInLocalScopeIsAbstract.js | 2 +- tests/baselines/reference/abstractProperty.js | 2 +- .../baselines/reference/abstractPropertyNegative.js | 2 +- .../reference/accessOverriddenBaseClassMember1.js | 2 +- .../accessors_spec_section-4.5_inference.js | 2 +- .../reference/aliasUsageInAccessorsOfClass.js | 2 +- tests/baselines/reference/aliasUsageInArray.js | 2 +- .../reference/aliasUsageInFunctionExpression.js | 2 +- .../reference/aliasUsageInGenericFunction.js | 2 +- .../reference/aliasUsageInIndexerOfClass.js | 2 +- .../baselines/reference/aliasUsageInObjectLiteral.js | 2 +- .../baselines/reference/aliasUsageInOrExpression.js | 2 +- .../aliasUsageInTypeArgumentOfExtendsClause.js | 4 ++-- .../baselines/reference/aliasUsageInVarAssignment.js | 2 +- .../reference/ambiguousOverloadResolution.js | 2 +- tests/baselines/reference/apparentTypeSubtyping.js | 2 +- tests/baselines/reference/apparentTypeSupertype.js | 2 +- tests/baselines/reference/arrayAssignmentTest1.js | 2 +- tests/baselines/reference/arrayAssignmentTest2.js | 2 +- tests/baselines/reference/arrayBestCommonTypes.js | 2 +- .../baselines/reference/arrayLiteralTypeInference.js | 2 +- tests/baselines/reference/arrayLiterals.js | 2 +- .../reference/arrayLiteralsWithRecursiveGenerics.js | 2 +- .../arrayOfSubtypeIsAssignableToReadonlyArray.js | 2 +- tests/baselines/reference/arrowFunctionContexts.js | 2 +- .../reference/assignmentCompatWithCallSignatures3.js | 2 +- .../reference/assignmentCompatWithCallSignatures4.js | 2 +- .../reference/assignmentCompatWithCallSignatures5.js | 2 +- .../reference/assignmentCompatWithCallSignatures6.js | 2 +- .../assignmentCompatWithConstructSignatures3.js | 2 +- .../assignmentCompatWithConstructSignatures4.js | 2 +- .../assignmentCompatWithConstructSignatures5.js | 2 +- .../assignmentCompatWithConstructSignatures6.js | 2 +- .../reference/assignmentCompatWithNumericIndexer.js | 2 +- .../reference/assignmentCompatWithNumericIndexer3.js | 2 +- .../reference/assignmentCompatWithObjectMembers4.js | 2 +- .../assignmentCompatWithObjectMembersOptionality.js | 2 +- .../assignmentCompatWithObjectMembersOptionality2.js | 2 +- .../reference/assignmentCompatWithStringIndexer.js | 2 +- tests/baselines/reference/assignmentLHSIsValue.js | 2 +- .../baselines/reference/asyncImportedPromise_es5.js | 2 +- tests/baselines/reference/autolift4.js | 2 +- tests/baselines/reference/baseCheck.js | 2 +- .../reference/baseIndexSignatureResolution.js | 2 +- tests/baselines/reference/baseTypeOrderChecking.js | 2 +- .../reference/baseTypeWrappingInstantiationChain.js | 2 +- tests/baselines/reference/bases.js | 2 +- .../bestCommonTypeOfConditionalExpressions.js | 2 +- .../bestCommonTypeOfConditionalExpressions2.js | 2 +- tests/baselines/reference/bestCommonTypeOfTuple2.js | 2 +- .../callSignatureAssignabilityInInheritance2.js | 2 +- .../callSignatureAssignabilityInInheritance3.js | 2 +- .../callSignatureAssignabilityInInheritance4.js | 2 +- .../callSignatureAssignabilityInInheritance5.js | 2 +- .../callSignatureAssignabilityInInheritance6.js | 2 +- tests/baselines/reference/callWithSpread.js | 2 +- tests/baselines/reference/captureThisInSuperCall.js | 2 +- tests/baselines/reference/castingTuple.js | 2 +- tests/baselines/reference/chainedAssignment3.js | 2 +- ...thTypeParameterConstrainedToOtherTypeParameter.js | 2 +- tests/baselines/reference/checkForObjectTooStrict.js | 2 +- .../reference/checkSuperCallBeforeThisAccessing1.js | 2 +- .../reference/checkSuperCallBeforeThisAccessing2.js | 2 +- .../reference/checkSuperCallBeforeThisAccessing3.js | 2 +- .../reference/checkSuperCallBeforeThisAccessing4.js | 2 +- .../reference/checkSuperCallBeforeThisAccessing5.js | 2 +- .../reference/checkSuperCallBeforeThisAccessing6.js | 2 +- .../reference/checkSuperCallBeforeThisAccessing7.js | 2 +- .../reference/checkSuperCallBeforeThisAccessing8.js | 2 +- tests/baselines/reference/circularImportAlias.js | 2 +- .../reference/circularTypeofWithFunctionModule.js | 2 +- .../classAbstractConstructorAssignability.js | 2 +- .../baselines/reference/classAbstractCrashedOnce.js | 2 +- tests/baselines/reference/classAbstractExtends.js | 2 +- .../reference/classAbstractFactoryFunction.js | 2 +- tests/baselines/reference/classAbstractGeneric.js | 2 +- tests/baselines/reference/classAbstractInAModule.js | 2 +- .../baselines/reference/classAbstractInheritance.js | 2 +- .../reference/classAbstractInstantiations1.js | 2 +- .../reference/classAbstractInstantiations2.js | 2 +- .../reference/classAbstractOverrideWithAbstract.js | 2 +- tests/baselines/reference/classAbstractSuperCalls.js | 2 +- .../reference/classAbstractUsingAbstractMethod1.js | 2 +- .../reference/classAbstractUsingAbstractMethods2.js | 2 +- .../reference/classConstructorAccessibility2.js | 2 +- .../reference/classConstructorAccessibility4.js | 2 +- .../reference/classConstructorAccessibility5.js | 2 +- .../classConstructorParametersAccessibility.js | 2 +- .../classConstructorParametersAccessibility2.js | 2 +- .../classConstructorParametersAccessibility3.js | 2 +- ...classDeclarationMergedInModuleWithContinuation.js | 2 +- .../reference/classDeclaredBeforeClassFactory.js | 2 +- .../reference/classDoesNotDependOnBaseTypes.js | 2 +- tests/baselines/reference/classExpression2.js | 2 +- tests/baselines/reference/classExpression3.js | 2 +- .../classExpressionExtendingAbstractClass.js | 2 +- .../baselines/reference/classExtendingBuiltinType.js | 2 +- tests/baselines/reference/classExtendingClass.js | 2 +- .../reference/classExtendingClassLikeType.js | 2 +- .../reference/classExtendingNonConstructor.js | 2 +- tests/baselines/reference/classExtendingNull.js | 2 +- tests/baselines/reference/classExtendingPrimitive.js | 2 +- .../baselines/reference/classExtendingPrimitive2.js | 2 +- .../reference/classExtendingQualifiedName.js | 2 +- .../reference/classExtendingQualifiedName2.js | 2 +- tests/baselines/reference/classExtendsAcrossFiles.js | 4 ++-- ...useClassMergedWithModuleNotReferingConstructor.js | 2 +- ...classExtendsClauseClassNotReferringConstructor.js | 2 +- .../reference/classExtendsEveryObjectType.js | 2 +- .../reference/classExtendsEveryObjectType2.js | 2 +- tests/baselines/reference/classExtendsInterface.js | 2 +- .../reference/classExtendsInterfaceInExpression.js | 2 +- .../reference/classExtendsInterfaceInModule.js | 2 +- tests/baselines/reference/classExtendsItself.js | 2 +- .../reference/classExtendsItselfIndirectly.js | 2 +- .../reference/classExtendsItselfIndirectly2.js | 2 +- .../reference/classExtendsItselfIndirectly3.js | 12 ++++++------ .../reference/classExtendsMultipleBaseClasses.js | 2 +- tests/baselines/reference/classExtendsNull.js | 2 +- .../classExtendsShadowedConstructorFunction.js | 2 +- .../classExtendsValidConstructorFunction.js | 2 +- .../reference/classHeritageWithTrailingSeparator.js | 2 +- tests/baselines/reference/classImplementsClass2.js | 2 +- tests/baselines/reference/classImplementsClass3.js | 2 +- tests/baselines/reference/classImplementsClass4.js | 2 +- tests/baselines/reference/classImplementsClass5.js | 2 +- tests/baselines/reference/classImplementsClass6.js | 2 +- tests/baselines/reference/classIndexer3.js | 2 +- tests/baselines/reference/classInheritence.js | 2 +- .../baselines/reference/classIsSubtypeOfBaseType.js | 2 +- tests/baselines/reference/classOrder2.js | 2 +- tests/baselines/reference/classOrderBug.js | 2 +- tests/baselines/reference/classSideInheritance1.js | 2 +- tests/baselines/reference/classSideInheritance2.js | 2 +- tests/baselines/reference/classSideInheritance3.js | 2 +- tests/baselines/reference/classUpdateTests.js | 2 +- .../reference/classWithBaseClassButNoConstructor.js | 2 +- tests/baselines/reference/classWithConstructors.js | 2 +- .../reference/classWithProtectedProperty.js | 2 +- tests/baselines/reference/classWithStaticMembers.js | 2 +- tests/baselines/reference/classdecl.js | 2 +- tests/baselines/reference/clodulesDerivedClasses.js | 2 +- .../collisionSuperAndLocalFunctionInAccessors.js | 2 +- .../collisionSuperAndLocalFunctionInConstructor.js | 2 +- .../collisionSuperAndLocalFunctionInMethod.js | 2 +- .../collisionSuperAndLocalFunctionInProperty.js | 2 +- .../collisionSuperAndLocalVarInAccessors.js | 2 +- .../collisionSuperAndLocalVarInConstructor.js | 2 +- .../reference/collisionSuperAndLocalVarInMethod.js | 2 +- .../reference/collisionSuperAndLocalVarInProperty.js | 2 +- .../reference/collisionSuperAndNameResolution.js | 2 +- .../reference/collisionSuperAndParameter.js | 2 +- .../reference/collisionSuperAndParameter1.js | 2 +- ...isionSuperAndPropertyNameAsConstuctorParameter.js | 2 +- ...onThisExpressionAndLocalVarWithSuperExperssion.js | 2 +- tests/baselines/reference/commentsInheritance.js | 2 +- .../comparisonOperatorWithIdenticalObjects.js | 2 +- ...eratorWithNoRelationshipObjectsOnCallSignature.js | 2 +- ...ithNoRelationshipObjectsOnConstructorSignature.js | 2 +- ...ratorWithNoRelationshipObjectsOnIndexSignature.js | 2 +- ...RelationshipObjectsOnInstantiatedCallSignature.js | 2 +- ...nshipObjectsOnInstantiatedConstructorSignature.js | 2 +- ...arisonOperatorWithSubtypeObjectOnCallSignature.js | 2 +- ...peratorWithSubtypeObjectOnConstructorSignature.js | 2 +- ...risonOperatorWithSubtypeObjectOnIndexSignature.js | 2 +- ...orWithSubtypeObjectOnInstantiatedCallSignature.js | 2 +- ...ubtypeObjectOnInstantiatedConstructorSignature.js | 2 +- .../comparisonOperatorWithSubtypeObjectOnProperty.js | 2 +- .../baselines/reference/complexClassRelationships.js | 2 +- .../complicatedGenericRecursiveBaseClassReference.js | 2 +- .../reference/compoundAssignmentLHSIsValue.js | 2 +- .../compoundExponentiationAssignmentLHSIsValue.js | 2 +- .../reference/computedPropertyNames24_ES5.js | 2 +- .../reference/computedPropertyNames25_ES5.js | 2 +- .../reference/computedPropertyNames26_ES5.js | 2 +- .../reference/computedPropertyNames27_ES5.js | 2 +- .../reference/computedPropertyNames28_ES5.js | 2 +- .../reference/computedPropertyNames30_ES5.js | 2 +- .../reference/computedPropertyNames31_ES5.js | 2 +- .../reference/computedPropertyNames43_ES5.js | 2 +- .../reference/computedPropertyNames44_ES5.js | 2 +- .../reference/computedPropertyNames45_ES5.js | 2 +- .../reference/conditionalOperatorWithIdenticalBCT.js | 2 +- .../conditionalOperatorWithoutIdenticalBCT.js | 2 +- .../baselines/reference/constantOverloadFunction.js | 2 +- .../constantOverloadFunctionNoSubtypeError.js | 2 +- .../constraintCheckInGenericBaseTypeReference.js | 2 +- .../constructSignatureAssignabilityInInheritance2.js | 2 +- .../constructSignatureAssignabilityInInheritance3.js | 2 +- .../constructSignatureAssignabilityInInheritance4.js | 2 +- .../constructSignatureAssignabilityInInheritance5.js | 2 +- .../constructSignatureAssignabilityInInheritance6.js | 2 +- tests/baselines/reference/constructorArgs.js | 2 +- .../constructorFunctionTypeIsAssignableToBaseType.js | 2 +- ...constructorFunctionTypeIsAssignableToBaseType2.js | 2 +- .../reference/constructorHasPrototypeProperty.js | 2 +- tests/baselines/reference/constructorOverloads2.js | 2 +- tests/baselines/reference/constructorOverloads3.js | 2 +- .../reference/constructorWithCapturedSuper.js | 2 +- .../constructorWithIncompleteTypeAnnotation.js | 2 +- .../reference/contextualTypingArrayOfLambdas.js | 2 +- .../contextualTypingOfConditionalExpression.js | 2 +- .../contextualTypingOfConditionalExpression2.js | 2 +- ...ashInsourcePropertyIsRelatableToTargetProperty.js | 2 +- .../baselines/reference/declFileClassExtendsNull.js | 2 +- .../declFileForFunctionTypeAsTypeParameter.js | 2 +- .../declFileGenericClassWithGenericExtendedClass.js | 2 +- tests/baselines/reference/declFileGenericType.js | 2 +- tests/baselines/reference/declFileGenericType2.js | 2 +- ...ameConflictingWithClassReferredByExtendsClause.js | 2 +- ...thExtendsClauseThatHasItsContainerNameConflict.js | 2 +- .../reference/declarationEmitExpressionInExtends.js | 2 +- .../reference/declarationEmitExpressionInExtends2.js | 2 +- .../reference/declarationEmitExpressionInExtends3.js | 2 +- .../reference/declarationEmitExpressionInExtends4.js | 2 +- .../reference/declarationEmitNameConflicts3.js | 2 +- .../reference/declarationEmitProtectedMembers.js | 2 +- .../reference/declarationEmitThisPredicates01.js | 2 +- ...declarationEmitThisPredicatesWithPrivateName01.js | 2 +- tests/baselines/reference/declareDottedExtend.js | 2 +- .../reference/decoratorOnClassConstructor2.js | 2 +- .../reference/decoratorOnClassConstructor3.js | 2 +- .../baselines/reference/decoratorOnClassMethod12.js | 2 +- .../derivedClassConstructorWithExplicitReturns01.js | 2 +- ...assConstructorWithExplicitReturns01.sourcemap.txt | 2 +- .../derivedClassConstructorWithoutSuperCall.js | 2 +- ...derivedClassFunctionOverridesBaseClassAccessor.js | 2 +- .../derivedClassIncludesInheritedMembers.js | 2 +- ...ssOverridesIndexersWithAssignmentCompatibility.js | 2 +- .../derivedClassOverridesPrivateFunction1.js | 2 +- .../reference/derivedClassOverridesPrivates.js | 2 +- .../derivedClassOverridesProtectedMembers.js | 2 +- .../derivedClassOverridesProtectedMembers2.js | 2 +- .../derivedClassOverridesProtectedMembers3.js | 2 +- .../derivedClassOverridesProtectedMembers4.js | 2 +- .../reference/derivedClassOverridesPublicMembers.js | 2 +- .../reference/derivedClassOverridesWithoutSubtype.js | 2 +- .../reference/derivedClassParameterProperties.js | 2 +- .../derivedClassSuperCallsInNonConstructorMembers.js | 2 +- .../reference/derivedClassSuperCallsWithThisArg.js | 2 +- .../baselines/reference/derivedClassTransitivity.js | 2 +- .../baselines/reference/derivedClassTransitivity2.js | 2 +- .../baselines/reference/derivedClassTransitivity3.js | 2 +- .../baselines/reference/derivedClassTransitivity4.js | 2 +- tests/baselines/reference/derivedClassWithAny.js | 2 +- ...sWithPrivateInstanceShadowingProtectedInstance.js | 2 +- ...lassWithPrivateInstanceShadowingPublicInstance.js | 2 +- ...ClassWithPrivateStaticShadowingProtectedStatic.js | 2 +- ...vedClassWithPrivateStaticShadowingPublicStatic.js | 2 +- .../derivedClassWithoutExplicitConstructor.js | 2 +- .../derivedClassWithoutExplicitConstructor2.js | 2 +- .../derivedClassWithoutExplicitConstructor3.js | 2 +- tests/baselines/reference/derivedClasses.js | 2 +- .../reference/derivedGenericClassWithAny.js | 2 +- ...peAccessesHiddenBaseCallViaSuperPropertyAccess.js | 2 +- .../derivedTypeDoesNotRequireExtendsClause.js | 2 +- .../reference/destructuringParameterDeclaration5.js | 2 +- ...perCallBeforeEmitParameterPropertyDeclaration1.js | 2 +- .../emitSuperCallBeforeEmitPropertyDeclaration1.js | 2 +- ...rtyDeclarationAndParameterPropertyDeclaration1.js | 2 +- .../baselines/reference/emitThisInSuperMethodCall.js | 2 +- tests/baselines/reference/emptyModuleName.js | 2 +- .../errorForwardReferenceForwadingConstructor.js | 2 +- tests/baselines/reference/errorSuperCalls.js | 2 +- .../baselines/reference/errorSuperPropertyAccess.js | 2 +- .../reference/errorsInGenericTypeReference.js | 2 +- tests/baselines/reference/es6ClassSuperCodegenBug.js | 2 +- tests/baselines/reference/es6ClassTest.js | 2 +- tests/baselines/reference/es6ClassTest2.js | 2 +- tests/baselines/reference/es6ClassTest7.js | 2 +- .../reference/exportAssignmentOfGenericType1.js | 2 +- .../reference/exportDeclarationInInternalModule.js | 2 +- tests/baselines/reference/extBaseClass1.js | 2 +- tests/baselines/reference/extBaseClass2.js | 2 +- .../reference/extendAndImplementTheSameBaseType.js | 2 +- .../reference/extendAndImplementTheSameBaseType2.js | 2 +- .../reference/extendBaseClassBeforeItsDeclared.js | 2 +- .../reference/extendClassExpressionFromModule.js | 2 +- .../reference/extendConstructSignatureInInterface.js | 2 +- tests/baselines/reference/extendNonClassSymbol1.js | 2 +- tests/baselines/reference/extendNonClassSymbol2.js | 2 +- .../reference/extendPrivateConstructorClass.js | 2 +- .../extendingClassFromAliasAndUsageInIndexer.js | 4 ++-- .../baselines/reference/extendsClauseAlreadySeen.js | 2 +- .../baselines/reference/extendsClauseAlreadySeen2.js | 2 +- tests/baselines/reference/fluentClasses.js | 2 +- tests/baselines/reference/for-inStatements.js | 2 +- tests/baselines/reference/for-inStatementsInvalid.js | 2 +- .../reference/forStatementsMultipleInvalidDecl.js | 2 +- .../reference/functionImplementationErrors.js | 2 +- tests/baselines/reference/functionImplementations.js | 2 +- .../reference/functionSubtypingOfVarArgs.js | 2 +- .../reference/functionSubtypingOfVarArgs2.js | 2 +- .../baselines/reference/generatedContextualTyping.js | 2 +- .../reference/genericBaseClassLiteralProperty.js | 2 +- .../reference/genericBaseClassLiteralProperty2.js | 2 +- ...enericCallWithConstraintsTypeArgumentInference.js | 2 +- .../reference/genericCallWithObjectTypeArgs2.js | 2 +- .../genericCallWithObjectTypeArgsAndConstraints2.js | 2 +- .../genericCallWithObjectTypeArgsAndConstraints3.js | 2 +- .../reference/genericCallbacksAndClassHierarchy.js | 2 +- .../reference/genericClassExpressionInFunction.js | 2 +- ...ricClassInheritsConstructorFromNonGenericClass.js | 2 +- .../genericClassPropertyInheritanceSpecialization.js | 2 +- .../baselines/reference/genericClassStaticMethod.js | 2 +- tests/baselines/reference/genericClasses3.js | 2 +- .../genericConstraintOnExtendedBuiltinTypes.js | 2 +- .../genericConstraintOnExtendedBuiltinTypes2.js | 2 +- .../genericDerivedTypeWithSpecializedBase.js | 2 +- .../genericDerivedTypeWithSpecializedBase2.js | 2 +- .../reference/genericInheritedDefaultConstructors.js | 2 +- .../baselines/reference/genericPrototypeProperty2.js | 2 +- .../baselines/reference/genericPrototypeProperty3.js | 2 +- .../genericRecursiveImplicitConstructorErrors2.js | 2 +- .../genericRecursiveImplicitConstructorErrors3.js | 2 +- tests/baselines/reference/genericTypeAssertions2.js | 2 +- tests/baselines/reference/genericTypeAssertions4.js | 2 +- tests/baselines/reference/genericTypeAssertions6.js | 2 +- tests/baselines/reference/genericTypeConstraints.js | 2 +- .../genericTypeReferenceWithoutTypeArgument.js | 2 +- .../genericTypeReferenceWithoutTypeArgument2.js | 2 +- .../genericWithIndexerOfTypeParameterType2.js | 2 +- .../reference/heterogeneousArrayLiterals.js | 2 +- tests/baselines/reference/ifDoWhileStatements.js | 2 +- .../reference/illegalSuperCallsInConstructor.js | 2 +- .../reference/implementClausePrecedingExtends.js | 2 +- ...ementingAnInterfaceExtendingClassWithPrivates2.js | 2 +- ...mentingAnInterfaceExtendingClassWithProtecteds.js | 2 +- tests/baselines/reference/importAsBaseClass.js | 2 +- tests/baselines/reference/importHelpers.js | 2 +- tests/baselines/reference/importHelpersNoHelpers.js | 2 +- tests/baselines/reference/importHelpersNoModule.js | 2 +- tests/baselines/reference/importShadowsGlobalName.js | 2 +- .../baselines/reference/importUsedInExtendsList1.js | 2 +- tests/baselines/reference/indexerConstraints2.js | 2 +- tests/baselines/reference/indirectSelfReference.js | 2 +- .../reference/indirectSelfReferenceGeneric.js | 2 +- .../infinitelyExpandingTypesNonGenericBase.js | 2 +- .../reference/inheritFromGenericTypeParameter.js | 2 +- ...inheritSameNamePrivatePropertiesFromSameOrigin.js | 2 +- tests/baselines/reference/inheritance.js | 2 +- tests/baselines/reference/inheritance1.js | 2 +- .../inheritanceGrandParentPrivateMemberCollision.js | 2 +- ...ndParentPrivateMemberCollisionWithPublicMember.js | 2 +- ...ndParentPublicMemberCollisionWithPrivateMember.js | 2 +- .../inheritanceMemberAccessorOverridingAccessor.js | 2 +- .../inheritanceMemberAccessorOverridingMethod.js | 2 +- .../inheritanceMemberAccessorOverridingProperty.js | 2 +- .../inheritanceMemberFuncOverridingAccessor.js | 2 +- .../inheritanceMemberFuncOverridingMethod.js | 2 +- .../inheritanceMemberFuncOverridingProperty.js | 2 +- .../inheritanceMemberPropertyOverridingAccessor.js | 2 +- .../inheritanceMemberPropertyOverridingMethod.js | 2 +- .../inheritanceMemberPropertyOverridingProperty.js | 2 +- .../inheritanceOfGenericConstructorMethod1.js | 2 +- .../inheritanceOfGenericConstructorMethod2.js | 2 +- .../inheritanceStaticAccessorOverridingAccessor.js | 2 +- .../inheritanceStaticAccessorOverridingMethod.js | 2 +- .../inheritanceStaticAccessorOverridingProperty.js | 2 +- .../inheritanceStaticFuncOverridingAccessor.js | 2 +- ...eritanceStaticFuncOverridingAccessorOfFuncType.js | 2 +- .../inheritanceStaticFuncOverridingMethod.js | 2 +- .../inheritanceStaticFuncOverridingProperty.js | 2 +- ...eritanceStaticFuncOverridingPropertyOfFuncType.js | 2 +- ...itanceStaticFunctionOverridingInstanceProperty.js | 2 +- .../reference/inheritanceStaticMembersCompatible.js | 2 +- .../inheritanceStaticMembersIncompatible.js | 2 +- .../inheritanceStaticPropertyOverridingAccessor.js | 2 +- .../inheritanceStaticPropertyOverridingMethod.js | 2 +- .../inheritanceStaticPropertyOverridingProperty.js | 2 +- .../reference/inheritedConstructorWithRestParams.js | 2 +- .../reference/inheritedConstructorWithRestParams2.js | 2 +- .../reference/inheritedModuleMembersForClodule.js | 2 +- tests/baselines/reference/instanceOfAssignability.js | 2 +- .../instancePropertiesInheritedIntoClassType.js | 2 +- tests/baselines/reference/instanceSubtypeCheck2.js | 2 +- .../instanceofWithStructurallyIdenticalTypes.js | 2 +- .../instantiatedReturnTypeContravariance.js | 2 +- tests/baselines/reference/interfaceClassMerging.js | 2 +- tests/baselines/reference/interfaceClassMerging2.js | 2 +- tests/baselines/reference/interfaceExtendsClass1.js | 2 +- .../reference/interfaceExtendsClassWithPrivate1.js | 2 +- .../reference/interfaceExtendsClassWithPrivate2.js | 2 +- .../baselines/reference/interfaceImplementation8.js | 2 +- .../invalidModuleWithStatementsOfEveryKind.js | 2 +- .../reference/invalidMultipleVariableDeclarations.js | 2 +- tests/baselines/reference/invalidReturnStatements.js | 2 +- .../reference/isolatedModulesImportExportElision.js | 2 +- tests/baselines/reference/jsxViaImport.js | 2 +- tests/baselines/reference/keyofAndIndexedAccess.js | 2 +- tests/baselines/reference/lambdaArgCrash.js | 2 +- tests/baselines/reference/lift.js | 2 +- tests/baselines/reference/localTypes1.js | 2 +- tests/baselines/reference/m7Bugs.js | 2 +- tests/baselines/reference/mergedDeclarations5.js | 2 +- tests/baselines/reference/mergedDeclarations6.js | 2 +- .../reference/mergedInheritedClassInterface.js | 2 +- .../mergedInterfacesWithInheritedPrivates2.js | 2 +- .../mergedInterfacesWithInheritedPrivates3.js | 2 +- .../reference/missingPropertiesOfClassExpression.js | 2 +- tests/baselines/reference/moduleAsBaseType.js | 2 +- .../moduleImportedForTypeArgumentPosition.js | 2 +- .../reference/moduleWithStatementsOfEveryKind.js | 2 +- tests/baselines/reference/multipleInheritance.js | 2 +- .../reference/mutuallyRecursiveGenericBaseTypes2.js | 2 +- .../reference/noImplicitAnyMissingGetAccessor.js | 2 +- .../reference/noImplicitAnyMissingSetAccessor.js | 2 +- .../nonGenericClassExtendingGenericClassWithAny.js | 2 +- .../numericIndexerConstrainsPropertyDeclarations2.js | 2 +- .../baselines/reference/numericIndexerConstraint3.js | 2 +- .../baselines/reference/numericIndexerConstraint4.js | 2 +- tests/baselines/reference/numericIndexerTyping2.js | 2 +- .../objectCreationOfElementAccessExpression.js | 2 +- .../objectTypeHidingMembersOfExtendedObject.js | 2 +- .../objectTypesIdentityWithNumericIndexers1.js | 2 +- .../objectTypesIdentityWithNumericIndexers2.js | 2 +- .../objectTypesIdentityWithNumericIndexers3.js | 2 +- .../reference/objectTypesIdentityWithPrivates.js | 2 +- .../reference/objectTypesIdentityWithPrivates2.js | 2 +- .../reference/objectTypesIdentityWithPrivates3.js | 2 +- .../objectTypesIdentityWithStringIndexers.js | 2 +- .../objectTypesIdentityWithStringIndexers2.js | 2 +- .../reference/optionalConstructorArgInSuper.js | 2 +- tests/baselines/reference/optionalMethods.js | 2 +- tests/baselines/reference/optionalParamArgsTest.js | 2 +- tests/baselines/reference/optionalParamInOverride.js | 2 +- .../baselines/reference/optionalParameterProperty.js | 2 +- tests/baselines/reference/outModuleConcatAmd.js | 2 +- .../reference/outModuleConcatAmd.sourcemap.txt | 2 +- tests/baselines/reference/outModuleConcatSystem.js | 2 +- .../reference/outModuleConcatSystem.sourcemap.txt | 2 +- .../baselines/reference/outModuleTripleSlashRefs.js | 2 +- .../reference/outModuleTripleSlashRefs.sourcemap.txt | 2 +- tests/baselines/reference/overload1.js | 2 +- .../reference/overloadOnConstConstraintChecks1.js | 2 +- .../reference/overloadOnConstConstraintChecks2.js | 2 +- .../reference/overloadOnConstConstraintChecks3.js | 2 +- .../reference/overloadOnConstConstraintChecks4.js | 2 +- .../reference/overloadOnConstantsInvalidOverload1.js | 2 +- tests/baselines/reference/overloadResolution.js | 2 +- .../reference/overloadResolutionClassConstructors.js | 2 +- .../reference/overloadResolutionConstructors.js | 2 +- tests/baselines/reference/overloadingOnConstants1.js | 2 +- tests/baselines/reference/overloadingOnConstants2.js | 2 +- .../reference/overridingPrivateStaticMembers.js | 2 +- .../reference/parseErrorInHeritageClause1.js | 2 +- tests/baselines/reference/parser509630.js | 2 +- tests/baselines/reference/parserAstSpans1.js | 2 +- tests/baselines/reference/parserClassDeclaration1.js | 2 +- tests/baselines/reference/parserClassDeclaration3.js | 2 +- tests/baselines/reference/parserClassDeclaration4.js | 2 +- tests/baselines/reference/parserClassDeclaration5.js | 2 +- tests/baselines/reference/parserClassDeclaration6.js | 2 +- ...parserErrorRecovery_ExtendsOrImplementsClause2.js | 2 +- ...parserErrorRecovery_ExtendsOrImplementsClause4.js | 2 +- ...parserErrorRecovery_ExtendsOrImplementsClause5.js | 2 +- .../reference/parserGenericsInTypeContexts1.js | 2 +- .../reference/parserGenericsInTypeContexts2.js | 2 +- tests/baselines/reference/parserRealSource10.js | 2 +- tests/baselines/reference/parserRealSource11.js | 2 +- tests/baselines/reference/parserharness.js | 2 +- .../partiallyAnnotatedFunctionInferenceError.js | 2 +- ...llyAnnotatedFunctionInferenceWithTypeParameter.js | 2 +- tests/baselines/reference/primitiveMembers.js | 2 +- tests/baselines/reference/privacyClass.js | 2 +- .../reference/privacyClassExtendsClauseDeclFile.js | 4 ++-- tests/baselines/reference/privacyGloClass.js | 2 +- .../baselines/reference/privateAccessInSubclass1.js | 2 +- .../reference/privateInstanceMemberAccessibility.js | 2 +- ...eProtectedMembersAreNotAccessibleDestructuring.js | 2 +- .../reference/privateStaticMemberAccessibility.js | 2 +- .../privateStaticNotAccessibleInClodule2.js | 2 +- .../amd/testGlo.js | 2 +- .../node/testGlo.js | 2 +- .../reference/project/prologueEmit/amd/out.js | 2 +- .../reference/project/prologueEmit/node/out.js | 2 +- .../quotesInFileAndDirectoryNames/amd/m'ain.js | 2 +- .../quotesInFileAndDirectoryNames/node/m'ain.js | 2 +- tests/baselines/reference/propertiesAndIndexers.js | 2 +- tests/baselines/reference/propertyAccess.js | 2 +- .../propertyAccessOnTypeParameterWithConstraints2.js | 2 +- .../propertyAccessOnTypeParameterWithConstraints3.js | 2 +- .../propertyAccessOnTypeParameterWithConstraints5.js | 2 +- ...tedClassPropertyAccessibleWithinNestedSubclass.js | 2 +- ...edClassPropertyAccessibleWithinNestedSubclass1.js | 2 +- ...protectedClassPropertyAccessibleWithinSubclass.js | 2 +- ...rotectedClassPropertyAccessibleWithinSubclass2.js | 2 +- ...rotectedClassPropertyAccessibleWithinSubclass3.js | 2 +- .../protectedInstanceMemberAccessibility.js | 2 +- tests/baselines/reference/protectedMembers.js | 2 +- ...tedStaticClassPropertyAccessibleWithinSubclass.js | 2 +- ...edStaticClassPropertyAccessibleWithinSubclass2.js | 2 +- ...name-resolution-does-not-affect-class-heritage.js | 2 +- .../reference/readonlyConstructorAssignment.js | 2 +- tests/baselines/reference/recursiveBaseCheck3.js | 2 +- tests/baselines/reference/recursiveBaseCheck4.js | 2 +- tests/baselines/reference/recursiveBaseCheck6.js | 2 +- .../reference/recursiveBaseConstructorCreation1.js | 2 +- ...siveClassInstantiationsWithDefaultConstructors.js | 2 +- .../reference/recursiveClassReferenceTest.js | 2 +- .../recursiveClassReferenceTest.sourcemap.txt | 2 +- .../reference/recursiveComplicatedClasses.js | 2 +- .../recursivelySpecializedConstructorDeclaration.js | 2 +- tests/baselines/reference/reexportClassDefinition.js | 2 +- ...olvingClassDeclarationWhenInBaseTypeResolution.js | 2 +- tests/baselines/reference/returnInConstructor1.js | 2 +- tests/baselines/reference/returnStatements.js | 2 +- .../scopeCheckExtendedClassInsidePublicMethod2.js | 2 +- .../scopeCheckExtendedClassInsideStaticMethod1.js | 2 +- tests/baselines/reference/scopeTests.js | 2 +- tests/baselines/reference/shadowPrivateMembers.js | 2 +- ...ionClassWithDefaultConstructorAndExtendsClause.js | 2 +- ...hDefaultConstructorAndExtendsClause.sourcemap.txt | 2 +- .../reference/specializedInheritedConstructors1.js | 2 +- .../specializedOverloadWithRestParameters.js | 2 +- tests/baselines/reference/staticFactory1.js | 2 +- tests/baselines/reference/staticInheritance.js | 2 +- .../reference/staticMemberAccessOffDerivedType1.js | 2 +- tests/baselines/reference/staticPropSuper.js | 2 +- tests/baselines/reference/strictModeInConstructor.js | 2 +- tests/baselines/reference/strictModeReservedWord.js | 2 +- .../strictModeReservedWordInClassDeclaration.js | 2 +- .../stringIndexerConstrainsPropertyDeclarations2.js | 2 +- tests/baselines/reference/subtypesOfTypeParameter.js | 2 +- .../subtypesOfTypeParameterWithConstraints.js | 2 +- .../subtypesOfTypeParameterWithConstraints4.js | 2 +- ...ubtypesOfTypeParameterWithRecursiveConstraints.js | 2 +- tests/baselines/reference/subtypingTransitivity.js | 2 +- .../reference/subtypingWithCallSignatures2.js | 2 +- .../reference/subtypingWithCallSignatures3.js | 2 +- .../reference/subtypingWithCallSignatures4.js | 2 +- .../reference/subtypingWithConstructSignatures2.js | 2 +- .../reference/subtypingWithConstructSignatures3.js | 2 +- .../reference/subtypingWithConstructSignatures4.js | 2 +- .../reference/subtypingWithConstructSignatures5.js | 2 +- .../reference/subtypingWithConstructSignatures6.js | 2 +- .../reference/subtypingWithNumericIndexer.js | 2 +- .../reference/subtypingWithNumericIndexer3.js | 2 +- .../reference/subtypingWithNumericIndexer4.js | 2 +- .../reference/subtypingWithObjectMembers.js | 2 +- .../reference/subtypingWithObjectMembers4.js | 2 +- .../subtypingWithObjectMembersAccessibility.js | 2 +- .../subtypingWithObjectMembersAccessibility2.js | 2 +- .../reference/subtypingWithStringIndexer.js | 2 +- .../reference/subtypingWithStringIndexer3.js | 2 +- .../reference/subtypingWithStringIndexer4.js | 2 +- tests/baselines/reference/super.js | 2 +- tests/baselines/reference/super1.js | 2 +- tests/baselines/reference/super2.js | 2 +- tests/baselines/reference/superAccess.js | 2 +- tests/baselines/reference/superAccess2.js | 2 +- tests/baselines/reference/superAccessInFatArrow1.js | 2 +- tests/baselines/reference/superCallArgsMustMatch.js | 2 +- tests/baselines/reference/superCallAssignResult.js | 2 +- .../reference/superCallBeforeThisAccessing1.js | 2 +- .../reference/superCallBeforeThisAccessing2.js | 2 +- .../reference/superCallBeforeThisAccessing3.js | 2 +- .../reference/superCallBeforeThisAccessing4.js | 2 +- .../reference/superCallBeforeThisAccessing5.js | 2 +- .../reference/superCallBeforeThisAccessing6.js | 2 +- .../reference/superCallBeforeThisAccessing7.js | 2 +- .../reference/superCallBeforeThisAccessing8.js | 2 +- .../superCallFromClassThatDerivesFromGenericType1.js | 2 +- .../superCallFromClassThatDerivesFromGenericType2.js | 2 +- ...ericTypeButWithIncorrectNumberOfTypeArguments1.js | 2 +- ...tDerivesFromGenericTypeButWithNoTypeArguments1.js | 2 +- ...ThatDerivesNonGenericTypeButWithTypeArguments1.js | 2 +- .../reference/superCallInNonStaticMethod.js | 2 +- tests/baselines/reference/superCallInStaticMethod.js | 2 +- .../reference/superCallInsideClassDeclaration.js | 2 +- .../reference/superCallInsideClassExpression.js | 2 +- .../superCallInsideObjectLiteralExpression.js | 2 +- .../reference/superCallOutsideConstructor.js | 2 +- .../reference/superCallParameterContextualTyping1.js | 2 +- .../reference/superCallParameterContextualTyping2.js | 2 +- .../reference/superCallParameterContextualTyping3.js | 2 +- .../reference/superCallWithCommentEmit01.js | 2 +- .../reference/superCallWithMissingBaseClass.js | 2 +- tests/baselines/reference/superCalls.js | 2 +- tests/baselines/reference/superCallsInConstructor.js | 2 +- tests/baselines/reference/superErrors.js | 2 +- tests/baselines/reference/superInCatchBlock1.js | 2 +- .../baselines/reference/superInConstructorParam1.js | 2 +- tests/baselines/reference/superInLambdas.js | 2 +- .../baselines/reference/superInObjectLiterals_ES5.js | 2 +- tests/baselines/reference/superNewCall1.js | 2 +- tests/baselines/reference/superPropertyAccess.js | 2 +- tests/baselines/reference/superPropertyAccess1.js | 2 +- tests/baselines/reference/superPropertyAccess2.js | 2 +- ...ertyAccessInComputedPropertiesOfNestedType_ES5.js | 2 +- .../reference/superPropertyAccessNoError.js | 2 +- tests/baselines/reference/superPropertyAccess_ES5.js | 2 +- .../baselines/reference/superSymbolIndexedAccess5.js | 2 +- .../baselines/reference/superSymbolIndexedAccess6.js | 2 +- .../reference/superWithGenericSpecialization.js | 2 +- tests/baselines/reference/superWithGenerics.js | 2 +- tests/baselines/reference/superWithTypeArgument.js | 2 +- tests/baselines/reference/superWithTypeArgument2.js | 2 +- tests/baselines/reference/superWithTypeArgument3.js | 2 +- ...uper_inside-object-literal-getters-and-setters.js | 2 +- tests/baselines/reference/switchStatements.js | 2 +- .../reference/systemModuleWithSuperClass.js | 2 +- tests/baselines/reference/targetTypeBaseCalls.js | 2 +- tests/baselines/reference/thisInInvalidContexts.js | 2 +- .../reference/thisInInvalidContextsExternalModule.js | 2 +- tests/baselines/reference/thisInSuperCall.js | 2 +- tests/baselines/reference/thisInSuperCall1.js | 2 +- tests/baselines/reference/thisInSuperCall2.js | 2 +- tests/baselines/reference/thisInSuperCall3.js | 2 +- tests/baselines/reference/thisTypeInFunctions.js | 2 +- .../reference/thisTypeInFunctionsNegative.js | 2 +- .../tsxCorrectlyParseLessThanComparison1.js | 2 +- tests/baselines/reference/tsxDynamicTagName5.js | 2 +- tests/baselines/reference/tsxDynamicTagName7.js | 2 +- tests/baselines/reference/tsxDynamicTagName8.js | 2 +- tests/baselines/reference/tsxDynamicTagName9.js | 2 +- tests/baselines/reference/tsxExternalModuleEmit1.js | 4 ++-- .../reference/tsxStatelessFunctionComponents2.js | 2 +- tests/baselines/reference/tsxUnionTypeComponent1.js | 2 +- tests/baselines/reference/typeAssertions.js | 2 +- tests/baselines/reference/typeGuardFunction.js | 2 +- tests/baselines/reference/typeGuardFunctionErrors.js | 2 +- .../baselines/reference/typeGuardFunctionGenerics.js | 2 +- .../reference/typeGuardFunctionOfFormThis.js | 2 +- .../reference/typeGuardFunctionOfFormThisErrors.js | 2 +- .../baselines/reference/typeGuardOfFormInstanceOf.js | 2 +- tests/baselines/reference/typeGuardOfFormIsType.js | 2 +- .../baselines/reference/typeGuardOfFormThisMember.js | 2 +- .../reference/typeGuardOfFormThisMemberErrors.js | 2 +- tests/baselines/reference/typeMatch2.js | 2 +- tests/baselines/reference/typeOfSuperCall.js | 2 +- .../baselines/reference/typeParameterAsBaseClass.js | 2 +- tests/baselines/reference/typeParameterAsBaseType.js | 2 +- .../reference/typeParameterExtendingUnion1.js | 2 +- .../reference/typeParameterExtendingUnion2.js | 2 +- tests/baselines/reference/typeRelationships.js | 2 +- tests/baselines/reference/typeValueConflict1.js | 2 +- tests/baselines/reference/typeValueConflict2.js | 2 +- tests/baselines/reference/typeofClass2.js | 2 +- .../reference/typesWithSpecializedCallSignatures.js | 2 +- .../typesWithSpecializedConstructSignatures.js | 2 +- tests/baselines/reference/undeclaredBase.js | 2 +- .../reference/undefinedIsSubtypeOfEverything.js | 2 +- tests/baselines/reference/underscoreMapFirst.js | 2 +- .../reference/underscoreThisInDerivedClass01.js | 2 +- .../reference/underscoreThisInDerivedClass02.js | 2 +- tests/baselines/reference/unionTypeEquivalence.js | 2 +- .../baselines/reference/unionTypeFromArrayLiteral.js | 2 +- tests/baselines/reference/unionTypesAssignability.js | 2 +- tests/baselines/reference/unknownSymbols1.js | 2 +- .../baselines/reference/unspecializedConstraints.js | 2 +- .../untypedFunctionCallsWithTypeParameters1.js | 2 +- .../baselines/reference/unusedClassesinNamespace4.js | 2 +- .../reference/unusedIdentifiersConsolidated1.js | 2 +- tests/baselines/reference/validUseOfThisInSuper.js | 2 +- .../baselines/reference/varArgsOnConstructorTypes.js | 2 +- 660 files changed, 670 insertions(+), 670 deletions(-) diff --git a/src/compiler/transformers/es2015.ts b/src/compiler/transformers/es2015.ts index bc9341a4b4f..5dc78701316 100644 --- a/src/compiler/transformers/es2015.ts +++ b/src/compiler/transformers/es2015.ts @@ -3338,7 +3338,7 @@ namespace ts { priority: 0, text: ` var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); };` diff --git a/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js b/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js index ec0ed5494a4..b15cd7f6eb7 100644 --- a/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js +++ b/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js @@ -22,7 +22,7 @@ module A { //// [ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js b/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js index bae9593fb98..955adc72817 100644 --- a/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js +++ b/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js @@ -26,7 +26,7 @@ module A { //// [ExportClassWithInaccessibleTypeInTypeParameterConstraint.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/abstractClassInLocalScope.js b/tests/baselines/reference/abstractClassInLocalScope.js index db5144be399..b413326e26a 100644 --- a/tests/baselines/reference/abstractClassInLocalScope.js +++ b/tests/baselines/reference/abstractClassInLocalScope.js @@ -9,7 +9,7 @@ //// [abstractClassInLocalScope.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js b/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js index 1b3e11cfa32..f143171b54c 100644 --- a/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js +++ b/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js @@ -9,7 +9,7 @@ //// [abstractClassInLocalScopeIsAbstract.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/abstractProperty.js b/tests/baselines/reference/abstractProperty.js index fb7deaa09dd..12735de42cb 100644 --- a/tests/baselines/reference/abstractProperty.js +++ b/tests/baselines/reference/abstractProperty.js @@ -23,7 +23,7 @@ class C extends B { //// [abstractProperty.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/abstractPropertyNegative.js b/tests/baselines/reference/abstractPropertyNegative.js index bebf9026a0e..eaad20d1804 100644 --- a/tests/baselines/reference/abstractPropertyNegative.js +++ b/tests/baselines/reference/abstractPropertyNegative.js @@ -45,7 +45,7 @@ abstract class AbstractAccessorMismatch { //// [abstractPropertyNegative.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/accessOverriddenBaseClassMember1.js b/tests/baselines/reference/accessOverriddenBaseClassMember1.js index 02d092dfd39..2d06be8df96 100644 --- a/tests/baselines/reference/accessOverriddenBaseClassMember1.js +++ b/tests/baselines/reference/accessOverriddenBaseClassMember1.js @@ -17,7 +17,7 @@ class ColoredPoint extends Point { //// [accessOverriddenBaseClassMember1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/accessors_spec_section-4.5_inference.js b/tests/baselines/reference/accessors_spec_section-4.5_inference.js index dbaeec1f688..eddb75c2666 100644 --- a/tests/baselines/reference/accessors_spec_section-4.5_inference.js +++ b/tests/baselines/reference/accessors_spec_section-4.5_inference.js @@ -26,7 +26,7 @@ class LanguageSpec_section_4_5_inference { //// [accessors_spec_section-4.5_inference.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInAccessorsOfClass.js b/tests/baselines/reference/aliasUsageInAccessorsOfClass.js index 8b60ed8e76d..817e589d995 100644 --- a/tests/baselines/reference/aliasUsageInAccessorsOfClass.js +++ b/tests/baselines/reference/aliasUsageInAccessorsOfClass.js @@ -38,7 +38,7 @@ exports.Model = Model; //// [aliasUsage1_moduleA.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInArray.js b/tests/baselines/reference/aliasUsageInArray.js index bf573aa9abb..e0d30fb608b 100644 --- a/tests/baselines/reference/aliasUsageInArray.js +++ b/tests/baselines/reference/aliasUsageInArray.js @@ -32,7 +32,7 @@ exports.Model = Model; //// [aliasUsageInArray_moduleA.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInFunctionExpression.js b/tests/baselines/reference/aliasUsageInFunctionExpression.js index 49bdd493aac..35bf66fed02 100644 --- a/tests/baselines/reference/aliasUsageInFunctionExpression.js +++ b/tests/baselines/reference/aliasUsageInFunctionExpression.js @@ -31,7 +31,7 @@ exports.Model = Model; //// [aliasUsageInFunctionExpression_moduleA.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInGenericFunction.js b/tests/baselines/reference/aliasUsageInGenericFunction.js index dc3a8a88bab..373aa0c3b40 100644 --- a/tests/baselines/reference/aliasUsageInGenericFunction.js +++ b/tests/baselines/reference/aliasUsageInGenericFunction.js @@ -35,7 +35,7 @@ exports.Model = Model; //// [aliasUsageInGenericFunction_moduleA.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInIndexerOfClass.js b/tests/baselines/reference/aliasUsageInIndexerOfClass.js index cb7ad3027ca..9769a4b005f 100644 --- a/tests/baselines/reference/aliasUsageInIndexerOfClass.js +++ b/tests/baselines/reference/aliasUsageInIndexerOfClass.js @@ -37,7 +37,7 @@ exports.Model = Model; //// [aliasUsageInIndexerOfClass_moduleA.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInObjectLiteral.js b/tests/baselines/reference/aliasUsageInObjectLiteral.js index 81e3e621e85..2f4abf75161 100644 --- a/tests/baselines/reference/aliasUsageInObjectLiteral.js +++ b/tests/baselines/reference/aliasUsageInObjectLiteral.js @@ -32,7 +32,7 @@ exports.Model = Model; //// [aliasUsageInObjectLiteral_moduleA.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInOrExpression.js b/tests/baselines/reference/aliasUsageInOrExpression.js index 4faa41dd034..c4902a1b894 100644 --- a/tests/baselines/reference/aliasUsageInOrExpression.js +++ b/tests/baselines/reference/aliasUsageInOrExpression.js @@ -35,7 +35,7 @@ exports.Model = Model; //// [aliasUsageInOrExpression_moduleA.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js b/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js index 2cf4aefab6c..c79f820b106 100644 --- a/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js +++ b/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js @@ -35,7 +35,7 @@ exports.Model = Model; //// [aliasUsageInTypeArgumentOfExtendsClause_moduleA.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -51,7 +51,7 @@ exports.VisualizationModel = VisualizationModel; //// [aliasUsageInTypeArgumentOfExtendsClause_main.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInVarAssignment.js b/tests/baselines/reference/aliasUsageInVarAssignment.js index 80bb2dca20e..87c41811d4a 100644 --- a/tests/baselines/reference/aliasUsageInVarAssignment.js +++ b/tests/baselines/reference/aliasUsageInVarAssignment.js @@ -31,7 +31,7 @@ exports.Model = Model; //// [aliasUsageInVarAssignment_moduleA.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/ambiguousOverloadResolution.js b/tests/baselines/reference/ambiguousOverloadResolution.js index 01002792921..9b141141862 100644 --- a/tests/baselines/reference/ambiguousOverloadResolution.js +++ b/tests/baselines/reference/ambiguousOverloadResolution.js @@ -10,7 +10,7 @@ var t: number = f(x, x); // Not an error //// [ambiguousOverloadResolution.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/apparentTypeSubtyping.js b/tests/baselines/reference/apparentTypeSubtyping.js index 6ca9d343a72..dc30b51a448 100644 --- a/tests/baselines/reference/apparentTypeSubtyping.js +++ b/tests/baselines/reference/apparentTypeSubtyping.js @@ -25,7 +25,7 @@ class Derived2 extends Base2 { // error because of the prototy // subtype checks use the apparent type of the target type // S is a subtype of a type T, and T is a supertype of S, if one of the following is true, where S' denotes the apparent type (section 3.8.1) of S: var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/apparentTypeSupertype.js b/tests/baselines/reference/apparentTypeSupertype.js index c6d3378872e..bb002a9798d 100644 --- a/tests/baselines/reference/apparentTypeSupertype.js +++ b/tests/baselines/reference/apparentTypeSupertype.js @@ -15,7 +15,7 @@ class Derived extends Base { // error // subtype checks use the apparent type of the target type // S is a subtype of a type T, and T is a supertype of S, if one of the following is true, where S' denotes the apparent type (section 3.8.1) of S: var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/arrayAssignmentTest1.js b/tests/baselines/reference/arrayAssignmentTest1.js index a887203cd5e..410fb80b323 100644 --- a/tests/baselines/reference/arrayAssignmentTest1.js +++ b/tests/baselines/reference/arrayAssignmentTest1.js @@ -87,7 +87,7 @@ arr_any = i1; // should be an error - is //// [arrayAssignmentTest1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/arrayAssignmentTest2.js b/tests/baselines/reference/arrayAssignmentTest2.js index d82dedff29d..e051b8187cf 100644 --- a/tests/baselines/reference/arrayAssignmentTest2.js +++ b/tests/baselines/reference/arrayAssignmentTest2.js @@ -61,7 +61,7 @@ arr_any = i1; // should be an error - is //// [arrayAssignmentTest2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/arrayBestCommonTypes.js b/tests/baselines/reference/arrayBestCommonTypes.js index b7ddaa5d6da..acaa6c76ffc 100644 --- a/tests/baselines/reference/arrayBestCommonTypes.js +++ b/tests/baselines/reference/arrayBestCommonTypes.js @@ -109,7 +109,7 @@ module NonEmptyTypes { //// [arrayBestCommonTypes.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/arrayLiteralTypeInference.js b/tests/baselines/reference/arrayLiteralTypeInference.js index 919d3a5e922..d836e0afe1d 100644 --- a/tests/baselines/reference/arrayLiteralTypeInference.js +++ b/tests/baselines/reference/arrayLiteralTypeInference.js @@ -53,7 +53,7 @@ var z3: { id: number }[] = //// [arrayLiteralTypeInference.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/arrayLiterals.js b/tests/baselines/reference/arrayLiterals.js index 530cdedec73..5e57d827c72 100644 --- a/tests/baselines/reference/arrayLiterals.js +++ b/tests/baselines/reference/arrayLiterals.js @@ -39,7 +39,7 @@ var context4: Base[] = [new Derived1(), new Derived1()]; //// [arrayLiterals.js] // Empty array literal with no contextual type has type Undefined[] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js b/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js index c0f320ac1e5..5b8237c2556 100644 --- a/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js +++ b/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js @@ -27,7 +27,7 @@ var as = [list, myDerivedList]; // List[] //// [arrayLiteralsWithRecursiveGenerics.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js b/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js index d1d75e8041c..6fecfadd07b 100644 --- a/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js +++ b/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js @@ -21,7 +21,7 @@ rrb = cra; // error: 'A' is not assignable to 'B' //// [arrayOfSubtypeIsAssignableToReadonlyArray.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/arrowFunctionContexts.js b/tests/baselines/reference/arrowFunctionContexts.js index 64727398f72..7075cdc0a58 100644 --- a/tests/baselines/reference/arrowFunctionContexts.js +++ b/tests/baselines/reference/arrowFunctionContexts.js @@ -98,7 +98,7 @@ var asserted2: any; //// [arrowFunctionContexts.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures3.js b/tests/baselines/reference/assignmentCompatWithCallSignatures3.js index c5a1f415437..d4761781bd3 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures3.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures3.js @@ -102,7 +102,7 @@ b18 = a18; // ok //// [assignmentCompatWithCallSignatures3.js] // these are all permitted with the current rules, since we do not do contextual signature instantiation var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures4.js b/tests/baselines/reference/assignmentCompatWithCallSignatures4.js index 58faf663ea8..1a3d939ba23 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures4.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures4.js @@ -101,7 +101,7 @@ module Errors { //// [assignmentCompatWithCallSignatures4.js] // These are mostly permitted with the current loose rules. All ok unless otherwise noted. var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures5.js b/tests/baselines/reference/assignmentCompatWithCallSignatures5.js index 87506cad08f..8d33f3565bf 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures5.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures5.js @@ -68,7 +68,7 @@ b18 = a18; // ok //// [assignmentCompatWithCallSignatures5.js] // checking assignment compat for function types. No errors in this file var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures6.js b/tests/baselines/reference/assignmentCompatWithCallSignatures6.js index 2c05d5960b2..5949ad582fa 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures6.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures6.js @@ -45,7 +45,7 @@ b16 = x.a16; //// [assignmentCompatWithCallSignatures6.js] // checking assignment compatibility relations for function types. All valid var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js index 76ad53e4e05..97da2c58848 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js @@ -102,7 +102,7 @@ b18 = a18; // ok //// [assignmentCompatWithConstructSignatures3.js] // checking assignment compatibility relations for function types. All of these are valid. var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js index f516df153c6..44e9c8e8a36 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js @@ -101,7 +101,7 @@ module Errors { //// [assignmentCompatWithConstructSignatures4.js] // checking assignment compatibility relations for function types. var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js index ef7de7f011b..a80ece9d4d5 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js @@ -68,7 +68,7 @@ b18 = a18; // ok //// [assignmentCompatWithConstructSignatures5.js] // checking assignment compat for function types. All valid var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js index 3d58ae707a5..ea5c5c61e3b 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js @@ -45,7 +45,7 @@ b16 = x.a16; //// [assignmentCompatWithConstructSignatures6.js] // checking assignment compatibility relations for function types. All valid. var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer.js b/tests/baselines/reference/assignmentCompatWithNumericIndexer.js index 37160506683..f5ec41091e0 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer.js +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer.js @@ -46,7 +46,7 @@ module Generics { //// [assignmentCompatWithNumericIndexer.js] // Derived type indexer must be subtype of base type indexer var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js b/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js index 2e6ecd72741..c6e262c4446 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js @@ -43,7 +43,7 @@ module Generics { //// [assignmentCompatWithNumericIndexer3.js] // Derived type indexer must be subtype of base type indexer var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers4.js b/tests/baselines/reference/assignmentCompatWithObjectMembers4.js index 2cc2510c8da..b7ff16e11fc 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers4.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers4.js @@ -94,7 +94,7 @@ module WithBase { //// [assignmentCompatWithObjectMembers4.js] // members N and M of types S and T have the same name, same accessibility, same optionality, and N is not assignable M var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js index 3b12701b3d9..b5148d063a7 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js @@ -91,7 +91,7 @@ module SourceHasOptional { //// [assignmentCompatWithObjectMembersOptionality.js] // Derived member is not optional but base member is, should be ok var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js index f965d18e2ce..4b22c469791 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js @@ -93,7 +93,7 @@ module SourceHasOptional { // M is optional and S contains no property with the same name as M // N is optional and T contains no property with the same name as N var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithStringIndexer.js b/tests/baselines/reference/assignmentCompatWithStringIndexer.js index 8d081c90794..b319af595cd 100644 --- a/tests/baselines/reference/assignmentCompatWithStringIndexer.js +++ b/tests/baselines/reference/assignmentCompatWithStringIndexer.js @@ -56,7 +56,7 @@ module Generics { //// [assignmentCompatWithStringIndexer.js] // index signatures must be compatible in assignments var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentLHSIsValue.js b/tests/baselines/reference/assignmentLHSIsValue.js index 155fa26fa81..add2c59e15f 100644 --- a/tests/baselines/reference/assignmentLHSIsValue.js +++ b/tests/baselines/reference/assignmentLHSIsValue.js @@ -72,7 +72,7 @@ foo() = value; //// [assignmentLHSIsValue.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/asyncImportedPromise_es5.js b/tests/baselines/reference/asyncImportedPromise_es5.js index e5c28eb2dc1..f13b4f962c7 100644 --- a/tests/baselines/reference/asyncImportedPromise_es5.js +++ b/tests/baselines/reference/asyncImportedPromise_es5.js @@ -12,7 +12,7 @@ class Test { //// [task.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/autolift4.js b/tests/baselines/reference/autolift4.js index 1c29bfeeff7..5d27475ba42 100644 --- a/tests/baselines/reference/autolift4.js +++ b/tests/baselines/reference/autolift4.js @@ -25,7 +25,7 @@ class Point3D extends Point { //// [autolift4.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/baseCheck.js b/tests/baselines/reference/baseCheck.js index 870f811c09f..80271d13e83 100644 --- a/tests/baselines/reference/baseCheck.js +++ b/tests/baselines/reference/baseCheck.js @@ -31,7 +31,7 @@ function f() { //// [baseCheck.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/baseIndexSignatureResolution.js b/tests/baselines/reference/baseIndexSignatureResolution.js index 7e922cf83b2..bd6dd5a40e8 100644 --- a/tests/baselines/reference/baseIndexSignatureResolution.js +++ b/tests/baselines/reference/baseIndexSignatureResolution.js @@ -26,7 +26,7 @@ var z: Derived = b.foo(); //// [baseIndexSignatureResolution.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/baseTypeOrderChecking.js b/tests/baselines/reference/baseTypeOrderChecking.js index ec96b80a999..1c87fb1dd5d 100644 --- a/tests/baselines/reference/baseTypeOrderChecking.js +++ b/tests/baselines/reference/baseTypeOrderChecking.js @@ -38,7 +38,7 @@ class Class4 extends Class3 //// [baseTypeOrderChecking.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/baseTypeWrappingInstantiationChain.js b/tests/baselines/reference/baseTypeWrappingInstantiationChain.js index 5f8dcbd0e10..cc6c091b6c7 100644 --- a/tests/baselines/reference/baseTypeWrappingInstantiationChain.js +++ b/tests/baselines/reference/baseTypeWrappingInstantiationChain.js @@ -29,7 +29,7 @@ class C extends CBase { //// [baseTypeWrappingInstantiationChain.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/bases.js b/tests/baselines/reference/bases.js index 6b73eb9556b..f23750c4391 100644 --- a/tests/baselines/reference/bases.js +++ b/tests/baselines/reference/bases.js @@ -22,7 +22,7 @@ new C().y; //// [bases.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js index 6d0f19dd37d..755c3f4ab84 100644 --- a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js +++ b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js @@ -30,7 +30,7 @@ function foo5(t: T, u: U): Object { // conditional expressions return the best common type of the branches plus contextual type (using the first candidate if multiple BCTs exist) // no errors expected here var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js index 2e2d0bcb1e2..796706dd248 100644 --- a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js +++ b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js @@ -28,7 +28,7 @@ function foo3(t: T, u: U) { // conditional expressions return the best common type of the branches plus contextual type (using the first candidate if multiple BCTs exist) // these are errors var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/bestCommonTypeOfTuple2.js b/tests/baselines/reference/bestCommonTypeOfTuple2.js index 928909f4c38..1bd3ac45bcc 100644 --- a/tests/baselines/reference/bestCommonTypeOfTuple2.js +++ b/tests/baselines/reference/bestCommonTypeOfTuple2.js @@ -24,7 +24,7 @@ var e51 = t5[2]; // {} //// [bestCommonTypeOfTuple2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js index 0ae7648c7f9..3c581096d6b 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js @@ -72,7 +72,7 @@ interface I extends A { //// [callSignatureAssignabilityInInheritance2.js] // checking subtype relations for function types as it relates to contextual signature instantiation var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js index 7a7791280ad..909a9bbb8cb 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js @@ -117,7 +117,7 @@ module Errors { // checking subtype relations for function types as it relates to contextual signature instantiation // error cases var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js index 19d66ce8d46..d42769a1e67 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js @@ -52,7 +52,7 @@ interface I extends A { //// [callSignatureAssignabilityInInheritance4.js] // checking subtype relations for function types as it relates to contextual signature instantiation var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js index 1c53de5d26e..94f5fecd2f8 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js @@ -52,7 +52,7 @@ interface I extends B { // checking subtype relations for function types as it relates to contextual signature instantiation // same as subtypingWithCallSignatures2 just with an extra level of indirection in the inheritance chain var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js index c42e36389ca..b73ed7070d8 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js @@ -55,7 +55,7 @@ interface I9 extends A { // same as subtypingWithCallSignatures4 but using class type parameters instead of generic signatures // all are errors var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/callWithSpread.js b/tests/baselines/reference/callWithSpread.js index 69f7e4e30b0..2bce24e4637 100644 --- a/tests/baselines/reference/callWithSpread.js +++ b/tests/baselines/reference/callWithSpread.js @@ -60,7 +60,7 @@ class D extends C { //// [callWithSpread.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/captureThisInSuperCall.js b/tests/baselines/reference/captureThisInSuperCall.js index 2c4df5db961..1a1d5562531 100644 --- a/tests/baselines/reference/captureThisInSuperCall.js +++ b/tests/baselines/reference/captureThisInSuperCall.js @@ -10,7 +10,7 @@ class B extends A { //// [captureThisInSuperCall.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/castingTuple.js b/tests/baselines/reference/castingTuple.js index f0178dcbbf0..331a61a6f78 100644 --- a/tests/baselines/reference/castingTuple.js +++ b/tests/baselines/reference/castingTuple.js @@ -34,7 +34,7 @@ t4[2] = 10; //// [castingTuple.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/chainedAssignment3.js b/tests/baselines/reference/chainedAssignment3.js index 3857867043c..3bfe61f2664 100644 --- a/tests/baselines/reference/chainedAssignment3.js +++ b/tests/baselines/reference/chainedAssignment3.js @@ -24,7 +24,7 @@ a = b = new A(); //// [chainedAssignment3.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js index 26d341e1f6a..59a4b8b12ce 100644 --- a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js +++ b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js @@ -21,7 +21,7 @@ class C extends B { //// [chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkForObjectTooStrict.js b/tests/baselines/reference/checkForObjectTooStrict.js index ade99e9319b..80f12196d0d 100644 --- a/tests/baselines/reference/checkForObjectTooStrict.js +++ b/tests/baselines/reference/checkForObjectTooStrict.js @@ -33,7 +33,7 @@ class Baz extends Object { //// [checkForObjectTooStrict.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js index 8ced6fce500..006bdbf356f 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js @@ -12,7 +12,7 @@ class Derived extends Based { //// [checkSuperCallBeforeThisAccessing1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js index 95b34f27b68..5c35d42ca4f 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js @@ -12,7 +12,7 @@ class Derived extends Based { //// [checkSuperCallBeforeThisAccessing2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js index 0e882f71fdb..16b8181ac5d 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js @@ -17,7 +17,7 @@ class Derived extends Based { //// [checkSuperCallBeforeThisAccessing3.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js index 00f2ed22fbf..9ac1fdaaa21 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js @@ -21,7 +21,7 @@ class Derived extends Based { //// [checkSuperCallBeforeThisAccessing4.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js index 4cce975d6d9..6f8d7589163 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js @@ -9,7 +9,7 @@ class Derived extends Based { //// [checkSuperCallBeforeThisAccessing5.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js index 782e3236271..415bbb06501 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js @@ -12,7 +12,7 @@ class Super extends Base { //// [checkSuperCallBeforeThisAccessing6.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js index ca12c16e047..39eea670c57 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js @@ -11,7 +11,7 @@ class Super extends Base { //// [checkSuperCallBeforeThisAccessing7.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js index 5dd3708a3bb..ff1801d1f93 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js @@ -12,7 +12,7 @@ class Super extends Base { //// [checkSuperCallBeforeThisAccessing8.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/circularImportAlias.js b/tests/baselines/reference/circularImportAlias.js index 6fe5e604e57..49e1124b467 100644 --- a/tests/baselines/reference/circularImportAlias.js +++ b/tests/baselines/reference/circularImportAlias.js @@ -22,7 +22,7 @@ var c = new B.a.C(); //// [circularImportAlias.js] // expected no error var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/circularTypeofWithFunctionModule.js b/tests/baselines/reference/circularTypeofWithFunctionModule.js index 1c38b9625e3..aa2987725bd 100644 --- a/tests/baselines/reference/circularTypeofWithFunctionModule.js +++ b/tests/baselines/reference/circularTypeofWithFunctionModule.js @@ -15,7 +15,7 @@ namespace maker { //// [circularTypeofWithFunctionModule.js] // Repro from #6072 var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractConstructorAssignability.js b/tests/baselines/reference/classAbstractConstructorAssignability.js index 35d9e75884f..20f3de041be 100644 --- a/tests/baselines/reference/classAbstractConstructorAssignability.js +++ b/tests/baselines/reference/classAbstractConstructorAssignability.js @@ -16,7 +16,7 @@ new CC; //// [classAbstractConstructorAssignability.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractCrashedOnce.js b/tests/baselines/reference/classAbstractCrashedOnce.js index fe23e60c94f..2037dbbc64f 100644 --- a/tests/baselines/reference/classAbstractCrashedOnce.js +++ b/tests/baselines/reference/classAbstractCrashedOnce.js @@ -12,7 +12,7 @@ var x = new bar(); //// [classAbstractCrashedOnce.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractExtends.js b/tests/baselines/reference/classAbstractExtends.js index e899cb82d6d..d7e9a04d189 100644 --- a/tests/baselines/reference/classAbstractExtends.js +++ b/tests/baselines/reference/classAbstractExtends.js @@ -18,7 +18,7 @@ class E extends B { //// [classAbstractExtends.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractFactoryFunction.js b/tests/baselines/reference/classAbstractFactoryFunction.js index 50e232a9fca..71850654425 100644 --- a/tests/baselines/reference/classAbstractFactoryFunction.js +++ b/tests/baselines/reference/classAbstractFactoryFunction.js @@ -19,7 +19,7 @@ NewB(B); //// [classAbstractFactoryFunction.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractGeneric.js b/tests/baselines/reference/classAbstractGeneric.js index 96df8f5f19e..e5f5598c14c 100644 --- a/tests/baselines/reference/classAbstractGeneric.js +++ b/tests/baselines/reference/classAbstractGeneric.js @@ -27,7 +27,7 @@ class G extends A { //// [classAbstractGeneric.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractInAModule.js b/tests/baselines/reference/classAbstractInAModule.js index c6a9e206bcc..5ff60d21ca9 100644 --- a/tests/baselines/reference/classAbstractInAModule.js +++ b/tests/baselines/reference/classAbstractInAModule.js @@ -9,7 +9,7 @@ new M.B; //// [classAbstractInAModule.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractInheritance.js b/tests/baselines/reference/classAbstractInheritance.js index 297a80dd99c..90d8216647a 100644 --- a/tests/baselines/reference/classAbstractInheritance.js +++ b/tests/baselines/reference/classAbstractInheritance.js @@ -23,7 +23,7 @@ abstract class GG extends CC {} //// [classAbstractInheritance.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractInstantiations1.js b/tests/baselines/reference/classAbstractInstantiations1.js index 5abbb9c1baa..4c6ed144e0b 100644 --- a/tests/baselines/reference/classAbstractInstantiations1.js +++ b/tests/baselines/reference/classAbstractInstantiations1.js @@ -29,7 +29,7 @@ c = new B; // Calling new with (non)abstract classes. // var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractInstantiations2.js b/tests/baselines/reference/classAbstractInstantiations2.js index dea4c744ae0..e5b678ee715 100644 --- a/tests/baselines/reference/classAbstractInstantiations2.js +++ b/tests/baselines/reference/classAbstractInstantiations2.js @@ -53,7 +53,7 @@ class H { // error -- not declared abstract //// [classAbstractInstantiations2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractOverrideWithAbstract.js b/tests/baselines/reference/classAbstractOverrideWithAbstract.js index 4ecebdf7b32..0cf9c039b35 100644 --- a/tests/baselines/reference/classAbstractOverrideWithAbstract.js +++ b/tests/baselines/reference/classAbstractOverrideWithAbstract.js @@ -25,7 +25,7 @@ class DD extends BB { //// [classAbstractOverrideWithAbstract.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractSuperCalls.js b/tests/baselines/reference/classAbstractSuperCalls.js index 0197f48a429..30c33822be9 100644 --- a/tests/baselines/reference/classAbstractSuperCalls.js +++ b/tests/baselines/reference/classAbstractSuperCalls.js @@ -29,7 +29,7 @@ abstract class BB extends AA { //// [classAbstractSuperCalls.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractUsingAbstractMethod1.js b/tests/baselines/reference/classAbstractUsingAbstractMethod1.js index 74b5d62aaf5..5aa616dcb7c 100644 --- a/tests/baselines/reference/classAbstractUsingAbstractMethod1.js +++ b/tests/baselines/reference/classAbstractUsingAbstractMethod1.js @@ -19,7 +19,7 @@ a.foo(); //// [classAbstractUsingAbstractMethod1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractUsingAbstractMethods2.js b/tests/baselines/reference/classAbstractUsingAbstractMethods2.js index 25cf1a307c7..56aa3937772 100644 --- a/tests/baselines/reference/classAbstractUsingAbstractMethods2.js +++ b/tests/baselines/reference/classAbstractUsingAbstractMethods2.js @@ -29,7 +29,7 @@ class DD extends AA { //// [classAbstractUsingAbstractMethods2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classConstructorAccessibility2.js b/tests/baselines/reference/classConstructorAccessibility2.js index ef637611e8d..eeff60323b7 100644 --- a/tests/baselines/reference/classConstructorAccessibility2.js +++ b/tests/baselines/reference/classConstructorAccessibility2.js @@ -48,7 +48,7 @@ var dc = new DerivedC(1); //// [classConstructorAccessibility2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classConstructorAccessibility4.js b/tests/baselines/reference/classConstructorAccessibility4.js index 4772ac68d11..199383b6a71 100644 --- a/tests/baselines/reference/classConstructorAccessibility4.js +++ b/tests/baselines/reference/classConstructorAccessibility4.js @@ -32,7 +32,7 @@ class D { //// [classConstructorAccessibility4.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classConstructorAccessibility5.js b/tests/baselines/reference/classConstructorAccessibility5.js index d658349c2a5..cb01b233781 100644 --- a/tests/baselines/reference/classConstructorAccessibility5.js +++ b/tests/baselines/reference/classConstructorAccessibility5.js @@ -13,7 +13,7 @@ class Unrelated { //// [classConstructorAccessibility5.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classConstructorParametersAccessibility.js b/tests/baselines/reference/classConstructorParametersAccessibility.js index e0e75bcfeeb..4b086a854a1 100644 --- a/tests/baselines/reference/classConstructorParametersAccessibility.js +++ b/tests/baselines/reference/classConstructorParametersAccessibility.js @@ -28,7 +28,7 @@ class Derived extends C3 { //// [classConstructorParametersAccessibility.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classConstructorParametersAccessibility2.js b/tests/baselines/reference/classConstructorParametersAccessibility2.js index 84da66c3e3c..244b56dddc0 100644 --- a/tests/baselines/reference/classConstructorParametersAccessibility2.js +++ b/tests/baselines/reference/classConstructorParametersAccessibility2.js @@ -28,7 +28,7 @@ class Derived extends C3 { //// [classConstructorParametersAccessibility2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classConstructorParametersAccessibility3.js b/tests/baselines/reference/classConstructorParametersAccessibility3.js index db9f94cf0fb..ef3e6d5b4bd 100644 --- a/tests/baselines/reference/classConstructorParametersAccessibility3.js +++ b/tests/baselines/reference/classConstructorParametersAccessibility3.js @@ -15,7 +15,7 @@ d.p; // public, OK //// [classConstructorParametersAccessibility3.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js b/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js index 5a5440a92b5..1fa51632ba7 100644 --- a/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js +++ b/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js @@ -13,7 +13,7 @@ module M { //// [classDeclarationMergedInModuleWithContinuation.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classDeclaredBeforeClassFactory.js b/tests/baselines/reference/classDeclaredBeforeClassFactory.js index 3dd1e7a4aaf..c30c913a010 100644 --- a/tests/baselines/reference/classDeclaredBeforeClassFactory.js +++ b/tests/baselines/reference/classDeclaredBeforeClassFactory.js @@ -9,7 +9,7 @@ function makeBaseClass() { //// [classDeclaredBeforeClassFactory.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classDoesNotDependOnBaseTypes.js b/tests/baselines/reference/classDoesNotDependOnBaseTypes.js index 076412e164d..e195506c294 100644 --- a/tests/baselines/reference/classDoesNotDependOnBaseTypes.js +++ b/tests/baselines/reference/classDoesNotDependOnBaseTypes.js @@ -14,7 +14,7 @@ class StringTreeCollection extends StringTreeCollectionBase { } //// [classDoesNotDependOnBaseTypes.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExpression2.js b/tests/baselines/reference/classExpression2.js index 59b62c60cfe..7e78007badc 100644 --- a/tests/baselines/reference/classExpression2.js +++ b/tests/baselines/reference/classExpression2.js @@ -4,7 +4,7 @@ var v = class C extends D {}; //// [classExpression2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExpression3.js b/tests/baselines/reference/classExpression3.js index c0376c54c27..9c29f35cd19 100644 --- a/tests/baselines/reference/classExpression3.js +++ b/tests/baselines/reference/classExpression3.js @@ -8,7 +8,7 @@ c.c; //// [classExpression3.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExpressionExtendingAbstractClass.js b/tests/baselines/reference/classExpressionExtendingAbstractClass.js index 7312ab6567d..3031f69117a 100644 --- a/tests/baselines/reference/classExpressionExtendingAbstractClass.js +++ b/tests/baselines/reference/classExpressionExtendingAbstractClass.js @@ -10,7 +10,7 @@ var C = class extends A { // no error reported! //// [classExpressionExtendingAbstractClass.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingBuiltinType.js b/tests/baselines/reference/classExtendingBuiltinType.js index 4c95e3008ea..c0988a01296 100644 --- a/tests/baselines/reference/classExtendingBuiltinType.js +++ b/tests/baselines/reference/classExtendingBuiltinType.js @@ -13,7 +13,7 @@ class C10 extends Array { } //// [classExtendingBuiltinType.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingClass.js b/tests/baselines/reference/classExtendingClass.js index 91e3752980c..5b5a1386322 100644 --- a/tests/baselines/reference/classExtendingClass.js +++ b/tests/baselines/reference/classExtendingClass.js @@ -33,7 +33,7 @@ var r8 = D2.other(1); //// [classExtendingClass.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingClassLikeType.js b/tests/baselines/reference/classExtendingClassLikeType.js index bfc10c23563..1d16866904e 100644 --- a/tests/baselines/reference/classExtendingClassLikeType.js +++ b/tests/baselines/reference/classExtendingClassLikeType.js @@ -60,7 +60,7 @@ class D5 extends getBadBase() { //// [classExtendingClassLikeType.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingNonConstructor.js b/tests/baselines/reference/classExtendingNonConstructor.js index 574d5004486..74070c3bc0c 100644 --- a/tests/baselines/reference/classExtendingNonConstructor.js +++ b/tests/baselines/reference/classExtendingNonConstructor.js @@ -16,7 +16,7 @@ class C7 extends foo { } //// [classExtendingNonConstructor.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingNull.js b/tests/baselines/reference/classExtendingNull.js index 8d5d73329aa..3a227b564e9 100644 --- a/tests/baselines/reference/classExtendingNull.js +++ b/tests/baselines/reference/classExtendingNull.js @@ -5,7 +5,7 @@ class C2 extends (null) { } //// [classExtendingNull.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingPrimitive.js b/tests/baselines/reference/classExtendingPrimitive.js index 53cb45c2081..04fd2d57e52 100644 --- a/tests/baselines/reference/classExtendingPrimitive.js +++ b/tests/baselines/reference/classExtendingPrimitive.js @@ -17,7 +17,7 @@ class C8 extends E { } //// [classExtendingPrimitive.js] // classes cannot extend primitives var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingPrimitive2.js b/tests/baselines/reference/classExtendingPrimitive2.js index b32dc31a5b4..a85bcb21f09 100644 --- a/tests/baselines/reference/classExtendingPrimitive2.js +++ b/tests/baselines/reference/classExtendingPrimitive2.js @@ -7,7 +7,7 @@ class C5a extends null { } //// [classExtendingPrimitive2.js] // classes cannot extend primitives var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingQualifiedName.js b/tests/baselines/reference/classExtendingQualifiedName.js index fced8c2a373..6c2d5b6c2e4 100644 --- a/tests/baselines/reference/classExtendingQualifiedName.js +++ b/tests/baselines/reference/classExtendingQualifiedName.js @@ -9,7 +9,7 @@ module M { //// [classExtendingQualifiedName.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingQualifiedName2.js b/tests/baselines/reference/classExtendingQualifiedName2.js index c133ceb87dc..946a7604ca4 100644 --- a/tests/baselines/reference/classExtendingQualifiedName2.js +++ b/tests/baselines/reference/classExtendingQualifiedName2.js @@ -9,7 +9,7 @@ module M { //// [classExtendingQualifiedName2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsAcrossFiles.js b/tests/baselines/reference/classExtendsAcrossFiles.js index 5be0ab8f9c0..0fa873d378f 100644 --- a/tests/baselines/reference/classExtendsAcrossFiles.js +++ b/tests/baselines/reference/classExtendsAcrossFiles.js @@ -22,7 +22,7 @@ export const b = { //// [b.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -47,7 +47,7 @@ exports.b = { //// [a.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js b/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js index 91f96450d87..b164b77d319 100644 --- a/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js +++ b/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js @@ -15,7 +15,7 @@ module Foo { //// [classExtendsClauseClassMergedWithModuleNotReferingConstructor.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.js b/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.js index 6c3dc789445..619d1488ff8 100644 --- a/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.js +++ b/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.js @@ -8,7 +8,7 @@ module Foo { //// [classExtendsClauseClassNotReferringConstructor.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsEveryObjectType.js b/tests/baselines/reference/classExtendsEveryObjectType.js index a19f5d5cdd6..044ef0fca51 100644 --- a/tests/baselines/reference/classExtendsEveryObjectType.js +++ b/tests/baselines/reference/classExtendsEveryObjectType.js @@ -18,7 +18,7 @@ class C6 extends []{ } // error //// [classExtendsEveryObjectType.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsEveryObjectType2.js b/tests/baselines/reference/classExtendsEveryObjectType2.js index fbc364ca5da..88929e72c57 100644 --- a/tests/baselines/reference/classExtendsEveryObjectType2.js +++ b/tests/baselines/reference/classExtendsEveryObjectType2.js @@ -5,7 +5,7 @@ class C6 extends []{ } // error //// [classExtendsEveryObjectType2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsInterface.js b/tests/baselines/reference/classExtendsInterface.js index b5946224317..1005ccbdd3f 100644 --- a/tests/baselines/reference/classExtendsInterface.js +++ b/tests/baselines/reference/classExtendsInterface.js @@ -10,7 +10,7 @@ class B2 implements Comparable2 {} //// [classExtendsInterface.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsInterfaceInExpression.js b/tests/baselines/reference/classExtendsInterfaceInExpression.js index 9dcd8dd7279..511d22e93f1 100644 --- a/tests/baselines/reference/classExtendsInterfaceInExpression.js +++ b/tests/baselines/reference/classExtendsInterfaceInExpression.js @@ -10,7 +10,7 @@ class C extends factory(A) {} //// [classExtendsInterfaceInExpression.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsInterfaceInModule.js b/tests/baselines/reference/classExtendsInterfaceInModule.js index 9da8831a138..a3034d59df7 100644 --- a/tests/baselines/reference/classExtendsInterfaceInModule.js +++ b/tests/baselines/reference/classExtendsInterfaceInModule.js @@ -17,7 +17,7 @@ class D extends Mod.Nested.I {} //// [classExtendsInterfaceInModule.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsItself.js b/tests/baselines/reference/classExtendsItself.js index 36f2263d671..ad4ce10cfc6 100644 --- a/tests/baselines/reference/classExtendsItself.js +++ b/tests/baselines/reference/classExtendsItself.js @@ -7,7 +7,7 @@ class E extends E { } // error //// [classExtendsItself.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsItselfIndirectly.js b/tests/baselines/reference/classExtendsItselfIndirectly.js index 0f3f48d2f2c..dfbfb7720fa 100644 --- a/tests/baselines/reference/classExtendsItselfIndirectly.js +++ b/tests/baselines/reference/classExtendsItselfIndirectly.js @@ -13,7 +13,7 @@ class E2 extends D2 { baz: T; } //// [classExtendsItselfIndirectly.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsItselfIndirectly2.js b/tests/baselines/reference/classExtendsItselfIndirectly2.js index e215a07c357..6751b19335d 100644 --- a/tests/baselines/reference/classExtendsItselfIndirectly2.js +++ b/tests/baselines/reference/classExtendsItselfIndirectly2.js @@ -24,7 +24,7 @@ module O { //// [classExtendsItselfIndirectly2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsItselfIndirectly3.js b/tests/baselines/reference/classExtendsItselfIndirectly3.js index f8366d77e13..750e5ddfd1c 100644 --- a/tests/baselines/reference/classExtendsItselfIndirectly3.js +++ b/tests/baselines/reference/classExtendsItselfIndirectly3.js @@ -20,7 +20,7 @@ class E2 extends D2 { baz: T; } //// [classExtendsItselfIndirectly_file1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -33,7 +33,7 @@ var C = (function (_super) { }(E)); // error //// [classExtendsItselfIndirectly_file2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -46,7 +46,7 @@ var D = (function (_super) { }(C)); //// [classExtendsItselfIndirectly_file3.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -59,7 +59,7 @@ var E = (function (_super) { }(D)); //// [classExtendsItselfIndirectly_file4.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -72,7 +72,7 @@ var C2 = (function (_super) { }(E2)); // error //// [classExtendsItselfIndirectly_file5.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -85,7 +85,7 @@ var D2 = (function (_super) { }(C2)); //// [classExtendsItselfIndirectly_file6.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsMultipleBaseClasses.js b/tests/baselines/reference/classExtendsMultipleBaseClasses.js index cd9c28ad283..6cb987186c4 100644 --- a/tests/baselines/reference/classExtendsMultipleBaseClasses.js +++ b/tests/baselines/reference/classExtendsMultipleBaseClasses.js @@ -5,7 +5,7 @@ class C extends A,B { } //// [classExtendsMultipleBaseClasses.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsNull.js b/tests/baselines/reference/classExtendsNull.js index 1eeb5172cad..45cd0132bda 100644 --- a/tests/baselines/reference/classExtendsNull.js +++ b/tests/baselines/reference/classExtendsNull.js @@ -14,7 +14,7 @@ class D extends null { //// [classExtendsNull.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsShadowedConstructorFunction.js b/tests/baselines/reference/classExtendsShadowedConstructorFunction.js index ddaadc2dc62..fde420bca39 100644 --- a/tests/baselines/reference/classExtendsShadowedConstructorFunction.js +++ b/tests/baselines/reference/classExtendsShadowedConstructorFunction.js @@ -10,7 +10,7 @@ module M { //// [classExtendsShadowedConstructorFunction.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsValidConstructorFunction.js b/tests/baselines/reference/classExtendsValidConstructorFunction.js index 31bff6e430c..7346096d803 100644 --- a/tests/baselines/reference/classExtendsValidConstructorFunction.js +++ b/tests/baselines/reference/classExtendsValidConstructorFunction.js @@ -7,7 +7,7 @@ class C extends foo { } // error, cannot extend it though //// [classExtendsValidConstructorFunction.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classHeritageWithTrailingSeparator.js b/tests/baselines/reference/classHeritageWithTrailingSeparator.js index 12265f569bd..ab37b45f3be 100644 --- a/tests/baselines/reference/classHeritageWithTrailingSeparator.js +++ b/tests/baselines/reference/classHeritageWithTrailingSeparator.js @@ -5,7 +5,7 @@ class D extends C, { //// [classHeritageWithTrailingSeparator.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classImplementsClass2.js b/tests/baselines/reference/classImplementsClass2.js index 5e3eae46543..372f8ce84ef 100644 --- a/tests/baselines/reference/classImplementsClass2.js +++ b/tests/baselines/reference/classImplementsClass2.js @@ -15,7 +15,7 @@ c2 = c; //// [classImplementsClass2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classImplementsClass3.js b/tests/baselines/reference/classImplementsClass3.js index 5fd003e93b9..09c2a9fbe6b 100644 --- a/tests/baselines/reference/classImplementsClass3.js +++ b/tests/baselines/reference/classImplementsClass3.js @@ -16,7 +16,7 @@ c2 = c; //// [classImplementsClass3.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classImplementsClass4.js b/tests/baselines/reference/classImplementsClass4.js index 477288972df..c80e2152598 100644 --- a/tests/baselines/reference/classImplementsClass4.js +++ b/tests/baselines/reference/classImplementsClass4.js @@ -18,7 +18,7 @@ c2 = c; //// [classImplementsClass4.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classImplementsClass5.js b/tests/baselines/reference/classImplementsClass5.js index 0ec258ab77b..de0bb4469e1 100644 --- a/tests/baselines/reference/classImplementsClass5.js +++ b/tests/baselines/reference/classImplementsClass5.js @@ -19,7 +19,7 @@ c2 = c; //// [classImplementsClass5.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classImplementsClass6.js b/tests/baselines/reference/classImplementsClass6.js index 0771c56415c..c87c1b59d2f 100644 --- a/tests/baselines/reference/classImplementsClass6.js +++ b/tests/baselines/reference/classImplementsClass6.js @@ -23,7 +23,7 @@ c2.bar(); // should error //// [classImplementsClass6.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classIndexer3.js b/tests/baselines/reference/classIndexer3.js index 2e55c894645..759804baa41 100644 --- a/tests/baselines/reference/classIndexer3.js +++ b/tests/baselines/reference/classIndexer3.js @@ -12,7 +12,7 @@ class D123 extends C123 { //// [classIndexer3.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classInheritence.js b/tests/baselines/reference/classInheritence.js index f68d76fad47..614124c7a09 100644 --- a/tests/baselines/reference/classInheritence.js +++ b/tests/baselines/reference/classInheritence.js @@ -4,7 +4,7 @@ class A extends A { } //// [classInheritence.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classIsSubtypeOfBaseType.js b/tests/baselines/reference/classIsSubtypeOfBaseType.js index 52300987d8e..fe056e41813 100644 --- a/tests/baselines/reference/classIsSubtypeOfBaseType.js +++ b/tests/baselines/reference/classIsSubtypeOfBaseType.js @@ -17,7 +17,7 @@ class Derived2 extends Base<{ bar: string; }> { //// [classIsSubtypeOfBaseType.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classOrder2.js b/tests/baselines/reference/classOrder2.js index 63490fa29b1..34bbf93fd2f 100644 --- a/tests/baselines/reference/classOrder2.js +++ b/tests/baselines/reference/classOrder2.js @@ -21,7 +21,7 @@ a.foo(); //// [classOrder2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classOrderBug.js b/tests/baselines/reference/classOrderBug.js index e21a5ed64cf..69ed7723a98 100644 --- a/tests/baselines/reference/classOrderBug.js +++ b/tests/baselines/reference/classOrderBug.js @@ -17,7 +17,7 @@ class foo extends baz {} //// [classOrderBug.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classSideInheritance1.js b/tests/baselines/reference/classSideInheritance1.js index 9443509032c..b3882d64b87 100644 --- a/tests/baselines/reference/classSideInheritance1.js +++ b/tests/baselines/reference/classSideInheritance1.js @@ -17,7 +17,7 @@ C2.bar(); // valid //// [classSideInheritance1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classSideInheritance2.js b/tests/baselines/reference/classSideInheritance2.js index 67ee666749b..8a6564f4f9f 100644 --- a/tests/baselines/reference/classSideInheritance2.js +++ b/tests/baselines/reference/classSideInheritance2.js @@ -22,7 +22,7 @@ class TextBase implements IText { //// [classSideInheritance2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classSideInheritance3.js b/tests/baselines/reference/classSideInheritance3.js index 589dd81c5c6..44035af4f30 100644 --- a/tests/baselines/reference/classSideInheritance3.js +++ b/tests/baselines/reference/classSideInheritance3.js @@ -20,7 +20,7 @@ var r3: typeof A = C; // ok //// [classSideInheritance3.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classUpdateTests.js b/tests/baselines/reference/classUpdateTests.js index 53ef71d0e4b..d29277a84e4 100644 --- a/tests/baselines/reference/classUpdateTests.js +++ b/tests/baselines/reference/classUpdateTests.js @@ -115,7 +115,7 @@ class R { //// [classUpdateTests.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classWithBaseClassButNoConstructor.js b/tests/baselines/reference/classWithBaseClassButNoConstructor.js index c25687d3c74..db10ddb0727 100644 --- a/tests/baselines/reference/classWithBaseClassButNoConstructor.js +++ b/tests/baselines/reference/classWithBaseClassButNoConstructor.js @@ -42,7 +42,7 @@ var d6 = new D(1); // ok //// [classWithBaseClassButNoConstructor.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classWithConstructors.js b/tests/baselines/reference/classWithConstructors.js index f445d22d18f..3e038e3a424 100644 --- a/tests/baselines/reference/classWithConstructors.js +++ b/tests/baselines/reference/classWithConstructors.js @@ -51,7 +51,7 @@ module Generics { //// [classWithConstructors.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classWithProtectedProperty.js b/tests/baselines/reference/classWithProtectedProperty.js index 2cb8a4e0a50..35c26afef98 100644 --- a/tests/baselines/reference/classWithProtectedProperty.js +++ b/tests/baselines/reference/classWithProtectedProperty.js @@ -30,7 +30,7 @@ class D extends C { //// [classWithProtectedProperty.js] // accessing any protected outside the class is an error var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classWithStaticMembers.js b/tests/baselines/reference/classWithStaticMembers.js index 9e79780d5cc..5deb8f99643 100644 --- a/tests/baselines/reference/classWithStaticMembers.js +++ b/tests/baselines/reference/classWithStaticMembers.js @@ -21,7 +21,7 @@ var r3 = r.foo; //// [classWithStaticMembers.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classdecl.js b/tests/baselines/reference/classdecl.js index a3059757d2f..99d7bba92b0 100644 --- a/tests/baselines/reference/classdecl.js +++ b/tests/baselines/reference/classdecl.js @@ -95,7 +95,7 @@ class e { //// [classdecl.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/clodulesDerivedClasses.js b/tests/baselines/reference/clodulesDerivedClasses.js index ea4bfcf301f..209b135fb15 100644 --- a/tests/baselines/reference/clodulesDerivedClasses.js +++ b/tests/baselines/reference/clodulesDerivedClasses.js @@ -24,7 +24,7 @@ module Path.Utils { //// [clodulesDerivedClasses.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js index 85c0e398fbd..ec87855ba46 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js @@ -41,7 +41,7 @@ class c extends Foo { //// [collisionSuperAndLocalFunctionInAccessors.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.js index d4a22b731f2..09f1db5dd40 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.js +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.js @@ -26,7 +26,7 @@ class c extends Foo { //// [collisionSuperAndLocalFunctionInConstructor.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.js index 81c069da169..40084c7c2a5 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.js +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.js @@ -30,7 +30,7 @@ class c extends Foo { //// [collisionSuperAndLocalFunctionInMethod.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js index 67b7f0e3991..457779fe395 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js @@ -20,7 +20,7 @@ class b extends Foo { //// [collisionSuperAndLocalFunctionInProperty.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js b/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js index 26f782c0d17..92a538bea04 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js +++ b/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js @@ -34,7 +34,7 @@ class c extends Foo { //// [collisionSuperAndLocalVarInAccessors.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js b/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js index e3069352c08..c498658a974 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js +++ b/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js @@ -22,7 +22,7 @@ class c extends Foo { //// [collisionSuperAndLocalVarInConstructor.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js b/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js index 0524d993ba1..94e42d35691 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js +++ b/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js @@ -20,7 +20,7 @@ class c extends Foo { //// [collisionSuperAndLocalVarInMethod.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js b/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js index d793e022c6b..750de147841 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js +++ b/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js @@ -19,7 +19,7 @@ class b extends Foo { //// [collisionSuperAndLocalVarInProperty.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndNameResolution.js b/tests/baselines/reference/collisionSuperAndNameResolution.js index cb5636ec904..dcfd4529266 100644 --- a/tests/baselines/reference/collisionSuperAndNameResolution.js +++ b/tests/baselines/reference/collisionSuperAndNameResolution.js @@ -13,7 +13,7 @@ class Foo extends base { //// [collisionSuperAndNameResolution.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndParameter.js b/tests/baselines/reference/collisionSuperAndParameter.js index f5765043c55..408158ba2a5 100644 --- a/tests/baselines/reference/collisionSuperAndParameter.js +++ b/tests/baselines/reference/collisionSuperAndParameter.js @@ -64,7 +64,7 @@ class Foo4 extends Foo { //// [collisionSuperAndParameter.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndParameter1.js b/tests/baselines/reference/collisionSuperAndParameter1.js index ed19500f9d4..58b1cbd4989 100644 --- a/tests/baselines/reference/collisionSuperAndParameter1.js +++ b/tests/baselines/reference/collisionSuperAndParameter1.js @@ -11,7 +11,7 @@ class Foo2 extends Foo { //// [collisionSuperAndParameter1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js b/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js index 5fa7fe29091..f6f38b6f099 100644 --- a/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js +++ b/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js @@ -32,7 +32,7 @@ class b4 extends a { //// [collisionSuperAndPropertyNameAsConstuctorParameter.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js b/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js index 9e8132c6883..68707fd675d 100644 --- a/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js +++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js @@ -20,7 +20,7 @@ class b2 extends a { //// [collisionThisExpressionAndLocalVarWithSuperExperssion.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/commentsInheritance.js b/tests/baselines/reference/commentsInheritance.js index 3527f5d23bb..a1e87482843 100644 --- a/tests/baselines/reference/commentsInheritance.js +++ b/tests/baselines/reference/commentsInheritance.js @@ -153,7 +153,7 @@ i2_i = i3_i; //// [commentsInheritance.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.js b/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.js index a263a30e382..91482033255 100644 --- a/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.js +++ b/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.js @@ -196,7 +196,7 @@ var r8b7 = b6 !== a6; //// [comparisonOperatorWithIdenticalObjects.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js index b8584522b7b..95dfc215bfe 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js @@ -170,7 +170,7 @@ var r8b7 = b7 !== a7; //// [comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js index 93e1e876a7f..fbcd4a72b99 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js @@ -170,7 +170,7 @@ var r8b7 = b7 !== a7; //// [comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js index a8973bf2c10..ec2e2556cc9 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js @@ -113,7 +113,7 @@ var r8b4 = b4 !== a4; //// [comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js index 4539538782d..2e38deb0e55 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js @@ -151,7 +151,7 @@ var r8b6 = b6 !== a6; //// [comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js index 5e8412bc361..675cce7d49a 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js @@ -151,7 +151,7 @@ var r8b6 = b6 !== a6; //// [comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnCallSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnCallSignature.js index d30c3586b12..634a6448581 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnCallSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnCallSignature.js @@ -261,7 +261,7 @@ var r8b11 = b11 !== a11; //// [comparisonOperatorWithSubtypeObjectOnCallSignature.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnConstructorSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnConstructorSignature.js index 4235c1352d4..d7857dcfd2a 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnConstructorSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnConstructorSignature.js @@ -223,7 +223,7 @@ var r8b9 = b9 !== a9; //// [comparisonOperatorWithSubtypeObjectOnConstructorSignature.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnIndexSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnIndexSignature.js index 9a6fecd668d..08f08546aa9 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnIndexSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnIndexSignature.js @@ -109,7 +109,7 @@ var r8b1 = b4 !== a4; //// [comparisonOperatorWithSubtypeObjectOnIndexSignature.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js index 5721a452486..ada0ee77486 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js @@ -166,7 +166,7 @@ var r8b6 = b6 !== a6; //// [comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js index b6bf8a16e61..28d960fc3c9 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js @@ -166,7 +166,7 @@ var r8b6 = b6 !== a6; //// [comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.js index 690214fc00f..62fee91b7a3 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.js @@ -80,7 +80,7 @@ var rh4 = b2 !== a2; //// [comparisonOperatorWithSubtypeObjectOnProperty.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/complexClassRelationships.js b/tests/baselines/reference/complexClassRelationships.js index 4f48e5fc2c5..3094d43eed2 100644 --- a/tests/baselines/reference/complexClassRelationships.js +++ b/tests/baselines/reference/complexClassRelationships.js @@ -49,7 +49,7 @@ class FooBase { //// [complexClassRelationships.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.js b/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.js index 326c0830c4f..d9317789455 100644 --- a/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.js +++ b/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.js @@ -7,7 +7,7 @@ class S18 extends S18 //// [complicatedGenericRecursiveBaseClassReference.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/compoundAssignmentLHSIsValue.js b/tests/baselines/reference/compoundAssignmentLHSIsValue.js index df3015731c7..a1f6274b38b 100644 --- a/tests/baselines/reference/compoundAssignmentLHSIsValue.js +++ b/tests/baselines/reference/compoundAssignmentLHSIsValue.js @@ -125,7 +125,7 @@ foo() += value; //// [compoundAssignmentLHSIsValue.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js b/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js index d188a592588..0c90b7b60f8 100644 --- a/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js +++ b/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js @@ -87,7 +87,7 @@ foo() **= value; //// [compoundExponentiationAssignmentLHSIsValue.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames24_ES5.js b/tests/baselines/reference/computedPropertyNames24_ES5.js index ff9112755bd..03b7347165c 100644 --- a/tests/baselines/reference/computedPropertyNames24_ES5.js +++ b/tests/baselines/reference/computedPropertyNames24_ES5.js @@ -10,7 +10,7 @@ class C extends Base { //// [computedPropertyNames24_ES5.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames25_ES5.js b/tests/baselines/reference/computedPropertyNames25_ES5.js index dad9c5c291a..e98865176fb 100644 --- a/tests/baselines/reference/computedPropertyNames25_ES5.js +++ b/tests/baselines/reference/computedPropertyNames25_ES5.js @@ -15,7 +15,7 @@ class C extends Base { //// [computedPropertyNames25_ES5.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames26_ES5.js b/tests/baselines/reference/computedPropertyNames26_ES5.js index 5db7768270a..c10c3b112e4 100644 --- a/tests/baselines/reference/computedPropertyNames26_ES5.js +++ b/tests/baselines/reference/computedPropertyNames26_ES5.js @@ -12,7 +12,7 @@ class C extends Base { //// [computedPropertyNames26_ES5.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames27_ES5.js b/tests/baselines/reference/computedPropertyNames27_ES5.js index 381805659e2..0801b4b5e71 100644 --- a/tests/baselines/reference/computedPropertyNames27_ES5.js +++ b/tests/baselines/reference/computedPropertyNames27_ES5.js @@ -7,7 +7,7 @@ class C extends Base { //// [computedPropertyNames27_ES5.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames28_ES5.js b/tests/baselines/reference/computedPropertyNames28_ES5.js index ab765c56dd7..dc360dfd86a 100644 --- a/tests/baselines/reference/computedPropertyNames28_ES5.js +++ b/tests/baselines/reference/computedPropertyNames28_ES5.js @@ -12,7 +12,7 @@ class C extends Base { //// [computedPropertyNames28_ES5.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames30_ES5.js b/tests/baselines/reference/computedPropertyNames30_ES5.js index c2c7cddd971..30c6fa33bbe 100644 --- a/tests/baselines/reference/computedPropertyNames30_ES5.js +++ b/tests/baselines/reference/computedPropertyNames30_ES5.js @@ -17,7 +17,7 @@ class C extends Base { //// [computedPropertyNames30_ES5.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames31_ES5.js b/tests/baselines/reference/computedPropertyNames31_ES5.js index 00cc765f4cc..856fbe88f68 100644 --- a/tests/baselines/reference/computedPropertyNames31_ES5.js +++ b/tests/baselines/reference/computedPropertyNames31_ES5.js @@ -17,7 +17,7 @@ class C extends Base { //// [computedPropertyNames31_ES5.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames43_ES5.js b/tests/baselines/reference/computedPropertyNames43_ES5.js index b1bb0fec72c..ccc7aed3725 100644 --- a/tests/baselines/reference/computedPropertyNames43_ES5.js +++ b/tests/baselines/reference/computedPropertyNames43_ES5.js @@ -14,7 +14,7 @@ class D extends C { //// [computedPropertyNames43_ES5.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames44_ES5.js b/tests/baselines/reference/computedPropertyNames44_ES5.js index bf940f15014..d16c7fc2f46 100644 --- a/tests/baselines/reference/computedPropertyNames44_ES5.js +++ b/tests/baselines/reference/computedPropertyNames44_ES5.js @@ -13,7 +13,7 @@ class D extends C { //// [computedPropertyNames44_ES5.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames45_ES5.js b/tests/baselines/reference/computedPropertyNames45_ES5.js index 5b5d64f9bf0..8585f28e5d6 100644 --- a/tests/baselines/reference/computedPropertyNames45_ES5.js +++ b/tests/baselines/reference/computedPropertyNames45_ES5.js @@ -14,7 +14,7 @@ class D extends C { //// [computedPropertyNames45_ES5.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js b/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js index 408571af42a..030fba2525b 100644 --- a/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js +++ b/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js @@ -49,7 +49,7 @@ var result11: any = true ? 1 : 'string'; //// [conditionalOperatorWithIdenticalBCT.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js b/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js index 0ac935a582a..85633af2a25 100644 --- a/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js +++ b/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js @@ -25,7 +25,7 @@ var result61: (t: X) => number| string = true ? (m) => m.propertyX1 : (n) => n.p //// [conditionalOperatorWithoutIdenticalBCT.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constantOverloadFunction.js b/tests/baselines/reference/constantOverloadFunction.js index 160191c5ca0..09e0c2788c4 100644 --- a/tests/baselines/reference/constantOverloadFunction.js +++ b/tests/baselines/reference/constantOverloadFunction.js @@ -15,7 +15,7 @@ function foo(tagName: any): Base { //// [constantOverloadFunction.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js b/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js index 509f9ba70e6..dd5bbf27d61 100644 --- a/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js +++ b/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js @@ -16,7 +16,7 @@ function foo(tagName: any): Base { //// [constantOverloadFunctionNoSubtypeError.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js b/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js index 7908d36a56a..a68f1411821 100644 --- a/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js +++ b/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js @@ -21,7 +21,7 @@ class Container { //// [constraintCheckInGenericBaseTypeReference.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.js index 6b308d88896..f082035064b 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.js @@ -72,7 +72,7 @@ interface I extends A { //// [constructSignatureAssignabilityInInheritance2.js] // checking subtype relations for function types as it relates to contextual signature instantiation var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.js index 09abd6e0868..ad834dd6cb4 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.js @@ -115,7 +115,7 @@ module Errors { // checking subtype relations for function types as it relates to contextual signature instantiation // error cases var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance4.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance4.js index 4e9a8c59bf9..12fc6bc872f 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance4.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance4.js @@ -62,7 +62,7 @@ interface I extends A { //// [constructSignatureAssignabilityInInheritance4.js] // checking subtype relations for function types as it relates to contextual signature instantiation var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.js index 91ec3b313bb..10172a751ab 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.js @@ -52,7 +52,7 @@ interface I extends B { // checking subtype relations for function types as it relates to contextual signature instantiation // same as subtypingWithConstructSignatures2 just with an extra level of indirection in the inheritance chain var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.js index edafb009916..8c0fc83b406 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.js @@ -55,7 +55,7 @@ interface I9 extends A { // same as subtypingWithConstructSignatures4 but using class type parameters instead of generic signatures // all are errors var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructorArgs.js b/tests/baselines/reference/constructorArgs.js index 6bbea0fddf7..333cc843162 100644 --- a/tests/baselines/reference/constructorArgs.js +++ b/tests/baselines/reference/constructorArgs.js @@ -17,7 +17,7 @@ class Sub extends Super { //// [constructorArgs.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType.js b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType.js index 45ed976e191..806ff9581ca 100644 --- a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType.js +++ b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType.js @@ -21,7 +21,7 @@ class Derived2 extends Base { //// [constructorFunctionTypeIsAssignableToBaseType.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js index c5e27748f52..4308710ef81 100644 --- a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js +++ b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js @@ -35,7 +35,7 @@ class Derived2 extends Base { //// [constructorFunctionTypeIsAssignableToBaseType2.js] // the constructor function itself does not need to be a subtype of the base type constructor function var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructorHasPrototypeProperty.js b/tests/baselines/reference/constructorHasPrototypeProperty.js index a16694cdbf5..c36307ee7fe 100644 --- a/tests/baselines/reference/constructorHasPrototypeProperty.js +++ b/tests/baselines/reference/constructorHasPrototypeProperty.js @@ -33,7 +33,7 @@ module Generic { //// [constructorHasPrototypeProperty.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructorOverloads2.js b/tests/baselines/reference/constructorOverloads2.js index 2d26194f2e7..43553c8f72c 100644 --- a/tests/baselines/reference/constructorOverloads2.js +++ b/tests/baselines/reference/constructorOverloads2.js @@ -27,7 +27,7 @@ f1.bar1(); //// [constructorOverloads2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructorOverloads3.js b/tests/baselines/reference/constructorOverloads3.js index c0ae9b452f9..fc916a1b283 100644 --- a/tests/baselines/reference/constructorOverloads3.js +++ b/tests/baselines/reference/constructorOverloads3.js @@ -24,7 +24,7 @@ f1.bar1(); //// [constructorOverloads3.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructorWithCapturedSuper.js b/tests/baselines/reference/constructorWithCapturedSuper.js index 895f78eb04b..f128a5f25a0 100644 --- a/tests/baselines/reference/constructorWithCapturedSuper.js +++ b/tests/baselines/reference/constructorWithCapturedSuper.js @@ -54,7 +54,7 @@ class D extends A { //// [constructorWithCapturedSuper.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js index d4cd737ab46..bcf6ee23d91 100644 --- a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js +++ b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js @@ -282,7 +282,7 @@ TypeScriptAllInOne.Program.Main(); //// [constructorWithIncompleteTypeAnnotation.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/contextualTypingArrayOfLambdas.js b/tests/baselines/reference/contextualTypingArrayOfLambdas.js index caf7ed445e5..6358453f4fa 100644 --- a/tests/baselines/reference/contextualTypingArrayOfLambdas.js +++ b/tests/baselines/reference/contextualTypingArrayOfLambdas.js @@ -16,7 +16,7 @@ var xs = [(x: A) => { }, (x: B) => { }, (x: C) => { }]; //// [contextualTypingArrayOfLambdas.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/contextualTypingOfConditionalExpression.js b/tests/baselines/reference/contextualTypingOfConditionalExpression.js index a6ce98f61e2..70234ea3fec 100644 --- a/tests/baselines/reference/contextualTypingOfConditionalExpression.js +++ b/tests/baselines/reference/contextualTypingOfConditionalExpression.js @@ -16,7 +16,7 @@ var x2: (a: A) => void = true ? (a) => a.foo : (b) => b.foo; //// [contextualTypingOfConditionalExpression.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/contextualTypingOfConditionalExpression2.js b/tests/baselines/reference/contextualTypingOfConditionalExpression2.js index e3bd1643cfb..5c40163b2e0 100644 --- a/tests/baselines/reference/contextualTypingOfConditionalExpression2.js +++ b/tests/baselines/reference/contextualTypingOfConditionalExpression2.js @@ -14,7 +14,7 @@ var x2: (a: A) => void = true ? (a: C) => a.foo : (b: number) => { }; //// [contextualTypingOfConditionalExpression2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.js b/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.js index 89979da4812..2afea65e32a 100644 --- a/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.js +++ b/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.js @@ -12,7 +12,7 @@ var a: D = foo("hi", []); //// [crashInsourcePropertyIsRelatableToTargetProperty.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declFileClassExtendsNull.js b/tests/baselines/reference/declFileClassExtendsNull.js index 30ddc3f08bf..0638373ab22 100644 --- a/tests/baselines/reference/declFileClassExtendsNull.js +++ b/tests/baselines/reference/declFileClassExtendsNull.js @@ -5,7 +5,7 @@ class ExtendsNull extends null { //// [declFileClassExtendsNull.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declFileForFunctionTypeAsTypeParameter.js b/tests/baselines/reference/declFileForFunctionTypeAsTypeParameter.js index 442007d9b9a..889ab313c01 100644 --- a/tests/baselines/reference/declFileForFunctionTypeAsTypeParameter.js +++ b/tests/baselines/reference/declFileForFunctionTypeAsTypeParameter.js @@ -11,7 +11,7 @@ interface I extends X<() => number> { //// [declFileForFunctionTypeAsTypeParameter.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declFileGenericClassWithGenericExtendedClass.js b/tests/baselines/reference/declFileGenericClassWithGenericExtendedClass.js index 47593dc9d68..005e33950bc 100644 --- a/tests/baselines/reference/declFileGenericClassWithGenericExtendedClass.js +++ b/tests/baselines/reference/declFileGenericClassWithGenericExtendedClass.js @@ -14,7 +14,7 @@ class Baz implements IBar { //// [declFileGenericClassWithGenericExtendedClass.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declFileGenericType.js b/tests/baselines/reference/declFileGenericType.js index b2e99a73ad7..47af8dc415a 100644 --- a/tests/baselines/reference/declFileGenericType.js +++ b/tests/baselines/reference/declFileGenericType.js @@ -42,7 +42,7 @@ export var j = C.F6; //// [declFileGenericType.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declFileGenericType2.js b/tests/baselines/reference/declFileGenericType2.js index 720be79b28d..f6fb93cb28b 100644 --- a/tests/baselines/reference/declFileGenericType2.js +++ b/tests/baselines/reference/declFileGenericType2.js @@ -44,7 +44,7 @@ module templa.dom.mvc.composite { //// [declFileGenericType2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js b/tests/baselines/reference/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js index 17d885788dd..45cde43ee4f 100644 --- a/tests/baselines/reference/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js +++ b/tests/baselines/reference/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js @@ -22,7 +22,7 @@ module X.Y.base.Z { //// [declFileWithClassNameConflictingWithClassReferredByExtendsClause.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declFileWithExtendsClauseThatHasItsContainerNameConflict.js b/tests/baselines/reference/declFileWithExtendsClauseThatHasItsContainerNameConflict.js index 70d0cd5a3dd..c7b4a7483e9 100644 --- a/tests/baselines/reference/declFileWithExtendsClauseThatHasItsContainerNameConflict.js +++ b/tests/baselines/reference/declFileWithExtendsClauseThatHasItsContainerNameConflict.js @@ -20,7 +20,7 @@ module A.B.C { //// [declFileWithExtendsClauseThatHasItsContainerNameConflict.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declarationEmitExpressionInExtends.js b/tests/baselines/reference/declarationEmitExpressionInExtends.js index 726c7b22446..34b8206e43a 100644 --- a/tests/baselines/reference/declarationEmitExpressionInExtends.js +++ b/tests/baselines/reference/declarationEmitExpressionInExtends.js @@ -16,7 +16,7 @@ q.s; //// [declarationEmitExpressionInExtends.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declarationEmitExpressionInExtends2.js b/tests/baselines/reference/declarationEmitExpressionInExtends2.js index 4081de6d3ed..106fe00152b 100644 --- a/tests/baselines/reference/declarationEmitExpressionInExtends2.js +++ b/tests/baselines/reference/declarationEmitExpressionInExtends2.js @@ -14,7 +14,7 @@ class MyClass extends getClass(2) { //// [declarationEmitExpressionInExtends2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declarationEmitExpressionInExtends3.js b/tests/baselines/reference/declarationEmitExpressionInExtends3.js index f36a7e250a2..c1fbd1fea90 100644 --- a/tests/baselines/reference/declarationEmitExpressionInExtends3.js +++ b/tests/baselines/reference/declarationEmitExpressionInExtends3.js @@ -46,7 +46,7 @@ export class MyClass4 extends getExportedClass(undefined)>>var __extends = (this && this.__extends) || function (d, b) { ->>> for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; +>>> Object.setPrototypeOf(d, b); >>> function __() { this.constructor = d; } >>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); >>>}; diff --git a/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js b/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js index e76f3445c8e..55ceea201ed 100644 --- a/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js +++ b/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js @@ -35,7 +35,7 @@ class Derived4 extends Base2 { //// [derivedClassConstructorWithoutSuperCall.js] // derived class constructors must contain a super call var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.js b/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.js index 7f6b83593ca..fe6be20e2ac 100644 --- a/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.js +++ b/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.js @@ -16,7 +16,7 @@ class Derived extends Base { //// [derivedClassFunctionOverridesBaseClassAccessor.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassIncludesInheritedMembers.js b/tests/baselines/reference/derivedClassIncludesInheritedMembers.js index 8224473cb54..8b6f6fe34cb 100644 --- a/tests/baselines/reference/derivedClassIncludesInheritedMembers.js +++ b/tests/baselines/reference/derivedClassIncludesInheritedMembers.js @@ -42,7 +42,7 @@ var r8 = d2[1]; //// [derivedClassIncludesInheritedMembers.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesIndexersWithAssignmentCompatibility.js b/tests/baselines/reference/derivedClassOverridesIndexersWithAssignmentCompatibility.js index 4753e395390..80fd6fd251c 100644 --- a/tests/baselines/reference/derivedClassOverridesIndexersWithAssignmentCompatibility.js +++ b/tests/baselines/reference/derivedClassOverridesIndexersWithAssignmentCompatibility.js @@ -19,7 +19,7 @@ class Derived2 extends Base2 { //// [derivedClassOverridesIndexersWithAssignmentCompatibility.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesPrivateFunction1.js b/tests/baselines/reference/derivedClassOverridesPrivateFunction1.js index 981c072d47c..c5d48de031e 100644 --- a/tests/baselines/reference/derivedClassOverridesPrivateFunction1.js +++ b/tests/baselines/reference/derivedClassOverridesPrivateFunction1.js @@ -17,7 +17,7 @@ new DerivedClass(); //// [derivedClassOverridesPrivateFunction1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesPrivates.js b/tests/baselines/reference/derivedClassOverridesPrivates.js index 1a58c038fea..fa4b88bdc56 100644 --- a/tests/baselines/reference/derivedClassOverridesPrivates.js +++ b/tests/baselines/reference/derivedClassOverridesPrivates.js @@ -17,7 +17,7 @@ class Derived2 extends Base2 { //// [derivedClassOverridesPrivates.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers.js index b8997769eb7..b4fb59ffd2c 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers.js @@ -38,7 +38,7 @@ class Derived extends Base { //// [derivedClassOverridesProtectedMembers.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js index 6797eef0e77..13f2cfc4698 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js @@ -65,7 +65,7 @@ var r8 = d2[1]; //// [derivedClassOverridesProtectedMembers2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js index d0d9d8fa0f5..24602737e6b 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js @@ -73,7 +73,7 @@ class Derived10 extends Base { //// [derivedClassOverridesProtectedMembers3.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers4.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers4.js index 06f80997600..add886d1985 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers4.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers4.js @@ -16,7 +16,7 @@ class Derived2 extends Derived1 { //// [derivedClassOverridesProtectedMembers4.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesPublicMembers.js b/tests/baselines/reference/derivedClassOverridesPublicMembers.js index 7943d904dea..d8fa9e82683 100644 --- a/tests/baselines/reference/derivedClassOverridesPublicMembers.js +++ b/tests/baselines/reference/derivedClassOverridesPublicMembers.js @@ -64,7 +64,7 @@ var r8 = d2[1]; //// [derivedClassOverridesPublicMembers.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesWithoutSubtype.js b/tests/baselines/reference/derivedClassOverridesWithoutSubtype.js index e42ff9c9e1d..bcd4e505721 100644 --- a/tests/baselines/reference/derivedClassOverridesWithoutSubtype.js +++ b/tests/baselines/reference/derivedClassOverridesWithoutSubtype.js @@ -25,7 +25,7 @@ class Derived2 extends Base2 { //// [derivedClassOverridesWithoutSubtype.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassParameterProperties.js b/tests/baselines/reference/derivedClassParameterProperties.js index 27dcc4b7d5d..cb08d4d8545 100644 --- a/tests/baselines/reference/derivedClassParameterProperties.js +++ b/tests/baselines/reference/derivedClassParameterProperties.js @@ -97,7 +97,7 @@ class Derived10 extends Base2 { //// [derivedClassParameterProperties.js] // ordering of super calls in derived constructors matters depending on other class contents var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js b/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js index b778d7bbca2..cf7845a4d9a 100644 --- a/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js +++ b/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js @@ -34,7 +34,7 @@ class Derived extends Base { //// [derivedClassSuperCallsInNonConstructorMembers.js] // error to use super calls outside a constructor var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js b/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js index 504d414a608..59a4ff7e1d1 100644 --- a/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js +++ b/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js @@ -30,7 +30,7 @@ class Derived4 extends Base { //// [derivedClassSuperCallsWithThisArg.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassTransitivity.js b/tests/baselines/reference/derivedClassTransitivity.js index a76ac8101a0..6a6b713f250 100644 --- a/tests/baselines/reference/derivedClassTransitivity.js +++ b/tests/baselines/reference/derivedClassTransitivity.js @@ -23,7 +23,7 @@ var r2 = e.foo(''); //// [derivedClassTransitivity.js] // subclassing is not transitive when you can remove required parameters and add optional parameters var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassTransitivity2.js b/tests/baselines/reference/derivedClassTransitivity2.js index a3894863696..2d05dd09cee 100644 --- a/tests/baselines/reference/derivedClassTransitivity2.js +++ b/tests/baselines/reference/derivedClassTransitivity2.js @@ -23,7 +23,7 @@ var r2 = e.foo(1, ''); //// [derivedClassTransitivity2.js] // subclassing is not transitive when you can remove required parameters and add optional parameters var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassTransitivity3.js b/tests/baselines/reference/derivedClassTransitivity3.js index 71dfecb346f..6c02e2055d9 100644 --- a/tests/baselines/reference/derivedClassTransitivity3.js +++ b/tests/baselines/reference/derivedClassTransitivity3.js @@ -23,7 +23,7 @@ var r2 = e.foo('', 1); //// [derivedClassTransitivity3.js] // subclassing is not transitive when you can remove required parameters and add optional parameters var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassTransitivity4.js b/tests/baselines/reference/derivedClassTransitivity4.js index 0030ce702d8..7d375e8e94e 100644 --- a/tests/baselines/reference/derivedClassTransitivity4.js +++ b/tests/baselines/reference/derivedClassTransitivity4.js @@ -23,7 +23,7 @@ var r2 = e.foo(''); //// [derivedClassTransitivity4.js] // subclassing is not transitive when you can remove required parameters and add optional parameters on protected members var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassWithAny.js b/tests/baselines/reference/derivedClassWithAny.js index 2a199e55861..51b4e5739f6 100644 --- a/tests/baselines/reference/derivedClassWithAny.js +++ b/tests/baselines/reference/derivedClassWithAny.js @@ -61,7 +61,7 @@ var r = c.foo(); // e.foo would return string //// [derivedClassWithAny.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js index 0542815c4e4..8a86f4ab4a9 100644 --- a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js +++ b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js @@ -24,7 +24,7 @@ class Derived extends Base { //// [derivedClassWithPrivateInstanceShadowingProtectedInstance.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js index 41869cad416..fab643265cb 100644 --- a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js +++ b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js @@ -34,7 +34,7 @@ Derived.a = 2; // error //// [derivedClassWithPrivateInstanceShadowingPublicInstance.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js index 10ae3cb35c8..322514e1c82 100644 --- a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js +++ b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js @@ -23,7 +23,7 @@ class Derived extends Base { //// [derivedClassWithPrivateStaticShadowingProtectedStatic.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js index 3f2c2a3b811..8c01a45e1ae 100644 --- a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js +++ b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js @@ -35,7 +35,7 @@ Derived.a = 2; // error //// [derivedClassWithPrivateStaticShadowingPublicStatic.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js b/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js index 7a6a7ecbb63..462819c551d 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js @@ -27,7 +27,7 @@ var d2 = new D(new Date()); // ok //// [derivedClassWithoutExplicitConstructor.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js b/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js index 62beb4bf28f..6e7c75ef37d 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js @@ -35,7 +35,7 @@ var d4 = new D(new Date(), new Date(), new Date()); //// [derivedClassWithoutExplicitConstructor2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js b/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js index c96d0c96723..4d4527c172e 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js @@ -49,7 +49,7 @@ var d3 = new D2(new Date(), new Date()); // ok //// [derivedClassWithoutExplicitConstructor3.js] // automatic constructors with a class hieararchy of depth > 2 var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClasses.js b/tests/baselines/reference/derivedClasses.js index 3e097a9b139..00bdfcfde4e 100644 --- a/tests/baselines/reference/derivedClasses.js +++ b/tests/baselines/reference/derivedClasses.js @@ -32,7 +32,7 @@ b.hue(); //// [derivedClasses.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedGenericClassWithAny.js b/tests/baselines/reference/derivedGenericClassWithAny.js index 1822f3fcc47..410027ce76d 100644 --- a/tests/baselines/reference/derivedGenericClassWithAny.js +++ b/tests/baselines/reference/derivedGenericClassWithAny.js @@ -44,7 +44,7 @@ var r = c.foo(); // e.foo would return string //// [derivedGenericClassWithAny.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js b/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js index c17922e05ee..367b0d895cf 100644 --- a/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js +++ b/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js @@ -19,7 +19,7 @@ class Derived extends Base { //// [derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js b/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js index 6fe690fd692..c890a28b110 100644 --- a/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js +++ b/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js @@ -22,7 +22,7 @@ var r: Base[] = [d1, d2]; //// [derivedTypeDoesNotRequireExtendsClause.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/destructuringParameterDeclaration5.js b/tests/baselines/reference/destructuringParameterDeclaration5.js index 7ba178823df..d7b75ede23d 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration5.js +++ b/tests/baselines/reference/destructuringParameterDeclaration5.js @@ -53,7 +53,7 @@ d3({ y: "world" }); //// [destructuringParameterDeclaration5.js] // Parameter Declaration with generic var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js b/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js index 05b061116d3..fbc08b66624 100644 --- a/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js +++ b/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js @@ -15,7 +15,7 @@ class B extends A { //// [emitSuperCallBeforeEmitParameterPropertyDeclaration1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js index 2cf2cb02073..1328ece2af0 100644 --- a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js +++ b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js @@ -17,7 +17,7 @@ class B extends A { //// [emitSuperCallBeforeEmitPropertyDeclaration1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js index eaa52e39285..a9883b26e30 100644 --- a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js +++ b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js @@ -15,7 +15,7 @@ class B extends A { //// [emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/emitThisInSuperMethodCall.js b/tests/baselines/reference/emitThisInSuperMethodCall.js index 1f7ed8bfa94..1e23553a2d9 100644 --- a/tests/baselines/reference/emitThisInSuperMethodCall.js +++ b/tests/baselines/reference/emitThisInSuperMethodCall.js @@ -29,7 +29,7 @@ class RegisteredUser extends User { //// [emitThisInSuperMethodCall.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/emptyModuleName.js b/tests/baselines/reference/emptyModuleName.js index 3ed21cf217a..404abf6a42c 100644 --- a/tests/baselines/reference/emptyModuleName.js +++ b/tests/baselines/reference/emptyModuleName.js @@ -6,7 +6,7 @@ class B extends A { //// [emptyModuleName.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/errorForwardReferenceForwadingConstructor.js b/tests/baselines/reference/errorForwardReferenceForwadingConstructor.js index ed2e1aa7f06..2bfac7ec0f0 100644 --- a/tests/baselines/reference/errorForwardReferenceForwadingConstructor.js +++ b/tests/baselines/reference/errorForwardReferenceForwadingConstructor.js @@ -13,7 +13,7 @@ class derived extends base { } //// [errorForwardReferenceForwadingConstructor.js] // Error forward referencing derived class with forwarding constructor var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/errorSuperCalls.js b/tests/baselines/reference/errorSuperCalls.js index 720894e50c0..4e228777567 100644 --- a/tests/baselines/reference/errorSuperCalls.js +++ b/tests/baselines/reference/errorSuperCalls.js @@ -76,7 +76,7 @@ class OtherDerived extends OtherBase { //// [errorSuperCalls.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/errorSuperPropertyAccess.js b/tests/baselines/reference/errorSuperPropertyAccess.js index e12a758b053..62bb9919171 100644 --- a/tests/baselines/reference/errorSuperPropertyAccess.js +++ b/tests/baselines/reference/errorSuperPropertyAccess.js @@ -130,7 +130,7 @@ var obj = { n: super.wat, p: super.foo() }; //// [errorSuperPropertyAccess.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/errorsInGenericTypeReference.js b/tests/baselines/reference/errorsInGenericTypeReference.js index 6dd9f62edcb..bb80f73f216 100644 --- a/tests/baselines/reference/errorsInGenericTypeReference.js +++ b/tests/baselines/reference/errorsInGenericTypeReference.js @@ -74,7 +74,7 @@ interface testInterface2 { //// [errorsInGenericTypeReference.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/es6ClassSuperCodegenBug.js b/tests/baselines/reference/es6ClassSuperCodegenBug.js index 2eec250211e..fc6ad83738d 100644 --- a/tests/baselines/reference/es6ClassSuperCodegenBug.js +++ b/tests/baselines/reference/es6ClassSuperCodegenBug.js @@ -16,7 +16,7 @@ class B extends A { //// [es6ClassSuperCodegenBug.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/es6ClassTest.js b/tests/baselines/reference/es6ClassTest.js index 067e57c2581..8fa5be0ba3e 100644 --- a/tests/baselines/reference/es6ClassTest.js +++ b/tests/baselines/reference/es6ClassTest.js @@ -86,7 +86,7 @@ declare module AmbientMod { //// [es6ClassTest.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/es6ClassTest2.js b/tests/baselines/reference/es6ClassTest2.js index 533b332422d..7004c7056f2 100644 --- a/tests/baselines/reference/es6ClassTest2.js +++ b/tests/baselines/reference/es6ClassTest2.js @@ -160,7 +160,7 @@ var ccwc = new ChildClassWithoutConstructor(1, "s"); //// [es6ClassTest2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/es6ClassTest7.js b/tests/baselines/reference/es6ClassTest7.js index f786fce4461..20d46e6b53c 100644 --- a/tests/baselines/reference/es6ClassTest7.js +++ b/tests/baselines/reference/es6ClassTest7.js @@ -10,7 +10,7 @@ class Bar extends M.Foo { //// [es6ClassTest7.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/exportAssignmentOfGenericType1.js b/tests/baselines/reference/exportAssignmentOfGenericType1.js index 7c1831ecac4..431da58c12e 100644 --- a/tests/baselines/reference/exportAssignmentOfGenericType1.js +++ b/tests/baselines/reference/exportAssignmentOfGenericType1.js @@ -25,7 +25,7 @@ define(["require", "exports"], function (require, exports) { }); //// [exportAssignmentOfGenericType1_1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/exportDeclarationInInternalModule.js b/tests/baselines/reference/exportDeclarationInInternalModule.js index b6d6d982a32..ddc2e15a5b2 100644 --- a/tests/baselines/reference/exportDeclarationInInternalModule.js +++ b/tests/baselines/reference/exportDeclarationInInternalModule.js @@ -20,7 +20,7 @@ var a: Bbb.SomeType; //// [exportDeclarationInInternalModule.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extBaseClass1.js b/tests/baselines/reference/extBaseClass1.js index 91dfba7a9bf..d8eb5e75f9f 100644 --- a/tests/baselines/reference/extBaseClass1.js +++ b/tests/baselines/reference/extBaseClass1.js @@ -21,7 +21,7 @@ module N { //// [extBaseClass1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extBaseClass2.js b/tests/baselines/reference/extBaseClass2.js index 3ab217eb019..474a91d2a72 100644 --- a/tests/baselines/reference/extBaseClass2.js +++ b/tests/baselines/reference/extBaseClass2.js @@ -12,7 +12,7 @@ module M { //// [extBaseClass2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendAndImplementTheSameBaseType.js b/tests/baselines/reference/extendAndImplementTheSameBaseType.js index 74bbf3a27ac..1342df1b992 100644 --- a/tests/baselines/reference/extendAndImplementTheSameBaseType.js +++ b/tests/baselines/reference/extendAndImplementTheSameBaseType.js @@ -15,7 +15,7 @@ d.foo; //// [extendAndImplementTheSameBaseType.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendAndImplementTheSameBaseType2.js b/tests/baselines/reference/extendAndImplementTheSameBaseType2.js index fa7963487d5..38b76b19942 100644 --- a/tests/baselines/reference/extendAndImplementTheSameBaseType2.js +++ b/tests/baselines/reference/extendAndImplementTheSameBaseType2.js @@ -18,7 +18,7 @@ var r4: number = d.bar(); //// [extendAndImplementTheSameBaseType2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendBaseClassBeforeItsDeclared.js b/tests/baselines/reference/extendBaseClassBeforeItsDeclared.js index 596ab319b2c..8cf51642831 100644 --- a/tests/baselines/reference/extendBaseClassBeforeItsDeclared.js +++ b/tests/baselines/reference/extendBaseClassBeforeItsDeclared.js @@ -5,7 +5,7 @@ class base { constructor (public n: number) { } } //// [extendBaseClassBeforeItsDeclared.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendClassExpressionFromModule.js b/tests/baselines/reference/extendClassExpressionFromModule.js index 895cdedfaff..27420b55d1c 100644 --- a/tests/baselines/reference/extendClassExpressionFromModule.js +++ b/tests/baselines/reference/extendClassExpressionFromModule.js @@ -22,7 +22,7 @@ module.exports = x; //// [foo2.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendConstructSignatureInInterface.js b/tests/baselines/reference/extendConstructSignatureInInterface.js index 4bf92dd0315..db87c4c14fd 100644 --- a/tests/baselines/reference/extendConstructSignatureInInterface.js +++ b/tests/baselines/reference/extendConstructSignatureInInterface.js @@ -12,7 +12,7 @@ var e: E = new E(1); //// [extendConstructSignatureInInterface.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendNonClassSymbol1.js b/tests/baselines/reference/extendNonClassSymbol1.js index b23b601bc29..00326e24103 100644 --- a/tests/baselines/reference/extendNonClassSymbol1.js +++ b/tests/baselines/reference/extendNonClassSymbol1.js @@ -5,7 +5,7 @@ class C extends x { } // error, could not find symbol xs //// [extendNonClassSymbol1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendNonClassSymbol2.js b/tests/baselines/reference/extendNonClassSymbol2.js index 78dfaa91827..ce030629af5 100644 --- a/tests/baselines/reference/extendNonClassSymbol2.js +++ b/tests/baselines/reference/extendNonClassSymbol2.js @@ -7,7 +7,7 @@ class C extends Foo {} // error, could not find symbol Foo //// [extendNonClassSymbol2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendPrivateConstructorClass.js b/tests/baselines/reference/extendPrivateConstructorClass.js index 8893e9735ff..52b96e31611 100644 --- a/tests/baselines/reference/extendPrivateConstructorClass.js +++ b/tests/baselines/reference/extendPrivateConstructorClass.js @@ -11,7 +11,7 @@ class C extends abc.XYZ { //// [extendPrivateConstructorClass.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js b/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js index da081154d8a..92c5dc69681 100644 --- a/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js +++ b/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js @@ -43,7 +43,7 @@ exports.Model = Model; //// [extendingClassFromAliasAndUsageInIndexer_moduleA.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -59,7 +59,7 @@ exports.VisualizationModel = VisualizationModel; //// [extendingClassFromAliasAndUsageInIndexer_moduleB.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendsClauseAlreadySeen.js b/tests/baselines/reference/extendsClauseAlreadySeen.js index 267cd86eed0..37cdd0eb9bc 100644 --- a/tests/baselines/reference/extendsClauseAlreadySeen.js +++ b/tests/baselines/reference/extendsClauseAlreadySeen.js @@ -8,7 +8,7 @@ class D extends C extends C { //// [extendsClauseAlreadySeen.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendsClauseAlreadySeen2.js b/tests/baselines/reference/extendsClauseAlreadySeen2.js index 76fbc3365af..bc4306884a3 100644 --- a/tests/baselines/reference/extendsClauseAlreadySeen2.js +++ b/tests/baselines/reference/extendsClauseAlreadySeen2.js @@ -8,7 +8,7 @@ class D extends C extends C { //// [extendsClauseAlreadySeen2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/fluentClasses.js b/tests/baselines/reference/fluentClasses.js index ac44416e133..ade60a06331 100644 --- a/tests/baselines/reference/fluentClasses.js +++ b/tests/baselines/reference/fluentClasses.js @@ -20,7 +20,7 @@ var z = c.foo().bar().baz(); // Fluent pattern //// [fluentClasses.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/for-inStatements.js b/tests/baselines/reference/for-inStatements.js index 15d771bf587..b34fd91192b 100644 --- a/tests/baselines/reference/for-inStatements.js +++ b/tests/baselines/reference/for-inStatements.js @@ -82,7 +82,7 @@ for (var x in Color.Blue) { } //// [for-inStatements.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/for-inStatementsInvalid.js b/tests/baselines/reference/for-inStatementsInvalid.js index d1181760a36..3d39fb2903b 100644 --- a/tests/baselines/reference/for-inStatementsInvalid.js +++ b/tests/baselines/reference/for-inStatementsInvalid.js @@ -65,7 +65,7 @@ for (var x in i[42]) { } //// [for-inStatementsInvalid.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/forStatementsMultipleInvalidDecl.js b/tests/baselines/reference/forStatementsMultipleInvalidDecl.js index 3666ad930a6..8ca8c794cf5 100644 --- a/tests/baselines/reference/forStatementsMultipleInvalidDecl.js +++ b/tests/baselines/reference/forStatementsMultipleInvalidDecl.js @@ -56,7 +56,7 @@ for( var m = M.A;;){} //// [forStatementsMultipleInvalidDecl.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/functionImplementationErrors.js b/tests/baselines/reference/functionImplementationErrors.js index 433418af41d..5c8defcf814 100644 --- a/tests/baselines/reference/functionImplementationErrors.js +++ b/tests/baselines/reference/functionImplementationErrors.js @@ -76,7 +76,7 @@ var f13 = () => { //// [functionImplementationErrors.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/functionImplementations.js b/tests/baselines/reference/functionImplementations.js index 86636b84a87..e73e5095701 100644 --- a/tests/baselines/reference/functionImplementations.js +++ b/tests/baselines/reference/functionImplementations.js @@ -159,7 +159,7 @@ var f12: (x: number) => any = x => { // should be (x: number) => Base | AnotherC //// [functionImplementations.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/functionSubtypingOfVarArgs.js b/tests/baselines/reference/functionSubtypingOfVarArgs.js index 55917962184..89e8b1e95ef 100644 --- a/tests/baselines/reference/functionSubtypingOfVarArgs.js +++ b/tests/baselines/reference/functionSubtypingOfVarArgs.js @@ -16,7 +16,7 @@ class StringEvent extends EventBase { // should work //// [functionSubtypingOfVarArgs.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/functionSubtypingOfVarArgs2.js b/tests/baselines/reference/functionSubtypingOfVarArgs2.js index a676316459f..be9c293ae72 100644 --- a/tests/baselines/reference/functionSubtypingOfVarArgs2.js +++ b/tests/baselines/reference/functionSubtypingOfVarArgs2.js @@ -16,7 +16,7 @@ class StringEvent extends EventBase { //// [functionSubtypingOfVarArgs2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/generatedContextualTyping.js b/tests/baselines/reference/generatedContextualTyping.js index 2a6911d9cf5..06abd1b9a8b 100644 --- a/tests/baselines/reference/generatedContextualTyping.js +++ b/tests/baselines/reference/generatedContextualTyping.js @@ -357,7 +357,7 @@ var x356 = function(n: Genric) { }; x356({ func: n => { return [d1, d2]; } //// [generatedContextualTyping.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericBaseClassLiteralProperty.js b/tests/baselines/reference/genericBaseClassLiteralProperty.js index a075eff9550..b572cfae97d 100644 --- a/tests/baselines/reference/genericBaseClassLiteralProperty.js +++ b/tests/baselines/reference/genericBaseClassLiteralProperty.js @@ -14,7 +14,7 @@ class SubClass extends BaseClass { //// [genericBaseClassLiteralProperty.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericBaseClassLiteralProperty2.js b/tests/baselines/reference/genericBaseClassLiteralProperty2.js index 2b562742bf7..9e99dee2b4c 100644 --- a/tests/baselines/reference/genericBaseClassLiteralProperty2.js +++ b/tests/baselines/reference/genericBaseClassLiteralProperty2.js @@ -17,7 +17,7 @@ class DataView2 extends BaseCollection2 { //// [genericBaseClassLiteralProperty2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.js b/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.js index afef6224ba1..68a3e77f9ae 100644 --- a/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.js +++ b/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.js @@ -110,7 +110,7 @@ var r11 = i.foo8(); // Base //// [genericCallWithConstraintsTypeArgumentInference.js] // Basic type inference with generic calls and constraints, no errors expected var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgs2.js b/tests/baselines/reference/genericCallWithObjectTypeArgs2.js index 7b621b3ffd9..0b643db14cb 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgs2.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgs2.js @@ -34,7 +34,7 @@ var r4 = f2(i); // Base => Derived //// [genericCallWithObjectTypeArgs2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js index 892cda0ee2d..98448645d15 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js @@ -42,7 +42,7 @@ var r7 = f3(null, x => x); // any // Generic call with constraints infering type parameter from object member properties // No errors expected var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js index addfbc756a8..71bf682b0dc 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js @@ -40,7 +40,7 @@ var r6 = f3(x => x, null); //// [genericCallWithObjectTypeArgsAndConstraints3.js] // Generic call with constraints infering type parameter from object member properties var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericCallbacksAndClassHierarchy.js b/tests/baselines/reference/genericCallbacksAndClassHierarchy.js index c2ad2ba29a3..67d0df1bc22 100644 --- a/tests/baselines/reference/genericCallbacksAndClassHierarchy.js +++ b/tests/baselines/reference/genericCallbacksAndClassHierarchy.js @@ -25,7 +25,7 @@ module M { //// [genericCallbacksAndClassHierarchy.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericClassExpressionInFunction.js b/tests/baselines/reference/genericClassExpressionInFunction.js index dc574dedb00..3db4d9693af 100644 --- a/tests/baselines/reference/genericClassExpressionInFunction.js +++ b/tests/baselines/reference/genericClassExpressionInFunction.js @@ -33,7 +33,7 @@ s.genericVar = 12; //// [genericClassExpressionInFunction.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericClassInheritsConstructorFromNonGenericClass.js b/tests/baselines/reference/genericClassInheritsConstructorFromNonGenericClass.js index 1f3a6e17f14..307c891f928 100644 --- a/tests/baselines/reference/genericClassInheritsConstructorFromNonGenericClass.js +++ b/tests/baselines/reference/genericClassInheritsConstructorFromNonGenericClass.js @@ -7,7 +7,7 @@ class C { //// [genericClassInheritsConstructorFromNonGenericClass.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js b/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js index 28eaf464968..147bbd8fb87 100644 --- a/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js +++ b/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js @@ -77,7 +77,7 @@ class ViewModel implements Contract { //// [genericClassPropertyInheritanceSpecialization.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericClassStaticMethod.js b/tests/baselines/reference/genericClassStaticMethod.js index 4609e3bc9db..257e7dbce97 100644 --- a/tests/baselines/reference/genericClassStaticMethod.js +++ b/tests/baselines/reference/genericClassStaticMethod.js @@ -12,7 +12,7 @@ class Bar extends Foo { //// [genericClassStaticMethod.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericClasses3.js b/tests/baselines/reference/genericClasses3.js index 5371e2479aa..fbc62b23aab 100644 --- a/tests/baselines/reference/genericClasses3.js +++ b/tests/baselines/reference/genericClasses3.js @@ -19,7 +19,7 @@ var z = v2.b; //// [genericClasses3.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js index d990f76d2c3..4043924bf54 100644 --- a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js +++ b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js @@ -28,7 +28,7 @@ module EndGate.Tweening { //// [genericConstraintOnExtendedBuiltinTypes.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js index 4291b315933..33394ee4fce 100644 --- a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js +++ b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js @@ -27,7 +27,7 @@ module EndGate.Tweening { //// [genericConstraintOnExtendedBuiltinTypes2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.js b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.js index 1b455073196..413eed2a4c8 100644 --- a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.js +++ b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.js @@ -14,7 +14,7 @@ x = y; // error //// [genericDerivedTypeWithSpecializedBase.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.js b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.js index 0abd655e1da..da81eaf5640 100644 --- a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.js +++ b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.js @@ -14,7 +14,7 @@ x = y; // error //// [genericDerivedTypeWithSpecializedBase2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericInheritedDefaultConstructors.js b/tests/baselines/reference/genericInheritedDefaultConstructors.js index 059a3213b7a..d7aaa6224ef 100644 --- a/tests/baselines/reference/genericInheritedDefaultConstructors.js +++ b/tests/baselines/reference/genericInheritedDefaultConstructors.js @@ -12,7 +12,7 @@ var c:Constructor> = B; // shouldn't error here //// [genericInheritedDefaultConstructors.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericPrototypeProperty2.js b/tests/baselines/reference/genericPrototypeProperty2.js index eac025cce9b..6ce627694ca 100644 --- a/tests/baselines/reference/genericPrototypeProperty2.js +++ b/tests/baselines/reference/genericPrototypeProperty2.js @@ -17,7 +17,7 @@ class MyEventWrapper extends BaseEventWrapper { //// [genericPrototypeProperty2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericPrototypeProperty3.js b/tests/baselines/reference/genericPrototypeProperty3.js index 9e3ede0019d..a2817d82e9f 100644 --- a/tests/baselines/reference/genericPrototypeProperty3.js +++ b/tests/baselines/reference/genericPrototypeProperty3.js @@ -16,7 +16,7 @@ class MyEventWrapper extends BaseEventWrapper { //// [genericPrototypeProperty3.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js index 401a2e94b68..2fbb5f7ef50 100644 --- a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js +++ b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js @@ -28,7 +28,7 @@ module TypeScript2 { //// [genericRecursiveImplicitConstructorErrors2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js index c7643d4a9a2..c88dd78765a 100644 --- a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js +++ b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js @@ -32,7 +32,7 @@ module TypeScript { //// [genericRecursiveImplicitConstructorErrors3.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericTypeAssertions2.js b/tests/baselines/reference/genericTypeAssertions2.js index 687d593f01e..25e4d3f3bae 100644 --- a/tests/baselines/reference/genericTypeAssertions2.js +++ b/tests/baselines/reference/genericTypeAssertions2.js @@ -15,7 +15,7 @@ var r5: A = >[]; // error //// [genericTypeAssertions2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericTypeAssertions4.js b/tests/baselines/reference/genericTypeAssertions4.js index 50dbe5debbd..d54f37408a3 100644 --- a/tests/baselines/reference/genericTypeAssertions4.js +++ b/tests/baselines/reference/genericTypeAssertions4.js @@ -27,7 +27,7 @@ function foo2(x: T) { //// [genericTypeAssertions4.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericTypeAssertions6.js b/tests/baselines/reference/genericTypeAssertions6.js index 7bbd7351f1d..6ace4b38a13 100644 --- a/tests/baselines/reference/genericTypeAssertions6.js +++ b/tests/baselines/reference/genericTypeAssertions6.js @@ -26,7 +26,7 @@ var c: A = >b; //// [genericTypeAssertions6.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericTypeConstraints.js b/tests/baselines/reference/genericTypeConstraints.js index 67303166aa3..4aae830a0d1 100644 --- a/tests/baselines/reference/genericTypeConstraints.js +++ b/tests/baselines/reference/genericTypeConstraints.js @@ -15,7 +15,7 @@ class BarExtended extends Bar { //// [genericTypeConstraints.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js index cf19feede34..ec7029135a9 100644 --- a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js +++ b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js @@ -41,7 +41,7 @@ var k = null; // it is an error to use a generic type without type arguments // all of these are errors var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js index 973ee231762..d3797663e0e 100644 --- a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js +++ b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js @@ -41,7 +41,7 @@ var k = null; // it is an error to use a generic type without type arguments // all of these are errors var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js b/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js index d6fb98b67ca..b5c3316ab12 100644 --- a/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js +++ b/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js @@ -16,7 +16,7 @@ export class ListItem extends CollectionItem { //// [genericWithIndexerOfTypeParameterType2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/heterogeneousArrayLiterals.js b/tests/baselines/reference/heterogeneousArrayLiterals.js index 9b15cf743f0..43ec9a09587 100644 --- a/tests/baselines/reference/heterogeneousArrayLiterals.js +++ b/tests/baselines/reference/heterogeneousArrayLiterals.js @@ -134,7 +134,7 @@ function foo4(t: T, u: U) { //// [heterogeneousArrayLiterals.js] // type of an array is the best common type of its elements (plus its contextual type if it exists) var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/ifDoWhileStatements.js b/tests/baselines/reference/ifDoWhileStatements.js index 483370bee5c..8d1ad1a834f 100644 --- a/tests/baselines/reference/ifDoWhileStatements.js +++ b/tests/baselines/reference/ifDoWhileStatements.js @@ -165,7 +165,7 @@ do { }while(fn) //// [ifDoWhileStatements.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/illegalSuperCallsInConstructor.js b/tests/baselines/reference/illegalSuperCallsInConstructor.js index 868d53daad5..5299bac5eb3 100644 --- a/tests/baselines/reference/illegalSuperCallsInConstructor.js +++ b/tests/baselines/reference/illegalSuperCallsInConstructor.js @@ -22,7 +22,7 @@ class Derived extends Base { //// [illegalSuperCallsInConstructor.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/implementClausePrecedingExtends.js b/tests/baselines/reference/implementClausePrecedingExtends.js index df725cde43a..669a6794618 100644 --- a/tests/baselines/reference/implementClausePrecedingExtends.js +++ b/tests/baselines/reference/implementClausePrecedingExtends.js @@ -4,7 +4,7 @@ class D implements C extends C { } //// [implementClausePrecedingExtends.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.js b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.js index a5a5e02c156..5d93d2b04a4 100644 --- a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.js +++ b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.js @@ -87,7 +87,7 @@ module M2 { //// [implementingAnInterfaceExtendingClassWithPrivates2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.js b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.js index d0f74847141..082b9d801dc 100644 --- a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.js +++ b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.js @@ -43,7 +43,7 @@ class Bar8 extends Foo implements I { //// [implementingAnInterfaceExtendingClassWithProtecteds.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/importAsBaseClass.js b/tests/baselines/reference/importAsBaseClass.js index b4f45cac806..f61703de5f0 100644 --- a/tests/baselines/reference/importAsBaseClass.js +++ b/tests/baselines/reference/importAsBaseClass.js @@ -22,7 +22,7 @@ exports.Greeter = Greeter; //// [importAsBaseClass_1.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/importHelpers.js b/tests/baselines/reference/importHelpers.js index ae4d3127010..ec294a342de 100644 --- a/tests/baselines/reference/importHelpers.js +++ b/tests/baselines/reference/importHelpers.js @@ -69,7 +69,7 @@ C = tslib_1.__decorate([ ], C); //// [script.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/importHelpersNoHelpers.js b/tests/baselines/reference/importHelpersNoHelpers.js index a9c2deb76b6..3a2e4823337 100644 --- a/tests/baselines/reference/importHelpersNoHelpers.js +++ b/tests/baselines/reference/importHelpersNoHelpers.js @@ -71,7 +71,7 @@ var y = tslib_1.__assign({}, o); var x = tslib_1.__rest(y, []); //// [script.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/importHelpersNoModule.js b/tests/baselines/reference/importHelpersNoModule.js index 41df9710f33..991733f4b37 100644 --- a/tests/baselines/reference/importHelpersNoModule.js +++ b/tests/baselines/reference/importHelpersNoModule.js @@ -61,7 +61,7 @@ C = tslib_1.__decorate([ ], C); //// [script.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/importShadowsGlobalName.js b/tests/baselines/reference/importShadowsGlobalName.js index 34cc0604e7a..abdf7e28cbb 100644 --- a/tests/baselines/reference/importShadowsGlobalName.js +++ b/tests/baselines/reference/importShadowsGlobalName.js @@ -22,7 +22,7 @@ define(["require", "exports"], function (require, exports) { }); //// [Bar.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/importUsedInExtendsList1.js b/tests/baselines/reference/importUsedInExtendsList1.js index a40c3a51a78..941436e7e75 100644 --- a/tests/baselines/reference/importUsedInExtendsList1.js +++ b/tests/baselines/reference/importUsedInExtendsList1.js @@ -22,7 +22,7 @@ exports.Super = Super; //// [importUsedInExtendsList1_1.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/indexerConstraints2.js b/tests/baselines/reference/indexerConstraints2.js index d7357f021d0..81bb114e394 100644 --- a/tests/baselines/reference/indexerConstraints2.js +++ b/tests/baselines/reference/indexerConstraints2.js @@ -30,7 +30,7 @@ class K extends J { //// [indexerConstraints2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/indirectSelfReference.js b/tests/baselines/reference/indirectSelfReference.js index 2f4f37b9b53..a61a14a2d6b 100644 --- a/tests/baselines/reference/indirectSelfReference.js +++ b/tests/baselines/reference/indirectSelfReference.js @@ -4,7 +4,7 @@ class b extends a{ } //// [indirectSelfReference.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/indirectSelfReferenceGeneric.js b/tests/baselines/reference/indirectSelfReferenceGeneric.js index 9171bb0eeb6..989a02b1943 100644 --- a/tests/baselines/reference/indirectSelfReferenceGeneric.js +++ b/tests/baselines/reference/indirectSelfReferenceGeneric.js @@ -4,7 +4,7 @@ class b extends a { } //// [indirectSelfReferenceGeneric.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/infinitelyExpandingTypesNonGenericBase.js b/tests/baselines/reference/infinitelyExpandingTypesNonGenericBase.js index ad1a063bfb0..7336e2c0f69 100644 --- a/tests/baselines/reference/infinitelyExpandingTypesNonGenericBase.js +++ b/tests/baselines/reference/infinitelyExpandingTypesNonGenericBase.js @@ -26,7 +26,7 @@ o(A); //// [infinitelyExpandingTypesNonGenericBase.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritFromGenericTypeParameter.js b/tests/baselines/reference/inheritFromGenericTypeParameter.js index 40e6abd3e53..57ad5b71bd8 100644 --- a/tests/baselines/reference/inheritFromGenericTypeParameter.js +++ b/tests/baselines/reference/inheritFromGenericTypeParameter.js @@ -4,7 +4,7 @@ interface I extends T { } //// [inheritFromGenericTypeParameter.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritSameNamePrivatePropertiesFromSameOrigin.js b/tests/baselines/reference/inheritSameNamePrivatePropertiesFromSameOrigin.js index a0874eb1c72..679e91dc38a 100644 --- a/tests/baselines/reference/inheritSameNamePrivatePropertiesFromSameOrigin.js +++ b/tests/baselines/reference/inheritSameNamePrivatePropertiesFromSameOrigin.js @@ -12,7 +12,7 @@ interface A extends C, C2 { // ok //// [inheritSameNamePrivatePropertiesFromSameOrigin.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritance.js b/tests/baselines/reference/inheritance.js index cbfef2d3382..01fdd0a3d67 100644 --- a/tests/baselines/reference/inheritance.js +++ b/tests/baselines/reference/inheritance.js @@ -36,7 +36,7 @@ class Baad extends Good { //// [inheritance.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritance1.js b/tests/baselines/reference/inheritance1.js index 86de0b76350..c33c73a6e60 100644 --- a/tests/baselines/reference/inheritance1.js +++ b/tests/baselines/reference/inheritance1.js @@ -63,7 +63,7 @@ l1 = c; //// [inheritance1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js index 57a9c897583..180f48f613c 100644 --- a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js +++ b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js @@ -12,7 +12,7 @@ class C extends B { //// [inheritanceGrandParentPrivateMemberCollision.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js index 83c5aa3e4cd..73121951e7c 100644 --- a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js +++ b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js @@ -12,7 +12,7 @@ class C extends B { //// [inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js b/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js index b11b6e318a7..60183c5749e 100644 --- a/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js +++ b/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js @@ -12,7 +12,7 @@ class C extends B { //// [inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js b/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js index 09ea08899d9..fc1ff97e8cf 100644 --- a/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js @@ -19,7 +19,7 @@ class b extends a { //// [inheritanceMemberAccessorOverridingAccessor.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.js b/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.js index 59d2abdaab2..0ba2a70f257 100644 --- a/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.js +++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.js @@ -16,7 +16,7 @@ class b extends a { //// [inheritanceMemberAccessorOverridingMethod.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js b/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js index 98a95747a8e..26c911694a2 100644 --- a/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js +++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js @@ -14,7 +14,7 @@ class b extends a { //// [inheritanceMemberAccessorOverridingProperty.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js b/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js index 0d54e5d42fa..d0dfcc5923a 100644 --- a/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js @@ -16,7 +16,7 @@ class b extends a { //// [inheritanceMemberFuncOverridingAccessor.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.js b/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.js index 9af25c6fdb8..64e5e923178 100644 --- a/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.js +++ b/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.js @@ -13,7 +13,7 @@ class b extends a { //// [inheritanceMemberFuncOverridingMethod.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.js b/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.js index 5c77ce08101..f3835a78f14 100644 --- a/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.js +++ b/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.js @@ -11,7 +11,7 @@ class b extends a { //// [inheritanceMemberFuncOverridingProperty.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js b/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js index 82c7a94d17c..82fc4906ca6 100644 --- a/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js @@ -15,7 +15,7 @@ class b extends a { //// [inheritanceMemberPropertyOverridingAccessor.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.js b/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.js index e6929218e63..e13a111fef9 100644 --- a/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.js +++ b/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.js @@ -11,7 +11,7 @@ class b extends a { //// [inheritanceMemberPropertyOverridingMethod.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberPropertyOverridingProperty.js b/tests/baselines/reference/inheritanceMemberPropertyOverridingProperty.js index 85764cddc52..b6496085a61 100644 --- a/tests/baselines/reference/inheritanceMemberPropertyOverridingProperty.js +++ b/tests/baselines/reference/inheritanceMemberPropertyOverridingProperty.js @@ -9,7 +9,7 @@ class b extends a { //// [inheritanceMemberPropertyOverridingProperty.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js b/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js index 28fe8144509..ac99c90e829 100644 --- a/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js +++ b/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js @@ -9,7 +9,7 @@ var b3 = new B(); // error, could not select overload for 'new' expression //// [inheritanceOfGenericConstructorMethod1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js b/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js index 0cc71e168f4..406675d88d9 100644 --- a/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js +++ b/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js @@ -16,7 +16,7 @@ var n3 = new N.D2(); // no error, D2 //// [inheritanceOfGenericConstructorMethod2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js b/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js index bb91ee5f9ea..3faa8f8388d 100644 --- a/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js @@ -19,7 +19,7 @@ class b extends a { //// [inheritanceStaticAccessorOverridingAccessor.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js b/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js index 363852a84bf..543651ea6f0 100644 --- a/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js +++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js @@ -16,7 +16,7 @@ class b extends a { //// [inheritanceStaticAccessorOverridingMethod.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js b/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js index ba8df7a5f0b..5053cd3946a 100644 --- a/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js +++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js @@ -14,7 +14,7 @@ class b extends a { //// [inheritanceStaticAccessorOverridingProperty.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js index e464029fba5..6090bd4f74f 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js @@ -16,7 +16,7 @@ class b extends a { //// [inheritanceStaticFuncOverridingAccessor.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js index cc825cfa9b5..5213eae20dd 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js @@ -13,7 +13,7 @@ class b extends a { //// [inheritanceStaticFuncOverridingAccessorOfFuncType.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.js b/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.js index 466c65fa7d5..4d85f383ef6 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.js @@ -13,7 +13,7 @@ class b extends a { //// [inheritanceStaticFuncOverridingMethod.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.js b/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.js index dfc0ce2c13f..a548d70861b 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.js @@ -11,7 +11,7 @@ class b extends a { //// [inheritanceStaticFuncOverridingProperty.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.js b/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.js index da7850f2071..9f2a7acfd14 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.js @@ -11,7 +11,7 @@ class b extends a { //// [inheritanceStaticFuncOverridingPropertyOfFuncType.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticFunctionOverridingInstanceProperty.js b/tests/baselines/reference/inheritanceStaticFunctionOverridingInstanceProperty.js index d5916a9d452..c489493375e 100644 --- a/tests/baselines/reference/inheritanceStaticFunctionOverridingInstanceProperty.js +++ b/tests/baselines/reference/inheritanceStaticFunctionOverridingInstanceProperty.js @@ -11,7 +11,7 @@ class b extends a { //// [inheritanceStaticFunctionOverridingInstanceProperty.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticMembersCompatible.js b/tests/baselines/reference/inheritanceStaticMembersCompatible.js index b4cae99b64b..b57ada54212 100644 --- a/tests/baselines/reference/inheritanceStaticMembersCompatible.js +++ b/tests/baselines/reference/inheritanceStaticMembersCompatible.js @@ -9,7 +9,7 @@ class b extends a { //// [inheritanceStaticMembersCompatible.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticMembersIncompatible.js b/tests/baselines/reference/inheritanceStaticMembersIncompatible.js index 38c637dd8d1..11e8e0117db 100644 --- a/tests/baselines/reference/inheritanceStaticMembersIncompatible.js +++ b/tests/baselines/reference/inheritanceStaticMembersIncompatible.js @@ -9,7 +9,7 @@ class b extends a { //// [inheritanceStaticMembersIncompatible.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js b/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js index 49dc86fc500..7283ee4dbb0 100644 --- a/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js @@ -14,7 +14,7 @@ class b extends a { //// [inheritanceStaticPropertyOverridingAccessor.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.js b/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.js index bcd63537540..e9308f977db 100644 --- a/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.js +++ b/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.js @@ -11,7 +11,7 @@ class b extends a { //// [inheritanceStaticPropertyOverridingMethod.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticPropertyOverridingProperty.js b/tests/baselines/reference/inheritanceStaticPropertyOverridingProperty.js index c1bdd9b66a2..4feb0e06b8c 100644 --- a/tests/baselines/reference/inheritanceStaticPropertyOverridingProperty.js +++ b/tests/baselines/reference/inheritanceStaticPropertyOverridingProperty.js @@ -9,7 +9,7 @@ class b extends a { //// [inheritanceStaticPropertyOverridingProperty.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritedConstructorWithRestParams.js b/tests/baselines/reference/inheritedConstructorWithRestParams.js index 6a30836d728..4d3b055dcdb 100644 --- a/tests/baselines/reference/inheritedConstructorWithRestParams.js +++ b/tests/baselines/reference/inheritedConstructorWithRestParams.js @@ -16,7 +16,7 @@ new Derived(3); //// [inheritedConstructorWithRestParams.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritedConstructorWithRestParams2.js b/tests/baselines/reference/inheritedConstructorWithRestParams2.js index 9a1b13a8434..146677ff09c 100644 --- a/tests/baselines/reference/inheritedConstructorWithRestParams2.js +++ b/tests/baselines/reference/inheritedConstructorWithRestParams2.js @@ -36,7 +36,7 @@ new Derived("", 3, "", ""); //// [inheritedConstructorWithRestParams2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritedModuleMembersForClodule.js b/tests/baselines/reference/inheritedModuleMembersForClodule.js index cd49009fed9..666f4d703be 100644 --- a/tests/baselines/reference/inheritedModuleMembersForClodule.js +++ b/tests/baselines/reference/inheritedModuleMembersForClodule.js @@ -23,7 +23,7 @@ class E extends D { //// [inheritedModuleMembersForClodule.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/instanceOfAssignability.js b/tests/baselines/reference/instanceOfAssignability.js index b8f39c5b0e2..1492a9f919b 100644 --- a/tests/baselines/reference/instanceOfAssignability.js +++ b/tests/baselines/reference/instanceOfAssignability.js @@ -91,7 +91,7 @@ function fn8(x: Alpha|Beta|Gamma) { //// [instanceOfAssignability.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js b/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js index 8dc5227685f..a421814ea2d 100644 --- a/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js +++ b/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js @@ -44,7 +44,7 @@ module Generic { //// [instancePropertiesInheritedIntoClassType.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/instanceSubtypeCheck2.js b/tests/baselines/reference/instanceSubtypeCheck2.js index 914f3796001..c6c657aa82e 100644 --- a/tests/baselines/reference/instanceSubtypeCheck2.js +++ b/tests/baselines/reference/instanceSubtypeCheck2.js @@ -9,7 +9,7 @@ class C2 extends C1 { //// [instanceSubtypeCheck2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/instanceofWithStructurallyIdenticalTypes.js b/tests/baselines/reference/instanceofWithStructurallyIdenticalTypes.js index 54a574238e5..46c842c86a7 100644 --- a/tests/baselines/reference/instanceofWithStructurallyIdenticalTypes.js +++ b/tests/baselines/reference/instanceofWithStructurallyIdenticalTypes.js @@ -73,7 +73,7 @@ function goo(x: A) { //// [instanceofWithStructurallyIdenticalTypes.js] // Repro from #7271 var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/instantiatedReturnTypeContravariance.js b/tests/baselines/reference/instantiatedReturnTypeContravariance.js index bc496a63632..ac3470cb288 100644 --- a/tests/baselines/reference/instantiatedReturnTypeContravariance.js +++ b/tests/baselines/reference/instantiatedReturnTypeContravariance.js @@ -32,7 +32,7 @@ return null; //// [instantiatedReturnTypeContravariance.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/interfaceClassMerging.js b/tests/baselines/reference/interfaceClassMerging.js index 6542376a19b..931d94f6eda 100644 --- a/tests/baselines/reference/interfaceClassMerging.js +++ b/tests/baselines/reference/interfaceClassMerging.js @@ -42,7 +42,7 @@ obj = bar; //// [interfaceClassMerging.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/interfaceClassMerging2.js b/tests/baselines/reference/interfaceClassMerging2.js index 70a62da4131..c0c9b17b3e8 100644 --- a/tests/baselines/reference/interfaceClassMerging2.js +++ b/tests/baselines/reference/interfaceClassMerging2.js @@ -38,7 +38,7 @@ foo = bar; //// [interfaceClassMerging2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/interfaceExtendsClass1.js b/tests/baselines/reference/interfaceExtendsClass1.js index 8324a001f91..85b4a42302d 100644 --- a/tests/baselines/reference/interfaceExtendsClass1.js +++ b/tests/baselines/reference/interfaceExtendsClass1.js @@ -20,7 +20,7 @@ class Location { //// [interfaceExtendsClass1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js b/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js index 1179ff101df..05ae7d83678 100644 --- a/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js +++ b/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js @@ -29,7 +29,7 @@ d = c; // error //// [interfaceExtendsClassWithPrivate1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js b/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js index 49b5efbd012..a1ff0fff763 100644 --- a/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js +++ b/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js @@ -25,7 +25,7 @@ class D2 extends C implements I { // error //// [interfaceExtendsClassWithPrivate2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/interfaceImplementation8.js b/tests/baselines/reference/interfaceImplementation8.js index afb5a795264..2193189eaf1 100644 --- a/tests/baselines/reference/interfaceImplementation8.js +++ b/tests/baselines/reference/interfaceImplementation8.js @@ -42,7 +42,7 @@ class C8 extends C7 implements i2{ //// [interfaceImplementation8.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.js b/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.js index 6e9b09c906f..dc4284495b1 100644 --- a/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.js +++ b/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.js @@ -81,7 +81,7 @@ module YYY4 { //// [invalidModuleWithStatementsOfEveryKind.js] // All of these should be an error var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/invalidMultipleVariableDeclarations.js b/tests/baselines/reference/invalidMultipleVariableDeclarations.js index 340429cc398..2117e176f08 100644 --- a/tests/baselines/reference/invalidMultipleVariableDeclarations.js +++ b/tests/baselines/reference/invalidMultipleVariableDeclarations.js @@ -55,7 +55,7 @@ var m = M.A; //// [invalidMultipleVariableDeclarations.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/invalidReturnStatements.js b/tests/baselines/reference/invalidReturnStatements.js index a6b07b7d7bd..8f1adc05fa6 100644 --- a/tests/baselines/reference/invalidReturnStatements.js +++ b/tests/baselines/reference/invalidReturnStatements.js @@ -22,7 +22,7 @@ function fn11(): D { return new C(); } //// [invalidReturnStatements.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/isolatedModulesImportExportElision.js b/tests/baselines/reference/isolatedModulesImportExportElision.js index 6f1d38dcbb5..e98932901e3 100644 --- a/tests/baselines/reference/isolatedModulesImportExportElision.js +++ b/tests/baselines/reference/isolatedModulesImportExportElision.js @@ -16,7 +16,7 @@ export var z = x; //// [file1.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/jsxViaImport.js b/tests/baselines/reference/jsxViaImport.js index 604787af744..99b9229f2a5 100644 --- a/tests/baselines/reference/jsxViaImport.js +++ b/tests/baselines/reference/jsxViaImport.js @@ -26,7 +26,7 @@ class TestComponent extends React.Component { //// [consumer.jsx] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/keyofAndIndexedAccess.js b/tests/baselines/reference/keyofAndIndexedAccess.js index 0e630be9a43..50bb51dbae7 100644 --- a/tests/baselines/reference/keyofAndIndexedAccess.js +++ b/tests/baselines/reference/keyofAndIndexedAccess.js @@ -295,7 +295,7 @@ var hashOfEmpty2 = on({ test: (x: boolean) => {} }); // { test: boolean } //// [keyofAndIndexedAccess.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/lambdaArgCrash.js b/tests/baselines/reference/lambdaArgCrash.js index 47db7f3ce64..911232722bd 100644 --- a/tests/baselines/reference/lambdaArgCrash.js +++ b/tests/baselines/reference/lambdaArgCrash.js @@ -36,7 +36,7 @@ class ItemSetEvent extends Event { //// [lambdaArgCrash.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/lift.js b/tests/baselines/reference/lift.js index 364d52d9385..cd6f4fffd00 100644 --- a/tests/baselines/reference/lift.js +++ b/tests/baselines/reference/lift.js @@ -19,7 +19,7 @@ class C extends B { //// [lift.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/localTypes1.js b/tests/baselines/reference/localTypes1.js index 100452b7a96..a887a3e07b0 100644 --- a/tests/baselines/reference/localTypes1.js +++ b/tests/baselines/reference/localTypes1.js @@ -143,7 +143,7 @@ function f6() { //// [localTypes1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/m7Bugs.js b/tests/baselines/reference/m7Bugs.js index e5a4d11f00c..078c77c5e3c 100644 --- a/tests/baselines/reference/m7Bugs.js +++ b/tests/baselines/reference/m7Bugs.js @@ -28,7 +28,7 @@ var y3: C1 = {}; //// [m7Bugs.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/mergedDeclarations5.js b/tests/baselines/reference/mergedDeclarations5.js index b24e86eca58..f731d4de428 100644 --- a/tests/baselines/reference/mergedDeclarations5.js +++ b/tests/baselines/reference/mergedDeclarations5.js @@ -20,7 +20,7 @@ var A = (function () { }()); //// [b.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/mergedDeclarations6.js b/tests/baselines/reference/mergedDeclarations6.js index d610e4ab46f..42ef5702061 100644 --- a/tests/baselines/reference/mergedDeclarations6.js +++ b/tests/baselines/reference/mergedDeclarations6.js @@ -38,7 +38,7 @@ define(["require", "exports"], function (require, exports) { }); //// [b.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/mergedInheritedClassInterface.js b/tests/baselines/reference/mergedInheritedClassInterface.js index 0f598f2cf78..38d4f94adde 100644 --- a/tests/baselines/reference/mergedInheritedClassInterface.js +++ b/tests/baselines/reference/mergedInheritedClassInterface.js @@ -48,7 +48,7 @@ grandchild.method2(); //// [mergedInheritedClassInterface.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.js b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.js index 6dccf1dfdd9..fd3d2da41e3 100644 --- a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.js +++ b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.js @@ -33,7 +33,7 @@ var r2 = a.w; // error //// [mergedInterfacesWithInheritedPrivates2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.js b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.js index a3ca796575c..1c8ba88d786 100644 --- a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.js +++ b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.js @@ -40,7 +40,7 @@ module M { //// [mergedInterfacesWithInheritedPrivates3.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/missingPropertiesOfClassExpression.js b/tests/baselines/reference/missingPropertiesOfClassExpression.js index c7b30882b14..8df4153b72d 100644 --- a/tests/baselines/reference/missingPropertiesOfClassExpression.js +++ b/tests/baselines/reference/missingPropertiesOfClassExpression.js @@ -8,7 +8,7 @@ class George extends class { reset() { return this.y; } } { //// [missingPropertiesOfClassExpression.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/moduleAsBaseType.js b/tests/baselines/reference/moduleAsBaseType.js index fc0533a2470..a4caea585ac 100644 --- a/tests/baselines/reference/moduleAsBaseType.js +++ b/tests/baselines/reference/moduleAsBaseType.js @@ -6,7 +6,7 @@ class C2 implements M { } //// [moduleAsBaseType.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/moduleImportedForTypeArgumentPosition.js b/tests/baselines/reference/moduleImportedForTypeArgumentPosition.js index 51d9eb89b1d..bf074378d4b 100644 --- a/tests/baselines/reference/moduleImportedForTypeArgumentPosition.js +++ b/tests/baselines/reference/moduleImportedForTypeArgumentPosition.js @@ -17,7 +17,7 @@ define(["require", "exports"], function (require, exports) { }); //// [moduleImportedForTypeArgumentPosition_1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/moduleWithStatementsOfEveryKind.js b/tests/baselines/reference/moduleWithStatementsOfEveryKind.js index 4243c9849cf..6efcddf7201 100644 --- a/tests/baselines/reference/moduleWithStatementsOfEveryKind.js +++ b/tests/baselines/reference/moduleWithStatementsOfEveryKind.js @@ -60,7 +60,7 @@ module Y { //// [moduleWithStatementsOfEveryKind.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/multipleInheritance.js b/tests/baselines/reference/multipleInheritance.js index 9c0e865cdb7..d05f10568ad 100644 --- a/tests/baselines/reference/multipleInheritance.js +++ b/tests/baselines/reference/multipleInheritance.js @@ -40,7 +40,7 @@ class Baad extends Good { //// [multipleInheritance.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/mutuallyRecursiveGenericBaseTypes2.js b/tests/baselines/reference/mutuallyRecursiveGenericBaseTypes2.js index 8b59564d465..570a93e8534 100644 --- a/tests/baselines/reference/mutuallyRecursiveGenericBaseTypes2.js +++ b/tests/baselines/reference/mutuallyRecursiveGenericBaseTypes2.js @@ -12,7 +12,7 @@ var test = new foo(); //// [mutuallyRecursiveGenericBaseTypes2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/noImplicitAnyMissingGetAccessor.js b/tests/baselines/reference/noImplicitAnyMissingGetAccessor.js index cc4c9422373..78ea4e74a97 100644 --- a/tests/baselines/reference/noImplicitAnyMissingGetAccessor.js +++ b/tests/baselines/reference/noImplicitAnyMissingGetAccessor.js @@ -14,7 +14,7 @@ class Child extends Parent { //// [noImplicitAnyMissingGetAccessor.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/noImplicitAnyMissingSetAccessor.js b/tests/baselines/reference/noImplicitAnyMissingSetAccessor.js index 1323955c05e..64c480cc8e1 100644 --- a/tests/baselines/reference/noImplicitAnyMissingSetAccessor.js +++ b/tests/baselines/reference/noImplicitAnyMissingSetAccessor.js @@ -13,7 +13,7 @@ class Child extends Parent { //// [noImplicitAnyMissingSetAccessor.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/nonGenericClassExtendingGenericClassWithAny.js b/tests/baselines/reference/nonGenericClassExtendingGenericClassWithAny.js index b0a3365193d..33f7e696126 100644 --- a/tests/baselines/reference/nonGenericClassExtendingGenericClassWithAny.js +++ b/tests/baselines/reference/nonGenericClassExtendingGenericClassWithAny.js @@ -7,7 +7,7 @@ class Bar extends Foo { } // Valid //// [nonGenericClassExtendingGenericClassWithAny.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js index 92c8b380e00..c8ec0d9da78 100644 --- a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js +++ b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js @@ -48,7 +48,7 @@ var b: { [x: number]: A } = { //// [numericIndexerConstrainsPropertyDeclarations2.js] // String indexer providing a constraint of a user defined type var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/numericIndexerConstraint3.js b/tests/baselines/reference/numericIndexerConstraint3.js index 29cb75b4234..02b54a2bbad 100644 --- a/tests/baselines/reference/numericIndexerConstraint3.js +++ b/tests/baselines/reference/numericIndexerConstraint3.js @@ -14,7 +14,7 @@ class C { //// [numericIndexerConstraint3.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/numericIndexerConstraint4.js b/tests/baselines/reference/numericIndexerConstraint4.js index 135e169c4a9..0f82789285d 100644 --- a/tests/baselines/reference/numericIndexerConstraint4.js +++ b/tests/baselines/reference/numericIndexerConstraint4.js @@ -14,7 +14,7 @@ var x: { //// [numericIndexerConstraint4.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/numericIndexerTyping2.js b/tests/baselines/reference/numericIndexerTyping2.js index 5b9e797bdec..1086d974590 100644 --- a/tests/baselines/reference/numericIndexerTyping2.js +++ b/tests/baselines/reference/numericIndexerTyping2.js @@ -14,7 +14,7 @@ var r2: string = i2[1]; // error: numeric indexer returns the type of the string //// [numericIndexerTyping2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectCreationOfElementAccessExpression.js b/tests/baselines/reference/objectCreationOfElementAccessExpression.js index a1739ce0d8e..2b7ac176c7e 100644 --- a/tests/baselines/reference/objectCreationOfElementAccessExpression.js +++ b/tests/baselines/reference/objectCreationOfElementAccessExpression.js @@ -57,7 +57,7 @@ var foods2: MonsterFood[] = new PetFood[new IceCream('Mint chocolate chip') , Co //// [objectCreationOfElementAccessExpression.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js b/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js index 17045d65af0..301761c2849 100644 --- a/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js +++ b/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js @@ -56,7 +56,7 @@ var r4: void = b.valueOf(); //// [objectTypeHidingMembersOfExtendedObject.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js index e82cef9bdd6..1b889269724 100644 --- a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js +++ b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js @@ -125,7 +125,7 @@ function foo16(x: any) { } //// [objectTypesIdentityWithNumericIndexers1.js] // object types are identical structurally var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js index abcea113670..767f10adc88 100644 --- a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js +++ b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js @@ -128,7 +128,7 @@ function foo16(x: any) { } //// [objectTypesIdentityWithNumericIndexers2.js] // object types are identical structurally var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js index f5aeb177472..8ae7b92b4dd 100644 --- a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js +++ b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js @@ -125,7 +125,7 @@ function foo16(x: any) { } //// [objectTypesIdentityWithNumericIndexers3.js] // object types are identical structurally var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypesIdentityWithPrivates.js b/tests/baselines/reference/objectTypesIdentityWithPrivates.js index 3946027063f..9f9319a3cf8 100644 --- a/tests/baselines/reference/objectTypesIdentityWithPrivates.js +++ b/tests/baselines/reference/objectTypesIdentityWithPrivates.js @@ -123,7 +123,7 @@ function foo16(x: any) { } //// [objectTypesIdentityWithPrivates.js] // object types are identical structurally var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypesIdentityWithPrivates2.js b/tests/baselines/reference/objectTypesIdentityWithPrivates2.js index 9cae6960a2e..e1426e4a3b5 100644 --- a/tests/baselines/reference/objectTypesIdentityWithPrivates2.js +++ b/tests/baselines/reference/objectTypesIdentityWithPrivates2.js @@ -41,7 +41,7 @@ function foo6(x: any): any { } //// [objectTypesIdentityWithPrivates2.js] // object types are identical structurally var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypesIdentityWithPrivates3.js b/tests/baselines/reference/objectTypesIdentityWithPrivates3.js index 68754a583aa..1105c06c204 100644 --- a/tests/baselines/reference/objectTypesIdentityWithPrivates3.js +++ b/tests/baselines/reference/objectTypesIdentityWithPrivates3.js @@ -27,7 +27,7 @@ var c3: C3; //// [objectTypesIdentityWithPrivates3.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js b/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js index b0211bbbba7..9f076b52c60 100644 --- a/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js +++ b/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js @@ -125,7 +125,7 @@ function foo16(x: any) { } //// [objectTypesIdentityWithStringIndexers.js] // object types are identical structurally var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js b/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js index 00d7d1e81d8..75ad2243fe3 100644 --- a/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js +++ b/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js @@ -128,7 +128,7 @@ function foo16(x: any) { } //// [objectTypesIdentityWithStringIndexers2.js] // object types are identical structurally var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/optionalConstructorArgInSuper.js b/tests/baselines/reference/optionalConstructorArgInSuper.js index e460ab3fb15..4ebc1226146 100644 --- a/tests/baselines/reference/optionalConstructorArgInSuper.js +++ b/tests/baselines/reference/optionalConstructorArgInSuper.js @@ -12,7 +12,7 @@ d2.foo(); //// [optionalConstructorArgInSuper.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/optionalMethods.js b/tests/baselines/reference/optionalMethods.js index 28ed0bcd76e..5cbd798ec89 100644 --- a/tests/baselines/reference/optionalMethods.js +++ b/tests/baselines/reference/optionalMethods.js @@ -59,7 +59,7 @@ class Derived extends Base { //// [optionalMethods.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/optionalParamArgsTest.js b/tests/baselines/reference/optionalParamArgsTest.js index 1b603898aa6..23ab5150579 100644 --- a/tests/baselines/reference/optionalParamArgsTest.js +++ b/tests/baselines/reference/optionalParamArgsTest.js @@ -126,7 +126,7 @@ fnOpt2(1, [2, 3], [1], true); //// [optionalParamArgsTest.js] // Optional parameter and default argument tests var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/optionalParamInOverride.js b/tests/baselines/reference/optionalParamInOverride.js index 1312a89502a..9d318cd9ae5 100644 --- a/tests/baselines/reference/optionalParamInOverride.js +++ b/tests/baselines/reference/optionalParamInOverride.js @@ -9,7 +9,7 @@ class Y extends Z { //// [optionalParamInOverride.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/optionalParameterProperty.js b/tests/baselines/reference/optionalParameterProperty.js index f9b9ecaf990..3203c4e2e09 100644 --- a/tests/baselines/reference/optionalParameterProperty.js +++ b/tests/baselines/reference/optionalParameterProperty.js @@ -13,7 +13,7 @@ class D extends C { //// [optionalParameterProperty.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/outModuleConcatAmd.js b/tests/baselines/reference/outModuleConcatAmd.js index 5054c2a3c33..cab6be31d07 100644 --- a/tests/baselines/reference/outModuleConcatAmd.js +++ b/tests/baselines/reference/outModuleConcatAmd.js @@ -10,7 +10,7 @@ export class B extends A { } //// [all.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt b/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt index 34ab74816ad..f07a95163f6 100644 --- a/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt +++ b/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt @@ -9,7 +9,7 @@ emittedFile:all.js sourceFile:tests/cases/compiler/ref/a.ts ------------------------------------------------------------------- >>>var __extends = (this && this.__extends) || function (d, b) { ->>> for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; +>>> Object.setPrototypeOf(d, b); >>> function __() { this.constructor = d; } >>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); >>>}; diff --git a/tests/baselines/reference/outModuleConcatSystem.js b/tests/baselines/reference/outModuleConcatSystem.js index a615090f33a..6f6e1c3b366 100644 --- a/tests/baselines/reference/outModuleConcatSystem.js +++ b/tests/baselines/reference/outModuleConcatSystem.js @@ -10,7 +10,7 @@ export class B extends A { } //// [all.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt b/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt index 732214237fa..47558a3812a 100644 --- a/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt +++ b/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt @@ -9,7 +9,7 @@ emittedFile:all.js sourceFile:tests/cases/compiler/ref/a.ts ------------------------------------------------------------------- >>>var __extends = (this && this.__extends) || function (d, b) { ->>> for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; +>>> Object.setPrototypeOf(d, b); >>> function __() { this.constructor = d; } >>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); >>>}; diff --git a/tests/baselines/reference/outModuleTripleSlashRefs.js b/tests/baselines/reference/outModuleTripleSlashRefs.js index b9ff7c15b61..5f6def67a48 100644 --- a/tests/baselines/reference/outModuleTripleSlashRefs.js +++ b/tests/baselines/reference/outModuleTripleSlashRefs.js @@ -32,7 +32,7 @@ export class B extends A { } //// [all.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt b/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt index ce41bae6de3..9f15bc0eaee 100644 --- a/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt +++ b/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt @@ -9,7 +9,7 @@ emittedFile:all.js sourceFile:tests/cases/compiler/ref/b.ts ------------------------------------------------------------------- >>>var __extends = (this && this.__extends) || function (d, b) { ->>> for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; +>>> Object.setPrototypeOf(d, b); >>> function __() { this.constructor = d; } >>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); >>>}; diff --git a/tests/baselines/reference/overload1.js b/tests/baselines/reference/overload1.js index 41aafdfb29c..6cbfb843812 100644 --- a/tests/baselines/reference/overload1.js +++ b/tests/baselines/reference/overload1.js @@ -41,7 +41,7 @@ var v=x.g; //// [overload1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks1.js b/tests/baselines/reference/overloadOnConstConstraintChecks1.js index f9d1c81b06b..8bc8ccd1612 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks1.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks1.js @@ -24,7 +24,7 @@ class D implements MyDoc { //// [overloadOnConstConstraintChecks1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks2.js b/tests/baselines/reference/overloadOnConstConstraintChecks2.js index a680a62ddfe..16cfb630a5d 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks2.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks2.js @@ -13,7 +13,7 @@ function foo(name: any): A { //// [overloadOnConstConstraintChecks2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks3.js b/tests/baselines/reference/overloadOnConstConstraintChecks3.js index 025e449fd6f..1540bc4dc49 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks3.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks3.js @@ -14,7 +14,7 @@ function foo(name: any): A { //// [overloadOnConstConstraintChecks3.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks4.js b/tests/baselines/reference/overloadOnConstConstraintChecks4.js index 0f436a5f0b2..a634547a36b 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks4.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks4.js @@ -15,7 +15,7 @@ function foo(name: any): Z { //// [overloadOnConstConstraintChecks4.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js b/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js index e3f58c0f7d0..0edadc3c692 100644 --- a/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js +++ b/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js @@ -13,7 +13,7 @@ foo("HI"); //// [overloadOnConstantsInvalidOverload1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadResolution.js b/tests/baselines/reference/overloadResolution.js index e5cc35c39c4..56ebebc454e 100644 --- a/tests/baselines/reference/overloadResolution.js +++ b/tests/baselines/reference/overloadResolution.js @@ -96,7 +96,7 @@ var s = fn5((n) => n.substr(0)); //// [overloadResolution.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadResolutionClassConstructors.js b/tests/baselines/reference/overloadResolutionClassConstructors.js index 7c8b2e2ccb6..5cf41a3b44a 100644 --- a/tests/baselines/reference/overloadResolutionClassConstructors.js +++ b/tests/baselines/reference/overloadResolutionClassConstructors.js @@ -103,7 +103,7 @@ new fn5((n) => n.blah); // Error //// [overloadResolutionClassConstructors.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadResolutionConstructors.js b/tests/baselines/reference/overloadResolutionConstructors.js index 44bbfbcec2b..85ec9fb06fb 100644 --- a/tests/baselines/reference/overloadResolutionConstructors.js +++ b/tests/baselines/reference/overloadResolutionConstructors.js @@ -104,7 +104,7 @@ var s = new fn5((n) => n.substr(0)); //// [overloadResolutionConstructors.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadingOnConstants1.js b/tests/baselines/reference/overloadingOnConstants1.js index 96f4f7baf24..c8f5a8fd9ae 100644 --- a/tests/baselines/reference/overloadingOnConstants1.js +++ b/tests/baselines/reference/overloadingOnConstants1.js @@ -27,7 +27,7 @@ var htmlSpanElement2: Derived1 = d2.createElement("span"); //// [overloadingOnConstants1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadingOnConstants2.js b/tests/baselines/reference/overloadingOnConstants2.js index 0c34d0f4b76..9792485e1cf 100644 --- a/tests/baselines/reference/overloadingOnConstants2.js +++ b/tests/baselines/reference/overloadingOnConstants2.js @@ -29,7 +29,7 @@ var f: C = bar("um", []); // C //// [overloadingOnConstants2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overridingPrivateStaticMembers.js b/tests/baselines/reference/overridingPrivateStaticMembers.js index ca5616450ba..50f957c7fdd 100644 --- a/tests/baselines/reference/overridingPrivateStaticMembers.js +++ b/tests/baselines/reference/overridingPrivateStaticMembers.js @@ -9,7 +9,7 @@ class Derived2 extends Base2 { //// [overridingPrivateStaticMembers.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parseErrorInHeritageClause1.js b/tests/baselines/reference/parseErrorInHeritageClause1.js index a9ca0a6db73..3409c13e2f1 100644 --- a/tests/baselines/reference/parseErrorInHeritageClause1.js +++ b/tests/baselines/reference/parseErrorInHeritageClause1.js @@ -4,7 +4,7 @@ class C extends A # { //// [parseErrorInHeritageClause1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parser509630.js b/tests/baselines/reference/parser509630.js index d3648dc5b64..cce7df3db54 100644 --- a/tests/baselines/reference/parser509630.js +++ b/tests/baselines/reference/parser509630.js @@ -8,7 +8,7 @@ class Any extends Type { //// [parser509630.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserAstSpans1.js b/tests/baselines/reference/parserAstSpans1.js index 6b86353b959..12de33e4738 100644 --- a/tests/baselines/reference/parserAstSpans1.js +++ b/tests/baselines/reference/parserAstSpans1.js @@ -221,7 +221,7 @@ class c6 extends c5 { //// [parserAstSpans1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserClassDeclaration1.js b/tests/baselines/reference/parserClassDeclaration1.js index a61b492b7a9..555d625d522 100644 --- a/tests/baselines/reference/parserClassDeclaration1.js +++ b/tests/baselines/reference/parserClassDeclaration1.js @@ -4,7 +4,7 @@ class C extends A extends B { //// [parserClassDeclaration1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserClassDeclaration3.js b/tests/baselines/reference/parserClassDeclaration3.js index f58f0ab00cb..b63483411b2 100644 --- a/tests/baselines/reference/parserClassDeclaration3.js +++ b/tests/baselines/reference/parserClassDeclaration3.js @@ -4,7 +4,7 @@ class C implements A extends B { //// [parserClassDeclaration3.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserClassDeclaration4.js b/tests/baselines/reference/parserClassDeclaration4.js index 912aa8c6581..2f3cdf0e166 100644 --- a/tests/baselines/reference/parserClassDeclaration4.js +++ b/tests/baselines/reference/parserClassDeclaration4.js @@ -4,7 +4,7 @@ class C extends A implements B extends C { //// [parserClassDeclaration4.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserClassDeclaration5.js b/tests/baselines/reference/parserClassDeclaration5.js index 054aaf0eb7a..da843d06292 100644 --- a/tests/baselines/reference/parserClassDeclaration5.js +++ b/tests/baselines/reference/parserClassDeclaration5.js @@ -4,7 +4,7 @@ class C extends A implements B implements C { //// [parserClassDeclaration5.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserClassDeclaration6.js b/tests/baselines/reference/parserClassDeclaration6.js index 1423edfe037..842b811de9b 100644 --- a/tests/baselines/reference/parserClassDeclaration6.js +++ b/tests/baselines/reference/parserClassDeclaration6.js @@ -4,7 +4,7 @@ class C extends A, B { //// [parserClassDeclaration6.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause2.js b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause2.js index aa0679bb8f5..22225819435 100644 --- a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause2.js +++ b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause2.js @@ -4,7 +4,7 @@ class C extends A, { //// [parserErrorRecovery_ExtendsOrImplementsClause2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause4.js b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause4.js index 1308c7c194b..92af44f7cc4 100644 --- a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause4.js +++ b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause4.js @@ -4,7 +4,7 @@ class C extends A implements { //// [parserErrorRecovery_ExtendsOrImplementsClause4.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause5.js b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause5.js index b1471628fbd..07adb1e2001 100644 --- a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause5.js +++ b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause5.js @@ -4,7 +4,7 @@ class C extends A, implements B, { //// [parserErrorRecovery_ExtendsOrImplementsClause5.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserGenericsInTypeContexts1.js b/tests/baselines/reference/parserGenericsInTypeContexts1.js index 641d296dc43..ef93433301b 100644 --- a/tests/baselines/reference/parserGenericsInTypeContexts1.js +++ b/tests/baselines/reference/parserGenericsInTypeContexts1.js @@ -19,7 +19,7 @@ function f2(): F { //// [parserGenericsInTypeContexts1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserGenericsInTypeContexts2.js b/tests/baselines/reference/parserGenericsInTypeContexts2.js index b0f14a090ae..a3bfafc19b4 100644 --- a/tests/baselines/reference/parserGenericsInTypeContexts2.js +++ b/tests/baselines/reference/parserGenericsInTypeContexts2.js @@ -19,7 +19,7 @@ function f2(): F, Y>> { //// [parserGenericsInTypeContexts2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserRealSource10.js b/tests/baselines/reference/parserRealSource10.js index 11cfbdfa1f2..b89e47d3e75 100644 --- a/tests/baselines/reference/parserRealSource10.js +++ b/tests/baselines/reference/parserRealSource10.js @@ -459,7 +459,7 @@ module TypeScript { // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. // See LICENSE.txt in the project root for complete license information. var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserRealSource11.js b/tests/baselines/reference/parserRealSource11.js index eb05d13f4ed..daaa9f79cee 100644 --- a/tests/baselines/reference/parserRealSource11.js +++ b/tests/baselines/reference/parserRealSource11.js @@ -2368,7 +2368,7 @@ module TypeScript { // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. // See LICENSE.txt in the project root for complete license information. var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserharness.js b/tests/baselines/reference/parserharness.js index 14ce4338176..fd432660b52 100644 --- a/tests/baselines/reference/parserharness.js +++ b/tests/baselines/reference/parserharness.js @@ -2097,7 +2097,7 @@ module Harness { // limitations under the License. // var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/partiallyAnnotatedFunctionInferenceError.js b/tests/baselines/reference/partiallyAnnotatedFunctionInferenceError.js index 9702595fffb..c81647e79b5 100644 --- a/tests/baselines/reference/partiallyAnnotatedFunctionInferenceError.js +++ b/tests/baselines/reference/partiallyAnnotatedFunctionInferenceError.js @@ -17,7 +17,7 @@ testError((t1, t2, t3: D) => {}) //// [partiallyAnnotatedFunctionInferenceError.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/partiallyAnnotatedFunctionInferenceWithTypeParameter.js b/tests/baselines/reference/partiallyAnnotatedFunctionInferenceWithTypeParameter.js index d20b35625e9..e54441df4d6 100644 --- a/tests/baselines/reference/partiallyAnnotatedFunctionInferenceWithTypeParameter.js +++ b/tests/baselines/reference/partiallyAnnotatedFunctionInferenceWithTypeParameter.js @@ -36,7 +36,7 @@ testRest((t2, ...t3: D[]) => {}) //// [partiallyAnnotatedFunctionInferenceWithTypeParameter.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/primitiveMembers.js b/tests/baselines/reference/primitiveMembers.js index 7b94b555eb1..64b699496bf 100644 --- a/tests/baselines/reference/primitiveMembers.js +++ b/tests/baselines/reference/primitiveMembers.js @@ -33,7 +33,7 @@ class foo extends baz { public bar(){ return undefined}; } //// [primitiveMembers.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/privacyClass.js b/tests/baselines/reference/privacyClass.js index 7e56edf2cf1..64e1c63eca1 100644 --- a/tests/baselines/reference/privacyClass.js +++ b/tests/baselines/reference/privacyClass.js @@ -130,7 +130,7 @@ export class glo_C12_public extends glo_c_private implements glo_i_private, glo //// [privacyClass.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js b/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js index e0828809416..377b4082bea 100644 --- a/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js +++ b/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js @@ -100,7 +100,7 @@ class publicClassExtendingPublicClassInGlobal extends publicClassInGlobal { //// [privacyClassExtendsClauseDeclFile_externalModule.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -286,7 +286,7 @@ var publicClassExtendingFromPrivateModuleClass = (function (_super) { exports.publicClassExtendingFromPrivateModuleClass = publicClassExtendingFromPrivateModuleClass; //// [privacyClassExtendsClauseDeclFile_GlobalFile.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/privacyGloClass.js b/tests/baselines/reference/privacyGloClass.js index fa769a606ae..b93ed51025d 100644 --- a/tests/baselines/reference/privacyGloClass.js +++ b/tests/baselines/reference/privacyGloClass.js @@ -62,7 +62,7 @@ class glo_C11_public extends glo_c_public implements glo_i_public { //// [privacyGloClass.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/privateAccessInSubclass1.js b/tests/baselines/reference/privateAccessInSubclass1.js index 21ff4793fb3..2118eb072d7 100644 --- a/tests/baselines/reference/privateAccessInSubclass1.js +++ b/tests/baselines/reference/privateAccessInSubclass1.js @@ -11,7 +11,7 @@ class D extends Base { //// [privateAccessInSubclass1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/privateInstanceMemberAccessibility.js b/tests/baselines/reference/privateInstanceMemberAccessibility.js index 6fa05178f91..98b2671d23e 100644 --- a/tests/baselines/reference/privateInstanceMemberAccessibility.js +++ b/tests/baselines/reference/privateInstanceMemberAccessibility.js @@ -15,7 +15,7 @@ class Derived extends Base { //// [privateInstanceMemberAccessibility.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/privateProtectedMembersAreNotAccessibleDestructuring.js b/tests/baselines/reference/privateProtectedMembersAreNotAccessibleDestructuring.js index b732661edfc..bcef17bf63f 100644 --- a/tests/baselines/reference/privateProtectedMembersAreNotAccessibleDestructuring.js +++ b/tests/baselines/reference/privateProtectedMembersAreNotAccessibleDestructuring.js @@ -23,7 +23,7 @@ let { priv: a, prot: b, privateMethod: f } = k; // error //// [privateProtectedMembersAreNotAccessibleDestructuring.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/privateStaticMemberAccessibility.js b/tests/baselines/reference/privateStaticMemberAccessibility.js index c1897e8503a..438f485e031 100644 --- a/tests/baselines/reference/privateStaticMemberAccessibility.js +++ b/tests/baselines/reference/privateStaticMemberAccessibility.js @@ -10,7 +10,7 @@ class Derived extends Base { //// [privateStaticMemberAccessibility.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/privateStaticNotAccessibleInClodule2.js b/tests/baselines/reference/privateStaticNotAccessibleInClodule2.js index a93823654d4..618d6d88e8a 100644 --- a/tests/baselines/reference/privateStaticNotAccessibleInClodule2.js +++ b/tests/baselines/reference/privateStaticNotAccessibleInClodule2.js @@ -17,7 +17,7 @@ module D { //// [privateStaticNotAccessibleInClodule2.js] // Any attempt to access a private property member outside the class body that contains its declaration results in a compile-time error. var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/amd/testGlo.js b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/amd/testGlo.js index 99a4842f636..ef754cba47d 100644 --- a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/amd/testGlo.js +++ b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/amd/testGlo.js @@ -1,5 +1,5 @@ var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/node/testGlo.js b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/node/testGlo.js index 99a4842f636..ef754cba47d 100644 --- a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/node/testGlo.js +++ b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/node/testGlo.js @@ -1,5 +1,5 @@ var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/project/prologueEmit/amd/out.js b/tests/baselines/reference/project/prologueEmit/amd/out.js index 7ee160b82ef..8273c054fbd 100644 --- a/tests/baselines/reference/project/prologueEmit/amd/out.js +++ b/tests/baselines/reference/project/prologueEmit/amd/out.js @@ -1,5 +1,5 @@ var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/project/prologueEmit/node/out.js b/tests/baselines/reference/project/prologueEmit/node/out.js index 7ee160b82ef..8273c054fbd 100644 --- a/tests/baselines/reference/project/prologueEmit/node/out.js +++ b/tests/baselines/reference/project/prologueEmit/node/out.js @@ -1,5 +1,5 @@ var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/project/quotesInFileAndDirectoryNames/amd/m'ain.js b/tests/baselines/reference/project/quotesInFileAndDirectoryNames/amd/m'ain.js index b793b07534c..dac535093f5 100644 --- a/tests/baselines/reference/project/quotesInFileAndDirectoryNames/amd/m'ain.js +++ b/tests/baselines/reference/project/quotesInFileAndDirectoryNames/amd/m'ain.js @@ -1,6 +1,6 @@ /// var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/project/quotesInFileAndDirectoryNames/node/m'ain.js b/tests/baselines/reference/project/quotesInFileAndDirectoryNames/node/m'ain.js index b793b07534c..dac535093f5 100644 --- a/tests/baselines/reference/project/quotesInFileAndDirectoryNames/node/m'ain.js +++ b/tests/baselines/reference/project/quotesInFileAndDirectoryNames/node/m'ain.js @@ -1,6 +1,6 @@ /// var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/propertiesAndIndexers.js b/tests/baselines/reference/propertiesAndIndexers.js index dff86f3954e..ccf7c50ebc9 100644 --- a/tests/baselines/reference/propertiesAndIndexers.js +++ b/tests/baselines/reference/propertiesAndIndexers.js @@ -53,7 +53,7 @@ var c: { //// [propertiesAndIndexers.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/propertyAccess.js b/tests/baselines/reference/propertyAccess.js index 0a4c9082a21..3240f46a935 100644 --- a/tests/baselines/reference/propertyAccess.js +++ b/tests/baselines/reference/propertyAccess.js @@ -152,7 +152,7 @@ var x3: A; //// [propertyAccess.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js index d36d7e27efe..e813239484b 100644 --- a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js @@ -84,7 +84,7 @@ var r4 = b.foo(aB, aB); // no inferences for T so constraint isn't satisfied, er //// [propertyAccessOnTypeParameterWithConstraints2.js] // generic types should behave as if they have properties of their constraint type var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js index 4aedfe12b04..b10642c73c5 100644 --- a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js @@ -59,7 +59,7 @@ var r4 = b.foo(new B()); // valid call to an invalid function //// [propertyAccessOnTypeParameterWithConstraints3.js] // generic types should behave as if they have properties of their constraint type var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js index 3cb14438141..97f8e18f917 100644 --- a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js @@ -46,7 +46,7 @@ var r4 = b.foo(new B()); // error after constraints above made illegal, doesn't //// [propertyAccessOnTypeParameterWithConstraints5.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass.js index 429dfdf6b14..226ad97f81f 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass.js @@ -40,7 +40,7 @@ class E extends C { //// [protectedClassPropertyAccessibleWithinNestedSubclass.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass1.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass1.js index 0571b85ea9e..c98abd2a89a 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass1.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass1.js @@ -116,7 +116,7 @@ d4.x; // Error, neither within their declaring class nor class //// [protectedClassPropertyAccessibleWithinNestedSubclass1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js index a10b39b402e..2557a8abcf9 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js @@ -22,7 +22,7 @@ class C extends B { //// [protectedClassPropertyAccessibleWithinSubclass.js] // no errors var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass2.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass2.js index a404b8049bc..8ee957ec64f 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass2.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass2.js @@ -96,7 +96,7 @@ d4.x; // Error, neither within their declaring class nor class //// [protectedClassPropertyAccessibleWithinSubclass2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass3.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass3.js index 7d449bdcbd4..31c2f3d149c 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass3.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass3.js @@ -15,7 +15,7 @@ class Derived extends Base { //// [protectedClassPropertyAccessibleWithinSubclass3.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedInstanceMemberAccessibility.js b/tests/baselines/reference/protectedInstanceMemberAccessibility.js index 3259d401270..84400a37aa7 100644 --- a/tests/baselines/reference/protectedInstanceMemberAccessibility.js +++ b/tests/baselines/reference/protectedInstanceMemberAccessibility.js @@ -46,7 +46,7 @@ class C extends A { //// [protectedInstanceMemberAccessibility.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedMembers.js b/tests/baselines/reference/protectedMembers.js index 46b4691dff7..4757f6134a3 100644 --- a/tests/baselines/reference/protectedMembers.js +++ b/tests/baselines/reference/protectedMembers.js @@ -117,7 +117,7 @@ class B3 extends A3 { //// [protectedMembers.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass.js b/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass.js index ad1b1682aa7..ffe163716ed 100644 --- a/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass.js +++ b/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass.js @@ -45,7 +45,7 @@ Derived3.x; // Error, neither within their declaring class nor classes deriv //// [protectedStaticClassPropertyAccessibleWithinSubclass.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass2.js b/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass2.js index a2346b8be40..d21e6511c34 100644 --- a/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass2.js +++ b/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass2.js @@ -23,7 +23,7 @@ class Derived2 extends Derived1 { //// [protectedStaticClassPropertyAccessibleWithinSubclass2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/qualifiedName_entity-name-resolution-does-not-affect-class-heritage.js b/tests/baselines/reference/qualifiedName_entity-name-resolution-does-not-affect-class-heritage.js index a881eb55a18..d345bb7e1b1 100644 --- a/tests/baselines/reference/qualifiedName_entity-name-resolution-does-not-affect-class-heritage.js +++ b/tests/baselines/reference/qualifiedName_entity-name-resolution-does-not-affect-class-heritage.js @@ -8,7 +8,7 @@ class Beta extends Alpha.x { //// [qualifiedName_entity-name-resolution-does-not-affect-class-heritage.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/readonlyConstructorAssignment.js b/tests/baselines/reference/readonlyConstructorAssignment.js index 872c00486c0..d8275690d4a 100644 --- a/tests/baselines/reference/readonlyConstructorAssignment.js +++ b/tests/baselines/reference/readonlyConstructorAssignment.js @@ -42,7 +42,7 @@ class E extends D { //// [readonlyConstructorAssignment.js] // Tests that readonly parameter properties behave like regular readonly properties var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/recursiveBaseCheck3.js b/tests/baselines/reference/recursiveBaseCheck3.js index 250a9e0b618..92835b848ce 100644 --- a/tests/baselines/reference/recursiveBaseCheck3.js +++ b/tests/baselines/reference/recursiveBaseCheck3.js @@ -6,7 +6,7 @@ class C extends A { } //// [recursiveBaseCheck3.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/recursiveBaseCheck4.js b/tests/baselines/reference/recursiveBaseCheck4.js index 7f0c6b5f95d..f0271b2d36a 100644 --- a/tests/baselines/reference/recursiveBaseCheck4.js +++ b/tests/baselines/reference/recursiveBaseCheck4.js @@ -4,7 +4,7 @@ class M extends M { } //// [recursiveBaseCheck4.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/recursiveBaseCheck6.js b/tests/baselines/reference/recursiveBaseCheck6.js index 53a608baeca..97e6cb483e3 100644 --- a/tests/baselines/reference/recursiveBaseCheck6.js +++ b/tests/baselines/reference/recursiveBaseCheck6.js @@ -4,7 +4,7 @@ class S18 extends S18<{ S19: A; }>{ } //// [recursiveBaseCheck6.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/recursiveBaseConstructorCreation1.js b/tests/baselines/reference/recursiveBaseConstructorCreation1.js index 344750974cb..d20d43c405d 100644 --- a/tests/baselines/reference/recursiveBaseConstructorCreation1.js +++ b/tests/baselines/reference/recursiveBaseConstructorCreation1.js @@ -8,7 +8,7 @@ var x = new C2(); // Valid //// [recursiveBaseConstructorCreation1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/recursiveClassInstantiationsWithDefaultConstructors.js b/tests/baselines/reference/recursiveClassInstantiationsWithDefaultConstructors.js index 34aa110b7ee..eeda7ef86f4 100644 --- a/tests/baselines/reference/recursiveClassInstantiationsWithDefaultConstructors.js +++ b/tests/baselines/reference/recursiveClassInstantiationsWithDefaultConstructors.js @@ -11,7 +11,7 @@ export class MemberNameArray extends MemberName { //// [recursiveClassInstantiationsWithDefaultConstructors.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/recursiveClassReferenceTest.js b/tests/baselines/reference/recursiveClassReferenceTest.js index a2cf3319474..e59f3ad4c36 100644 --- a/tests/baselines/reference/recursiveClassReferenceTest.js +++ b/tests/baselines/reference/recursiveClassReferenceTest.js @@ -106,7 +106,7 @@ module Sample.Thing.Languages.PlainText { // Scenario 1: Test reqursive function call with "this" parameter // Scenario 2: Test recursive function call with cast and "this" parameter var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt b/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt index f99a062e2c6..8bfac267dbf 100644 --- a/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt +++ b/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt @@ -27,7 +27,7 @@ sourceFile:recursiveClassReferenceTest.ts 2 >Emitted(2, 75) Source(2, 75) + SourceIndex(0) --- >>>var __extends = (this && this.__extends) || function (d, b) { ->>> for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; +>>> Object.setPrototypeOf(d, b); >>> function __() { this.constructor = d; } >>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); >>>}; diff --git a/tests/baselines/reference/recursiveComplicatedClasses.js b/tests/baselines/reference/recursiveComplicatedClasses.js index 8441ff9e15a..57000180db4 100644 --- a/tests/baselines/reference/recursiveComplicatedClasses.js +++ b/tests/baselines/reference/recursiveComplicatedClasses.js @@ -26,7 +26,7 @@ class TypeSymbol extends InferenceSymbol { //// [recursiveComplicatedClasses.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/recursivelySpecializedConstructorDeclaration.js b/tests/baselines/reference/recursivelySpecializedConstructorDeclaration.js index 76224741e60..5f6e3ab0b06 100644 --- a/tests/baselines/reference/recursivelySpecializedConstructorDeclaration.js +++ b/tests/baselines/reference/recursivelySpecializedConstructorDeclaration.js @@ -31,7 +31,7 @@ declare module MsPortal.Controls.Base.ItemList { //// [recursivelySpecializedConstructorDeclaration.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/reexportClassDefinition.js b/tests/baselines/reference/reexportClassDefinition.js index a75a90d4d86..d7b644514cc 100644 --- a/tests/baselines/reference/reexportClassDefinition.js +++ b/tests/baselines/reference/reexportClassDefinition.js @@ -34,7 +34,7 @@ module.exports = { //// [foo3.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js b/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js index 94dc537298a..77417da53f3 100644 --- a/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js +++ b/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js @@ -1021,7 +1021,7 @@ module caurinus { //// [resolvingClassDeclarationWhenInBaseTypeResolution.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/returnInConstructor1.js b/tests/baselines/reference/returnInConstructor1.js index a47fa7ed513..cd56b78f0a3 100644 --- a/tests/baselines/reference/returnInConstructor1.js +++ b/tests/baselines/reference/returnInConstructor1.js @@ -68,7 +68,7 @@ class I extends G { //// [returnInConstructor1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/returnStatements.js b/tests/baselines/reference/returnStatements.js index f786e994963..783ffb5899e 100644 --- a/tests/baselines/reference/returnStatements.js +++ b/tests/baselines/reference/returnStatements.js @@ -26,7 +26,7 @@ function fn13(): C { return null; } //// [returnStatements.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.js b/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.js index 1474f8ab29a..1ab4b160e7c 100644 --- a/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.js +++ b/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.js @@ -10,7 +10,7 @@ class D extends C { //// [scopeCheckExtendedClassInsidePublicMethod2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.js b/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.js index 0baf0187009..9d1fafea4c9 100644 --- a/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.js +++ b/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.js @@ -10,7 +10,7 @@ class D extends C { //// [scopeCheckExtendedClassInsideStaticMethod1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/scopeTests.js b/tests/baselines/reference/scopeTests.js index 48863404a8e..0ab152adf11 100644 --- a/tests/baselines/reference/scopeTests.js +++ b/tests/baselines/reference/scopeTests.js @@ -13,7 +13,7 @@ class D extends C { //// [scopeTests.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/shadowPrivateMembers.js b/tests/baselines/reference/shadowPrivateMembers.js index 4906814f7eb..305c7581959 100644 --- a/tests/baselines/reference/shadowPrivateMembers.js +++ b/tests/baselines/reference/shadowPrivateMembers.js @@ -5,7 +5,7 @@ class derived extends base { private n() {} } //// [shadowPrivateMembers.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js index 4bac0210c85..d3ac854d4dd 100644 --- a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js +++ b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js @@ -9,7 +9,7 @@ class Greeter extends AbstractGreeter { //// [sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt index 91e284fd063..68dea53e96b 100644 --- a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt @@ -9,7 +9,7 @@ emittedFile:tests/cases/compiler/sourceMapValidationClassWithDefaultConstructorA sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts ------------------------------------------------------------------- >>>var __extends = (this && this.__extends) || function (d, b) { ->>> for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; +>>> Object.setPrototypeOf(d, b); >>> function __() { this.constructor = d; } >>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); >>>}; diff --git a/tests/baselines/reference/specializedInheritedConstructors1.js b/tests/baselines/reference/specializedInheritedConstructors1.js index f65f42941bf..56fd271bb34 100644 --- a/tests/baselines/reference/specializedInheritedConstructors1.js +++ b/tests/baselines/reference/specializedInheritedConstructors1.js @@ -19,7 +19,7 @@ var myView = new MyView(m); // was error //// [specializedInheritedConstructors1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/specializedOverloadWithRestParameters.js b/tests/baselines/reference/specializedOverloadWithRestParameters.js index b76afaff08c..3f31e7f61df 100644 --- a/tests/baselines/reference/specializedOverloadWithRestParameters.js +++ b/tests/baselines/reference/specializedOverloadWithRestParameters.js @@ -14,7 +14,7 @@ function g(tagName: any): Base { //// [specializedOverloadWithRestParameters.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/staticFactory1.js b/tests/baselines/reference/staticFactory1.js index de7588c3ebe..d8c53470b81 100644 --- a/tests/baselines/reference/staticFactory1.js +++ b/tests/baselines/reference/staticFactory1.js @@ -15,7 +15,7 @@ d.foo(); //// [staticFactory1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/staticInheritance.js b/tests/baselines/reference/staticInheritance.js index d204c1aed47..c6c95c1e6bf 100644 --- a/tests/baselines/reference/staticInheritance.js +++ b/tests/baselines/reference/staticInheritance.js @@ -13,7 +13,7 @@ doThing(B); //OK //// [staticInheritance.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/staticMemberAccessOffDerivedType1.js b/tests/baselines/reference/staticMemberAccessOffDerivedType1.js index 7b8ca52b9a4..ededeec9c5c 100644 --- a/tests/baselines/reference/staticMemberAccessOffDerivedType1.js +++ b/tests/baselines/reference/staticMemberAccessOffDerivedType1.js @@ -11,7 +11,7 @@ class P extends SomeBase { //// [staticMemberAccessOffDerivedType1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/staticPropSuper.js b/tests/baselines/reference/staticPropSuper.js index 6240f8c454f..fdb63a556e0 100644 --- a/tests/baselines/reference/staticPropSuper.js +++ b/tests/baselines/reference/staticPropSuper.js @@ -37,7 +37,7 @@ class E extends A { //// [staticPropSuper.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/strictModeInConstructor.js b/tests/baselines/reference/strictModeInConstructor.js index da45bda5c6e..ac78decef58 100644 --- a/tests/baselines/reference/strictModeInConstructor.js +++ b/tests/baselines/reference/strictModeInConstructor.js @@ -62,7 +62,7 @@ class Ds extends A { //// [strictModeInConstructor.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/strictModeReservedWord.js b/tests/baselines/reference/strictModeReservedWord.js index 29715745890..e376167c667 100644 --- a/tests/baselines/reference/strictModeReservedWord.js +++ b/tests/baselines/reference/strictModeReservedWord.js @@ -29,7 +29,7 @@ function foo() { //// [strictModeReservedWord.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/strictModeReservedWordInClassDeclaration.js b/tests/baselines/reference/strictModeReservedWordInClassDeclaration.js index 1507e53d8cf..f6b864047a8 100644 --- a/tests/baselines/reference/strictModeReservedWordInClassDeclaration.js +++ b/tests/baselines/reference/strictModeReservedWordInClassDeclaration.js @@ -30,7 +30,7 @@ class H extends package.A { } //// [strictModeReservedWordInClassDeclaration.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js b/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js index b532df7b120..6836a7adff3 100644 --- a/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js +++ b/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js @@ -42,7 +42,7 @@ var b: { [x: string]: A } = { //// [stringIndexerConstrainsPropertyDeclarations2.js] // String indexer providing a constraint of a user defined type var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypesOfTypeParameter.js b/tests/baselines/reference/subtypesOfTypeParameter.js index 38f5b5f1d4b..4407e02a1e7 100644 --- a/tests/baselines/reference/subtypesOfTypeParameter.js +++ b/tests/baselines/reference/subtypesOfTypeParameter.js @@ -108,7 +108,7 @@ function f2(x: T, y: U) { //// [subtypesOfTypeParameter.js] // checking whether other types are subtypes of type parameters var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints.js b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints.js index 82bcbf14ecc..ec44364d4a4 100644 --- a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints.js +++ b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints.js @@ -170,7 +170,7 @@ class D29 extends C3 { //// [subtypesOfTypeParameterWithConstraints.js] // checking whether other types are subtypes of type parameters with constraints var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints4.js b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints4.js index e0baced37a4..f25a43a353f 100644 --- a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints4.js +++ b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints4.js @@ -81,7 +81,7 @@ class D9 extends B1 { //// [subtypesOfTypeParameterWithConstraints4.js] // checking whether other types are subtypes of type parameters with constraints var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypesOfTypeParameterWithRecursiveConstraints.js b/tests/baselines/reference/subtypesOfTypeParameterWithRecursiveConstraints.js index 0b17fc07f24..16797d0e5b5 100644 --- a/tests/baselines/reference/subtypesOfTypeParameterWithRecursiveConstraints.js +++ b/tests/baselines/reference/subtypesOfTypeParameterWithRecursiveConstraints.js @@ -160,7 +160,7 @@ module M2 { //// [subtypesOfTypeParameterWithRecursiveConstraints.js] // checking whether other types are subtypes of type parameters with constraints var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingTransitivity.js b/tests/baselines/reference/subtypingTransitivity.js index 9c4c9011758..ca52f7ed49f 100644 --- a/tests/baselines/reference/subtypingTransitivity.js +++ b/tests/baselines/reference/subtypingTransitivity.js @@ -21,7 +21,7 @@ b.x = 1; // assigned number to string //// [subtypingTransitivity.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithCallSignatures2.js b/tests/baselines/reference/subtypingWithCallSignatures2.js index 3b5fada2012..8086362951f 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures2.js +++ b/tests/baselines/reference/subtypingWithCallSignatures2.js @@ -175,7 +175,7 @@ var r18 = foo18(r18arg1); //// [subtypingWithCallSignatures2.js] // checking subtype relations for function types as it relates to contextual signature instantiation var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithCallSignatures3.js b/tests/baselines/reference/subtypingWithCallSignatures3.js index 4ac7d3a7f24..1fa01910cdb 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures3.js +++ b/tests/baselines/reference/subtypingWithCallSignatures3.js @@ -122,7 +122,7 @@ module WithGenericSignaturesInBaseType { // checking subtype relations for function types as it relates to contextual signature instantiation // error cases, so function calls will all result in 'any' var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithCallSignatures4.js b/tests/baselines/reference/subtypingWithCallSignatures4.js index 94f549c62c1..5aaa139f19a 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures4.js +++ b/tests/baselines/reference/subtypingWithCallSignatures4.js @@ -114,7 +114,7 @@ var r18 = foo18(r18arg); //// [subtypingWithCallSignatures4.js] // checking subtype relations for function types as it relates to contextual signature instantiation var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithConstructSignatures2.js b/tests/baselines/reference/subtypingWithConstructSignatures2.js index 1d12aeb945f..1f7ae528b5b 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures2.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures2.js @@ -175,7 +175,7 @@ var r18 = foo18(r18arg1); //// [subtypingWithConstructSignatures2.js] // checking subtype relations for function types as it relates to contextual signature instantiation var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithConstructSignatures3.js b/tests/baselines/reference/subtypingWithConstructSignatures3.js index 78582304cb8..d86b0519ebe 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures3.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures3.js @@ -124,7 +124,7 @@ module WithGenericSignaturesInBaseType { // checking subtype relations for function types as it relates to contextual signature instantiation // error cases, so function calls will all result in 'any' var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithConstructSignatures4.js b/tests/baselines/reference/subtypingWithConstructSignatures4.js index 17252fdb809..f11d2e3c211 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures4.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures4.js @@ -114,7 +114,7 @@ var r18 = foo18(r18arg); //// [subtypingWithConstructSignatures4.js] // checking subtype relations for function types as it relates to contextual signature instantiation var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithConstructSignatures5.js b/tests/baselines/reference/subtypingWithConstructSignatures5.js index a0561606393..bdce522f104 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures5.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures5.js @@ -52,7 +52,7 @@ interface I extends B { // checking subtype relations for function types as it relates to contextual signature instantiation // same as subtypingWithConstructSignatures2 just with an extra level of indirection in the inheritance chain var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithConstructSignatures6.js b/tests/baselines/reference/subtypingWithConstructSignatures6.js index c508781e089..2c0b10744f2 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures6.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures6.js @@ -55,7 +55,7 @@ interface I9 extends A { // same as subtypingWithConstructSignatures4 but using class type parameters instead of generic signatures // all are errors var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithNumericIndexer.js b/tests/baselines/reference/subtypingWithNumericIndexer.js index 3cf75dd83fd..efe3d5927a9 100644 --- a/tests/baselines/reference/subtypingWithNumericIndexer.js +++ b/tests/baselines/reference/subtypingWithNumericIndexer.js @@ -42,7 +42,7 @@ module Generics { //// [subtypingWithNumericIndexer.js] // Derived type indexer must be subtype of base type indexer var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithNumericIndexer3.js b/tests/baselines/reference/subtypingWithNumericIndexer3.js index e9e8d39bf3c..a3b1034d6a8 100644 --- a/tests/baselines/reference/subtypingWithNumericIndexer3.js +++ b/tests/baselines/reference/subtypingWithNumericIndexer3.js @@ -46,7 +46,7 @@ module Generics { //// [subtypingWithNumericIndexer3.js] // Derived type indexer must be subtype of base type indexer var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithNumericIndexer4.js b/tests/baselines/reference/subtypingWithNumericIndexer4.js index 798e775083f..f2657654c8b 100644 --- a/tests/baselines/reference/subtypingWithNumericIndexer4.js +++ b/tests/baselines/reference/subtypingWithNumericIndexer4.js @@ -30,7 +30,7 @@ module Generics { //// [subtypingWithNumericIndexer4.js] // Derived type indexer must be subtype of base type indexer var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithObjectMembers.js b/tests/baselines/reference/subtypingWithObjectMembers.js index 3675ed6a410..04f05b81cef 100644 --- a/tests/baselines/reference/subtypingWithObjectMembers.js +++ b/tests/baselines/reference/subtypingWithObjectMembers.js @@ -69,7 +69,7 @@ module TwoLevels { //// [subtypingWithObjectMembers.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithObjectMembers4.js b/tests/baselines/reference/subtypingWithObjectMembers4.js index 404b6cbe988..2cdf1b4401b 100644 --- a/tests/baselines/reference/subtypingWithObjectMembers4.js +++ b/tests/baselines/reference/subtypingWithObjectMembers4.js @@ -36,7 +36,7 @@ class B3 extends A3 { //// [subtypingWithObjectMembers4.js] // subtyping when property names do not match var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithObjectMembersAccessibility.js b/tests/baselines/reference/subtypingWithObjectMembersAccessibility.js index 8b168ea73b5..386ce781675 100644 --- a/tests/baselines/reference/subtypingWithObjectMembersAccessibility.js +++ b/tests/baselines/reference/subtypingWithObjectMembersAccessibility.js @@ -36,7 +36,7 @@ class B3 extends A3 { //// [subtypingWithObjectMembersAccessibility.js] // Derived member is private, base member is not causes errors var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.js b/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.js index 0a83b760218..5227eac7db4 100644 --- a/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.js +++ b/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.js @@ -64,7 +64,7 @@ module ImplicitPublic { //// [subtypingWithObjectMembersAccessibility2.js] // Derived member is private, base member is not causes errors var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithStringIndexer.js b/tests/baselines/reference/subtypingWithStringIndexer.js index 195b7d2192e..a1ec5e1f46f 100644 --- a/tests/baselines/reference/subtypingWithStringIndexer.js +++ b/tests/baselines/reference/subtypingWithStringIndexer.js @@ -43,7 +43,7 @@ module Generics { //// [subtypingWithStringIndexer.js] // Derived type indexer must be subtype of base type indexer var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithStringIndexer3.js b/tests/baselines/reference/subtypingWithStringIndexer3.js index 0b2a57324eb..ea193a206ed 100644 --- a/tests/baselines/reference/subtypingWithStringIndexer3.js +++ b/tests/baselines/reference/subtypingWithStringIndexer3.js @@ -46,7 +46,7 @@ module Generics { //// [subtypingWithStringIndexer3.js] // Derived type indexer must be subtype of base type indexer var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithStringIndexer4.js b/tests/baselines/reference/subtypingWithStringIndexer4.js index 2937261ad05..b5a8c75a03e 100644 --- a/tests/baselines/reference/subtypingWithStringIndexer4.js +++ b/tests/baselines/reference/subtypingWithStringIndexer4.js @@ -30,7 +30,7 @@ module Generics { //// [subtypingWithStringIndexer4.js] // Derived type indexer must be subtype of base type indexer var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/super.js b/tests/baselines/reference/super.js index 504e8542d4d..6607c7897dd 100644 --- a/tests/baselines/reference/super.js +++ b/tests/baselines/reference/super.js @@ -39,7 +39,7 @@ s.foo() + ss.foo(); //// [super.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/super1.js b/tests/baselines/reference/super1.js index 0094f696faf..44a48adab77 100644 --- a/tests/baselines/reference/super1.js +++ b/tests/baselines/reference/super1.js @@ -68,7 +68,7 @@ module Base4 { //// [super1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/super2.js b/tests/baselines/reference/super2.js index 1d2331052db..e46b2825481 100644 --- a/tests/baselines/reference/super2.js +++ b/tests/baselines/reference/super2.js @@ -52,7 +52,7 @@ results1.x() + results1.y() + results2.y(); //// [super2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superAccess.js b/tests/baselines/reference/superAccess.js index 0bd9d305d2e..b300f75b5fa 100644 --- a/tests/baselines/reference/superAccess.js +++ b/tests/baselines/reference/superAccess.js @@ -15,7 +15,7 @@ class MyDerived extends MyBase { //// [superAccess.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superAccess2.js b/tests/baselines/reference/superAccess2.js index da19770584a..0388b8d7f10 100644 --- a/tests/baselines/reference/superAccess2.js +++ b/tests/baselines/reference/superAccess2.js @@ -26,7 +26,7 @@ class Q extends P { //// [superAccess2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superAccessInFatArrow1.js b/tests/baselines/reference/superAccessInFatArrow1.js index a7f964309f7..ec8488f0dad 100644 --- a/tests/baselines/reference/superAccessInFatArrow1.js +++ b/tests/baselines/reference/superAccessInFatArrow1.js @@ -17,7 +17,7 @@ module test { //// [superAccessInFatArrow1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallArgsMustMatch.js b/tests/baselines/reference/superCallArgsMustMatch.js index 106d7433bf5..7ca13891555 100644 --- a/tests/baselines/reference/superCallArgsMustMatch.js +++ b/tests/baselines/reference/superCallArgsMustMatch.js @@ -27,7 +27,7 @@ class T6 extends T5{ //// [superCallArgsMustMatch.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallAssignResult.js b/tests/baselines/reference/superCallAssignResult.js index 6e30cc64052..d7ad39fc7a6 100644 --- a/tests/baselines/reference/superCallAssignResult.js +++ b/tests/baselines/reference/superCallAssignResult.js @@ -12,7 +12,7 @@ class H extends E { //// [superCallAssignResult.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing1.js b/tests/baselines/reference/superCallBeforeThisAccessing1.js index e3aed9e40e9..916d1568232 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing1.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing1.js @@ -18,7 +18,7 @@ class D extends Base { //// [superCallBeforeThisAccessing1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing2.js b/tests/baselines/reference/superCallBeforeThisAccessing2.js index 7331718a9ed..c5a8d293fff 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing2.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing2.js @@ -12,7 +12,7 @@ class D extends Base { //// [superCallBeforeThisAccessing2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing3.js b/tests/baselines/reference/superCallBeforeThisAccessing3.js index 185767fefb6..8a59226d1d6 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing3.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing3.js @@ -15,7 +15,7 @@ class D extends Base { //// [superCallBeforeThisAccessing3.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing4.js b/tests/baselines/reference/superCallBeforeThisAccessing4.js index 91acb88ce22..6870662435e 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing4.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing4.js @@ -17,7 +17,7 @@ class E extends null { //// [superCallBeforeThisAccessing4.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing5.js b/tests/baselines/reference/superCallBeforeThisAccessing5.js index 57228538faf..0c2f3aa1c2d 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing5.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing5.js @@ -9,7 +9,7 @@ class D extends null { //// [superCallBeforeThisAccessing5.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing6.js b/tests/baselines/reference/superCallBeforeThisAccessing6.js index e4dfb3f714a..2fe03ab52b5 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing6.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing6.js @@ -12,7 +12,7 @@ class D extends Base { //// [superCallBeforeThisAccessing6.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing7.js b/tests/baselines/reference/superCallBeforeThisAccessing7.js index 9cfe8736774..a843456be76 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing7.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing7.js @@ -15,7 +15,7 @@ class D extends Base { //// [superCallBeforeThisAccessing7.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing8.js b/tests/baselines/reference/superCallBeforeThisAccessing8.js index fe459b5e031..3b23949584f 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing8.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing8.js @@ -15,7 +15,7 @@ class D extends Base { //// [superCallBeforeThisAccessing8.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType1.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType1.js index bc196299bf9..e4f1d4ed105 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType1.js @@ -13,7 +13,7 @@ class D extends B { //// [superCallFromClassThatDerivesFromGenericType1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType2.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType2.js index 8a0ef085590..47d1b5007fe 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType2.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType2.js @@ -12,7 +12,7 @@ class D extends B { //// [superCallFromClassThatDerivesFromGenericType2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js index 0529d5e3dc2..d29377ed246 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js @@ -12,7 +12,7 @@ class B extends A { //// [superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js index fb08ec28902..844b24a0698 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js @@ -12,7 +12,7 @@ class B extends A { //// [superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js b/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js index 50153391f62..71587371fa0 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js @@ -12,7 +12,7 @@ class B extends A { //// [superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallInNonStaticMethod.js b/tests/baselines/reference/superCallInNonStaticMethod.js index cd84052ca3c..99a026a38fd 100644 --- a/tests/baselines/reference/superCallInNonStaticMethod.js +++ b/tests/baselines/reference/superCallInNonStaticMethod.js @@ -52,7 +52,7 @@ class Other extends Doing { //// [superCallInNonStaticMethod.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallInStaticMethod.js b/tests/baselines/reference/superCallInStaticMethod.js index b31110fdf78..b65b2b270c5 100644 --- a/tests/baselines/reference/superCallInStaticMethod.js +++ b/tests/baselines/reference/superCallInStaticMethod.js @@ -48,7 +48,7 @@ class Other extends Doing { //// [superCallInStaticMethod.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallInsideClassDeclaration.js b/tests/baselines/reference/superCallInsideClassDeclaration.js index 05e44119608..0b6c768c86f 100644 --- a/tests/baselines/reference/superCallInsideClassDeclaration.js +++ b/tests/baselines/reference/superCallInsideClassDeclaration.js @@ -18,7 +18,7 @@ class B extends A { //// [superCallInsideClassDeclaration.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallInsideClassExpression.js b/tests/baselines/reference/superCallInsideClassExpression.js index 3d55fe11cff..c3bd2425dd4 100644 --- a/tests/baselines/reference/superCallInsideClassExpression.js +++ b/tests/baselines/reference/superCallInsideClassExpression.js @@ -18,7 +18,7 @@ class B extends A { //// [superCallInsideClassExpression.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallInsideObjectLiteralExpression.js b/tests/baselines/reference/superCallInsideObjectLiteralExpression.js index 636b03c227f..45b6301a871 100644 --- a/tests/baselines/reference/superCallInsideObjectLiteralExpression.js +++ b/tests/baselines/reference/superCallInsideObjectLiteralExpression.js @@ -14,7 +14,7 @@ class B extends A { //// [superCallInsideObjectLiteralExpression.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallOutsideConstructor.js b/tests/baselines/reference/superCallOutsideConstructor.js index e32bfc66050..a98a9b3a322 100644 --- a/tests/baselines/reference/superCallOutsideConstructor.js +++ b/tests/baselines/reference/superCallOutsideConstructor.js @@ -24,7 +24,7 @@ var d = new D(); //// [superCallOutsideConstructor.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallParameterContextualTyping1.js b/tests/baselines/reference/superCallParameterContextualTyping1.js index d8491b4ee83..46aeb976987 100644 --- a/tests/baselines/reference/superCallParameterContextualTyping1.js +++ b/tests/baselines/reference/superCallParameterContextualTyping1.js @@ -14,7 +14,7 @@ class B extends A { //// [superCallParameterContextualTyping1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallParameterContextualTyping2.js b/tests/baselines/reference/superCallParameterContextualTyping2.js index 9868a7db124..a6aed2d1cae 100644 --- a/tests/baselines/reference/superCallParameterContextualTyping2.js +++ b/tests/baselines/reference/superCallParameterContextualTyping2.js @@ -13,7 +13,7 @@ class C extends A { //// [superCallParameterContextualTyping2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallParameterContextualTyping3.js b/tests/baselines/reference/superCallParameterContextualTyping3.js index 6a43d58c471..8445e86cfce 100644 --- a/tests/baselines/reference/superCallParameterContextualTyping3.js +++ b/tests/baselines/reference/superCallParameterContextualTyping3.js @@ -33,7 +33,7 @@ class C extends CBase { //// [superCallParameterContextualTyping3.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallWithCommentEmit01.js b/tests/baselines/reference/superCallWithCommentEmit01.js index c7ea3cc8b85..ea23eb3be03 100644 --- a/tests/baselines/reference/superCallWithCommentEmit01.js +++ b/tests/baselines/reference/superCallWithCommentEmit01.js @@ -12,7 +12,7 @@ class B extends A { //// [superCallWithCommentEmit01.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallWithMissingBaseClass.js b/tests/baselines/reference/superCallWithMissingBaseClass.js index 16f11088640..9dff2bc4c56 100644 --- a/tests/baselines/reference/superCallWithMissingBaseClass.js +++ b/tests/baselines/reference/superCallWithMissingBaseClass.js @@ -11,7 +11,7 @@ class Foo extends Bar { //// [superCallWithMissingBaseClass.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCalls.js b/tests/baselines/reference/superCalls.js index 99a3b78752c..d5a9af8e06a 100644 --- a/tests/baselines/reference/superCalls.js +++ b/tests/baselines/reference/superCalls.js @@ -32,7 +32,7 @@ class OtherDerived extends OtherBase { //// [superCalls.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallsInConstructor.js b/tests/baselines/reference/superCallsInConstructor.js index 48b79acadf4..540eef99840 100644 --- a/tests/baselines/reference/superCallsInConstructor.js +++ b/tests/baselines/reference/superCallsInConstructor.js @@ -22,7 +22,7 @@ class Derived extends Base { //// [superCallsInConstructor.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superErrors.js b/tests/baselines/reference/superErrors.js index 19f0d74f677..c52b2a22173 100644 --- a/tests/baselines/reference/superErrors.js +++ b/tests/baselines/reference/superErrors.js @@ -53,7 +53,7 @@ class RegisteredUser extends User { //// [superErrors.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superInCatchBlock1.js b/tests/baselines/reference/superInCatchBlock1.js index e1fc0f97024..17ac62b8491 100644 --- a/tests/baselines/reference/superInCatchBlock1.js +++ b/tests/baselines/reference/superInCatchBlock1.js @@ -15,7 +15,7 @@ class B extends A { //// [superInCatchBlock1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superInConstructorParam1.js b/tests/baselines/reference/superInConstructorParam1.js index 8c99b649917..7f53128e99e 100644 --- a/tests/baselines/reference/superInConstructorParam1.js +++ b/tests/baselines/reference/superInConstructorParam1.js @@ -12,7 +12,7 @@ class C extends B { //// [superInConstructorParam1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superInLambdas.js b/tests/baselines/reference/superInLambdas.js index 73ca53c3b5c..8c3d37efb34 100644 --- a/tests/baselines/reference/superInLambdas.js +++ b/tests/baselines/reference/superInLambdas.js @@ -69,7 +69,7 @@ class RegisteredUser4 extends User { //// [superInLambdas.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superInObjectLiterals_ES5.js b/tests/baselines/reference/superInObjectLiterals_ES5.js index 816277e4e9e..f31a2492f3d 100644 --- a/tests/baselines/reference/superInObjectLiterals_ES5.js +++ b/tests/baselines/reference/superInObjectLiterals_ES5.js @@ -61,7 +61,7 @@ class B extends A { //// [superInObjectLiterals_ES5.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superNewCall1.js b/tests/baselines/reference/superNewCall1.js index 30b07308bb2..2b6231691b2 100644 --- a/tests/baselines/reference/superNewCall1.js +++ b/tests/baselines/reference/superNewCall1.js @@ -14,7 +14,7 @@ class B extends A { //// [superNewCall1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superPropertyAccess.js b/tests/baselines/reference/superPropertyAccess.js index 7b5823e598b..72353c27624 100644 --- a/tests/baselines/reference/superPropertyAccess.js +++ b/tests/baselines/reference/superPropertyAccess.js @@ -38,7 +38,7 @@ class MyDerived extends MyBase { //// [superPropertyAccess.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superPropertyAccess1.js b/tests/baselines/reference/superPropertyAccess1.js index 0b1e4fc280f..7e07c236eec 100644 --- a/tests/baselines/reference/superPropertyAccess1.js +++ b/tests/baselines/reference/superPropertyAccess1.js @@ -29,7 +29,7 @@ class D extends C { //// [superPropertyAccess1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superPropertyAccess2.js b/tests/baselines/reference/superPropertyAccess2.js index 7c72ad5d1bb..f0776992312 100644 --- a/tests/baselines/reference/superPropertyAccess2.js +++ b/tests/baselines/reference/superPropertyAccess2.js @@ -29,7 +29,7 @@ class D extends C { //// [superPropertyAccess2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superPropertyAccessInComputedPropertiesOfNestedType_ES5.js b/tests/baselines/reference/superPropertyAccessInComputedPropertiesOfNestedType_ES5.js index 956bce4ef2e..cb5e98ee2d2 100644 --- a/tests/baselines/reference/superPropertyAccessInComputedPropertiesOfNestedType_ES5.js +++ b/tests/baselines/reference/superPropertyAccessInComputedPropertiesOfNestedType_ES5.js @@ -16,7 +16,7 @@ class B extends A { //// [superPropertyAccessInComputedPropertiesOfNestedType_ES5.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superPropertyAccessNoError.js b/tests/baselines/reference/superPropertyAccessNoError.js index 88a5da8b8fb..0f4efbc719f 100644 --- a/tests/baselines/reference/superPropertyAccessNoError.js +++ b/tests/baselines/reference/superPropertyAccessNoError.js @@ -78,7 +78,7 @@ instance.returnThis().fn(); //super.publicStaticMemberFunction in static member function of derived class //super.publicStaticMemberFunction in static member accessor(get and set) of derived class var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superPropertyAccess_ES5.js b/tests/baselines/reference/superPropertyAccess_ES5.js index 45c32076be9..159b3b86c4c 100644 --- a/tests/baselines/reference/superPropertyAccess_ES5.js +++ b/tests/baselines/reference/superPropertyAccess_ES5.js @@ -31,7 +31,7 @@ class B extends A { //// [superPropertyAccess_ES5.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superSymbolIndexedAccess5.js b/tests/baselines/reference/superSymbolIndexedAccess5.js index dd37deb5af3..43565251f79 100644 --- a/tests/baselines/reference/superSymbolIndexedAccess5.js +++ b/tests/baselines/reference/superSymbolIndexedAccess5.js @@ -15,7 +15,7 @@ class Bar extends Foo { //// [superSymbolIndexedAccess5.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superSymbolIndexedAccess6.js b/tests/baselines/reference/superSymbolIndexedAccess6.js index 8c8534b428a..2f47d38660e 100644 --- a/tests/baselines/reference/superSymbolIndexedAccess6.js +++ b/tests/baselines/reference/superSymbolIndexedAccess6.js @@ -15,7 +15,7 @@ class Bar extends Foo { //// [superSymbolIndexedAccess6.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superWithGenericSpecialization.js b/tests/baselines/reference/superWithGenericSpecialization.js index a0381d0b944..e024285dc9e 100644 --- a/tests/baselines/reference/superWithGenericSpecialization.js +++ b/tests/baselines/reference/superWithGenericSpecialization.js @@ -16,7 +16,7 @@ var r2: number = d.y; //// [superWithGenericSpecialization.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superWithGenerics.js b/tests/baselines/reference/superWithGenerics.js index 803f229bd4b..c8c99ef56cf 100644 --- a/tests/baselines/reference/superWithGenerics.js +++ b/tests/baselines/reference/superWithGenerics.js @@ -13,7 +13,7 @@ class D extends B { //// [superWithGenerics.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superWithTypeArgument.js b/tests/baselines/reference/superWithTypeArgument.js index a1c04975404..638b970d7ff 100644 --- a/tests/baselines/reference/superWithTypeArgument.js +++ b/tests/baselines/reference/superWithTypeArgument.js @@ -11,7 +11,7 @@ class D extends C { //// [superWithTypeArgument.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superWithTypeArgument2.js b/tests/baselines/reference/superWithTypeArgument2.js index 42a0e46d4c0..4241cc6a699 100644 --- a/tests/baselines/reference/superWithTypeArgument2.js +++ b/tests/baselines/reference/superWithTypeArgument2.js @@ -11,7 +11,7 @@ class D extends C { //// [superWithTypeArgument2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superWithTypeArgument3.js b/tests/baselines/reference/superWithTypeArgument3.js index 803e5c264c2..8f9d6252a87 100644 --- a/tests/baselines/reference/superWithTypeArgument3.js +++ b/tests/baselines/reference/superWithTypeArgument3.js @@ -15,7 +15,7 @@ class D extends C { //// [superWithTypeArgument3.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/super_inside-object-literal-getters-and-setters.js b/tests/baselines/reference/super_inside-object-literal-getters-and-setters.js index 6815b71ce11..e244f318328 100644 --- a/tests/baselines/reference/super_inside-object-literal-getters-and-setters.js +++ b/tests/baselines/reference/super_inside-object-literal-getters-and-setters.js @@ -29,7 +29,7 @@ class SuperObjectTest extends F { //// [super_inside-object-literal-getters-and-setters.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/switchStatements.js b/tests/baselines/reference/switchStatements.js index 2e1aecc7288..20a92712670 100644 --- a/tests/baselines/reference/switchStatements.js +++ b/tests/baselines/reference/switchStatements.js @@ -57,7 +57,7 @@ switch (((x: T) => '')(1)) { } //// [switchStatements.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/systemModuleWithSuperClass.js b/tests/baselines/reference/systemModuleWithSuperClass.js index 78c09355fa0..cbb2b5d05dd 100644 --- a/tests/baselines/reference/systemModuleWithSuperClass.js +++ b/tests/baselines/reference/systemModuleWithSuperClass.js @@ -33,7 +33,7 @@ System.register([], function (exports_1, context_1) { System.register(["./foo"], function (exports_1, context_1) { "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/targetTypeBaseCalls.js b/tests/baselines/reference/targetTypeBaseCalls.js index cac93023a00..3c1daae5d31 100644 --- a/tests/baselines/reference/targetTypeBaseCalls.js +++ b/tests/baselines/reference/targetTypeBaseCalls.js @@ -20,7 +20,7 @@ class Bar extends Foo { constructor() { super(function(s) { s = 5 }) } } // err //// [targetTypeBaseCalls.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/thisInInvalidContexts.js b/tests/baselines/reference/thisInInvalidContexts.js index 1fc1c734639..5eaac48383c 100644 --- a/tests/baselines/reference/thisInInvalidContexts.js +++ b/tests/baselines/reference/thisInInvalidContexts.js @@ -50,7 +50,7 @@ enum SomeEnum { //// [thisInInvalidContexts.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/thisInInvalidContextsExternalModule.js b/tests/baselines/reference/thisInInvalidContextsExternalModule.js index f8cb6d695dc..788eb974e89 100644 --- a/tests/baselines/reference/thisInInvalidContextsExternalModule.js +++ b/tests/baselines/reference/thisInInvalidContextsExternalModule.js @@ -51,7 +51,7 @@ export = this; // Should be an error //// [thisInInvalidContextsExternalModule.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/thisInSuperCall.js b/tests/baselines/reference/thisInSuperCall.js index 2a4d15973ab..f49a0b8eb65 100644 --- a/tests/baselines/reference/thisInSuperCall.js +++ b/tests/baselines/reference/thisInSuperCall.js @@ -24,7 +24,7 @@ class Foo3 extends Base { //// [thisInSuperCall.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/thisInSuperCall1.js b/tests/baselines/reference/thisInSuperCall1.js index e3eea1fb91d..bfc9d8b4f17 100644 --- a/tests/baselines/reference/thisInSuperCall1.js +++ b/tests/baselines/reference/thisInSuperCall1.js @@ -12,7 +12,7 @@ class Foo extends Base { //// [thisInSuperCall1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/thisInSuperCall2.js b/tests/baselines/reference/thisInSuperCall2.js index eabfa9d562c..df5dee1a321 100644 --- a/tests/baselines/reference/thisInSuperCall2.js +++ b/tests/baselines/reference/thisInSuperCall2.js @@ -21,7 +21,7 @@ class Foo2 extends Base { //// [thisInSuperCall2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/thisInSuperCall3.js b/tests/baselines/reference/thisInSuperCall3.js index 6a72f17248f..ac47e685c38 100644 --- a/tests/baselines/reference/thisInSuperCall3.js +++ b/tests/baselines/reference/thisInSuperCall3.js @@ -14,7 +14,7 @@ class Foo extends Base { //// [thisInSuperCall3.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/thisTypeInFunctions.js b/tests/baselines/reference/thisTypeInFunctions.js index 6400f410a09..3169e0cd06b 100644 --- a/tests/baselines/reference/thisTypeInFunctions.js +++ b/tests/baselines/reference/thisTypeInFunctions.js @@ -196,7 +196,7 @@ function missingTypeIsImplicitAny(this, a: number) { return this.anything + a; } //// [thisTypeInFunctions.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/thisTypeInFunctionsNegative.js b/tests/baselines/reference/thisTypeInFunctionsNegative.js index 446bc15e6d9..4b936e0198f 100644 --- a/tests/baselines/reference/thisTypeInFunctionsNegative.js +++ b/tests/baselines/reference/thisTypeInFunctionsNegative.js @@ -178,7 +178,7 @@ c.explicitProperty = (this, m) => m + this.n; //// [thisTypeInFunctionsNegative.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/tsxCorrectlyParseLessThanComparison1.js b/tests/baselines/reference/tsxCorrectlyParseLessThanComparison1.js index f5d35ccaf77..6cfb957dd39 100644 --- a/tests/baselines/reference/tsxCorrectlyParseLessThanComparison1.js +++ b/tests/baselines/reference/tsxCorrectlyParseLessThanComparison1.js @@ -22,7 +22,7 @@ export class ShortDetails extends React.Component<{ id: number }, {}> { //// [tsxCorrectlyParseLessThanComparison1.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/tsxDynamicTagName5.js b/tests/baselines/reference/tsxDynamicTagName5.js index d3bb404ceea..200a8e2d78d 100644 --- a/tests/baselines/reference/tsxDynamicTagName5.js +++ b/tests/baselines/reference/tsxDynamicTagName5.js @@ -22,7 +22,7 @@ export class Text extends React.Component<{}, {}> { //// [app.jsx] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/tsxDynamicTagName7.js b/tests/baselines/reference/tsxDynamicTagName7.js index 84debfd3e71..717caa83310 100644 --- a/tests/baselines/reference/tsxDynamicTagName7.js +++ b/tests/baselines/reference/tsxDynamicTagName7.js @@ -22,7 +22,7 @@ export class Text extends React.Component<{}, {}> { //// [app.jsx] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/tsxDynamicTagName8.js b/tests/baselines/reference/tsxDynamicTagName8.js index 6166b99f4ac..725eeec0326 100644 --- a/tests/baselines/reference/tsxDynamicTagName8.js +++ b/tests/baselines/reference/tsxDynamicTagName8.js @@ -22,7 +22,7 @@ export class Text extends React.Component<{}, {}> { //// [app.jsx] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/tsxDynamicTagName9.js b/tests/baselines/reference/tsxDynamicTagName9.js index 928649264c8..ff7e4a9a7e2 100644 --- a/tests/baselines/reference/tsxDynamicTagName9.js +++ b/tests/baselines/reference/tsxDynamicTagName9.js @@ -22,7 +22,7 @@ export class Text extends React.Component<{}, {}> { //// [app.jsx] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/tsxExternalModuleEmit1.js b/tests/baselines/reference/tsxExternalModuleEmit1.js index 58e7f1c8d85..0d515ac2114 100644 --- a/tests/baselines/reference/tsxExternalModuleEmit1.js +++ b/tests/baselines/reference/tsxExternalModuleEmit1.js @@ -34,7 +34,7 @@ export class Button extends React.Component { //// [button.jsx] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -53,7 +53,7 @@ exports.Button = Button; //// [app.jsx] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/tsxStatelessFunctionComponents2.js b/tests/baselines/reference/tsxStatelessFunctionComponents2.js index 88d91723501..7352f7edef7 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponents2.js +++ b/tests/baselines/reference/tsxStatelessFunctionComponents2.js @@ -41,7 +41,7 @@ let i =
x.propertyNotOnHtmlDivElement} />; //// [file.jsx] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/tsxUnionTypeComponent1.js b/tests/baselines/reference/tsxUnionTypeComponent1.js index 3520b5af372..a832e26806e 100644 --- a/tests/baselines/reference/tsxUnionTypeComponent1.js +++ b/tests/baselines/reference/tsxUnionTypeComponent1.js @@ -27,7 +27,7 @@ class MyButtonComponent extends React.Component<{},{}> { //// [file.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeAssertions.js b/tests/baselines/reference/typeAssertions.js index a57fb222a77..9e7e39be710 100644 --- a/tests/baselines/reference/typeAssertions.js +++ b/tests/baselines/reference/typeAssertions.js @@ -53,7 +53,7 @@ if((numOrStr === undefined) as numOrStr is string) { // Error //// [typeAssertions.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardFunction.js b/tests/baselines/reference/typeGuardFunction.js index b88d1038969..e261492d35f 100644 --- a/tests/baselines/reference/typeGuardFunction.js +++ b/tests/baselines/reference/typeGuardFunction.js @@ -85,7 +85,7 @@ let union3: boolean | B = isA(union2) || union2; //// [typeGuardFunction.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardFunctionErrors.js b/tests/baselines/reference/typeGuardFunctionErrors.js index 99c25faaa88..2ceec7e12e2 100644 --- a/tests/baselines/reference/typeGuardFunctionErrors.js +++ b/tests/baselines/reference/typeGuardFunctionErrors.js @@ -147,7 +147,7 @@ if (hasMissingParameter()) { //// [typeGuardFunctionErrors.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardFunctionGenerics.js b/tests/baselines/reference/typeGuardFunctionGenerics.js index 703c809274f..a2b9df419ad 100644 --- a/tests/baselines/reference/typeGuardFunctionGenerics.js +++ b/tests/baselines/reference/typeGuardFunctionGenerics.js @@ -35,7 +35,7 @@ let test3: B = funE(isB, 1); //// [typeGuardFunctionGenerics.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardFunctionOfFormThis.js b/tests/baselines/reference/typeGuardFunctionOfFormThis.js index c052ea7d72b..f9f102e06ae 100644 --- a/tests/baselines/reference/typeGuardFunctionOfFormThis.js +++ b/tests/baselines/reference/typeGuardFunctionOfFormThis.js @@ -143,7 +143,7 @@ interface MimicGuardInterface { //// [typeGuardFunctionOfFormThis.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.js b/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.js index a85a207a665..c1e5b6b0af1 100644 --- a/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.js +++ b/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.js @@ -61,7 +61,7 @@ else { //// [typeGuardFunctionOfFormThisErrors.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardOfFormInstanceOf.js b/tests/baselines/reference/typeGuardOfFormInstanceOf.js index a181a446a81..75f0ccdf492 100644 --- a/tests/baselines/reference/typeGuardOfFormInstanceOf.js +++ b/tests/baselines/reference/typeGuardOfFormInstanceOf.js @@ -74,7 +74,7 @@ else { // it is a subtype of the type of x, or // - when false, has no effect on the type of x. var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardOfFormIsType.js b/tests/baselines/reference/typeGuardOfFormIsType.js index 14e9259a9e7..c48034dfc36 100644 --- a/tests/baselines/reference/typeGuardOfFormIsType.js +++ b/tests/baselines/reference/typeGuardOfFormIsType.js @@ -39,7 +39,7 @@ var r2: C2 | D1 = isC1(c2Ord1) && c2Ord1; // C2 | D1 //// [typeGuardOfFormIsType.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardOfFormThisMember.js b/tests/baselines/reference/typeGuardOfFormThisMember.js index 52097af34f7..eaaa656a08e 100644 --- a/tests/baselines/reference/typeGuardOfFormThisMember.js +++ b/tests/baselines/reference/typeGuardOfFormThisMember.js @@ -84,7 +84,7 @@ namespace Test { //// [typeGuardOfFormThisMember.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js b/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js index c65445a3a5a..cb7fa087fe1 100644 --- a/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js +++ b/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js @@ -34,7 +34,7 @@ namespace Test { //// [typeGuardOfFormThisMemberErrors.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeMatch2.js b/tests/baselines/reference/typeMatch2.js index 2cae93924bc..9721d17aac4 100644 --- a/tests/baselines/reference/typeMatch2.js +++ b/tests/baselines/reference/typeMatch2.js @@ -46,7 +46,7 @@ function f4() { //// [typeMatch2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeOfSuperCall.js b/tests/baselines/reference/typeOfSuperCall.js index 179e981b8d1..7bad868e33c 100644 --- a/tests/baselines/reference/typeOfSuperCall.js +++ b/tests/baselines/reference/typeOfSuperCall.js @@ -10,7 +10,7 @@ class D extends C { //// [typeOfSuperCall.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeParameterAsBaseClass.js b/tests/baselines/reference/typeParameterAsBaseClass.js index 15d1c3b396e..4629854dd37 100644 --- a/tests/baselines/reference/typeParameterAsBaseClass.js +++ b/tests/baselines/reference/typeParameterAsBaseClass.js @@ -4,7 +4,7 @@ class C2 implements T {} //// [typeParameterAsBaseClass.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeParameterAsBaseType.js b/tests/baselines/reference/typeParameterAsBaseType.js index 2d0962f01d7..64d0f20c2f0 100644 --- a/tests/baselines/reference/typeParameterAsBaseType.js +++ b/tests/baselines/reference/typeParameterAsBaseType.js @@ -14,7 +14,7 @@ interface I2 extends U { } // type parameters cannot be used as base types // these are all errors var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeParameterExtendingUnion1.js b/tests/baselines/reference/typeParameterExtendingUnion1.js index 2738aa20528..73efba3f0d7 100644 --- a/tests/baselines/reference/typeParameterExtendingUnion1.js +++ b/tests/baselines/reference/typeParameterExtendingUnion1.js @@ -14,7 +14,7 @@ function f(a: T) { //// [typeParameterExtendingUnion1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeParameterExtendingUnion2.js b/tests/baselines/reference/typeParameterExtendingUnion2.js index b3754436f26..17d8d02cd9a 100644 --- a/tests/baselines/reference/typeParameterExtendingUnion2.js +++ b/tests/baselines/reference/typeParameterExtendingUnion2.js @@ -14,7 +14,7 @@ function f(a: T) { //// [typeParameterExtendingUnion2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeRelationships.js b/tests/baselines/reference/typeRelationships.js index 2f97f4b0d1c..0d30916767e 100644 --- a/tests/baselines/reference/typeRelationships.js +++ b/tests/baselines/reference/typeRelationships.js @@ -42,7 +42,7 @@ class D extends C { //// [typeRelationships.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeValueConflict1.js b/tests/baselines/reference/typeValueConflict1.js index 8711a656bf5..3abbb5cd21b 100644 --- a/tests/baselines/reference/typeValueConflict1.js +++ b/tests/baselines/reference/typeValueConflict1.js @@ -13,7 +13,7 @@ module M2 { //// [typeValueConflict1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeValueConflict2.js b/tests/baselines/reference/typeValueConflict2.js index 7abda8110b6..604acf71d15 100644 --- a/tests/baselines/reference/typeValueConflict2.js +++ b/tests/baselines/reference/typeValueConflict2.js @@ -20,7 +20,7 @@ module M3 { //// [typeValueConflict2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeofClass2.js b/tests/baselines/reference/typeofClass2.js index f1ec6a77b14..fb04510e23f 100644 --- a/tests/baselines/reference/typeofClass2.js +++ b/tests/baselines/reference/typeofClass2.js @@ -23,7 +23,7 @@ var r2: typeof d; //// [typeofClass2.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typesWithSpecializedCallSignatures.js b/tests/baselines/reference/typesWithSpecializedCallSignatures.js index 045f7b40e55..e46c2a3c267 100644 --- a/tests/baselines/reference/typesWithSpecializedCallSignatures.js +++ b/tests/baselines/reference/typesWithSpecializedCallSignatures.js @@ -44,7 +44,7 @@ var r3: Base = c.foo('hm'); //// [typesWithSpecializedCallSignatures.js] // basic uses of specialized signatures without errors var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typesWithSpecializedConstructSignatures.js b/tests/baselines/reference/typesWithSpecializedConstructSignatures.js index b4d42d819ed..37fc51c3f3a 100644 --- a/tests/baselines/reference/typesWithSpecializedConstructSignatures.js +++ b/tests/baselines/reference/typesWithSpecializedConstructSignatures.js @@ -42,7 +42,7 @@ var r3: Base = new a('hm'); //// [typesWithSpecializedConstructSignatures.js] // basic uses of specialized signatures without errors var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/undeclaredBase.js b/tests/baselines/reference/undeclaredBase.js index 4b7813231cf..3d07bc89571 100644 --- a/tests/baselines/reference/undeclaredBase.js +++ b/tests/baselines/reference/undeclaredBase.js @@ -5,7 +5,7 @@ module M { export class C extends M.I { } } //// [undeclaredBase.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/undefinedIsSubtypeOfEverything.js b/tests/baselines/reference/undefinedIsSubtypeOfEverything.js index 7e480d18a0a..393c5e24544 100644 --- a/tests/baselines/reference/undefinedIsSubtypeOfEverything.js +++ b/tests/baselines/reference/undefinedIsSubtypeOfEverything.js @@ -124,7 +124,7 @@ class D17 extends Base { //// [undefinedIsSubtypeOfEverything.js] // undefined is a subtype of every other types, no errors expected below var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/underscoreMapFirst.js b/tests/baselines/reference/underscoreMapFirst.js index c8e936af527..3edb48cd2d1 100644 --- a/tests/baselines/reference/underscoreMapFirst.js +++ b/tests/baselines/reference/underscoreMapFirst.js @@ -50,7 +50,7 @@ class MyView extends View { //// [underscoreMapFirst.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/underscoreThisInDerivedClass01.js b/tests/baselines/reference/underscoreThisInDerivedClass01.js index 000176c213f..c7f30f0ec87 100644 --- a/tests/baselines/reference/underscoreThisInDerivedClass01.js +++ b/tests/baselines/reference/underscoreThisInDerivedClass01.js @@ -26,7 +26,7 @@ class D extends C { //// [underscoreThisInDerivedClass01.js] // @target es5 var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/underscoreThisInDerivedClass02.js b/tests/baselines/reference/underscoreThisInDerivedClass02.js index c1e9494376b..89d3bf5a4f9 100644 --- a/tests/baselines/reference/underscoreThisInDerivedClass02.js +++ b/tests/baselines/reference/underscoreThisInDerivedClass02.js @@ -20,7 +20,7 @@ class D extends C { //// [underscoreThisInDerivedClass02.js] // @target es5 var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/unionTypeEquivalence.js b/tests/baselines/reference/unionTypeEquivalence.js index e4d0acc893c..bcb1f28f12b 100644 --- a/tests/baselines/reference/unionTypeEquivalence.js +++ b/tests/baselines/reference/unionTypeEquivalence.js @@ -21,7 +21,7 @@ var z1: string | typeof BC; //// [unionTypeEquivalence.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/unionTypeFromArrayLiteral.js b/tests/baselines/reference/unionTypeFromArrayLiteral.js index 83ad2a34394..a908067574f 100644 --- a/tests/baselines/reference/unionTypeFromArrayLiteral.js +++ b/tests/baselines/reference/unionTypeFromArrayLiteral.js @@ -29,7 +29,7 @@ var arr9 = [e, f]; // (E|F)[] // Otherwise, if the array literal is contextually typed by a type that has a property with the numeric name ‘0’, the resulting type is a tuple type constructed from the types of the element expressions. // Otherwise, the resulting type is an array type with an element type that is the union of the types of the element expressions. var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/unionTypesAssignability.js b/tests/baselines/reference/unionTypesAssignability.js index 231b8b27f3b..38c991bed61 100644 --- a/tests/baselines/reference/unionTypesAssignability.js +++ b/tests/baselines/reference/unionTypesAssignability.js @@ -75,7 +75,7 @@ function foo(t: T, u: U) { //// [unionTypesAssignability.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/unknownSymbols1.js b/tests/baselines/reference/unknownSymbols1.js index 832868c4b8f..9fed0f3a716 100644 --- a/tests/baselines/reference/unknownSymbols1.js +++ b/tests/baselines/reference/unknownSymbols1.js @@ -34,7 +34,7 @@ class C5 { //// [unknownSymbols1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/unspecializedConstraints.js b/tests/baselines/reference/unspecializedConstraints.js index 1343bea602e..e4c102d882d 100644 --- a/tests/baselines/reference/unspecializedConstraints.js +++ b/tests/baselines/reference/unspecializedConstraints.js @@ -155,7 +155,7 @@ module ts { //// [unspecializedConstraints.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js b/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js index b82a7cbc0ae..a651fdf7e8e 100644 --- a/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js +++ b/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js @@ -45,7 +45,7 @@ c5(1); // error //// [untypedFunctionCallsWithTypeParameters1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/unusedClassesinNamespace4.js b/tests/baselines/reference/unusedClassesinNamespace4.js index 0ab1227bf3d..bf5e996d2d2 100644 --- a/tests/baselines/reference/unusedClassesinNamespace4.js +++ b/tests/baselines/reference/unusedClassesinNamespace4.js @@ -16,7 +16,7 @@ namespace Validation { //// [unusedClassesinNamespace4.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/unusedIdentifiersConsolidated1.js b/tests/baselines/reference/unusedIdentifiersConsolidated1.js index dbb261e5f2a..6419fbe250b 100644 --- a/tests/baselines/reference/unusedIdentifiersConsolidated1.js +++ b/tests/baselines/reference/unusedIdentifiersConsolidated1.js @@ -104,7 +104,7 @@ namespace Greeter { //// [unusedIdentifiersConsolidated1.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/validUseOfThisInSuper.js b/tests/baselines/reference/validUseOfThisInSuper.js index 483e905b48a..b5eecf1720d 100644 --- a/tests/baselines/reference/validUseOfThisInSuper.js +++ b/tests/baselines/reference/validUseOfThisInSuper.js @@ -11,7 +11,7 @@ class Super extends Base { //// [validUseOfThisInSuper.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/varArgsOnConstructorTypes.js b/tests/baselines/reference/varArgsOnConstructorTypes.js index 0875f2ba1dd..547260c6197 100644 --- a/tests/baselines/reference/varArgsOnConstructorTypes.js +++ b/tests/baselines/reference/varArgsOnConstructorTypes.js @@ -26,7 +26,7 @@ reg.register(B); //// [varArgsOnConstructorTypes.js] var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + Object.setPrototypeOf(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; From 7ea37342408df46b9005560235fbcb7eac8bcdd9 Mon Sep 17 00:00:00 2001 From: vvakame Date: Fri, 25 Nov 2016 13:45:37 +0900 Subject: [PATCH 02/15] address feedback --- src/compiler/transformers/es2015.ts | 6 +- ...sClassHeritageListMemberTypeAnnotations.js | 6 +- ...accessibleTypeInTypeParameterConstraint.js | 6 +- .../reference/abstractClassInLocalScope.js | 6 +- .../abstractClassInLocalScopeIsAbstract.js | 6 +- tests/baselines/reference/abstractProperty.js | 6 +- .../reference/abstractPropertyNegative.js | 6 +- .../accessOverriddenBaseClassMember1.js | 6 +- .../accessors_spec_section-4.5_inference.js | 6 +- .../reference/aliasUsageInAccessorsOfClass.js | 6 +- .../baselines/reference/aliasUsageInArray.js | 6 +- .../aliasUsageInFunctionExpression.js | 6 +- .../reference/aliasUsageInGenericFunction.js | 6 +- .../reference/aliasUsageInIndexerOfClass.js | 6 +- .../reference/aliasUsageInObjectLiteral.js | 6 +- .../reference/aliasUsageInOrExpression.js | 6 +- ...aliasUsageInTypeArgumentOfExtendsClause.js | 12 +- .../reference/aliasUsageInVarAssignment.js | 6 +- .../reference/ambiguousOverloadResolution.js | 6 +- .../reference/apparentTypeSubtyping.js | 6 +- .../reference/apparentTypeSupertype.js | 6 +- .../reference/arrayAssignmentTest1.js | 6 +- .../reference/arrayAssignmentTest2.js | 6 +- .../reference/arrayBestCommonTypes.js | 6 +- .../reference/arrayLiteralTypeInference.js | 6 +- tests/baselines/reference/arrayLiterals.js | 6 +- .../arrayLiteralsWithRecursiveGenerics.js | 6 +- ...rayOfSubtypeIsAssignableToReadonlyArray.js | 6 +- .../reference/arrowFunctionContexts.js | 6 +- .../assignmentCompatWithCallSignatures3.js | 6 +- .../assignmentCompatWithCallSignatures4.js | 6 +- .../assignmentCompatWithCallSignatures5.js | 6 +- .../assignmentCompatWithCallSignatures6.js | 6 +- ...ssignmentCompatWithConstructSignatures3.js | 6 +- ...ssignmentCompatWithConstructSignatures4.js | 6 +- ...ssignmentCompatWithConstructSignatures5.js | 6 +- ...ssignmentCompatWithConstructSignatures6.js | 6 +- .../assignmentCompatWithNumericIndexer.js | 6 +- .../assignmentCompatWithNumericIndexer3.js | 6 +- .../assignmentCompatWithObjectMembers4.js | 6 +- ...nmentCompatWithObjectMembersOptionality.js | 6 +- ...mentCompatWithObjectMembersOptionality2.js | 6 +- .../assignmentCompatWithStringIndexer.js | 6 +- .../reference/assignmentLHSIsValue.js | 6 +- .../reference/asyncImportedPromise_es5.js | 6 +- tests/baselines/reference/autolift4.js | 6 +- tests/baselines/reference/baseCheck.js | 6 +- .../reference/baseIndexSignatureResolution.js | 6 +- .../reference/baseTypeOrderChecking.js | 6 +- .../baseTypeWrappingInstantiationChain.js | 6 +- tests/baselines/reference/bases.js | 6 +- .../bestCommonTypeOfConditionalExpressions.js | 6 +- ...bestCommonTypeOfConditionalExpressions2.js | 6 +- .../reference/bestCommonTypeOfTuple2.js | 6 +- ...allSignatureAssignabilityInInheritance2.js | 6 +- ...allSignatureAssignabilityInInheritance3.js | 6 +- ...allSignatureAssignabilityInInheritance4.js | 6 +- ...allSignatureAssignabilityInInheritance5.js | 6 +- ...allSignatureAssignabilityInInheritance6.js | 6 +- tests/baselines/reference/callWithSpread.js | 6 +- .../reference/captureThisInSuperCall.js | 6 +- tests/baselines/reference/castingTuple.js | 6 +- .../baselines/reference/chainedAssignment3.js | 6 +- ...arameterConstrainedToOtherTypeParameter.js | 6 +- .../reference/checkForObjectTooStrict.js | 6 +- .../checkSuperCallBeforeThisAccessing1.js | 6 +- .../checkSuperCallBeforeThisAccessing2.js | 6 +- .../checkSuperCallBeforeThisAccessing3.js | 6 +- .../checkSuperCallBeforeThisAccessing4.js | 6 +- .../checkSuperCallBeforeThisAccessing5.js | 6 +- .../checkSuperCallBeforeThisAccessing6.js | 6 +- .../checkSuperCallBeforeThisAccessing7.js | 6 +- .../checkSuperCallBeforeThisAccessing8.js | 6 +- .../reference/circularImportAlias.js | 6 +- .../circularTypeofWithFunctionModule.js | 6 +- .../classAbstractConstructorAssignability.js | 6 +- .../reference/classAbstractCrashedOnce.js | 6 +- .../reference/classAbstractExtends.js | 6 +- .../reference/classAbstractFactoryFunction.js | 6 +- .../reference/classAbstractGeneric.js | 6 +- .../reference/classAbstractInAModule.js | 6 +- .../reference/classAbstractInheritance.js | 6 +- .../reference/classAbstractInstantiations1.js | 6 +- .../reference/classAbstractInstantiations2.js | 6 +- .../classAbstractOverrideWithAbstract.js | 6 +- .../reference/classAbstractSuperCalls.js | 6 +- .../classAbstractUsingAbstractMethod1.js | 6 +- .../classAbstractUsingAbstractMethods2.js | 6 +- .../classConstructorAccessibility2.js | 6 +- .../classConstructorAccessibility4.js | 6 +- .../classConstructorAccessibility5.js | 6 +- ...classConstructorParametersAccessibility.js | 6 +- ...lassConstructorParametersAccessibility2.js | 6 +- ...lassConstructorParametersAccessibility3.js | 6 +- ...clarationMergedInModuleWithContinuation.js | 6 +- .../classDeclaredBeforeClassFactory.js | 6 +- .../classDoesNotDependOnBaseTypes.js | 6 +- tests/baselines/reference/classExpression2.js | 6 +- tests/baselines/reference/classExpression3.js | 6 +- .../classExpressionExtendingAbstractClass.js | 6 +- .../reference/classExtendingBuiltinType.js | 6 +- .../reference/classExtendingClass.js | 6 +- .../reference/classExtendingClassLikeType.js | 6 +- .../reference/classExtendingNonConstructor.js | 6 +- .../baselines/reference/classExtendingNull.js | 6 +- .../reference/classExtendingPrimitive.js | 6 +- .../reference/classExtendingPrimitive2.js | 6 +- .../reference/classExtendingQualifiedName.js | 6 +- .../reference/classExtendingQualifiedName2.js | 6 +- .../reference/classExtendsAcrossFiles.js | 12 +- ...sMergedWithModuleNotReferingConstructor.js | 6 +- ...tendsClauseClassNotReferringConstructor.js | 6 +- .../reference/classExtendsEveryObjectType.js | 6 +- .../reference/classExtendsEveryObjectType2.js | 6 +- .../reference/classExtendsInterface.js | 6 +- .../classExtendsInterfaceInExpression.js | 6 +- .../classExtendsInterfaceInModule.js | 6 +- .../baselines/reference/classExtendsItself.js | 6 +- .../reference/classExtendsItselfIndirectly.js | 6 +- .../classExtendsItselfIndirectly2.js | 6 +- .../classExtendsItselfIndirectly3.js | 36 +- .../classExtendsMultipleBaseClasses.js | 6 +- tests/baselines/reference/classExtendsNull.js | 6 +- ...classExtendsShadowedConstructorFunction.js | 6 +- .../classExtendsValidConstructorFunction.js | 6 +- .../classHeritageWithTrailingSeparator.js | 6 +- .../reference/classImplementsClass2.js | 6 +- .../reference/classImplementsClass3.js | 6 +- .../reference/classImplementsClass4.js | 6 +- .../reference/classImplementsClass5.js | 6 +- .../reference/classImplementsClass6.js | 6 +- tests/baselines/reference/classIndexer3.js | 6 +- tests/baselines/reference/classInheritence.js | 6 +- .../reference/classIsSubtypeOfBaseType.js | 6 +- tests/baselines/reference/classOrder2.js | 6 +- tests/baselines/reference/classOrderBug.js | 6 +- .../reference/classSideInheritance1.js | 6 +- .../reference/classSideInheritance2.js | 6 +- .../reference/classSideInheritance3.js | 6 +- tests/baselines/reference/classUpdateTests.js | 6 +- .../classWithBaseClassButNoConstructor.js | 6 +- .../reference/classWithConstructors.js | 6 +- .../reference/classWithProtectedProperty.js | 6 +- .../reference/classWithStaticMembers.js | 6 +- tests/baselines/reference/classdecl.js | 6 +- .../reference/clodulesDerivedClasses.js | 6 +- ...llisionSuperAndLocalFunctionInAccessors.js | 6 +- ...isionSuperAndLocalFunctionInConstructor.js | 6 +- .../collisionSuperAndLocalFunctionInMethod.js | 6 +- ...ollisionSuperAndLocalFunctionInProperty.js | 6 +- .../collisionSuperAndLocalVarInAccessors.js | 6 +- .../collisionSuperAndLocalVarInConstructor.js | 6 +- .../collisionSuperAndLocalVarInMethod.js | 6 +- .../collisionSuperAndLocalVarInProperty.js | 6 +- .../collisionSuperAndNameResolution.js | 6 +- .../reference/collisionSuperAndParameter.js | 6 +- .../reference/collisionSuperAndParameter1.js | 6 +- ...perAndPropertyNameAsConstuctorParameter.js | 6 +- ...xpressionAndLocalVarWithSuperExperssion.js | 6 +- .../reference/commentsInheritance.js | 6 +- .../comparisonOperatorWithIdenticalObjects.js | 6 +- ...ithNoRelationshipObjectsOnCallSignature.js | 6 +- ...lationshipObjectsOnConstructorSignature.js | 6 +- ...thNoRelationshipObjectsOnIndexSignature.js | 6 +- ...nshipObjectsOnInstantiatedCallSignature.js | 6 +- ...jectsOnInstantiatedConstructorSignature.js | 6 +- ...peratorWithSubtypeObjectOnCallSignature.js | 6 +- ...WithSubtypeObjectOnConstructorSignature.js | 6 +- ...eratorWithSubtypeObjectOnIndexSignature.js | 6 +- ...ubtypeObjectOnInstantiatedCallSignature.js | 6 +- ...bjectOnInstantiatedConstructorSignature.js | 6 +- ...isonOperatorWithSubtypeObjectOnProperty.js | 6 +- .../reference/complexClassRelationships.js | 6 +- ...catedGenericRecursiveBaseClassReference.js | 6 +- .../reference/compoundAssignmentLHSIsValue.js | 6 +- ...poundExponentiationAssignmentLHSIsValue.js | 6 +- .../reference/computedPropertyNames24_ES5.js | 6 +- .../reference/computedPropertyNames25_ES5.js | 6 +- .../reference/computedPropertyNames26_ES5.js | 6 +- .../reference/computedPropertyNames27_ES5.js | 6 +- .../reference/computedPropertyNames28_ES5.js | 6 +- .../reference/computedPropertyNames30_ES5.js | 6 +- .../reference/computedPropertyNames31_ES5.js | 6 +- .../reference/computedPropertyNames43_ES5.js | 6 +- .../reference/computedPropertyNames44_ES5.js | 6 +- .../reference/computedPropertyNames45_ES5.js | 6 +- .../conditionalOperatorWithIdenticalBCT.js | 6 +- .../conditionalOperatorWithoutIdenticalBCT.js | 6 +- .../reference/constantOverloadFunction.js | 6 +- .../constantOverloadFunctionNoSubtypeError.js | 6 +- ...nstraintCheckInGenericBaseTypeReference.js | 6 +- ...uctSignatureAssignabilityInInheritance2.js | 6 +- ...uctSignatureAssignabilityInInheritance3.js | 6 +- ...uctSignatureAssignabilityInInheritance4.js | 6 +- ...uctSignatureAssignabilityInInheritance5.js | 6 +- ...uctSignatureAssignabilityInInheritance6.js | 6 +- tests/baselines/reference/constructorArgs.js | 6 +- ...uctorFunctionTypeIsAssignableToBaseType.js | 6 +- ...ctorFunctionTypeIsAssignableToBaseType2.js | 6 +- .../constructorHasPrototypeProperty.js | 6 +- .../reference/constructorOverloads2.js | 6 +- .../reference/constructorOverloads3.js | 6 +- .../reference/constructorWithCapturedSuper.js | 6 +- ...constructorWithIncompleteTypeAnnotation.js | 6 +- .../contextualTypingArrayOfLambdas.js | 6 +- ...contextualTypingOfConditionalExpression.js | 6 +- ...ontextualTypingOfConditionalExpression2.js | 6 +- ...urcePropertyIsRelatableToTargetProperty.js | 6 +- .../reference/declFileClassExtendsNull.js | 6 +- .../declFileForFunctionTypeAsTypeParameter.js | 6 +- ...ileGenericClassWithGenericExtendedClass.js | 6 +- .../reference/declFileGenericType.js | 6 +- .../reference/declFileGenericType2.js | 6 +- ...lictingWithClassReferredByExtendsClause.js | 6 +- ...dsClauseThatHasItsContainerNameConflict.js | 6 +- .../declarationEmitExpressionInExtends.js | 6 +- .../declarationEmitExpressionInExtends2.js | 6 +- .../declarationEmitExpressionInExtends3.js | 6 +- .../declarationEmitExpressionInExtends4.js | 6 +- .../declarationEmitNameConflicts3.js | 6 +- .../declarationEmitProtectedMembers.js | 6 +- .../declarationEmitThisPredicates01.js | 6 +- ...tionEmitThisPredicatesWithPrivateName01.js | 6 +- .../reference/declareDottedExtend.js | 6 +- .../reference/decoratorOnClassConstructor2.js | 6 +- .../reference/decoratorOnClassConstructor3.js | 6 +- .../reference/decoratorOnClassMethod12.js | 6 +- ...edClassConstructorWithExplicitReturns01.js | 6 +- ...assConstructorWithExplicitReturns01.js.map | 2 +- ...tructorWithExplicitReturns01.sourcemap.txt | 268 +++--- ...derivedClassConstructorWithoutSuperCall.js | 6 +- ...ClassFunctionOverridesBaseClassAccessor.js | 6 +- .../derivedClassIncludesInheritedMembers.js | 6 +- ...idesIndexersWithAssignmentCompatibility.js | 6 +- .../derivedClassOverridesPrivateFunction1.js | 6 +- .../derivedClassOverridesPrivates.js | 6 +- .../derivedClassOverridesProtectedMembers.js | 6 +- .../derivedClassOverridesProtectedMembers2.js | 6 +- .../derivedClassOverridesProtectedMembers3.js | 6 +- .../derivedClassOverridesProtectedMembers4.js | 6 +- .../derivedClassOverridesPublicMembers.js | 6 +- .../derivedClassOverridesWithoutSubtype.js | 6 +- .../derivedClassParameterProperties.js | 6 +- ...dClassSuperCallsInNonConstructorMembers.js | 6 +- .../derivedClassSuperCallsWithThisArg.js | 6 +- .../reference/derivedClassTransitivity.js | 6 +- .../reference/derivedClassTransitivity2.js | 6 +- .../reference/derivedClassTransitivity3.js | 6 +- .../reference/derivedClassTransitivity4.js | 6 +- .../reference/derivedClassWithAny.js | 6 +- ...ivateInstanceShadowingProtectedInstance.js | 6 +- ...hPrivateInstanceShadowingPublicInstance.js | 6 +- ...thPrivateStaticShadowingProtectedStatic.js | 6 +- ...sWithPrivateStaticShadowingPublicStatic.js | 6 +- .../derivedClassWithoutExplicitConstructor.js | 6 +- ...derivedClassWithoutExplicitConstructor2.js | 6 +- ...derivedClassWithoutExplicitConstructor3.js | 6 +- tests/baselines/reference/derivedClasses.js | 6 +- .../reference/derivedGenericClassWithAny.js | 6 +- ...sesHiddenBaseCallViaSuperPropertyAccess.js | 6 +- .../derivedTypeDoesNotRequireExtendsClause.js | 6 +- .../destructuringParameterDeclaration5.js | 6 +- ...BeforeEmitParameterPropertyDeclaration1.js | 6 +- ...SuperCallBeforeEmitPropertyDeclaration1.js | 6 +- ...arationAndParameterPropertyDeclaration1.js | 6 +- .../reference/emitThisInSuperMethodCall.js | 6 +- tests/baselines/reference/emptyModuleName.js | 6 +- ...rorForwardReferenceForwadingConstructor.js | 6 +- tests/baselines/reference/errorSuperCalls.js | 6 +- .../reference/errorSuperPropertyAccess.js | 6 +- .../reference/errorsInGenericTypeReference.js | 6 +- .../reference/es6ClassSuperCodegenBug.js | 6 +- tests/baselines/reference/es6ClassTest.js | 6 +- tests/baselines/reference/es6ClassTest2.js | 6 +- tests/baselines/reference/es6ClassTest7.js | 6 +- .../exportAssignmentOfGenericType1.js | 6 +- .../exportDeclarationInInternalModule.js | 6 +- tests/baselines/reference/extBaseClass1.js | 6 +- tests/baselines/reference/extBaseClass2.js | 6 +- .../extendAndImplementTheSameBaseType.js | 6 +- .../extendAndImplementTheSameBaseType2.js | 6 +- .../extendBaseClassBeforeItsDeclared.js | 6 +- .../extendClassExpressionFromModule.js | 6 +- .../extendConstructSignatureInInterface.js | 6 +- .../reference/extendNonClassSymbol1.js | 6 +- .../reference/extendNonClassSymbol2.js | 6 +- .../extendPrivateConstructorClass.js | 6 +- ...xtendingClassFromAliasAndUsageInIndexer.js | 12 +- .../reference/extendsClauseAlreadySeen.js | 6 +- .../reference/extendsClauseAlreadySeen2.js | 6 +- tests/baselines/reference/fluentClasses.js | 6 +- tests/baselines/reference/for-inStatements.js | 6 +- .../reference/for-inStatementsInvalid.js | 6 +- .../forStatementsMultipleInvalidDecl.js | 6 +- .../reference/functionImplementationErrors.js | 6 +- .../reference/functionImplementations.js | 6 +- .../reference/functionSubtypingOfVarArgs.js | 6 +- .../reference/functionSubtypingOfVarArgs2.js | 6 +- .../reference/generatedContextualTyping.js | 6 +- .../genericBaseClassLiteralProperty.js | 6 +- .../genericBaseClassLiteralProperty2.js | 6 +- ...allWithConstraintsTypeArgumentInference.js | 6 +- .../genericCallWithObjectTypeArgs2.js | 6 +- ...icCallWithObjectTypeArgsAndConstraints2.js | 6 +- ...icCallWithObjectTypeArgsAndConstraints3.js | 6 +- .../genericCallbacksAndClassHierarchy.js | 6 +- .../genericClassExpressionInFunction.js | 6 +- ...sInheritsConstructorFromNonGenericClass.js | 6 +- ...cClassPropertyInheritanceSpecialization.js | 6 +- .../reference/genericClassStaticMethod.js | 6 +- tests/baselines/reference/genericClasses3.js | 6 +- ...genericConstraintOnExtendedBuiltinTypes.js | 6 +- ...enericConstraintOnExtendedBuiltinTypes2.js | 6 +- .../genericDerivedTypeWithSpecializedBase.js | 6 +- .../genericDerivedTypeWithSpecializedBase2.js | 6 +- .../genericInheritedDefaultConstructors.js | 6 +- .../reference/genericPrototypeProperty2.js | 6 +- .../reference/genericPrototypeProperty3.js | 6 +- ...ericRecursiveImplicitConstructorErrors2.js | 6 +- ...ericRecursiveImplicitConstructorErrors3.js | 6 +- .../reference/genericTypeAssertions2.js | 6 +- .../reference/genericTypeAssertions4.js | 6 +- .../reference/genericTypeAssertions6.js | 6 +- .../reference/genericTypeConstraints.js | 6 +- ...genericTypeReferenceWithoutTypeArgument.js | 6 +- ...enericTypeReferenceWithoutTypeArgument2.js | 6 +- .../genericWithIndexerOfTypeParameterType2.js | 6 +- .../reference/heterogeneousArrayLiterals.js | 6 +- .../reference/ifDoWhileStatements.js | 6 +- .../illegalSuperCallsInConstructor.js | 6 +- .../implementClausePrecedingExtends.js | 6 +- ...gAnInterfaceExtendingClassWithPrivates2.js | 6 +- ...AnInterfaceExtendingClassWithProtecteds.js | 6 +- .../baselines/reference/importAsBaseClass.js | 6 +- tests/baselines/reference/importHelpers.js | 6 +- .../reference/importHelpersNoHelpers.js | 6 +- .../reference/importHelpersNoModule.js | 6 +- .../reference/importShadowsGlobalName.js | 6 +- .../reference/importUsedInExtendsList1.js | 6 +- .../reference/indexerConstraints2.js | 6 +- .../reference/indirectSelfReference.js | 6 +- .../reference/indirectSelfReferenceGeneric.js | 6 +- .../infinitelyExpandingTypesNonGenericBase.js | 6 +- .../inheritFromGenericTypeParameter.js | 6 +- ...SameNamePrivatePropertiesFromSameOrigin.js | 6 +- tests/baselines/reference/inheritance.js | 6 +- tests/baselines/reference/inheritance1.js | 6 +- ...itanceGrandParentPrivateMemberCollision.js | 6 +- ...tPrivateMemberCollisionWithPublicMember.js | 6 +- ...tPublicMemberCollisionWithPrivateMember.js | 6 +- ...ritanceMemberAccessorOverridingAccessor.js | 6 +- ...heritanceMemberAccessorOverridingMethod.js | 6 +- ...ritanceMemberAccessorOverridingProperty.js | 6 +- ...inheritanceMemberFuncOverridingAccessor.js | 6 +- .../inheritanceMemberFuncOverridingMethod.js | 6 +- ...inheritanceMemberFuncOverridingProperty.js | 6 +- ...ritanceMemberPropertyOverridingAccessor.js | 6 +- ...heritanceMemberPropertyOverridingMethod.js | 6 +- ...ritanceMemberPropertyOverridingProperty.js | 6 +- .../inheritanceOfGenericConstructorMethod1.js | 6 +- .../inheritanceOfGenericConstructorMethod2.js | 6 +- ...ritanceStaticAccessorOverridingAccessor.js | 6 +- ...heritanceStaticAccessorOverridingMethod.js | 6 +- ...ritanceStaticAccessorOverridingProperty.js | 6 +- ...inheritanceStaticFuncOverridingAccessor.js | 6 +- ...eStaticFuncOverridingAccessorOfFuncType.js | 6 +- .../inheritanceStaticFuncOverridingMethod.js | 6 +- ...inheritanceStaticFuncOverridingProperty.js | 6 +- ...eStaticFuncOverridingPropertyOfFuncType.js | 6 +- ...taticFunctionOverridingInstanceProperty.js | 6 +- .../inheritanceStaticMembersCompatible.js | 6 +- .../inheritanceStaticMembersIncompatible.js | 6 +- ...ritanceStaticPropertyOverridingAccessor.js | 6 +- ...heritanceStaticPropertyOverridingMethod.js | 6 +- ...ritanceStaticPropertyOverridingProperty.js | 6 +- .../inheritedConstructorWithRestParams.js | 6 +- .../inheritedConstructorWithRestParams2.js | 6 +- .../inheritedModuleMembersForClodule.js | 6 +- .../reference/instanceOfAssignability.js | 6 +- ...nstancePropertiesInheritedIntoClassType.js | 6 +- .../reference/instanceSubtypeCheck2.js | 6 +- ...nstanceofWithStructurallyIdenticalTypes.js | 6 +- .../instantiatedReturnTypeContravariance.js | 6 +- .../reference/interfaceClassMerging.js | 6 +- .../reference/interfaceClassMerging2.js | 6 +- .../reference/interfaceExtendsClass1.js | 6 +- .../interfaceExtendsClassWithPrivate1.js | 6 +- .../interfaceExtendsClassWithPrivate2.js | 6 +- .../reference/interfaceImplementation8.js | 6 +- .../invalidModuleWithStatementsOfEveryKind.js | 6 +- .../invalidMultipleVariableDeclarations.js | 6 +- .../reference/invalidReturnStatements.js | 6 +- .../isolatedModulesImportExportElision.js | 6 +- tests/baselines/reference/jsxViaImport.js | 6 +- .../reference/keyofAndIndexedAccess.js | 6 +- tests/baselines/reference/lambdaArgCrash.js | 6 +- tests/baselines/reference/lift.js | 6 +- tests/baselines/reference/localTypes1.js | 6 +- tests/baselines/reference/m7Bugs.js | 6 +- .../reference/mergedDeclarations5.js | 6 +- .../reference/mergedDeclarations6.js | 6 +- .../mergedInheritedClassInterface.js | 6 +- .../mergedInterfacesWithInheritedPrivates2.js | 6 +- .../mergedInterfacesWithInheritedPrivates3.js | 6 +- .../missingPropertiesOfClassExpression.js | 6 +- tests/baselines/reference/moduleAsBaseType.js | 6 +- .../moduleImportedForTypeArgumentPosition.js | 6 +- .../moduleWithStatementsOfEveryKind.js | 6 +- .../reference/multipleInheritance.js | 6 +- .../mutuallyRecursiveGenericBaseTypes2.js | 6 +- .../noImplicitAnyMissingGetAccessor.js | 6 +- .../noImplicitAnyMissingSetAccessor.js | 6 +- ...enericClassExtendingGenericClassWithAny.js | 6 +- ...cIndexerConstrainsPropertyDeclarations2.js | 6 +- .../reference/numericIndexerConstraint3.js | 6 +- .../reference/numericIndexerConstraint4.js | 6 +- .../reference/numericIndexerTyping2.js | 6 +- ...objectCreationOfElementAccessExpression.js | 6 +- ...objectTypeHidingMembersOfExtendedObject.js | 6 +- ...objectTypesIdentityWithNumericIndexers1.js | 6 +- ...objectTypesIdentityWithNumericIndexers2.js | 6 +- ...objectTypesIdentityWithNumericIndexers3.js | 6 +- .../objectTypesIdentityWithPrivates.js | 6 +- .../objectTypesIdentityWithPrivates2.js | 6 +- .../objectTypesIdentityWithPrivates3.js | 6 +- .../objectTypesIdentityWithStringIndexers.js | 6 +- .../objectTypesIdentityWithStringIndexers2.js | 6 +- .../optionalConstructorArgInSuper.js | 6 +- tests/baselines/reference/optionalMethods.js | 6 +- .../reference/optionalParamArgsTest.js | 6 +- .../reference/optionalParamInOverride.js | 6 +- .../reference/optionalParameterProperty.js | 6 +- .../baselines/reference/outModuleConcatAmd.js | 6 +- .../reference/outModuleConcatAmd.js.map | 2 +- .../outModuleConcatAmd.sourcemap.txt | 62 +- .../reference/outModuleConcatSystem.js | 6 +- .../reference/outModuleConcatSystem.js.map | 2 +- .../outModuleConcatSystem.sourcemap.txt | 62 +- .../reference/outModuleTripleSlashRefs.js | 6 +- .../reference/outModuleTripleSlashRefs.js.map | 2 +- .../outModuleTripleSlashRefs.sourcemap.txt | 90 +- tests/baselines/reference/overload1.js | 6 +- .../overloadOnConstConstraintChecks1.js | 6 +- .../overloadOnConstConstraintChecks2.js | 6 +- .../overloadOnConstConstraintChecks3.js | 6 +- .../overloadOnConstConstraintChecks4.js | 6 +- .../overloadOnConstantsInvalidOverload1.js | 6 +- .../baselines/reference/overloadResolution.js | 6 +- .../overloadResolutionClassConstructors.js | 6 +- .../overloadResolutionConstructors.js | 6 +- .../reference/overloadingOnConstants1.js | 6 +- .../reference/overloadingOnConstants2.js | 6 +- .../overridingPrivateStaticMembers.js | 6 +- .../reference/parseErrorInHeritageClause1.js | 6 +- tests/baselines/reference/parser509630.js | 6 +- tests/baselines/reference/parserAstSpans1.js | 6 +- .../reference/parserClassDeclaration1.js | 6 +- .../reference/parserClassDeclaration3.js | 6 +- .../reference/parserClassDeclaration4.js | 6 +- .../reference/parserClassDeclaration5.js | 6 +- .../reference/parserClassDeclaration6.js | 6 +- ...rrorRecovery_ExtendsOrImplementsClause2.js | 6 +- ...rrorRecovery_ExtendsOrImplementsClause4.js | 6 +- ...rrorRecovery_ExtendsOrImplementsClause5.js | 6 +- .../parserGenericsInTypeContexts1.js | 6 +- .../parserGenericsInTypeContexts2.js | 6 +- .../baselines/reference/parserRealSource10.js | 6 +- .../baselines/reference/parserRealSource11.js | 6 +- tests/baselines/reference/parserharness.js | 6 +- ...artiallyAnnotatedFunctionInferenceError.js | 6 +- ...tatedFunctionInferenceWithTypeParameter.js | 6 +- tests/baselines/reference/primitiveMembers.js | 6 +- tests/baselines/reference/privacyClass.js | 6 +- .../privacyClassExtendsClauseDeclFile.js | 12 +- tests/baselines/reference/privacyGloClass.js | 6 +- .../reference/privateAccessInSubclass1.js | 6 +- .../privateInstanceMemberAccessibility.js | 6 +- ...tedMembersAreNotAccessibleDestructuring.js | 6 +- .../privateStaticMemberAccessibility.js | 6 +- .../privateStaticNotAccessibleInClodule2.js | 6 +- .../amd/testGlo.js | 6 +- .../node/testGlo.js | 6 +- .../reference/project/prologueEmit/amd/out.js | 6 +- .../project/prologueEmit/node/out.js | 6 +- .../amd/m'ain.js | 6 +- .../node/m'ain.js | 6 +- .../reference/propertiesAndIndexers.js | 6 +- tests/baselines/reference/propertyAccess.js | 6 +- ...tyAccessOnTypeParameterWithConstraints2.js | 6 +- ...tyAccessOnTypeParameterWithConstraints3.js | 6 +- ...tyAccessOnTypeParameterWithConstraints5.js | 6 +- ...sPropertyAccessibleWithinNestedSubclass.js | 6 +- ...PropertyAccessibleWithinNestedSubclass1.js | 6 +- ...edClassPropertyAccessibleWithinSubclass.js | 6 +- ...dClassPropertyAccessibleWithinSubclass2.js | 6 +- ...dClassPropertyAccessibleWithinSubclass3.js | 6 +- .../protectedInstanceMemberAccessibility.js | 6 +- tests/baselines/reference/protectedMembers.js | 6 +- ...icClassPropertyAccessibleWithinSubclass.js | 6 +- ...cClassPropertyAccessibleWithinSubclass2.js | 6 +- ...solution-does-not-affect-class-heritage.js | 6 +- .../readonlyConstructorAssignment.js | 6 +- .../reference/recursiveBaseCheck3.js | 6 +- .../reference/recursiveBaseCheck4.js | 6 +- .../reference/recursiveBaseCheck6.js | 6 +- .../recursiveBaseConstructorCreation1.js | 6 +- ...ssInstantiationsWithDefaultConstructors.js | 6 +- .../reference/recursiveClassReferenceTest.js | 6 +- .../recursiveClassReferenceTest.js.map | 2 +- .../recursiveClassReferenceTest.sourcemap.txt | 776 +++++++++--------- .../reference/recursiveComplicatedClasses.js | 6 +- ...sivelySpecializedConstructorDeclaration.js | 6 +- .../reference/reexportClassDefinition.js | 6 +- ...lassDeclarationWhenInBaseTypeResolution.js | 6 +- .../reference/returnInConstructor1.js | 6 +- tests/baselines/reference/returnStatements.js | 6 +- ...peCheckExtendedClassInsidePublicMethod2.js | 6 +- ...peCheckExtendedClassInsideStaticMethod1.js | 6 +- tests/baselines/reference/scopeTests.js | 6 +- .../reference/shadowPrivateMembers.js | 6 +- ...sWithDefaultConstructorAndExtendsClause.js | 6 +- ...hDefaultConstructorAndExtendsClause.js.map | 2 +- ...tConstructorAndExtendsClause.sourcemap.txt | 78 +- .../specializedInheritedConstructors1.js | 6 +- .../specializedOverloadWithRestParameters.js | 6 +- tests/baselines/reference/staticFactory1.js | 6 +- .../baselines/reference/staticInheritance.js | 6 +- .../staticMemberAccessOffDerivedType1.js | 6 +- tests/baselines/reference/staticPropSuper.js | 6 +- .../reference/strictModeInConstructor.js | 6 +- .../reference/strictModeReservedWord.js | 6 +- ...trictModeReservedWordInClassDeclaration.js | 6 +- ...gIndexerConstrainsPropertyDeclarations2.js | 6 +- .../reference/subtypesOfTypeParameter.js | 6 +- .../subtypesOfTypeParameterWithConstraints.js | 6 +- ...subtypesOfTypeParameterWithConstraints4.js | 6 +- ...OfTypeParameterWithRecursiveConstraints.js | 6 +- .../reference/subtypingTransitivity.js | 6 +- .../reference/subtypingWithCallSignatures2.js | 6 +- .../reference/subtypingWithCallSignatures3.js | 6 +- .../reference/subtypingWithCallSignatures4.js | 6 +- .../subtypingWithConstructSignatures2.js | 6 +- .../subtypingWithConstructSignatures3.js | 6 +- .../subtypingWithConstructSignatures4.js | 6 +- .../subtypingWithConstructSignatures5.js | 6 +- .../subtypingWithConstructSignatures6.js | 6 +- .../reference/subtypingWithNumericIndexer.js | 6 +- .../reference/subtypingWithNumericIndexer3.js | 6 +- .../reference/subtypingWithNumericIndexer4.js | 6 +- .../reference/subtypingWithObjectMembers.js | 6 +- .../reference/subtypingWithObjectMembers4.js | 6 +- ...subtypingWithObjectMembersAccessibility.js | 6 +- ...ubtypingWithObjectMembersAccessibility2.js | 6 +- .../reference/subtypingWithStringIndexer.js | 6 +- .../reference/subtypingWithStringIndexer3.js | 6 +- .../reference/subtypingWithStringIndexer4.js | 6 +- tests/baselines/reference/super.js | 6 +- tests/baselines/reference/super1.js | 6 +- tests/baselines/reference/super2.js | 6 +- tests/baselines/reference/superAccess.js | 6 +- tests/baselines/reference/superAccess2.js | 6 +- .../reference/superAccessInFatArrow1.js | 6 +- .../reference/superCallArgsMustMatch.js | 6 +- .../reference/superCallAssignResult.js | 6 +- .../superCallBeforeThisAccessing1.js | 6 +- .../superCallBeforeThisAccessing2.js | 6 +- .../superCallBeforeThisAccessing3.js | 6 +- .../superCallBeforeThisAccessing4.js | 6 +- .../superCallBeforeThisAccessing5.js | 6 +- .../superCallBeforeThisAccessing6.js | 6 +- .../superCallBeforeThisAccessing7.js | 6 +- .../superCallBeforeThisAccessing8.js | 6 +- ...allFromClassThatDerivesFromGenericType1.js | 6 +- ...allFromClassThatDerivesFromGenericType2.js | 6 +- ...eButWithIncorrectNumberOfTypeArguments1.js | 6 +- ...sFromGenericTypeButWithNoTypeArguments1.js | 6 +- ...ivesNonGenericTypeButWithTypeArguments1.js | 6 +- .../reference/superCallInNonStaticMethod.js | 6 +- .../reference/superCallInStaticMethod.js | 6 +- .../superCallInsideClassDeclaration.js | 6 +- .../superCallInsideClassExpression.js | 6 +- .../superCallInsideObjectLiteralExpression.js | 6 +- .../reference/superCallOutsideConstructor.js | 6 +- .../superCallParameterContextualTyping1.js | 6 +- .../superCallParameterContextualTyping2.js | 6 +- .../superCallParameterContextualTyping3.js | 6 +- .../reference/superCallWithCommentEmit01.js | 6 +- .../superCallWithMissingBaseClass.js | 6 +- tests/baselines/reference/superCalls.js | 6 +- .../reference/superCallsInConstructor.js | 6 +- tests/baselines/reference/superErrors.js | 6 +- .../baselines/reference/superInCatchBlock1.js | 6 +- .../reference/superInConstructorParam1.js | 6 +- tests/baselines/reference/superInLambdas.js | 6 +- .../reference/superInObjectLiterals_ES5.js | 6 +- tests/baselines/reference/superNewCall1.js | 6 +- .../reference/superPropertyAccess.js | 6 +- .../reference/superPropertyAccess1.js | 6 +- .../reference/superPropertyAccess2.js | 6 +- ...essInComputedPropertiesOfNestedType_ES5.js | 6 +- .../reference/superPropertyAccessNoError.js | 6 +- .../reference/superPropertyAccess_ES5.js | 6 +- .../reference/superSymbolIndexedAccess5.js | 6 +- .../reference/superSymbolIndexedAccess6.js | 6 +- .../superWithGenericSpecialization.js | 6 +- .../baselines/reference/superWithGenerics.js | 6 +- .../reference/superWithTypeArgument.js | 6 +- .../reference/superWithTypeArgument2.js | 6 +- .../reference/superWithTypeArgument3.js | 6 +- ...side-object-literal-getters-and-setters.js | 6 +- tests/baselines/reference/switchStatements.js | 6 +- .../reference/systemModuleWithSuperClass.js | 6 +- .../reference/targetTypeBaseCalls.js | 6 +- .../reference/thisInInvalidContexts.js | 6 +- .../thisInInvalidContextsExternalModule.js | 6 +- tests/baselines/reference/thisInSuperCall.js | 6 +- tests/baselines/reference/thisInSuperCall1.js | 6 +- tests/baselines/reference/thisInSuperCall2.js | 6 +- tests/baselines/reference/thisInSuperCall3.js | 6 +- .../reference/thisTypeInFunctions.js | 6 +- .../reference/thisTypeInFunctionsNegative.js | 6 +- .../tsxCorrectlyParseLessThanComparison1.js | 6 +- .../baselines/reference/tsxDynamicTagName5.js | 6 +- .../baselines/reference/tsxDynamicTagName7.js | 6 +- .../baselines/reference/tsxDynamicTagName8.js | 6 +- .../baselines/reference/tsxDynamicTagName9.js | 6 +- .../reference/tsxExternalModuleEmit1.js | 12 +- .../tsxStatelessFunctionComponents2.js | 6 +- .../reference/tsxUnionTypeComponent1.js | 6 +- tests/baselines/reference/typeAssertions.js | 6 +- .../baselines/reference/typeGuardFunction.js | 6 +- .../reference/typeGuardFunctionErrors.js | 6 +- .../reference/typeGuardFunctionGenerics.js | 6 +- .../reference/typeGuardFunctionOfFormThis.js | 6 +- .../typeGuardFunctionOfFormThisErrors.js | 6 +- .../reference/typeGuardOfFormInstanceOf.js | 6 +- .../reference/typeGuardOfFormIsType.js | 6 +- .../reference/typeGuardOfFormThisMember.js | 6 +- .../typeGuardOfFormThisMemberErrors.js | 6 +- tests/baselines/reference/typeMatch2.js | 6 +- tests/baselines/reference/typeOfSuperCall.js | 6 +- .../reference/typeParameterAsBaseClass.js | 6 +- .../reference/typeParameterAsBaseType.js | 6 +- .../reference/typeParameterExtendingUnion1.js | 6 +- .../reference/typeParameterExtendingUnion2.js | 6 +- .../baselines/reference/typeRelationships.js | 6 +- .../baselines/reference/typeValueConflict1.js | 6 +- .../baselines/reference/typeValueConflict2.js | 6 +- tests/baselines/reference/typeofClass2.js | 6 +- .../typesWithSpecializedCallSignatures.js | 6 +- ...typesWithSpecializedConstructSignatures.js | 6 +- tests/baselines/reference/undeclaredBase.js | 6 +- .../undefinedIsSubtypeOfEverything.js | 6 +- .../baselines/reference/underscoreMapFirst.js | 6 +- .../underscoreThisInDerivedClass01.js | 6 +- .../underscoreThisInDerivedClass02.js | 6 +- .../reference/unionTypeEquivalence.js | 6 +- .../reference/unionTypeFromArrayLiteral.js | 6 +- .../reference/unionTypesAssignability.js | 6 +- tests/baselines/reference/unknownSymbols1.js | 6 +- .../reference/unspecializedConstraints.js | 6 +- ...untypedFunctionCallsWithTypeParameters1.js | 6 +- .../reference/unusedClassesinNamespace4.js | 6 +- .../unusedIdentifiersConsolidated1.js | 6 +- .../reference/validUseOfThisInSuper.js | 6 +- .../reference/varArgsOnConstructorTypes.js | 6 +- 666 files changed, 4006 insertions(+), 1326 deletions(-) diff --git a/src/compiler/transformers/es2015.ts b/src/compiler/transformers/es2015.ts index 5dc78701316..fff52a8705e 100644 --- a/src/compiler/transformers/es2015.ts +++ b/src/compiler/transformers/es2015.ts @@ -3338,7 +3338,11 @@ namespace ts { priority: 0, text: ` var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); };` diff --git a/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js b/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js index b15cd7f6eb7..fb158c687ba 100644 --- a/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js +++ b/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js @@ -22,7 +22,11 @@ module A { //// [ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js b/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js index 955adc72817..ec67e66bd3f 100644 --- a/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js +++ b/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js @@ -26,7 +26,11 @@ module A { //// [ExportClassWithInaccessibleTypeInTypeParameterConstraint.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/abstractClassInLocalScope.js b/tests/baselines/reference/abstractClassInLocalScope.js index b413326e26a..8e16f9ccc29 100644 --- a/tests/baselines/reference/abstractClassInLocalScope.js +++ b/tests/baselines/reference/abstractClassInLocalScope.js @@ -9,7 +9,11 @@ //// [abstractClassInLocalScope.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js b/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js index f143171b54c..40eae697b44 100644 --- a/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js +++ b/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js @@ -9,7 +9,11 @@ //// [abstractClassInLocalScopeIsAbstract.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/abstractProperty.js b/tests/baselines/reference/abstractProperty.js index 12735de42cb..900f7aebcdd 100644 --- a/tests/baselines/reference/abstractProperty.js +++ b/tests/baselines/reference/abstractProperty.js @@ -23,7 +23,11 @@ class C extends B { //// [abstractProperty.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/abstractPropertyNegative.js b/tests/baselines/reference/abstractPropertyNegative.js index eaad20d1804..fa137057be4 100644 --- a/tests/baselines/reference/abstractPropertyNegative.js +++ b/tests/baselines/reference/abstractPropertyNegative.js @@ -45,7 +45,11 @@ abstract class AbstractAccessorMismatch { //// [abstractPropertyNegative.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/accessOverriddenBaseClassMember1.js b/tests/baselines/reference/accessOverriddenBaseClassMember1.js index 2d06be8df96..b468f1307df 100644 --- a/tests/baselines/reference/accessOverriddenBaseClassMember1.js +++ b/tests/baselines/reference/accessOverriddenBaseClassMember1.js @@ -17,7 +17,11 @@ class ColoredPoint extends Point { //// [accessOverriddenBaseClassMember1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/accessors_spec_section-4.5_inference.js b/tests/baselines/reference/accessors_spec_section-4.5_inference.js index eddb75c2666..aacadd6589f 100644 --- a/tests/baselines/reference/accessors_spec_section-4.5_inference.js +++ b/tests/baselines/reference/accessors_spec_section-4.5_inference.js @@ -26,7 +26,11 @@ class LanguageSpec_section_4_5_inference { //// [accessors_spec_section-4.5_inference.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInAccessorsOfClass.js b/tests/baselines/reference/aliasUsageInAccessorsOfClass.js index 817e589d995..df8662ac8cf 100644 --- a/tests/baselines/reference/aliasUsageInAccessorsOfClass.js +++ b/tests/baselines/reference/aliasUsageInAccessorsOfClass.js @@ -38,7 +38,11 @@ exports.Model = Model; //// [aliasUsage1_moduleA.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInArray.js b/tests/baselines/reference/aliasUsageInArray.js index e0d30fb608b..a8606050394 100644 --- a/tests/baselines/reference/aliasUsageInArray.js +++ b/tests/baselines/reference/aliasUsageInArray.js @@ -32,7 +32,11 @@ exports.Model = Model; //// [aliasUsageInArray_moduleA.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInFunctionExpression.js b/tests/baselines/reference/aliasUsageInFunctionExpression.js index 35bf66fed02..2ce51261eaa 100644 --- a/tests/baselines/reference/aliasUsageInFunctionExpression.js +++ b/tests/baselines/reference/aliasUsageInFunctionExpression.js @@ -31,7 +31,11 @@ exports.Model = Model; //// [aliasUsageInFunctionExpression_moduleA.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInGenericFunction.js b/tests/baselines/reference/aliasUsageInGenericFunction.js index 373aa0c3b40..8e69665b03c 100644 --- a/tests/baselines/reference/aliasUsageInGenericFunction.js +++ b/tests/baselines/reference/aliasUsageInGenericFunction.js @@ -35,7 +35,11 @@ exports.Model = Model; //// [aliasUsageInGenericFunction_moduleA.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInIndexerOfClass.js b/tests/baselines/reference/aliasUsageInIndexerOfClass.js index 9769a4b005f..cf96549def6 100644 --- a/tests/baselines/reference/aliasUsageInIndexerOfClass.js +++ b/tests/baselines/reference/aliasUsageInIndexerOfClass.js @@ -37,7 +37,11 @@ exports.Model = Model; //// [aliasUsageInIndexerOfClass_moduleA.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInObjectLiteral.js b/tests/baselines/reference/aliasUsageInObjectLiteral.js index 2f4abf75161..d660bf2db67 100644 --- a/tests/baselines/reference/aliasUsageInObjectLiteral.js +++ b/tests/baselines/reference/aliasUsageInObjectLiteral.js @@ -32,7 +32,11 @@ exports.Model = Model; //// [aliasUsageInObjectLiteral_moduleA.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInOrExpression.js b/tests/baselines/reference/aliasUsageInOrExpression.js index c4902a1b894..e81917ed8a3 100644 --- a/tests/baselines/reference/aliasUsageInOrExpression.js +++ b/tests/baselines/reference/aliasUsageInOrExpression.js @@ -35,7 +35,11 @@ exports.Model = Model; //// [aliasUsageInOrExpression_moduleA.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js b/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js index c79f820b106..ee4a62008b1 100644 --- a/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js +++ b/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js @@ -35,7 +35,11 @@ exports.Model = Model; //// [aliasUsageInTypeArgumentOfExtendsClause_moduleA.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -51,7 +55,11 @@ exports.VisualizationModel = VisualizationModel; //// [aliasUsageInTypeArgumentOfExtendsClause_main.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInVarAssignment.js b/tests/baselines/reference/aliasUsageInVarAssignment.js index 87c41811d4a..83c9bf080be 100644 --- a/tests/baselines/reference/aliasUsageInVarAssignment.js +++ b/tests/baselines/reference/aliasUsageInVarAssignment.js @@ -31,7 +31,11 @@ exports.Model = Model; //// [aliasUsageInVarAssignment_moduleA.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/ambiguousOverloadResolution.js b/tests/baselines/reference/ambiguousOverloadResolution.js index 9b141141862..319d3a75d01 100644 --- a/tests/baselines/reference/ambiguousOverloadResolution.js +++ b/tests/baselines/reference/ambiguousOverloadResolution.js @@ -10,7 +10,11 @@ var t: number = f(x, x); // Not an error //// [ambiguousOverloadResolution.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/apparentTypeSubtyping.js b/tests/baselines/reference/apparentTypeSubtyping.js index dc30b51a448..8cc81a46cd7 100644 --- a/tests/baselines/reference/apparentTypeSubtyping.js +++ b/tests/baselines/reference/apparentTypeSubtyping.js @@ -25,7 +25,11 @@ class Derived2 extends Base2 { // error because of the prototy // subtype checks use the apparent type of the target type // S is a subtype of a type T, and T is a supertype of S, if one of the following is true, where S' denotes the apparent type (section 3.8.1) of S: var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/apparentTypeSupertype.js b/tests/baselines/reference/apparentTypeSupertype.js index bb002a9798d..ba5d63e3579 100644 --- a/tests/baselines/reference/apparentTypeSupertype.js +++ b/tests/baselines/reference/apparentTypeSupertype.js @@ -15,7 +15,11 @@ class Derived extends Base { // error // subtype checks use the apparent type of the target type // S is a subtype of a type T, and T is a supertype of S, if one of the following is true, where S' denotes the apparent type (section 3.8.1) of S: var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/arrayAssignmentTest1.js b/tests/baselines/reference/arrayAssignmentTest1.js index 410fb80b323..ac8ada2d86f 100644 --- a/tests/baselines/reference/arrayAssignmentTest1.js +++ b/tests/baselines/reference/arrayAssignmentTest1.js @@ -87,7 +87,11 @@ arr_any = i1; // should be an error - is //// [arrayAssignmentTest1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/arrayAssignmentTest2.js b/tests/baselines/reference/arrayAssignmentTest2.js index e051b8187cf..a112a5a7a90 100644 --- a/tests/baselines/reference/arrayAssignmentTest2.js +++ b/tests/baselines/reference/arrayAssignmentTest2.js @@ -61,7 +61,11 @@ arr_any = i1; // should be an error - is //// [arrayAssignmentTest2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/arrayBestCommonTypes.js b/tests/baselines/reference/arrayBestCommonTypes.js index acaa6c76ffc..9ce41a2563a 100644 --- a/tests/baselines/reference/arrayBestCommonTypes.js +++ b/tests/baselines/reference/arrayBestCommonTypes.js @@ -109,7 +109,11 @@ module NonEmptyTypes { //// [arrayBestCommonTypes.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/arrayLiteralTypeInference.js b/tests/baselines/reference/arrayLiteralTypeInference.js index d836e0afe1d..a14277c795b 100644 --- a/tests/baselines/reference/arrayLiteralTypeInference.js +++ b/tests/baselines/reference/arrayLiteralTypeInference.js @@ -53,7 +53,11 @@ var z3: { id: number }[] = //// [arrayLiteralTypeInference.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/arrayLiterals.js b/tests/baselines/reference/arrayLiterals.js index 5e57d827c72..1e5dcd2e45e 100644 --- a/tests/baselines/reference/arrayLiterals.js +++ b/tests/baselines/reference/arrayLiterals.js @@ -39,7 +39,11 @@ var context4: Base[] = [new Derived1(), new Derived1()]; //// [arrayLiterals.js] // Empty array literal with no contextual type has type Undefined[] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js b/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js index 5b8237c2556..e6e097c8b44 100644 --- a/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js +++ b/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js @@ -27,7 +27,11 @@ var as = [list, myDerivedList]; // List[] //// [arrayLiteralsWithRecursiveGenerics.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js b/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js index 6fecfadd07b..701811e33de 100644 --- a/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js +++ b/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js @@ -21,7 +21,11 @@ rrb = cra; // error: 'A' is not assignable to 'B' //// [arrayOfSubtypeIsAssignableToReadonlyArray.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/arrowFunctionContexts.js b/tests/baselines/reference/arrowFunctionContexts.js index 7075cdc0a58..e425ebf9337 100644 --- a/tests/baselines/reference/arrowFunctionContexts.js +++ b/tests/baselines/reference/arrowFunctionContexts.js @@ -98,7 +98,11 @@ var asserted2: any; //// [arrowFunctionContexts.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures3.js b/tests/baselines/reference/assignmentCompatWithCallSignatures3.js index d4761781bd3..f241b28597d 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures3.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures3.js @@ -102,7 +102,11 @@ b18 = a18; // ok //// [assignmentCompatWithCallSignatures3.js] // these are all permitted with the current rules, since we do not do contextual signature instantiation var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures4.js b/tests/baselines/reference/assignmentCompatWithCallSignatures4.js index 1a3d939ba23..eade43f4dc8 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures4.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures4.js @@ -101,7 +101,11 @@ module Errors { //// [assignmentCompatWithCallSignatures4.js] // These are mostly permitted with the current loose rules. All ok unless otherwise noted. var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures5.js b/tests/baselines/reference/assignmentCompatWithCallSignatures5.js index 8d33f3565bf..36a024cbd3f 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures5.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures5.js @@ -68,7 +68,11 @@ b18 = a18; // ok //// [assignmentCompatWithCallSignatures5.js] // checking assignment compat for function types. No errors in this file var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures6.js b/tests/baselines/reference/assignmentCompatWithCallSignatures6.js index 5949ad582fa..eb727863c77 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures6.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures6.js @@ -45,7 +45,11 @@ b16 = x.a16; //// [assignmentCompatWithCallSignatures6.js] // checking assignment compatibility relations for function types. All valid var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js index 97da2c58848..bff2b84f273 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js @@ -102,7 +102,11 @@ b18 = a18; // ok //// [assignmentCompatWithConstructSignatures3.js] // checking assignment compatibility relations for function types. All of these are valid. var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js index 44e9c8e8a36..8aefc846d9b 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js @@ -101,7 +101,11 @@ module Errors { //// [assignmentCompatWithConstructSignatures4.js] // checking assignment compatibility relations for function types. var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js index a80ece9d4d5..b21074b8ff3 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js @@ -68,7 +68,11 @@ b18 = a18; // ok //// [assignmentCompatWithConstructSignatures5.js] // checking assignment compat for function types. All valid var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js index ea5c5c61e3b..95f585e8929 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js @@ -45,7 +45,11 @@ b16 = x.a16; //// [assignmentCompatWithConstructSignatures6.js] // checking assignment compatibility relations for function types. All valid. var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer.js b/tests/baselines/reference/assignmentCompatWithNumericIndexer.js index f5ec41091e0..05dce80507d 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer.js +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer.js @@ -46,7 +46,11 @@ module Generics { //// [assignmentCompatWithNumericIndexer.js] // Derived type indexer must be subtype of base type indexer var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js b/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js index c6e262c4446..7785aa2b01f 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js @@ -43,7 +43,11 @@ module Generics { //// [assignmentCompatWithNumericIndexer3.js] // Derived type indexer must be subtype of base type indexer var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers4.js b/tests/baselines/reference/assignmentCompatWithObjectMembers4.js index b7ff16e11fc..dbc0612153f 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers4.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers4.js @@ -94,7 +94,11 @@ module WithBase { //// [assignmentCompatWithObjectMembers4.js] // members N and M of types S and T have the same name, same accessibility, same optionality, and N is not assignable M var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js index b5148d063a7..fcbea350773 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js @@ -91,7 +91,11 @@ module SourceHasOptional { //// [assignmentCompatWithObjectMembersOptionality.js] // Derived member is not optional but base member is, should be ok var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js index 4b22c469791..91f212c9fd9 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js @@ -93,7 +93,11 @@ module SourceHasOptional { // M is optional and S contains no property with the same name as M // N is optional and T contains no property with the same name as N var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithStringIndexer.js b/tests/baselines/reference/assignmentCompatWithStringIndexer.js index b319af595cd..a0fb08df8d2 100644 --- a/tests/baselines/reference/assignmentCompatWithStringIndexer.js +++ b/tests/baselines/reference/assignmentCompatWithStringIndexer.js @@ -56,7 +56,11 @@ module Generics { //// [assignmentCompatWithStringIndexer.js] // index signatures must be compatible in assignments var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentLHSIsValue.js b/tests/baselines/reference/assignmentLHSIsValue.js index add2c59e15f..e4fa0fcc6b7 100644 --- a/tests/baselines/reference/assignmentLHSIsValue.js +++ b/tests/baselines/reference/assignmentLHSIsValue.js @@ -72,7 +72,11 @@ foo() = value; //// [assignmentLHSIsValue.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/asyncImportedPromise_es5.js b/tests/baselines/reference/asyncImportedPromise_es5.js index f13b4f962c7..a90d4254c61 100644 --- a/tests/baselines/reference/asyncImportedPromise_es5.js +++ b/tests/baselines/reference/asyncImportedPromise_es5.js @@ -12,7 +12,11 @@ class Test { //// [task.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/autolift4.js b/tests/baselines/reference/autolift4.js index 5d27475ba42..d516e1e9b7b 100644 --- a/tests/baselines/reference/autolift4.js +++ b/tests/baselines/reference/autolift4.js @@ -25,7 +25,11 @@ class Point3D extends Point { //// [autolift4.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/baseCheck.js b/tests/baselines/reference/baseCheck.js index 80271d13e83..9684189d565 100644 --- a/tests/baselines/reference/baseCheck.js +++ b/tests/baselines/reference/baseCheck.js @@ -31,7 +31,11 @@ function f() { //// [baseCheck.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/baseIndexSignatureResolution.js b/tests/baselines/reference/baseIndexSignatureResolution.js index bd6dd5a40e8..b1cb7c05ffc 100644 --- a/tests/baselines/reference/baseIndexSignatureResolution.js +++ b/tests/baselines/reference/baseIndexSignatureResolution.js @@ -26,7 +26,11 @@ var z: Derived = b.foo(); //// [baseIndexSignatureResolution.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/baseTypeOrderChecking.js b/tests/baselines/reference/baseTypeOrderChecking.js index 1c87fb1dd5d..5f7f6550ab9 100644 --- a/tests/baselines/reference/baseTypeOrderChecking.js +++ b/tests/baselines/reference/baseTypeOrderChecking.js @@ -38,7 +38,11 @@ class Class4 extends Class3 //// [baseTypeOrderChecking.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/baseTypeWrappingInstantiationChain.js b/tests/baselines/reference/baseTypeWrappingInstantiationChain.js index cc6c091b6c7..822c9584e1f 100644 --- a/tests/baselines/reference/baseTypeWrappingInstantiationChain.js +++ b/tests/baselines/reference/baseTypeWrappingInstantiationChain.js @@ -29,7 +29,11 @@ class C extends CBase { //// [baseTypeWrappingInstantiationChain.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/bases.js b/tests/baselines/reference/bases.js index f23750c4391..e45b934f1ad 100644 --- a/tests/baselines/reference/bases.js +++ b/tests/baselines/reference/bases.js @@ -22,7 +22,11 @@ new C().y; //// [bases.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js index 755c3f4ab84..c5e124e638a 100644 --- a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js +++ b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js @@ -30,7 +30,11 @@ function foo5(t: T, u: U): Object { // conditional expressions return the best common type of the branches plus contextual type (using the first candidate if multiple BCTs exist) // no errors expected here var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js index 796706dd248..1390eeb5a5d 100644 --- a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js +++ b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js @@ -28,7 +28,11 @@ function foo3(t: T, u: U) { // conditional expressions return the best common type of the branches plus contextual type (using the first candidate if multiple BCTs exist) // these are errors var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/bestCommonTypeOfTuple2.js b/tests/baselines/reference/bestCommonTypeOfTuple2.js index 1bd3ac45bcc..17c9242e6aa 100644 --- a/tests/baselines/reference/bestCommonTypeOfTuple2.js +++ b/tests/baselines/reference/bestCommonTypeOfTuple2.js @@ -24,7 +24,11 @@ var e51 = t5[2]; // {} //// [bestCommonTypeOfTuple2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js index 3c581096d6b..3d7d1167db5 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js @@ -72,7 +72,11 @@ interface I extends A { //// [callSignatureAssignabilityInInheritance2.js] // checking subtype relations for function types as it relates to contextual signature instantiation var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js index 909a9bbb8cb..8674a9def64 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js @@ -117,7 +117,11 @@ module Errors { // checking subtype relations for function types as it relates to contextual signature instantiation // error cases var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js index d42769a1e67..3173b6bd661 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js @@ -52,7 +52,11 @@ interface I extends A { //// [callSignatureAssignabilityInInheritance4.js] // checking subtype relations for function types as it relates to contextual signature instantiation var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js index 94f5fecd2f8..b1c387fb3e7 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js @@ -52,7 +52,11 @@ interface I extends B { // checking subtype relations for function types as it relates to contextual signature instantiation // same as subtypingWithCallSignatures2 just with an extra level of indirection in the inheritance chain var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js index b73ed7070d8..1b7688262cb 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js @@ -55,7 +55,11 @@ interface I9 extends A { // same as subtypingWithCallSignatures4 but using class type parameters instead of generic signatures // all are errors var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/callWithSpread.js b/tests/baselines/reference/callWithSpread.js index 2bce24e4637..c5d6bbf2401 100644 --- a/tests/baselines/reference/callWithSpread.js +++ b/tests/baselines/reference/callWithSpread.js @@ -60,7 +60,11 @@ class D extends C { //// [callWithSpread.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/captureThisInSuperCall.js b/tests/baselines/reference/captureThisInSuperCall.js index 1a1d5562531..062d50e8ad9 100644 --- a/tests/baselines/reference/captureThisInSuperCall.js +++ b/tests/baselines/reference/captureThisInSuperCall.js @@ -10,7 +10,11 @@ class B extends A { //// [captureThisInSuperCall.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/castingTuple.js b/tests/baselines/reference/castingTuple.js index 331a61a6f78..4b45f444f54 100644 --- a/tests/baselines/reference/castingTuple.js +++ b/tests/baselines/reference/castingTuple.js @@ -34,7 +34,11 @@ t4[2] = 10; //// [castingTuple.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/chainedAssignment3.js b/tests/baselines/reference/chainedAssignment3.js index 3bfe61f2664..6c8453c2348 100644 --- a/tests/baselines/reference/chainedAssignment3.js +++ b/tests/baselines/reference/chainedAssignment3.js @@ -24,7 +24,11 @@ a = b = new A(); //// [chainedAssignment3.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js index 59a4b8b12ce..769f74d39ae 100644 --- a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js +++ b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js @@ -21,7 +21,11 @@ class C extends B { //// [chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkForObjectTooStrict.js b/tests/baselines/reference/checkForObjectTooStrict.js index 80f12196d0d..cd65885b152 100644 --- a/tests/baselines/reference/checkForObjectTooStrict.js +++ b/tests/baselines/reference/checkForObjectTooStrict.js @@ -33,7 +33,11 @@ class Baz extends Object { //// [checkForObjectTooStrict.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js index 006bdbf356f..fece927ea9c 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js @@ -12,7 +12,11 @@ class Derived extends Based { //// [checkSuperCallBeforeThisAccessing1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js index 5c35d42ca4f..143514be551 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js @@ -12,7 +12,11 @@ class Derived extends Based { //// [checkSuperCallBeforeThisAccessing2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js index 16b8181ac5d..a080d62434f 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js @@ -17,7 +17,11 @@ class Derived extends Based { //// [checkSuperCallBeforeThisAccessing3.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js index 9ac1fdaaa21..2309600b2b8 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js @@ -21,7 +21,11 @@ class Derived extends Based { //// [checkSuperCallBeforeThisAccessing4.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js index 6f8d7589163..cc3838fd40d 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js @@ -9,7 +9,11 @@ class Derived extends Based { //// [checkSuperCallBeforeThisAccessing5.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js index 415bbb06501..e6183330d97 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js @@ -12,7 +12,11 @@ class Super extends Base { //// [checkSuperCallBeforeThisAccessing6.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js index 39eea670c57..3040a118a75 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js @@ -11,7 +11,11 @@ class Super extends Base { //// [checkSuperCallBeforeThisAccessing7.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js index ff1801d1f93..899128b6836 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js @@ -12,7 +12,11 @@ class Super extends Base { //// [checkSuperCallBeforeThisAccessing8.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/circularImportAlias.js b/tests/baselines/reference/circularImportAlias.js index 49e1124b467..6f2d3213aeb 100644 --- a/tests/baselines/reference/circularImportAlias.js +++ b/tests/baselines/reference/circularImportAlias.js @@ -22,7 +22,11 @@ var c = new B.a.C(); //// [circularImportAlias.js] // expected no error var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/circularTypeofWithFunctionModule.js b/tests/baselines/reference/circularTypeofWithFunctionModule.js index aa2987725bd..92403f0cb6b 100644 --- a/tests/baselines/reference/circularTypeofWithFunctionModule.js +++ b/tests/baselines/reference/circularTypeofWithFunctionModule.js @@ -15,7 +15,11 @@ namespace maker { //// [circularTypeofWithFunctionModule.js] // Repro from #6072 var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractConstructorAssignability.js b/tests/baselines/reference/classAbstractConstructorAssignability.js index 20f3de041be..704ff554a00 100644 --- a/tests/baselines/reference/classAbstractConstructorAssignability.js +++ b/tests/baselines/reference/classAbstractConstructorAssignability.js @@ -16,7 +16,11 @@ new CC; //// [classAbstractConstructorAssignability.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractCrashedOnce.js b/tests/baselines/reference/classAbstractCrashedOnce.js index 2037dbbc64f..107d8274369 100644 --- a/tests/baselines/reference/classAbstractCrashedOnce.js +++ b/tests/baselines/reference/classAbstractCrashedOnce.js @@ -12,7 +12,11 @@ var x = new bar(); //// [classAbstractCrashedOnce.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractExtends.js b/tests/baselines/reference/classAbstractExtends.js index d7e9a04d189..f9fa0ba2b32 100644 --- a/tests/baselines/reference/classAbstractExtends.js +++ b/tests/baselines/reference/classAbstractExtends.js @@ -18,7 +18,11 @@ class E extends B { //// [classAbstractExtends.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractFactoryFunction.js b/tests/baselines/reference/classAbstractFactoryFunction.js index 71850654425..addb71da717 100644 --- a/tests/baselines/reference/classAbstractFactoryFunction.js +++ b/tests/baselines/reference/classAbstractFactoryFunction.js @@ -19,7 +19,11 @@ NewB(B); //// [classAbstractFactoryFunction.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractGeneric.js b/tests/baselines/reference/classAbstractGeneric.js index e5f5598c14c..486fe97f838 100644 --- a/tests/baselines/reference/classAbstractGeneric.js +++ b/tests/baselines/reference/classAbstractGeneric.js @@ -27,7 +27,11 @@ class G extends A { //// [classAbstractGeneric.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractInAModule.js b/tests/baselines/reference/classAbstractInAModule.js index 5ff60d21ca9..4681a422c8d 100644 --- a/tests/baselines/reference/classAbstractInAModule.js +++ b/tests/baselines/reference/classAbstractInAModule.js @@ -9,7 +9,11 @@ new M.B; //// [classAbstractInAModule.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractInheritance.js b/tests/baselines/reference/classAbstractInheritance.js index 90d8216647a..ebaef77181a 100644 --- a/tests/baselines/reference/classAbstractInheritance.js +++ b/tests/baselines/reference/classAbstractInheritance.js @@ -23,7 +23,11 @@ abstract class GG extends CC {} //// [classAbstractInheritance.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractInstantiations1.js b/tests/baselines/reference/classAbstractInstantiations1.js index 4c6ed144e0b..96a0c1207be 100644 --- a/tests/baselines/reference/classAbstractInstantiations1.js +++ b/tests/baselines/reference/classAbstractInstantiations1.js @@ -29,7 +29,11 @@ c = new B; // Calling new with (non)abstract classes. // var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractInstantiations2.js b/tests/baselines/reference/classAbstractInstantiations2.js index e5b678ee715..3b93e78aebd 100644 --- a/tests/baselines/reference/classAbstractInstantiations2.js +++ b/tests/baselines/reference/classAbstractInstantiations2.js @@ -53,7 +53,11 @@ class H { // error -- not declared abstract //// [classAbstractInstantiations2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractOverrideWithAbstract.js b/tests/baselines/reference/classAbstractOverrideWithAbstract.js index 0cf9c039b35..59cd1186ef9 100644 --- a/tests/baselines/reference/classAbstractOverrideWithAbstract.js +++ b/tests/baselines/reference/classAbstractOverrideWithAbstract.js @@ -25,7 +25,11 @@ class DD extends BB { //// [classAbstractOverrideWithAbstract.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractSuperCalls.js b/tests/baselines/reference/classAbstractSuperCalls.js index 30c33822be9..c63b2673713 100644 --- a/tests/baselines/reference/classAbstractSuperCalls.js +++ b/tests/baselines/reference/classAbstractSuperCalls.js @@ -29,7 +29,11 @@ abstract class BB extends AA { //// [classAbstractSuperCalls.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractUsingAbstractMethod1.js b/tests/baselines/reference/classAbstractUsingAbstractMethod1.js index 5aa616dcb7c..421f3278489 100644 --- a/tests/baselines/reference/classAbstractUsingAbstractMethod1.js +++ b/tests/baselines/reference/classAbstractUsingAbstractMethod1.js @@ -19,7 +19,11 @@ a.foo(); //// [classAbstractUsingAbstractMethod1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractUsingAbstractMethods2.js b/tests/baselines/reference/classAbstractUsingAbstractMethods2.js index 56aa3937772..397d5a3a411 100644 --- a/tests/baselines/reference/classAbstractUsingAbstractMethods2.js +++ b/tests/baselines/reference/classAbstractUsingAbstractMethods2.js @@ -29,7 +29,11 @@ class DD extends AA { //// [classAbstractUsingAbstractMethods2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classConstructorAccessibility2.js b/tests/baselines/reference/classConstructorAccessibility2.js index eeff60323b7..6cbf33cddff 100644 --- a/tests/baselines/reference/classConstructorAccessibility2.js +++ b/tests/baselines/reference/classConstructorAccessibility2.js @@ -48,7 +48,11 @@ var dc = new DerivedC(1); //// [classConstructorAccessibility2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classConstructorAccessibility4.js b/tests/baselines/reference/classConstructorAccessibility4.js index 199383b6a71..61ce64ef19b 100644 --- a/tests/baselines/reference/classConstructorAccessibility4.js +++ b/tests/baselines/reference/classConstructorAccessibility4.js @@ -32,7 +32,11 @@ class D { //// [classConstructorAccessibility4.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classConstructorAccessibility5.js b/tests/baselines/reference/classConstructorAccessibility5.js index cb01b233781..8d0f9ad4069 100644 --- a/tests/baselines/reference/classConstructorAccessibility5.js +++ b/tests/baselines/reference/classConstructorAccessibility5.js @@ -13,7 +13,11 @@ class Unrelated { //// [classConstructorAccessibility5.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classConstructorParametersAccessibility.js b/tests/baselines/reference/classConstructorParametersAccessibility.js index 4b086a854a1..2433a6d3934 100644 --- a/tests/baselines/reference/classConstructorParametersAccessibility.js +++ b/tests/baselines/reference/classConstructorParametersAccessibility.js @@ -28,7 +28,11 @@ class Derived extends C3 { //// [classConstructorParametersAccessibility.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classConstructorParametersAccessibility2.js b/tests/baselines/reference/classConstructorParametersAccessibility2.js index 244b56dddc0..b29e3f06503 100644 --- a/tests/baselines/reference/classConstructorParametersAccessibility2.js +++ b/tests/baselines/reference/classConstructorParametersAccessibility2.js @@ -28,7 +28,11 @@ class Derived extends C3 { //// [classConstructorParametersAccessibility2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classConstructorParametersAccessibility3.js b/tests/baselines/reference/classConstructorParametersAccessibility3.js index ef3e6d5b4bd..10031b9c74e 100644 --- a/tests/baselines/reference/classConstructorParametersAccessibility3.js +++ b/tests/baselines/reference/classConstructorParametersAccessibility3.js @@ -15,7 +15,11 @@ d.p; // public, OK //// [classConstructorParametersAccessibility3.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js b/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js index 1fa51632ba7..1521745f951 100644 --- a/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js +++ b/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js @@ -13,7 +13,11 @@ module M { //// [classDeclarationMergedInModuleWithContinuation.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classDeclaredBeforeClassFactory.js b/tests/baselines/reference/classDeclaredBeforeClassFactory.js index c30c913a010..24df98a089f 100644 --- a/tests/baselines/reference/classDeclaredBeforeClassFactory.js +++ b/tests/baselines/reference/classDeclaredBeforeClassFactory.js @@ -9,7 +9,11 @@ function makeBaseClass() { //// [classDeclaredBeforeClassFactory.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classDoesNotDependOnBaseTypes.js b/tests/baselines/reference/classDoesNotDependOnBaseTypes.js index e195506c294..88a1ab19d14 100644 --- a/tests/baselines/reference/classDoesNotDependOnBaseTypes.js +++ b/tests/baselines/reference/classDoesNotDependOnBaseTypes.js @@ -14,7 +14,11 @@ class StringTreeCollection extends StringTreeCollectionBase { } //// [classDoesNotDependOnBaseTypes.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExpression2.js b/tests/baselines/reference/classExpression2.js index 7e78007badc..86d4509310d 100644 --- a/tests/baselines/reference/classExpression2.js +++ b/tests/baselines/reference/classExpression2.js @@ -4,7 +4,11 @@ var v = class C extends D {}; //// [classExpression2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExpression3.js b/tests/baselines/reference/classExpression3.js index 9c29f35cd19..0d999b57a1a 100644 --- a/tests/baselines/reference/classExpression3.js +++ b/tests/baselines/reference/classExpression3.js @@ -8,7 +8,11 @@ c.c; //// [classExpression3.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExpressionExtendingAbstractClass.js b/tests/baselines/reference/classExpressionExtendingAbstractClass.js index 3031f69117a..3c9db5e28ac 100644 --- a/tests/baselines/reference/classExpressionExtendingAbstractClass.js +++ b/tests/baselines/reference/classExpressionExtendingAbstractClass.js @@ -10,7 +10,11 @@ var C = class extends A { // no error reported! //// [classExpressionExtendingAbstractClass.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingBuiltinType.js b/tests/baselines/reference/classExtendingBuiltinType.js index c0988a01296..d2be7a12da2 100644 --- a/tests/baselines/reference/classExtendingBuiltinType.js +++ b/tests/baselines/reference/classExtendingBuiltinType.js @@ -13,7 +13,11 @@ class C10 extends Array { } //// [classExtendingBuiltinType.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingClass.js b/tests/baselines/reference/classExtendingClass.js index 5b5a1386322..a81efb38bd0 100644 --- a/tests/baselines/reference/classExtendingClass.js +++ b/tests/baselines/reference/classExtendingClass.js @@ -33,7 +33,11 @@ var r8 = D2.other(1); //// [classExtendingClass.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingClassLikeType.js b/tests/baselines/reference/classExtendingClassLikeType.js index 1d16866904e..7760490a244 100644 --- a/tests/baselines/reference/classExtendingClassLikeType.js +++ b/tests/baselines/reference/classExtendingClassLikeType.js @@ -60,7 +60,11 @@ class D5 extends getBadBase() { //// [classExtendingClassLikeType.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingNonConstructor.js b/tests/baselines/reference/classExtendingNonConstructor.js index 74070c3bc0c..d14663b4edc 100644 --- a/tests/baselines/reference/classExtendingNonConstructor.js +++ b/tests/baselines/reference/classExtendingNonConstructor.js @@ -16,7 +16,11 @@ class C7 extends foo { } //// [classExtendingNonConstructor.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingNull.js b/tests/baselines/reference/classExtendingNull.js index 3a227b564e9..9ce3714c1bd 100644 --- a/tests/baselines/reference/classExtendingNull.js +++ b/tests/baselines/reference/classExtendingNull.js @@ -5,7 +5,11 @@ class C2 extends (null) { } //// [classExtendingNull.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingPrimitive.js b/tests/baselines/reference/classExtendingPrimitive.js index 04fd2d57e52..9e1a855379c 100644 --- a/tests/baselines/reference/classExtendingPrimitive.js +++ b/tests/baselines/reference/classExtendingPrimitive.js @@ -17,7 +17,11 @@ class C8 extends E { } //// [classExtendingPrimitive.js] // classes cannot extend primitives var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingPrimitive2.js b/tests/baselines/reference/classExtendingPrimitive2.js index a85bcb21f09..ff7f19fc68d 100644 --- a/tests/baselines/reference/classExtendingPrimitive2.js +++ b/tests/baselines/reference/classExtendingPrimitive2.js @@ -7,7 +7,11 @@ class C5a extends null { } //// [classExtendingPrimitive2.js] // classes cannot extend primitives var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingQualifiedName.js b/tests/baselines/reference/classExtendingQualifiedName.js index 6c2d5b6c2e4..9a7d4551cf3 100644 --- a/tests/baselines/reference/classExtendingQualifiedName.js +++ b/tests/baselines/reference/classExtendingQualifiedName.js @@ -9,7 +9,11 @@ module M { //// [classExtendingQualifiedName.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingQualifiedName2.js b/tests/baselines/reference/classExtendingQualifiedName2.js index 946a7604ca4..adf590b6804 100644 --- a/tests/baselines/reference/classExtendingQualifiedName2.js +++ b/tests/baselines/reference/classExtendingQualifiedName2.js @@ -9,7 +9,11 @@ module M { //// [classExtendingQualifiedName2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsAcrossFiles.js b/tests/baselines/reference/classExtendsAcrossFiles.js index 0fa873d378f..45598142549 100644 --- a/tests/baselines/reference/classExtendsAcrossFiles.js +++ b/tests/baselines/reference/classExtendsAcrossFiles.js @@ -22,7 +22,11 @@ export const b = { //// [b.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -47,7 +51,11 @@ exports.b = { //// [a.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js b/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js index b164b77d319..187108fcf54 100644 --- a/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js +++ b/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js @@ -15,7 +15,11 @@ module Foo { //// [classExtendsClauseClassMergedWithModuleNotReferingConstructor.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.js b/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.js index 619d1488ff8..4d63c45f2c9 100644 --- a/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.js +++ b/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.js @@ -8,7 +8,11 @@ module Foo { //// [classExtendsClauseClassNotReferringConstructor.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsEveryObjectType.js b/tests/baselines/reference/classExtendsEveryObjectType.js index 044ef0fca51..e5b5651153c 100644 --- a/tests/baselines/reference/classExtendsEveryObjectType.js +++ b/tests/baselines/reference/classExtendsEveryObjectType.js @@ -18,7 +18,11 @@ class C6 extends []{ } // error //// [classExtendsEveryObjectType.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsEveryObjectType2.js b/tests/baselines/reference/classExtendsEveryObjectType2.js index 88929e72c57..9e935e789e4 100644 --- a/tests/baselines/reference/classExtendsEveryObjectType2.js +++ b/tests/baselines/reference/classExtendsEveryObjectType2.js @@ -5,7 +5,11 @@ class C6 extends []{ } // error //// [classExtendsEveryObjectType2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsInterface.js b/tests/baselines/reference/classExtendsInterface.js index 1005ccbdd3f..68167082021 100644 --- a/tests/baselines/reference/classExtendsInterface.js +++ b/tests/baselines/reference/classExtendsInterface.js @@ -10,7 +10,11 @@ class B2 implements Comparable2 {} //// [classExtendsInterface.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsInterfaceInExpression.js b/tests/baselines/reference/classExtendsInterfaceInExpression.js index 511d22e93f1..fa433e139c7 100644 --- a/tests/baselines/reference/classExtendsInterfaceInExpression.js +++ b/tests/baselines/reference/classExtendsInterfaceInExpression.js @@ -10,7 +10,11 @@ class C extends factory(A) {} //// [classExtendsInterfaceInExpression.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsInterfaceInModule.js b/tests/baselines/reference/classExtendsInterfaceInModule.js index a3034d59df7..933c5162477 100644 --- a/tests/baselines/reference/classExtendsInterfaceInModule.js +++ b/tests/baselines/reference/classExtendsInterfaceInModule.js @@ -17,7 +17,11 @@ class D extends Mod.Nested.I {} //// [classExtendsInterfaceInModule.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsItself.js b/tests/baselines/reference/classExtendsItself.js index ad4ce10cfc6..e13cd6dee6e 100644 --- a/tests/baselines/reference/classExtendsItself.js +++ b/tests/baselines/reference/classExtendsItself.js @@ -7,7 +7,11 @@ class E extends E { } // error //// [classExtendsItself.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsItselfIndirectly.js b/tests/baselines/reference/classExtendsItselfIndirectly.js index dfbfb7720fa..bef7ca9f8cf 100644 --- a/tests/baselines/reference/classExtendsItselfIndirectly.js +++ b/tests/baselines/reference/classExtendsItselfIndirectly.js @@ -13,7 +13,11 @@ class E2 extends D2 { baz: T; } //// [classExtendsItselfIndirectly.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsItselfIndirectly2.js b/tests/baselines/reference/classExtendsItselfIndirectly2.js index 6751b19335d..e9df1ddf908 100644 --- a/tests/baselines/reference/classExtendsItselfIndirectly2.js +++ b/tests/baselines/reference/classExtendsItselfIndirectly2.js @@ -24,7 +24,11 @@ module O { //// [classExtendsItselfIndirectly2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsItselfIndirectly3.js b/tests/baselines/reference/classExtendsItselfIndirectly3.js index 750e5ddfd1c..a324fa1ce72 100644 --- a/tests/baselines/reference/classExtendsItselfIndirectly3.js +++ b/tests/baselines/reference/classExtendsItselfIndirectly3.js @@ -20,7 +20,11 @@ class E2 extends D2 { baz: T; } //// [classExtendsItselfIndirectly_file1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -33,7 +37,11 @@ var C = (function (_super) { }(E)); // error //// [classExtendsItselfIndirectly_file2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -46,7 +54,11 @@ var D = (function (_super) { }(C)); //// [classExtendsItselfIndirectly_file3.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -59,7 +71,11 @@ var E = (function (_super) { }(D)); //// [classExtendsItselfIndirectly_file4.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -72,7 +88,11 @@ var C2 = (function (_super) { }(E2)); // error //// [classExtendsItselfIndirectly_file5.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -85,7 +105,11 @@ var D2 = (function (_super) { }(C2)); //// [classExtendsItselfIndirectly_file6.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsMultipleBaseClasses.js b/tests/baselines/reference/classExtendsMultipleBaseClasses.js index 6cb987186c4..7cef2b247cc 100644 --- a/tests/baselines/reference/classExtendsMultipleBaseClasses.js +++ b/tests/baselines/reference/classExtendsMultipleBaseClasses.js @@ -5,7 +5,11 @@ class C extends A,B { } //// [classExtendsMultipleBaseClasses.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsNull.js b/tests/baselines/reference/classExtendsNull.js index 45cd0132bda..5171dbc0085 100644 --- a/tests/baselines/reference/classExtendsNull.js +++ b/tests/baselines/reference/classExtendsNull.js @@ -14,7 +14,11 @@ class D extends null { //// [classExtendsNull.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsShadowedConstructorFunction.js b/tests/baselines/reference/classExtendsShadowedConstructorFunction.js index fde420bca39..ad16e0aacaa 100644 --- a/tests/baselines/reference/classExtendsShadowedConstructorFunction.js +++ b/tests/baselines/reference/classExtendsShadowedConstructorFunction.js @@ -10,7 +10,11 @@ module M { //// [classExtendsShadowedConstructorFunction.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsValidConstructorFunction.js b/tests/baselines/reference/classExtendsValidConstructorFunction.js index 7346096d803..4e284b0c64c 100644 --- a/tests/baselines/reference/classExtendsValidConstructorFunction.js +++ b/tests/baselines/reference/classExtendsValidConstructorFunction.js @@ -7,7 +7,11 @@ class C extends foo { } // error, cannot extend it though //// [classExtendsValidConstructorFunction.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classHeritageWithTrailingSeparator.js b/tests/baselines/reference/classHeritageWithTrailingSeparator.js index ab37b45f3be..3314583f338 100644 --- a/tests/baselines/reference/classHeritageWithTrailingSeparator.js +++ b/tests/baselines/reference/classHeritageWithTrailingSeparator.js @@ -5,7 +5,11 @@ class D extends C, { //// [classHeritageWithTrailingSeparator.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classImplementsClass2.js b/tests/baselines/reference/classImplementsClass2.js index 372f8ce84ef..0aeda35463f 100644 --- a/tests/baselines/reference/classImplementsClass2.js +++ b/tests/baselines/reference/classImplementsClass2.js @@ -15,7 +15,11 @@ c2 = c; //// [classImplementsClass2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classImplementsClass3.js b/tests/baselines/reference/classImplementsClass3.js index 09c2a9fbe6b..40fd20005e1 100644 --- a/tests/baselines/reference/classImplementsClass3.js +++ b/tests/baselines/reference/classImplementsClass3.js @@ -16,7 +16,11 @@ c2 = c; //// [classImplementsClass3.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classImplementsClass4.js b/tests/baselines/reference/classImplementsClass4.js index c80e2152598..631b5b38560 100644 --- a/tests/baselines/reference/classImplementsClass4.js +++ b/tests/baselines/reference/classImplementsClass4.js @@ -18,7 +18,11 @@ c2 = c; //// [classImplementsClass4.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classImplementsClass5.js b/tests/baselines/reference/classImplementsClass5.js index de0bb4469e1..a54c02f4b6b 100644 --- a/tests/baselines/reference/classImplementsClass5.js +++ b/tests/baselines/reference/classImplementsClass5.js @@ -19,7 +19,11 @@ c2 = c; //// [classImplementsClass5.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classImplementsClass6.js b/tests/baselines/reference/classImplementsClass6.js index c87c1b59d2f..c2987ac066e 100644 --- a/tests/baselines/reference/classImplementsClass6.js +++ b/tests/baselines/reference/classImplementsClass6.js @@ -23,7 +23,11 @@ c2.bar(); // should error //// [classImplementsClass6.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classIndexer3.js b/tests/baselines/reference/classIndexer3.js index 759804baa41..8bce9236899 100644 --- a/tests/baselines/reference/classIndexer3.js +++ b/tests/baselines/reference/classIndexer3.js @@ -12,7 +12,11 @@ class D123 extends C123 { //// [classIndexer3.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classInheritence.js b/tests/baselines/reference/classInheritence.js index 614124c7a09..23506947e9b 100644 --- a/tests/baselines/reference/classInheritence.js +++ b/tests/baselines/reference/classInheritence.js @@ -4,7 +4,11 @@ class A extends A { } //// [classInheritence.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classIsSubtypeOfBaseType.js b/tests/baselines/reference/classIsSubtypeOfBaseType.js index fe056e41813..df822eff312 100644 --- a/tests/baselines/reference/classIsSubtypeOfBaseType.js +++ b/tests/baselines/reference/classIsSubtypeOfBaseType.js @@ -17,7 +17,11 @@ class Derived2 extends Base<{ bar: string; }> { //// [classIsSubtypeOfBaseType.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classOrder2.js b/tests/baselines/reference/classOrder2.js index 34bbf93fd2f..d05dd72e245 100644 --- a/tests/baselines/reference/classOrder2.js +++ b/tests/baselines/reference/classOrder2.js @@ -21,7 +21,11 @@ a.foo(); //// [classOrder2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classOrderBug.js b/tests/baselines/reference/classOrderBug.js index 69ed7723a98..22596246d64 100644 --- a/tests/baselines/reference/classOrderBug.js +++ b/tests/baselines/reference/classOrderBug.js @@ -17,7 +17,11 @@ class foo extends baz {} //// [classOrderBug.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classSideInheritance1.js b/tests/baselines/reference/classSideInheritance1.js index b3882d64b87..bdaaec468f8 100644 --- a/tests/baselines/reference/classSideInheritance1.js +++ b/tests/baselines/reference/classSideInheritance1.js @@ -17,7 +17,11 @@ C2.bar(); // valid //// [classSideInheritance1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classSideInheritance2.js b/tests/baselines/reference/classSideInheritance2.js index 8a6564f4f9f..34c7467a864 100644 --- a/tests/baselines/reference/classSideInheritance2.js +++ b/tests/baselines/reference/classSideInheritance2.js @@ -22,7 +22,11 @@ class TextBase implements IText { //// [classSideInheritance2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classSideInheritance3.js b/tests/baselines/reference/classSideInheritance3.js index 44035af4f30..a9fb0919930 100644 --- a/tests/baselines/reference/classSideInheritance3.js +++ b/tests/baselines/reference/classSideInheritance3.js @@ -20,7 +20,11 @@ var r3: typeof A = C; // ok //// [classSideInheritance3.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classUpdateTests.js b/tests/baselines/reference/classUpdateTests.js index d29277a84e4..89dd0bded24 100644 --- a/tests/baselines/reference/classUpdateTests.js +++ b/tests/baselines/reference/classUpdateTests.js @@ -115,7 +115,11 @@ class R { //// [classUpdateTests.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classWithBaseClassButNoConstructor.js b/tests/baselines/reference/classWithBaseClassButNoConstructor.js index db10ddb0727..b23e0a13ba1 100644 --- a/tests/baselines/reference/classWithBaseClassButNoConstructor.js +++ b/tests/baselines/reference/classWithBaseClassButNoConstructor.js @@ -42,7 +42,11 @@ var d6 = new D(1); // ok //// [classWithBaseClassButNoConstructor.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classWithConstructors.js b/tests/baselines/reference/classWithConstructors.js index 3e038e3a424..c3609f99b86 100644 --- a/tests/baselines/reference/classWithConstructors.js +++ b/tests/baselines/reference/classWithConstructors.js @@ -51,7 +51,11 @@ module Generics { //// [classWithConstructors.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classWithProtectedProperty.js b/tests/baselines/reference/classWithProtectedProperty.js index 35c26afef98..4a1b09ff350 100644 --- a/tests/baselines/reference/classWithProtectedProperty.js +++ b/tests/baselines/reference/classWithProtectedProperty.js @@ -30,7 +30,11 @@ class D extends C { //// [classWithProtectedProperty.js] // accessing any protected outside the class is an error var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classWithStaticMembers.js b/tests/baselines/reference/classWithStaticMembers.js index 5deb8f99643..5563e859c6a 100644 --- a/tests/baselines/reference/classWithStaticMembers.js +++ b/tests/baselines/reference/classWithStaticMembers.js @@ -21,7 +21,11 @@ var r3 = r.foo; //// [classWithStaticMembers.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classdecl.js b/tests/baselines/reference/classdecl.js index 99d7bba92b0..c88b0ccae0e 100644 --- a/tests/baselines/reference/classdecl.js +++ b/tests/baselines/reference/classdecl.js @@ -95,7 +95,11 @@ class e { //// [classdecl.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/clodulesDerivedClasses.js b/tests/baselines/reference/clodulesDerivedClasses.js index 209b135fb15..1bb3fc7b705 100644 --- a/tests/baselines/reference/clodulesDerivedClasses.js +++ b/tests/baselines/reference/clodulesDerivedClasses.js @@ -24,7 +24,11 @@ module Path.Utils { //// [clodulesDerivedClasses.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js index ec87855ba46..2242c6667a6 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js @@ -41,7 +41,11 @@ class c extends Foo { //// [collisionSuperAndLocalFunctionInAccessors.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.js index 09f1db5dd40..e761534649e 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.js +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.js @@ -26,7 +26,11 @@ class c extends Foo { //// [collisionSuperAndLocalFunctionInConstructor.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.js index 40084c7c2a5..70a9b22ddbd 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.js +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.js @@ -30,7 +30,11 @@ class c extends Foo { //// [collisionSuperAndLocalFunctionInMethod.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js index 457779fe395..258ad86c096 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js @@ -20,7 +20,11 @@ class b extends Foo { //// [collisionSuperAndLocalFunctionInProperty.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js b/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js index 92a538bea04..81ef63068e6 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js +++ b/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js @@ -34,7 +34,11 @@ class c extends Foo { //// [collisionSuperAndLocalVarInAccessors.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js b/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js index c498658a974..355bf0af8af 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js +++ b/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js @@ -22,7 +22,11 @@ class c extends Foo { //// [collisionSuperAndLocalVarInConstructor.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js b/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js index 94e42d35691..33512c60658 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js +++ b/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js @@ -20,7 +20,11 @@ class c extends Foo { //// [collisionSuperAndLocalVarInMethod.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js b/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js index 750de147841..ee582bddbc5 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js +++ b/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js @@ -19,7 +19,11 @@ class b extends Foo { //// [collisionSuperAndLocalVarInProperty.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndNameResolution.js b/tests/baselines/reference/collisionSuperAndNameResolution.js index dcfd4529266..e36a2a3cbad 100644 --- a/tests/baselines/reference/collisionSuperAndNameResolution.js +++ b/tests/baselines/reference/collisionSuperAndNameResolution.js @@ -13,7 +13,11 @@ class Foo extends base { //// [collisionSuperAndNameResolution.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndParameter.js b/tests/baselines/reference/collisionSuperAndParameter.js index 408158ba2a5..7413002635d 100644 --- a/tests/baselines/reference/collisionSuperAndParameter.js +++ b/tests/baselines/reference/collisionSuperAndParameter.js @@ -64,7 +64,11 @@ class Foo4 extends Foo { //// [collisionSuperAndParameter.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndParameter1.js b/tests/baselines/reference/collisionSuperAndParameter1.js index 58b1cbd4989..0a7e21e8ca2 100644 --- a/tests/baselines/reference/collisionSuperAndParameter1.js +++ b/tests/baselines/reference/collisionSuperAndParameter1.js @@ -11,7 +11,11 @@ class Foo2 extends Foo { //// [collisionSuperAndParameter1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js b/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js index f6f38b6f099..5b12a0f9a9d 100644 --- a/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js +++ b/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js @@ -32,7 +32,11 @@ class b4 extends a { //// [collisionSuperAndPropertyNameAsConstuctorParameter.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js b/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js index 68707fd675d..d3270d4db57 100644 --- a/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js +++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js @@ -20,7 +20,11 @@ class b2 extends a { //// [collisionThisExpressionAndLocalVarWithSuperExperssion.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/commentsInheritance.js b/tests/baselines/reference/commentsInheritance.js index a1e87482843..691854bffb0 100644 --- a/tests/baselines/reference/commentsInheritance.js +++ b/tests/baselines/reference/commentsInheritance.js @@ -153,7 +153,11 @@ i2_i = i3_i; //// [commentsInheritance.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.js b/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.js index 91482033255..3053f86f345 100644 --- a/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.js +++ b/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.js @@ -196,7 +196,11 @@ var r8b7 = b6 !== a6; //// [comparisonOperatorWithIdenticalObjects.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js index 95dfc215bfe..bf522a88367 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js @@ -170,7 +170,11 @@ var r8b7 = b7 !== a7; //// [comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js index fbcd4a72b99..50e31f1d79c 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js @@ -170,7 +170,11 @@ var r8b7 = b7 !== a7; //// [comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js index ec2e2556cc9..8e4e7e7840d 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js @@ -113,7 +113,11 @@ var r8b4 = b4 !== a4; //// [comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js index 2e38deb0e55..f208bd500cd 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js @@ -151,7 +151,11 @@ var r8b6 = b6 !== a6; //// [comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js index 675cce7d49a..4cff1bf0584 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js @@ -151,7 +151,11 @@ var r8b6 = b6 !== a6; //// [comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnCallSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnCallSignature.js index 634a6448581..0a7cbce0c32 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnCallSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnCallSignature.js @@ -261,7 +261,11 @@ var r8b11 = b11 !== a11; //// [comparisonOperatorWithSubtypeObjectOnCallSignature.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnConstructorSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnConstructorSignature.js index d7857dcfd2a..bf8a6024faa 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnConstructorSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnConstructorSignature.js @@ -223,7 +223,11 @@ var r8b9 = b9 !== a9; //// [comparisonOperatorWithSubtypeObjectOnConstructorSignature.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnIndexSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnIndexSignature.js index 08f08546aa9..f1e06f733e4 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnIndexSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnIndexSignature.js @@ -109,7 +109,11 @@ var r8b1 = b4 !== a4; //// [comparisonOperatorWithSubtypeObjectOnIndexSignature.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js index ada0ee77486..78a7b456924 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js @@ -166,7 +166,11 @@ var r8b6 = b6 !== a6; //// [comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js index 28d960fc3c9..d08b7fbf11b 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js @@ -166,7 +166,11 @@ var r8b6 = b6 !== a6; //// [comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.js index 62fee91b7a3..d1f29b650c6 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.js @@ -80,7 +80,11 @@ var rh4 = b2 !== a2; //// [comparisonOperatorWithSubtypeObjectOnProperty.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/complexClassRelationships.js b/tests/baselines/reference/complexClassRelationships.js index 3094d43eed2..34cc2754746 100644 --- a/tests/baselines/reference/complexClassRelationships.js +++ b/tests/baselines/reference/complexClassRelationships.js @@ -49,7 +49,11 @@ class FooBase { //// [complexClassRelationships.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.js b/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.js index d9317789455..0e3dc9f3d31 100644 --- a/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.js +++ b/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.js @@ -7,7 +7,11 @@ class S18 extends S18 //// [complicatedGenericRecursiveBaseClassReference.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/compoundAssignmentLHSIsValue.js b/tests/baselines/reference/compoundAssignmentLHSIsValue.js index a1f6274b38b..8d17fcbfe10 100644 --- a/tests/baselines/reference/compoundAssignmentLHSIsValue.js +++ b/tests/baselines/reference/compoundAssignmentLHSIsValue.js @@ -125,7 +125,11 @@ foo() += value; //// [compoundAssignmentLHSIsValue.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js b/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js index 0c90b7b60f8..e7d1bef436e 100644 --- a/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js +++ b/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js @@ -87,7 +87,11 @@ foo() **= value; //// [compoundExponentiationAssignmentLHSIsValue.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames24_ES5.js b/tests/baselines/reference/computedPropertyNames24_ES5.js index 03b7347165c..426b7cbaa65 100644 --- a/tests/baselines/reference/computedPropertyNames24_ES5.js +++ b/tests/baselines/reference/computedPropertyNames24_ES5.js @@ -10,7 +10,11 @@ class C extends Base { //// [computedPropertyNames24_ES5.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames25_ES5.js b/tests/baselines/reference/computedPropertyNames25_ES5.js index e98865176fb..239a5cada1a 100644 --- a/tests/baselines/reference/computedPropertyNames25_ES5.js +++ b/tests/baselines/reference/computedPropertyNames25_ES5.js @@ -15,7 +15,11 @@ class C extends Base { //// [computedPropertyNames25_ES5.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames26_ES5.js b/tests/baselines/reference/computedPropertyNames26_ES5.js index c10c3b112e4..89e8dd39169 100644 --- a/tests/baselines/reference/computedPropertyNames26_ES5.js +++ b/tests/baselines/reference/computedPropertyNames26_ES5.js @@ -12,7 +12,11 @@ class C extends Base { //// [computedPropertyNames26_ES5.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames27_ES5.js b/tests/baselines/reference/computedPropertyNames27_ES5.js index 0801b4b5e71..7438ea49fd2 100644 --- a/tests/baselines/reference/computedPropertyNames27_ES5.js +++ b/tests/baselines/reference/computedPropertyNames27_ES5.js @@ -7,7 +7,11 @@ class C extends Base { //// [computedPropertyNames27_ES5.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames28_ES5.js b/tests/baselines/reference/computedPropertyNames28_ES5.js index dc360dfd86a..132f811b49e 100644 --- a/tests/baselines/reference/computedPropertyNames28_ES5.js +++ b/tests/baselines/reference/computedPropertyNames28_ES5.js @@ -12,7 +12,11 @@ class C extends Base { //// [computedPropertyNames28_ES5.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames30_ES5.js b/tests/baselines/reference/computedPropertyNames30_ES5.js index 30c6fa33bbe..63e448df3c1 100644 --- a/tests/baselines/reference/computedPropertyNames30_ES5.js +++ b/tests/baselines/reference/computedPropertyNames30_ES5.js @@ -17,7 +17,11 @@ class C extends Base { //// [computedPropertyNames30_ES5.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames31_ES5.js b/tests/baselines/reference/computedPropertyNames31_ES5.js index 856fbe88f68..e3145b8c0a1 100644 --- a/tests/baselines/reference/computedPropertyNames31_ES5.js +++ b/tests/baselines/reference/computedPropertyNames31_ES5.js @@ -17,7 +17,11 @@ class C extends Base { //// [computedPropertyNames31_ES5.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames43_ES5.js b/tests/baselines/reference/computedPropertyNames43_ES5.js index ccc7aed3725..383da77c550 100644 --- a/tests/baselines/reference/computedPropertyNames43_ES5.js +++ b/tests/baselines/reference/computedPropertyNames43_ES5.js @@ -14,7 +14,11 @@ class D extends C { //// [computedPropertyNames43_ES5.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames44_ES5.js b/tests/baselines/reference/computedPropertyNames44_ES5.js index d16c7fc2f46..43bf2849333 100644 --- a/tests/baselines/reference/computedPropertyNames44_ES5.js +++ b/tests/baselines/reference/computedPropertyNames44_ES5.js @@ -13,7 +13,11 @@ class D extends C { //// [computedPropertyNames44_ES5.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames45_ES5.js b/tests/baselines/reference/computedPropertyNames45_ES5.js index 8585f28e5d6..933e6ea66ff 100644 --- a/tests/baselines/reference/computedPropertyNames45_ES5.js +++ b/tests/baselines/reference/computedPropertyNames45_ES5.js @@ -14,7 +14,11 @@ class D extends C { //// [computedPropertyNames45_ES5.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js b/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js index 030fba2525b..c3a197e2a64 100644 --- a/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js +++ b/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js @@ -49,7 +49,11 @@ var result11: any = true ? 1 : 'string'; //// [conditionalOperatorWithIdenticalBCT.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js b/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js index 85633af2a25..0a1e2be65e9 100644 --- a/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js +++ b/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js @@ -25,7 +25,11 @@ var result61: (t: X) => number| string = true ? (m) => m.propertyX1 : (n) => n.p //// [conditionalOperatorWithoutIdenticalBCT.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constantOverloadFunction.js b/tests/baselines/reference/constantOverloadFunction.js index 09e0c2788c4..05cb517f9e0 100644 --- a/tests/baselines/reference/constantOverloadFunction.js +++ b/tests/baselines/reference/constantOverloadFunction.js @@ -15,7 +15,11 @@ function foo(tagName: any): Base { //// [constantOverloadFunction.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js b/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js index dd5bbf27d61..754abfd106e 100644 --- a/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js +++ b/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js @@ -16,7 +16,11 @@ function foo(tagName: any): Base { //// [constantOverloadFunctionNoSubtypeError.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js b/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js index a68f1411821..c1747ba54ff 100644 --- a/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js +++ b/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js @@ -21,7 +21,11 @@ class Container { //// [constraintCheckInGenericBaseTypeReference.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.js index f082035064b..9b6d7599516 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.js @@ -72,7 +72,11 @@ interface I extends A { //// [constructSignatureAssignabilityInInheritance2.js] // checking subtype relations for function types as it relates to contextual signature instantiation var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.js index ad834dd6cb4..c7b62f9521f 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.js @@ -115,7 +115,11 @@ module Errors { // checking subtype relations for function types as it relates to contextual signature instantiation // error cases var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance4.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance4.js index 12fc6bc872f..c328a70455f 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance4.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance4.js @@ -62,7 +62,11 @@ interface I extends A { //// [constructSignatureAssignabilityInInheritance4.js] // checking subtype relations for function types as it relates to contextual signature instantiation var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.js index 10172a751ab..4f2addd338b 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.js @@ -52,7 +52,11 @@ interface I extends B { // checking subtype relations for function types as it relates to contextual signature instantiation // same as subtypingWithConstructSignatures2 just with an extra level of indirection in the inheritance chain var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.js index 8c0fc83b406..a8bac464ac3 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.js @@ -55,7 +55,11 @@ interface I9 extends A { // same as subtypingWithConstructSignatures4 but using class type parameters instead of generic signatures // all are errors var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructorArgs.js b/tests/baselines/reference/constructorArgs.js index 333cc843162..001a0656c91 100644 --- a/tests/baselines/reference/constructorArgs.js +++ b/tests/baselines/reference/constructorArgs.js @@ -17,7 +17,11 @@ class Sub extends Super { //// [constructorArgs.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType.js b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType.js index 806ff9581ca..4132399c970 100644 --- a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType.js +++ b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType.js @@ -21,7 +21,11 @@ class Derived2 extends Base { //// [constructorFunctionTypeIsAssignableToBaseType.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js index 4308710ef81..339edd29823 100644 --- a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js +++ b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js @@ -35,7 +35,11 @@ class Derived2 extends Base { //// [constructorFunctionTypeIsAssignableToBaseType2.js] // the constructor function itself does not need to be a subtype of the base type constructor function var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructorHasPrototypeProperty.js b/tests/baselines/reference/constructorHasPrototypeProperty.js index c36307ee7fe..551b2644518 100644 --- a/tests/baselines/reference/constructorHasPrototypeProperty.js +++ b/tests/baselines/reference/constructorHasPrototypeProperty.js @@ -33,7 +33,11 @@ module Generic { //// [constructorHasPrototypeProperty.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructorOverloads2.js b/tests/baselines/reference/constructorOverloads2.js index 43553c8f72c..5aca4c6583a 100644 --- a/tests/baselines/reference/constructorOverloads2.js +++ b/tests/baselines/reference/constructorOverloads2.js @@ -27,7 +27,11 @@ f1.bar1(); //// [constructorOverloads2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructorOverloads3.js b/tests/baselines/reference/constructorOverloads3.js index fc916a1b283..063f4c72443 100644 --- a/tests/baselines/reference/constructorOverloads3.js +++ b/tests/baselines/reference/constructorOverloads3.js @@ -24,7 +24,11 @@ f1.bar1(); //// [constructorOverloads3.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructorWithCapturedSuper.js b/tests/baselines/reference/constructorWithCapturedSuper.js index f128a5f25a0..706d2522cfb 100644 --- a/tests/baselines/reference/constructorWithCapturedSuper.js +++ b/tests/baselines/reference/constructorWithCapturedSuper.js @@ -54,7 +54,11 @@ class D extends A { //// [constructorWithCapturedSuper.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js index bcf6ee23d91..6c670b245c5 100644 --- a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js +++ b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js @@ -282,7 +282,11 @@ TypeScriptAllInOne.Program.Main(); //// [constructorWithIncompleteTypeAnnotation.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/contextualTypingArrayOfLambdas.js b/tests/baselines/reference/contextualTypingArrayOfLambdas.js index 6358453f4fa..9a172c202b2 100644 --- a/tests/baselines/reference/contextualTypingArrayOfLambdas.js +++ b/tests/baselines/reference/contextualTypingArrayOfLambdas.js @@ -16,7 +16,11 @@ var xs = [(x: A) => { }, (x: B) => { }, (x: C) => { }]; //// [contextualTypingArrayOfLambdas.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/contextualTypingOfConditionalExpression.js b/tests/baselines/reference/contextualTypingOfConditionalExpression.js index 70234ea3fec..c573962825b 100644 --- a/tests/baselines/reference/contextualTypingOfConditionalExpression.js +++ b/tests/baselines/reference/contextualTypingOfConditionalExpression.js @@ -16,7 +16,11 @@ var x2: (a: A) => void = true ? (a) => a.foo : (b) => b.foo; //// [contextualTypingOfConditionalExpression.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/contextualTypingOfConditionalExpression2.js b/tests/baselines/reference/contextualTypingOfConditionalExpression2.js index 5c40163b2e0..9ee11aeb985 100644 --- a/tests/baselines/reference/contextualTypingOfConditionalExpression2.js +++ b/tests/baselines/reference/contextualTypingOfConditionalExpression2.js @@ -14,7 +14,11 @@ var x2: (a: A) => void = true ? (a: C) => a.foo : (b: number) => { }; //// [contextualTypingOfConditionalExpression2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.js b/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.js index 2afea65e32a..2d7ca989a81 100644 --- a/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.js +++ b/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.js @@ -12,7 +12,11 @@ var a: D = foo("hi", []); //// [crashInsourcePropertyIsRelatableToTargetProperty.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declFileClassExtendsNull.js b/tests/baselines/reference/declFileClassExtendsNull.js index 0638373ab22..483c1ca4481 100644 --- a/tests/baselines/reference/declFileClassExtendsNull.js +++ b/tests/baselines/reference/declFileClassExtendsNull.js @@ -5,7 +5,11 @@ class ExtendsNull extends null { //// [declFileClassExtendsNull.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declFileForFunctionTypeAsTypeParameter.js b/tests/baselines/reference/declFileForFunctionTypeAsTypeParameter.js index 889ab313c01..f7465149b92 100644 --- a/tests/baselines/reference/declFileForFunctionTypeAsTypeParameter.js +++ b/tests/baselines/reference/declFileForFunctionTypeAsTypeParameter.js @@ -11,7 +11,11 @@ interface I extends X<() => number> { //// [declFileForFunctionTypeAsTypeParameter.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declFileGenericClassWithGenericExtendedClass.js b/tests/baselines/reference/declFileGenericClassWithGenericExtendedClass.js index 005e33950bc..8d0e10f73f9 100644 --- a/tests/baselines/reference/declFileGenericClassWithGenericExtendedClass.js +++ b/tests/baselines/reference/declFileGenericClassWithGenericExtendedClass.js @@ -14,7 +14,11 @@ class Baz implements IBar { //// [declFileGenericClassWithGenericExtendedClass.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declFileGenericType.js b/tests/baselines/reference/declFileGenericType.js index 47af8dc415a..f579968df06 100644 --- a/tests/baselines/reference/declFileGenericType.js +++ b/tests/baselines/reference/declFileGenericType.js @@ -42,7 +42,11 @@ export var j = C.F6; //// [declFileGenericType.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declFileGenericType2.js b/tests/baselines/reference/declFileGenericType2.js index f6fb93cb28b..4f01f058b19 100644 --- a/tests/baselines/reference/declFileGenericType2.js +++ b/tests/baselines/reference/declFileGenericType2.js @@ -44,7 +44,11 @@ module templa.dom.mvc.composite { //// [declFileGenericType2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js b/tests/baselines/reference/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js index 45cde43ee4f..8f38d09160f 100644 --- a/tests/baselines/reference/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js +++ b/tests/baselines/reference/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js @@ -22,7 +22,11 @@ module X.Y.base.Z { //// [declFileWithClassNameConflictingWithClassReferredByExtendsClause.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declFileWithExtendsClauseThatHasItsContainerNameConflict.js b/tests/baselines/reference/declFileWithExtendsClauseThatHasItsContainerNameConflict.js index c7b4a7483e9..cacaa587609 100644 --- a/tests/baselines/reference/declFileWithExtendsClauseThatHasItsContainerNameConflict.js +++ b/tests/baselines/reference/declFileWithExtendsClauseThatHasItsContainerNameConflict.js @@ -20,7 +20,11 @@ module A.B.C { //// [declFileWithExtendsClauseThatHasItsContainerNameConflict.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declarationEmitExpressionInExtends.js b/tests/baselines/reference/declarationEmitExpressionInExtends.js index 34b8206e43a..acda2589195 100644 --- a/tests/baselines/reference/declarationEmitExpressionInExtends.js +++ b/tests/baselines/reference/declarationEmitExpressionInExtends.js @@ -16,7 +16,11 @@ q.s; //// [declarationEmitExpressionInExtends.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declarationEmitExpressionInExtends2.js b/tests/baselines/reference/declarationEmitExpressionInExtends2.js index 106fe00152b..8f0c53f66ac 100644 --- a/tests/baselines/reference/declarationEmitExpressionInExtends2.js +++ b/tests/baselines/reference/declarationEmitExpressionInExtends2.js @@ -14,7 +14,11 @@ class MyClass extends getClass(2) { //// [declarationEmitExpressionInExtends2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declarationEmitExpressionInExtends3.js b/tests/baselines/reference/declarationEmitExpressionInExtends3.js index c1fbd1fea90..902ddc08bc0 100644 --- a/tests/baselines/reference/declarationEmitExpressionInExtends3.js +++ b/tests/baselines/reference/declarationEmitExpressionInExtends3.js @@ -46,7 +46,11 @@ export class MyClass4 extends getExportedClass(undefined)>>var __extends = (this && this.__extends) || function (d, b) { ->>> Object.setPrototypeOf(d, b); +>>> if (typeof Object.setPrototypeOf === "function") { +>>> Object.setPrototypeOf(d, b); +>>> } else { +>>> d.__proto__ = b; +>>> } >>> function __() { this.constructor = d; } >>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); >>>}; @@ -18,7 +22,7 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 2 >^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(6, 1) Source(2, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(2, 1) + SourceIndex(0) --- >>> function C(value) { 1->^^^^ @@ -33,9 +37,9 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts > 2 > constructor( 3 > value: number -1->Emitted(7, 5) Source(7, 5) + SourceIndex(0) -2 >Emitted(7, 16) Source(7, 17) + SourceIndex(0) -3 >Emitted(7, 21) Source(7, 30) + SourceIndex(0) +1->Emitted(11, 5) Source(7, 5) + SourceIndex(0) +2 >Emitted(11, 16) Source(7, 17) + SourceIndex(0) +3 >Emitted(11, 21) Source(7, 30) + SourceIndex(0) --- >>> this.cProp = 10; 1->^^^^^^^^ @@ -48,11 +52,11 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 3 > = 4 > 10 5 > ; -1->Emitted(8, 9) Source(3, 5) + SourceIndex(0) -2 >Emitted(8, 19) Source(3, 10) + SourceIndex(0) -3 >Emitted(8, 22) Source(3, 13) + SourceIndex(0) -4 >Emitted(8, 24) Source(3, 15) + SourceIndex(0) -5 >Emitted(8, 25) Source(3, 16) + SourceIndex(0) +1->Emitted(12, 9) Source(3, 5) + SourceIndex(0) +2 >Emitted(12, 19) Source(3, 10) + SourceIndex(0) +3 >Emitted(12, 22) Source(3, 13) + SourceIndex(0) +4 >Emitted(12, 24) Source(3, 15) + SourceIndex(0) +5 >Emitted(12, 25) Source(3, 16) + SourceIndex(0) --- >>> return { 1 >^^^^^^^^ @@ -67,9 +71,9 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts > 2 > return 3 > -1 >Emitted(9, 9) Source(8, 9) + SourceIndex(0) -2 >Emitted(9, 15) Source(8, 15) + SourceIndex(0) -3 >Emitted(9, 16) Source(8, 16) + SourceIndex(0) +1 >Emitted(13, 9) Source(8, 9) + SourceIndex(0) +2 >Emitted(13, 15) Source(8, 15) + SourceIndex(0) +3 >Emitted(13, 16) Source(8, 16) + SourceIndex(0) --- >>> cProp: value, 1->^^^^^^^^^^^^ @@ -82,10 +86,10 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 2 > cProp 3 > : 4 > value -1->Emitted(10, 13) Source(9, 13) + SourceIndex(0) -2 >Emitted(10, 18) Source(9, 18) + SourceIndex(0) -3 >Emitted(10, 20) Source(9, 20) + SourceIndex(0) -4 >Emitted(10, 25) Source(9, 25) + SourceIndex(0) +1->Emitted(14, 13) Source(9, 13) + SourceIndex(0) +2 >Emitted(14, 18) Source(9, 18) + SourceIndex(0) +3 >Emitted(14, 20) Source(9, 20) + SourceIndex(0) +4 >Emitted(14, 25) Source(9, 25) + SourceIndex(0) --- >>> foo: function () { 1->^^^^^^^^^^^^ @@ -94,8 +98,8 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 1->, > 2 > foo -1->Emitted(11, 13) Source(10, 13) + SourceIndex(0) -2 >Emitted(11, 16) Source(10, 16) + SourceIndex(0) +1->Emitted(15, 13) Source(10, 13) + SourceIndex(0) +2 >Emitted(15, 16) Source(10, 16) + SourceIndex(0) --- >>> return "well this looks kinda C-ish."; 1->^^^^^^^^^^^^^^^^ @@ -109,11 +113,11 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 3 > 4 > "well this looks kinda C-ish." 5 > ; -1->Emitted(12, 17) Source(11, 17) + SourceIndex(0) -2 >Emitted(12, 23) Source(11, 23) + SourceIndex(0) -3 >Emitted(12, 24) Source(11, 24) + SourceIndex(0) -4 >Emitted(12, 54) Source(11, 54) + SourceIndex(0) -5 >Emitted(12, 55) Source(11, 55) + SourceIndex(0) +1->Emitted(16, 17) Source(11, 17) + SourceIndex(0) +2 >Emitted(16, 23) Source(11, 23) + SourceIndex(0) +3 >Emitted(16, 24) Source(11, 24) + SourceIndex(0) +4 >Emitted(16, 54) Source(11, 54) + SourceIndex(0) +5 >Emitted(16, 55) Source(11, 55) + SourceIndex(0) --- >>> } 1 >^^^^^^^^^^^^ @@ -121,8 +125,8 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 1 > > 2 > } -1 >Emitted(13, 13) Source(12, 13) + SourceIndex(0) -2 >Emitted(13, 14) Source(12, 14) + SourceIndex(0) +1 >Emitted(17, 13) Source(12, 13) + SourceIndex(0) +2 >Emitted(17, 14) Source(12, 14) + SourceIndex(0) --- >>> }; 1 >^^^^^^^^^ @@ -130,8 +134,8 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 1 > > } 2 > -1 >Emitted(14, 10) Source(13, 10) + SourceIndex(0) -2 >Emitted(14, 11) Source(13, 10) + SourceIndex(0) +1 >Emitted(18, 10) Source(13, 10) + SourceIndex(0) +2 >Emitted(18, 11) Source(13, 10) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -140,8 +144,8 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 1 > > 2 > } -1 >Emitted(15, 5) Source(14, 5) + SourceIndex(0) -2 >Emitted(15, 6) Source(14, 6) + SourceIndex(0) +1 >Emitted(19, 5) Source(14, 5) + SourceIndex(0) +2 >Emitted(19, 6) Source(14, 6) + SourceIndex(0) --- >>> C.prototype.foo = function () { return "this never gets used."; }; 1->^^^^ @@ -164,16 +168,16 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 8 > ; 9 > 10> } -1->Emitted(16, 5) Source(5, 5) + SourceIndex(0) -2 >Emitted(16, 20) Source(5, 8) + SourceIndex(0) -3 >Emitted(16, 23) Source(5, 5) + SourceIndex(0) -4 >Emitted(16, 37) Source(5, 13) + SourceIndex(0) -5 >Emitted(16, 43) Source(5, 19) + SourceIndex(0) -6 >Emitted(16, 44) Source(5, 20) + SourceIndex(0) -7 >Emitted(16, 67) Source(5, 43) + SourceIndex(0) -8 >Emitted(16, 68) Source(5, 44) + SourceIndex(0) -9 >Emitted(16, 69) Source(5, 45) + SourceIndex(0) -10>Emitted(16, 70) Source(5, 46) + SourceIndex(0) +1->Emitted(20, 5) Source(5, 5) + SourceIndex(0) +2 >Emitted(20, 20) Source(5, 8) + SourceIndex(0) +3 >Emitted(20, 23) Source(5, 5) + SourceIndex(0) +4 >Emitted(20, 37) Source(5, 13) + SourceIndex(0) +5 >Emitted(20, 43) Source(5, 19) + SourceIndex(0) +6 >Emitted(20, 44) Source(5, 20) + SourceIndex(0) +7 >Emitted(20, 67) Source(5, 43) + SourceIndex(0) +8 >Emitted(20, 68) Source(5, 44) + SourceIndex(0) +9 >Emitted(20, 69) Source(5, 45) + SourceIndex(0) +10>Emitted(20, 70) Source(5, 46) + SourceIndex(0) --- >>> return C; 1 >^^^^ @@ -190,8 +194,8 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts > } > 2 > } -1 >Emitted(17, 5) Source(15, 1) + SourceIndex(0) -2 >Emitted(17, 13) Source(15, 2) + SourceIndex(0) +1 >Emitted(21, 5) Source(15, 1) + SourceIndex(0) +2 >Emitted(21, 13) Source(15, 2) + SourceIndex(0) --- >>>}()); 1 > @@ -216,10 +220,10 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts > } > } > } -1 >Emitted(18, 1) Source(15, 1) + SourceIndex(0) -2 >Emitted(18, 2) Source(15, 2) + SourceIndex(0) -3 >Emitted(18, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(18, 6) Source(15, 2) + SourceIndex(0) +1 >Emitted(22, 1) Source(15, 1) + SourceIndex(0) +2 >Emitted(22, 2) Source(15, 2) + SourceIndex(0) +3 >Emitted(22, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(22, 6) Source(15, 2) + SourceIndex(0) --- >>>var D = (function (_super) { 1-> @@ -227,15 +231,15 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 1-> > > -1->Emitted(19, 1) Source(17, 1) + SourceIndex(0) +1->Emitted(23, 1) Source(17, 1) + SourceIndex(0) --- >>> __extends(D, _super); 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^ 1->class D extends 2 > C -1->Emitted(20, 5) Source(17, 17) + SourceIndex(0) -2 >Emitted(20, 26) Source(17, 18) + SourceIndex(0) +1->Emitted(24, 5) Source(17, 17) + SourceIndex(0) +2 >Emitted(24, 26) Source(17, 18) + SourceIndex(0) --- >>> function D(a) { 1 >^^^^ @@ -248,9 +252,9 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts > 2 > constructor( 3 > a = 100 -1 >Emitted(21, 5) Source(20, 5) + SourceIndex(0) -2 >Emitted(21, 16) Source(20, 17) + SourceIndex(0) -3 >Emitted(21, 17) Source(20, 24) + SourceIndex(0) +1 >Emitted(25, 5) Source(20, 5) + SourceIndex(0) +2 >Emitted(25, 16) Source(20, 17) + SourceIndex(0) +3 >Emitted(25, 17) Source(20, 24) + SourceIndex(0) --- >>> if (a === void 0) { a = 100; } 1->^^^^^^^^ @@ -262,10 +266,10 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 2 > 3 > 4 > a = 100 -1->Emitted(22, 9) Source(20, 17) + SourceIndex(0) -2 >Emitted(22, 27) Source(20, 17) + SourceIndex(0) -3 >Emitted(22, 29) Source(20, 17) + SourceIndex(0) -4 >Emitted(22, 36) Source(20, 24) + SourceIndex(0) +1->Emitted(26, 9) Source(20, 17) + SourceIndex(0) +2 >Emitted(26, 27) Source(20, 17) + SourceIndex(0) +3 >Emitted(26, 29) Source(20, 17) + SourceIndex(0) +4 >Emitted(26, 36) Source(20, 24) + SourceIndex(0) --- >>> var _this = _super.call(this, a) || this; 1->^^^^^^^^ @@ -294,12 +298,12 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts > else > return null; > } -1->Emitted(23, 9) Source(20, 5) + SourceIndex(0) -2 >Emitted(23, 21) Source(21, 9) + SourceIndex(0) -3 >Emitted(23, 39) Source(21, 15) + SourceIndex(0) -4 >Emitted(23, 40) Source(21, 16) + SourceIndex(0) -5 >Emitted(23, 41) Source(21, 17) + SourceIndex(0) -6 >Emitted(23, 50) Source(33, 6) + SourceIndex(0) +1->Emitted(27, 9) Source(20, 5) + SourceIndex(0) +2 >Emitted(27, 21) Source(21, 9) + SourceIndex(0) +3 >Emitted(27, 39) Source(21, 15) + SourceIndex(0) +4 >Emitted(27, 40) Source(21, 16) + SourceIndex(0) +5 >Emitted(27, 41) Source(21, 17) + SourceIndex(0) +6 >Emitted(27, 50) Source(33, 6) + SourceIndex(0) --- >>> _this.dProp = function () { return _this; }; 1->^^^^^^^^ @@ -320,15 +324,15 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 7 > 8 > this 9 > ; -1->Emitted(24, 9) Source(18, 5) + SourceIndex(0) -2 >Emitted(24, 20) Source(18, 10) + SourceIndex(0) -3 >Emitted(24, 23) Source(18, 13) + SourceIndex(0) -4 >Emitted(24, 37) Source(18, 19) + SourceIndex(0) -5 >Emitted(24, 44) Source(18, 19) + SourceIndex(0) -6 >Emitted(24, 49) Source(18, 23) + SourceIndex(0) -7 >Emitted(24, 51) Source(18, 19) + SourceIndex(0) -8 >Emitted(24, 52) Source(18, 23) + SourceIndex(0) -9 >Emitted(24, 53) Source(18, 24) + SourceIndex(0) +1->Emitted(28, 9) Source(18, 5) + SourceIndex(0) +2 >Emitted(28, 20) Source(18, 10) + SourceIndex(0) +3 >Emitted(28, 23) Source(18, 13) + SourceIndex(0) +4 >Emitted(28, 37) Source(18, 19) + SourceIndex(0) +5 >Emitted(28, 44) Source(18, 19) + SourceIndex(0) +6 >Emitted(28, 49) Source(18, 23) + SourceIndex(0) +7 >Emitted(28, 51) Source(18, 19) + SourceIndex(0) +8 >Emitted(28, 52) Source(18, 23) + SourceIndex(0) +9 >Emitted(28, 53) Source(18, 24) + SourceIndex(0) --- >>> if (Math.random() < 0.5) { 1 >^^^^^^^^ @@ -362,19 +366,19 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 11> ) 12> 13> { -1 >Emitted(25, 9) Source(23, 9) + SourceIndex(0) -2 >Emitted(25, 11) Source(23, 11) + SourceIndex(0) -3 >Emitted(25, 12) Source(23, 12) + SourceIndex(0) -4 >Emitted(25, 13) Source(23, 13) + SourceIndex(0) -5 >Emitted(25, 17) Source(23, 17) + SourceIndex(0) -6 >Emitted(25, 18) Source(23, 18) + SourceIndex(0) -7 >Emitted(25, 24) Source(23, 24) + SourceIndex(0) -8 >Emitted(25, 26) Source(23, 26) + SourceIndex(0) -9 >Emitted(25, 29) Source(23, 29) + SourceIndex(0) -10>Emitted(25, 32) Source(23, 32) + SourceIndex(0) -11>Emitted(25, 33) Source(23, 33) + SourceIndex(0) -12>Emitted(25, 34) Source(23, 34) + SourceIndex(0) -13>Emitted(25, 35) Source(23, 35) + SourceIndex(0) +1 >Emitted(29, 9) Source(23, 9) + SourceIndex(0) +2 >Emitted(29, 11) Source(23, 11) + SourceIndex(0) +3 >Emitted(29, 12) Source(23, 12) + SourceIndex(0) +4 >Emitted(29, 13) Source(23, 13) + SourceIndex(0) +5 >Emitted(29, 17) Source(23, 17) + SourceIndex(0) +6 >Emitted(29, 18) Source(23, 18) + SourceIndex(0) +7 >Emitted(29, 24) Source(23, 24) + SourceIndex(0) +8 >Emitted(29, 26) Source(23, 26) + SourceIndex(0) +9 >Emitted(29, 29) Source(23, 29) + SourceIndex(0) +10>Emitted(29, 32) Source(23, 32) + SourceIndex(0) +11>Emitted(29, 33) Source(23, 33) + SourceIndex(0) +12>Emitted(29, 34) Source(23, 34) + SourceIndex(0) +13>Emitted(29, 35) Source(23, 35) + SourceIndex(0) --- >>> "You win!"; 1 >^^^^^^^^^^^^ @@ -384,9 +388,9 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts > 2 > "You win!" 3 > -1 >Emitted(26, 13) Source(24, 13) + SourceIndex(0) -2 >Emitted(26, 23) Source(24, 23) + SourceIndex(0) -3 >Emitted(26, 24) Source(24, 23) + SourceIndex(0) +1 >Emitted(30, 13) Source(24, 13) + SourceIndex(0) +2 >Emitted(30, 23) Source(24, 23) + SourceIndex(0) +3 >Emitted(30, 24) Source(24, 23) + SourceIndex(0) --- >>> return { 1 >^^^^^^^^^^^^ @@ -397,9 +401,9 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts > 2 > return 3 > -1 >Emitted(27, 13) Source(25, 13) + SourceIndex(0) -2 >Emitted(27, 19) Source(25, 19) + SourceIndex(0) -3 >Emitted(27, 20) Source(25, 20) + SourceIndex(0) +1 >Emitted(31, 13) Source(25, 13) + SourceIndex(0) +2 >Emitted(31, 19) Source(25, 19) + SourceIndex(0) +3 >Emitted(31, 20) Source(25, 20) + SourceIndex(0) --- >>> cProp: 1, 1->^^^^^^^^^^^^^^^^ @@ -412,10 +416,10 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 2 > cProp 3 > : 4 > 1 -1->Emitted(28, 17) Source(26, 17) + SourceIndex(0) -2 >Emitted(28, 22) Source(26, 22) + SourceIndex(0) -3 >Emitted(28, 24) Source(26, 24) + SourceIndex(0) -4 >Emitted(28, 25) Source(26, 25) + SourceIndex(0) +1->Emitted(32, 17) Source(26, 17) + SourceIndex(0) +2 >Emitted(32, 22) Source(26, 22) + SourceIndex(0) +3 >Emitted(32, 24) Source(26, 24) + SourceIndex(0) +4 >Emitted(32, 25) Source(26, 25) + SourceIndex(0) --- >>> dProp: function () { return _this; }, 1->^^^^^^^^^^^^^^^^ @@ -436,14 +440,14 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 6 > this 7 > 8 > this -1->Emitted(29, 17) Source(27, 17) + SourceIndex(0) -2 >Emitted(29, 22) Source(27, 22) + SourceIndex(0) -3 >Emitted(29, 24) Source(27, 24) + SourceIndex(0) -4 >Emitted(29, 38) Source(27, 30) + SourceIndex(0) -5 >Emitted(29, 45) Source(27, 30) + SourceIndex(0) -6 >Emitted(29, 50) Source(27, 34) + SourceIndex(0) -7 >Emitted(29, 52) Source(27, 30) + SourceIndex(0) -8 >Emitted(29, 53) Source(27, 34) + SourceIndex(0) +1->Emitted(33, 17) Source(27, 17) + SourceIndex(0) +2 >Emitted(33, 22) Source(27, 22) + SourceIndex(0) +3 >Emitted(33, 24) Source(27, 24) + SourceIndex(0) +4 >Emitted(33, 38) Source(27, 30) + SourceIndex(0) +5 >Emitted(33, 45) Source(27, 30) + SourceIndex(0) +6 >Emitted(33, 50) Source(27, 34) + SourceIndex(0) +7 >Emitted(33, 52) Source(27, 30) + SourceIndex(0) +8 >Emitted(33, 53) Source(27, 34) + SourceIndex(0) --- >>> foo: function () { return "You win!!!!!"; } 1->^^^^^^^^^^^^^^^^ @@ -465,15 +469,15 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 7 > 8 > 9 > } -1->Emitted(30, 17) Source(28, 17) + SourceIndex(0) -2 >Emitted(30, 20) Source(28, 20) + SourceIndex(0) -3 >Emitted(30, 36) Source(28, 25) + SourceIndex(0) -4 >Emitted(30, 42) Source(28, 31) + SourceIndex(0) -5 >Emitted(30, 43) Source(28, 32) + SourceIndex(0) -6 >Emitted(30, 57) Source(28, 46) + SourceIndex(0) -7 >Emitted(30, 58) Source(28, 46) + SourceIndex(0) -8 >Emitted(30, 59) Source(28, 47) + SourceIndex(0) -9 >Emitted(30, 60) Source(28, 48) + SourceIndex(0) +1->Emitted(34, 17) Source(28, 17) + SourceIndex(0) +2 >Emitted(34, 20) Source(28, 20) + SourceIndex(0) +3 >Emitted(34, 36) Source(28, 25) + SourceIndex(0) +4 >Emitted(34, 42) Source(28, 31) + SourceIndex(0) +5 >Emitted(34, 43) Source(28, 32) + SourceIndex(0) +6 >Emitted(34, 57) Source(28, 46) + SourceIndex(0) +7 >Emitted(34, 58) Source(28, 46) + SourceIndex(0) +8 >Emitted(34, 59) Source(28, 47) + SourceIndex(0) +9 >Emitted(34, 60) Source(28, 48) + SourceIndex(0) --- >>> }; 1 >^^^^^^^^^^^^^ @@ -481,8 +485,8 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 1 > > } 2 > ; -1 >Emitted(31, 14) Source(29, 14) + SourceIndex(0) -2 >Emitted(31, 15) Source(29, 15) + SourceIndex(0) +1 >Emitted(35, 14) Source(29, 14) + SourceIndex(0) +2 >Emitted(35, 15) Source(29, 15) + SourceIndex(0) --- >>> } 1 >^^^^^^^^ @@ -491,8 +495,8 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 1 > > 2 > } -1 >Emitted(32, 9) Source(30, 9) + SourceIndex(0) -2 >Emitted(32, 10) Source(30, 10) + SourceIndex(0) +1 >Emitted(36, 9) Source(30, 9) + SourceIndex(0) +2 >Emitted(36, 10) Source(30, 10) + SourceIndex(0) --- >>> else 1->^^^^^^^^ @@ -501,8 +505,8 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 1-> > 2 > else -1->Emitted(33, 9) Source(31, 9) + SourceIndex(0) -2 >Emitted(33, 13) Source(31, 13) + SourceIndex(0) +1->Emitted(37, 9) Source(31, 9) + SourceIndex(0) +2 >Emitted(37, 13) Source(31, 13) + SourceIndex(0) --- >>> return null; 1->^^^^^^^^^^^^ @@ -516,11 +520,11 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 3 > 4 > null 5 > ; -1->Emitted(34, 13) Source(32, 13) + SourceIndex(0) -2 >Emitted(34, 19) Source(32, 19) + SourceIndex(0) -3 >Emitted(34, 20) Source(32, 20) + SourceIndex(0) -4 >Emitted(34, 24) Source(32, 24) + SourceIndex(0) -5 >Emitted(34, 25) Source(32, 25) + SourceIndex(0) +1->Emitted(38, 13) Source(32, 13) + SourceIndex(0) +2 >Emitted(38, 19) Source(32, 19) + SourceIndex(0) +3 >Emitted(38, 20) Source(32, 20) + SourceIndex(0) +4 >Emitted(38, 24) Source(32, 24) + SourceIndex(0) +5 >Emitted(38, 25) Source(32, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -529,8 +533,8 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 1 > > 2 > } -1 >Emitted(35, 5) Source(33, 5) + SourceIndex(0) -2 >Emitted(35, 6) Source(33, 6) + SourceIndex(0) +1 >Emitted(39, 5) Source(33, 5) + SourceIndex(0) +2 >Emitted(39, 6) Source(33, 6) + SourceIndex(0) --- >>> return D; 1->^^^^ @@ -538,8 +542,8 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 1-> > 2 > } -1->Emitted(36, 5) Source(34, 1) + SourceIndex(0) -2 >Emitted(36, 13) Source(34, 2) + SourceIndex(0) +1->Emitted(40, 5) Source(34, 1) + SourceIndex(0) +2 >Emitted(40, 13) Source(34, 2) + SourceIndex(0) --- >>>}(C)); 1 > @@ -572,11 +576,11 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts > return null; > } > } -1 >Emitted(37, 1) Source(34, 1) + SourceIndex(0) -2 >Emitted(37, 2) Source(34, 2) + SourceIndex(0) -3 >Emitted(37, 2) Source(17, 1) + SourceIndex(0) -4 >Emitted(37, 3) Source(17, 17) + SourceIndex(0) -5 >Emitted(37, 4) Source(17, 18) + SourceIndex(0) -6 >Emitted(37, 7) Source(34, 2) + SourceIndex(0) +1 >Emitted(41, 1) Source(34, 1) + SourceIndex(0) +2 >Emitted(41, 2) Source(34, 2) + SourceIndex(0) +3 >Emitted(41, 2) Source(17, 1) + SourceIndex(0) +4 >Emitted(41, 3) Source(17, 17) + SourceIndex(0) +5 >Emitted(41, 4) Source(17, 18) + SourceIndex(0) +6 >Emitted(41, 7) Source(34, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=derivedClassConstructorWithExplicitReturns01.js.map \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js b/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js index 55ceea201ed..31c8c3f722c 100644 --- a/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js +++ b/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js @@ -35,7 +35,11 @@ class Derived4 extends Base2 { //// [derivedClassConstructorWithoutSuperCall.js] // derived class constructors must contain a super call var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.js b/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.js index fe6be20e2ac..b948302a2d5 100644 --- a/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.js +++ b/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.js @@ -16,7 +16,11 @@ class Derived extends Base { //// [derivedClassFunctionOverridesBaseClassAccessor.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassIncludesInheritedMembers.js b/tests/baselines/reference/derivedClassIncludesInheritedMembers.js index 8b6f6fe34cb..cf5454d704f 100644 --- a/tests/baselines/reference/derivedClassIncludesInheritedMembers.js +++ b/tests/baselines/reference/derivedClassIncludesInheritedMembers.js @@ -42,7 +42,11 @@ var r8 = d2[1]; //// [derivedClassIncludesInheritedMembers.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesIndexersWithAssignmentCompatibility.js b/tests/baselines/reference/derivedClassOverridesIndexersWithAssignmentCompatibility.js index 80fd6fd251c..0d483a3eff6 100644 --- a/tests/baselines/reference/derivedClassOverridesIndexersWithAssignmentCompatibility.js +++ b/tests/baselines/reference/derivedClassOverridesIndexersWithAssignmentCompatibility.js @@ -19,7 +19,11 @@ class Derived2 extends Base2 { //// [derivedClassOverridesIndexersWithAssignmentCompatibility.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesPrivateFunction1.js b/tests/baselines/reference/derivedClassOverridesPrivateFunction1.js index c5d48de031e..8306e702cb1 100644 --- a/tests/baselines/reference/derivedClassOverridesPrivateFunction1.js +++ b/tests/baselines/reference/derivedClassOverridesPrivateFunction1.js @@ -17,7 +17,11 @@ new DerivedClass(); //// [derivedClassOverridesPrivateFunction1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesPrivates.js b/tests/baselines/reference/derivedClassOverridesPrivates.js index fa4b88bdc56..c32560eca59 100644 --- a/tests/baselines/reference/derivedClassOverridesPrivates.js +++ b/tests/baselines/reference/derivedClassOverridesPrivates.js @@ -17,7 +17,11 @@ class Derived2 extends Base2 { //// [derivedClassOverridesPrivates.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers.js index b4fb59ffd2c..03addf8ace5 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers.js @@ -38,7 +38,11 @@ class Derived extends Base { //// [derivedClassOverridesProtectedMembers.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js index 13f2cfc4698..0cfe6f3dd9d 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js @@ -65,7 +65,11 @@ var r8 = d2[1]; //// [derivedClassOverridesProtectedMembers2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js index 24602737e6b..d18fd9d1a30 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js @@ -73,7 +73,11 @@ class Derived10 extends Base { //// [derivedClassOverridesProtectedMembers3.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers4.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers4.js index add886d1985..2d89040ff13 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers4.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers4.js @@ -16,7 +16,11 @@ class Derived2 extends Derived1 { //// [derivedClassOverridesProtectedMembers4.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesPublicMembers.js b/tests/baselines/reference/derivedClassOverridesPublicMembers.js index d8fa9e82683..2ef057082bd 100644 --- a/tests/baselines/reference/derivedClassOverridesPublicMembers.js +++ b/tests/baselines/reference/derivedClassOverridesPublicMembers.js @@ -64,7 +64,11 @@ var r8 = d2[1]; //// [derivedClassOverridesPublicMembers.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesWithoutSubtype.js b/tests/baselines/reference/derivedClassOverridesWithoutSubtype.js index bcd4e505721..4a1f7c0cbeb 100644 --- a/tests/baselines/reference/derivedClassOverridesWithoutSubtype.js +++ b/tests/baselines/reference/derivedClassOverridesWithoutSubtype.js @@ -25,7 +25,11 @@ class Derived2 extends Base2 { //// [derivedClassOverridesWithoutSubtype.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassParameterProperties.js b/tests/baselines/reference/derivedClassParameterProperties.js index cb08d4d8545..cdf1ab4cbbd 100644 --- a/tests/baselines/reference/derivedClassParameterProperties.js +++ b/tests/baselines/reference/derivedClassParameterProperties.js @@ -97,7 +97,11 @@ class Derived10 extends Base2 { //// [derivedClassParameterProperties.js] // ordering of super calls in derived constructors matters depending on other class contents var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js b/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js index cf7845a4d9a..c7a90e31dfe 100644 --- a/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js +++ b/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js @@ -34,7 +34,11 @@ class Derived extends Base { //// [derivedClassSuperCallsInNonConstructorMembers.js] // error to use super calls outside a constructor var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js b/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js index 59a4ff7e1d1..3d3aacdf55b 100644 --- a/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js +++ b/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js @@ -30,7 +30,11 @@ class Derived4 extends Base { //// [derivedClassSuperCallsWithThisArg.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassTransitivity.js b/tests/baselines/reference/derivedClassTransitivity.js index 6a6b713f250..c5ea3722feb 100644 --- a/tests/baselines/reference/derivedClassTransitivity.js +++ b/tests/baselines/reference/derivedClassTransitivity.js @@ -23,7 +23,11 @@ var r2 = e.foo(''); //// [derivedClassTransitivity.js] // subclassing is not transitive when you can remove required parameters and add optional parameters var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassTransitivity2.js b/tests/baselines/reference/derivedClassTransitivity2.js index 2d05dd09cee..bf9f1dbb574 100644 --- a/tests/baselines/reference/derivedClassTransitivity2.js +++ b/tests/baselines/reference/derivedClassTransitivity2.js @@ -23,7 +23,11 @@ var r2 = e.foo(1, ''); //// [derivedClassTransitivity2.js] // subclassing is not transitive when you can remove required parameters and add optional parameters var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassTransitivity3.js b/tests/baselines/reference/derivedClassTransitivity3.js index 6c02e2055d9..d149d9f5aa9 100644 --- a/tests/baselines/reference/derivedClassTransitivity3.js +++ b/tests/baselines/reference/derivedClassTransitivity3.js @@ -23,7 +23,11 @@ var r2 = e.foo('', 1); //// [derivedClassTransitivity3.js] // subclassing is not transitive when you can remove required parameters and add optional parameters var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassTransitivity4.js b/tests/baselines/reference/derivedClassTransitivity4.js index 7d375e8e94e..2d48cf28728 100644 --- a/tests/baselines/reference/derivedClassTransitivity4.js +++ b/tests/baselines/reference/derivedClassTransitivity4.js @@ -23,7 +23,11 @@ var r2 = e.foo(''); //// [derivedClassTransitivity4.js] // subclassing is not transitive when you can remove required parameters and add optional parameters on protected members var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassWithAny.js b/tests/baselines/reference/derivedClassWithAny.js index 51b4e5739f6..b376364e542 100644 --- a/tests/baselines/reference/derivedClassWithAny.js +++ b/tests/baselines/reference/derivedClassWithAny.js @@ -61,7 +61,11 @@ var r = c.foo(); // e.foo would return string //// [derivedClassWithAny.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js index 8a86f4ab4a9..e5fe6eb2560 100644 --- a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js +++ b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js @@ -24,7 +24,11 @@ class Derived extends Base { //// [derivedClassWithPrivateInstanceShadowingProtectedInstance.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js index fab643265cb..5ac36e99b57 100644 --- a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js +++ b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js @@ -34,7 +34,11 @@ Derived.a = 2; // error //// [derivedClassWithPrivateInstanceShadowingPublicInstance.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js index 322514e1c82..9994c1bfb05 100644 --- a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js +++ b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js @@ -23,7 +23,11 @@ class Derived extends Base { //// [derivedClassWithPrivateStaticShadowingProtectedStatic.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js index 8c01a45e1ae..4183017f378 100644 --- a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js +++ b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js @@ -35,7 +35,11 @@ Derived.a = 2; // error //// [derivedClassWithPrivateStaticShadowingPublicStatic.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js b/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js index 462819c551d..d21cb14bcc4 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js @@ -27,7 +27,11 @@ var d2 = new D(new Date()); // ok //// [derivedClassWithoutExplicitConstructor.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js b/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js index 6e7c75ef37d..0acf65cd177 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js @@ -35,7 +35,11 @@ var d4 = new D(new Date(), new Date(), new Date()); //// [derivedClassWithoutExplicitConstructor2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js b/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js index 4d4527c172e..696ebcc1f9e 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js @@ -49,7 +49,11 @@ var d3 = new D2(new Date(), new Date()); // ok //// [derivedClassWithoutExplicitConstructor3.js] // automatic constructors with a class hieararchy of depth > 2 var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClasses.js b/tests/baselines/reference/derivedClasses.js index 00bdfcfde4e..36f1dcc799b 100644 --- a/tests/baselines/reference/derivedClasses.js +++ b/tests/baselines/reference/derivedClasses.js @@ -32,7 +32,11 @@ b.hue(); //// [derivedClasses.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedGenericClassWithAny.js b/tests/baselines/reference/derivedGenericClassWithAny.js index 410027ce76d..afba93ccac6 100644 --- a/tests/baselines/reference/derivedGenericClassWithAny.js +++ b/tests/baselines/reference/derivedGenericClassWithAny.js @@ -44,7 +44,11 @@ var r = c.foo(); // e.foo would return string //// [derivedGenericClassWithAny.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js b/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js index 367b0d895cf..c33bd3713fc 100644 --- a/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js +++ b/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js @@ -19,7 +19,11 @@ class Derived extends Base { //// [derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js b/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js index c890a28b110..3e28aece101 100644 --- a/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js +++ b/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js @@ -22,7 +22,11 @@ var r: Base[] = [d1, d2]; //// [derivedTypeDoesNotRequireExtendsClause.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/destructuringParameterDeclaration5.js b/tests/baselines/reference/destructuringParameterDeclaration5.js index d7b75ede23d..0c27e9b7f85 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration5.js +++ b/tests/baselines/reference/destructuringParameterDeclaration5.js @@ -53,7 +53,11 @@ d3({ y: "world" }); //// [destructuringParameterDeclaration5.js] // Parameter Declaration with generic var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js b/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js index fbc08b66624..80613c66be8 100644 --- a/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js +++ b/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js @@ -15,7 +15,11 @@ class B extends A { //// [emitSuperCallBeforeEmitParameterPropertyDeclaration1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js index 1328ece2af0..c0478a993c4 100644 --- a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js +++ b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js @@ -17,7 +17,11 @@ class B extends A { //// [emitSuperCallBeforeEmitPropertyDeclaration1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js index a9883b26e30..5d63f4f32af 100644 --- a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js +++ b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js @@ -15,7 +15,11 @@ class B extends A { //// [emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/emitThisInSuperMethodCall.js b/tests/baselines/reference/emitThisInSuperMethodCall.js index 1e23553a2d9..22d641e3414 100644 --- a/tests/baselines/reference/emitThisInSuperMethodCall.js +++ b/tests/baselines/reference/emitThisInSuperMethodCall.js @@ -29,7 +29,11 @@ class RegisteredUser extends User { //// [emitThisInSuperMethodCall.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/emptyModuleName.js b/tests/baselines/reference/emptyModuleName.js index 404abf6a42c..f6f4ea759a6 100644 --- a/tests/baselines/reference/emptyModuleName.js +++ b/tests/baselines/reference/emptyModuleName.js @@ -6,7 +6,11 @@ class B extends A { //// [emptyModuleName.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/errorForwardReferenceForwadingConstructor.js b/tests/baselines/reference/errorForwardReferenceForwadingConstructor.js index 2bfac7ec0f0..3320b144f11 100644 --- a/tests/baselines/reference/errorForwardReferenceForwadingConstructor.js +++ b/tests/baselines/reference/errorForwardReferenceForwadingConstructor.js @@ -13,7 +13,11 @@ class derived extends base { } //// [errorForwardReferenceForwadingConstructor.js] // Error forward referencing derived class with forwarding constructor var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/errorSuperCalls.js b/tests/baselines/reference/errorSuperCalls.js index 4e228777567..69691a62bb7 100644 --- a/tests/baselines/reference/errorSuperCalls.js +++ b/tests/baselines/reference/errorSuperCalls.js @@ -76,7 +76,11 @@ class OtherDerived extends OtherBase { //// [errorSuperCalls.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/errorSuperPropertyAccess.js b/tests/baselines/reference/errorSuperPropertyAccess.js index 62bb9919171..ed9ac2d8dd5 100644 --- a/tests/baselines/reference/errorSuperPropertyAccess.js +++ b/tests/baselines/reference/errorSuperPropertyAccess.js @@ -130,7 +130,11 @@ var obj = { n: super.wat, p: super.foo() }; //// [errorSuperPropertyAccess.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/errorsInGenericTypeReference.js b/tests/baselines/reference/errorsInGenericTypeReference.js index bb80f73f216..e63005bfe1a 100644 --- a/tests/baselines/reference/errorsInGenericTypeReference.js +++ b/tests/baselines/reference/errorsInGenericTypeReference.js @@ -74,7 +74,11 @@ interface testInterface2 { //// [errorsInGenericTypeReference.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/es6ClassSuperCodegenBug.js b/tests/baselines/reference/es6ClassSuperCodegenBug.js index fc6ad83738d..af87c3db821 100644 --- a/tests/baselines/reference/es6ClassSuperCodegenBug.js +++ b/tests/baselines/reference/es6ClassSuperCodegenBug.js @@ -16,7 +16,11 @@ class B extends A { //// [es6ClassSuperCodegenBug.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/es6ClassTest.js b/tests/baselines/reference/es6ClassTest.js index 8fa5be0ba3e..a20d939a794 100644 --- a/tests/baselines/reference/es6ClassTest.js +++ b/tests/baselines/reference/es6ClassTest.js @@ -86,7 +86,11 @@ declare module AmbientMod { //// [es6ClassTest.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/es6ClassTest2.js b/tests/baselines/reference/es6ClassTest2.js index 7004c7056f2..11d494c6291 100644 --- a/tests/baselines/reference/es6ClassTest2.js +++ b/tests/baselines/reference/es6ClassTest2.js @@ -160,7 +160,11 @@ var ccwc = new ChildClassWithoutConstructor(1, "s"); //// [es6ClassTest2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/es6ClassTest7.js b/tests/baselines/reference/es6ClassTest7.js index 20d46e6b53c..9cd21f44685 100644 --- a/tests/baselines/reference/es6ClassTest7.js +++ b/tests/baselines/reference/es6ClassTest7.js @@ -10,7 +10,11 @@ class Bar extends M.Foo { //// [es6ClassTest7.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/exportAssignmentOfGenericType1.js b/tests/baselines/reference/exportAssignmentOfGenericType1.js index 431da58c12e..e5d43bfaa9e 100644 --- a/tests/baselines/reference/exportAssignmentOfGenericType1.js +++ b/tests/baselines/reference/exportAssignmentOfGenericType1.js @@ -25,7 +25,11 @@ define(["require", "exports"], function (require, exports) { }); //// [exportAssignmentOfGenericType1_1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/exportDeclarationInInternalModule.js b/tests/baselines/reference/exportDeclarationInInternalModule.js index ddc2e15a5b2..934b3bb6ef0 100644 --- a/tests/baselines/reference/exportDeclarationInInternalModule.js +++ b/tests/baselines/reference/exportDeclarationInInternalModule.js @@ -20,7 +20,11 @@ var a: Bbb.SomeType; //// [exportDeclarationInInternalModule.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extBaseClass1.js b/tests/baselines/reference/extBaseClass1.js index d8eb5e75f9f..4603ff26320 100644 --- a/tests/baselines/reference/extBaseClass1.js +++ b/tests/baselines/reference/extBaseClass1.js @@ -21,7 +21,11 @@ module N { //// [extBaseClass1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extBaseClass2.js b/tests/baselines/reference/extBaseClass2.js index 474a91d2a72..285c96551b5 100644 --- a/tests/baselines/reference/extBaseClass2.js +++ b/tests/baselines/reference/extBaseClass2.js @@ -12,7 +12,11 @@ module M { //// [extBaseClass2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendAndImplementTheSameBaseType.js b/tests/baselines/reference/extendAndImplementTheSameBaseType.js index 1342df1b992..b3150a12bde 100644 --- a/tests/baselines/reference/extendAndImplementTheSameBaseType.js +++ b/tests/baselines/reference/extendAndImplementTheSameBaseType.js @@ -15,7 +15,11 @@ d.foo; //// [extendAndImplementTheSameBaseType.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendAndImplementTheSameBaseType2.js b/tests/baselines/reference/extendAndImplementTheSameBaseType2.js index 38b76b19942..1ecd77668d3 100644 --- a/tests/baselines/reference/extendAndImplementTheSameBaseType2.js +++ b/tests/baselines/reference/extendAndImplementTheSameBaseType2.js @@ -18,7 +18,11 @@ var r4: number = d.bar(); //// [extendAndImplementTheSameBaseType2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendBaseClassBeforeItsDeclared.js b/tests/baselines/reference/extendBaseClassBeforeItsDeclared.js index 8cf51642831..73c19b72565 100644 --- a/tests/baselines/reference/extendBaseClassBeforeItsDeclared.js +++ b/tests/baselines/reference/extendBaseClassBeforeItsDeclared.js @@ -5,7 +5,11 @@ class base { constructor (public n: number) { } } //// [extendBaseClassBeforeItsDeclared.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendClassExpressionFromModule.js b/tests/baselines/reference/extendClassExpressionFromModule.js index 27420b55d1c..bd3e01a7b29 100644 --- a/tests/baselines/reference/extendClassExpressionFromModule.js +++ b/tests/baselines/reference/extendClassExpressionFromModule.js @@ -22,7 +22,11 @@ module.exports = x; //// [foo2.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendConstructSignatureInInterface.js b/tests/baselines/reference/extendConstructSignatureInInterface.js index db87c4c14fd..28c5108f238 100644 --- a/tests/baselines/reference/extendConstructSignatureInInterface.js +++ b/tests/baselines/reference/extendConstructSignatureInInterface.js @@ -12,7 +12,11 @@ var e: E = new E(1); //// [extendConstructSignatureInInterface.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendNonClassSymbol1.js b/tests/baselines/reference/extendNonClassSymbol1.js index 00326e24103..8a6da5f4fa7 100644 --- a/tests/baselines/reference/extendNonClassSymbol1.js +++ b/tests/baselines/reference/extendNonClassSymbol1.js @@ -5,7 +5,11 @@ class C extends x { } // error, could not find symbol xs //// [extendNonClassSymbol1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendNonClassSymbol2.js b/tests/baselines/reference/extendNonClassSymbol2.js index ce030629af5..60f7a46a14f 100644 --- a/tests/baselines/reference/extendNonClassSymbol2.js +++ b/tests/baselines/reference/extendNonClassSymbol2.js @@ -7,7 +7,11 @@ class C extends Foo {} // error, could not find symbol Foo //// [extendNonClassSymbol2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendPrivateConstructorClass.js b/tests/baselines/reference/extendPrivateConstructorClass.js index 52b96e31611..983c7220397 100644 --- a/tests/baselines/reference/extendPrivateConstructorClass.js +++ b/tests/baselines/reference/extendPrivateConstructorClass.js @@ -11,7 +11,11 @@ class C extends abc.XYZ { //// [extendPrivateConstructorClass.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js b/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js index 92c5dc69681..af5f78dfcec 100644 --- a/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js +++ b/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js @@ -43,7 +43,11 @@ exports.Model = Model; //// [extendingClassFromAliasAndUsageInIndexer_moduleA.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -59,7 +63,11 @@ exports.VisualizationModel = VisualizationModel; //// [extendingClassFromAliasAndUsageInIndexer_moduleB.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendsClauseAlreadySeen.js b/tests/baselines/reference/extendsClauseAlreadySeen.js index 37cdd0eb9bc..06326b54282 100644 --- a/tests/baselines/reference/extendsClauseAlreadySeen.js +++ b/tests/baselines/reference/extendsClauseAlreadySeen.js @@ -8,7 +8,11 @@ class D extends C extends C { //// [extendsClauseAlreadySeen.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendsClauseAlreadySeen2.js b/tests/baselines/reference/extendsClauseAlreadySeen2.js index bc4306884a3..71555248556 100644 --- a/tests/baselines/reference/extendsClauseAlreadySeen2.js +++ b/tests/baselines/reference/extendsClauseAlreadySeen2.js @@ -8,7 +8,11 @@ class D extends C extends C { //// [extendsClauseAlreadySeen2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/fluentClasses.js b/tests/baselines/reference/fluentClasses.js index ade60a06331..360c7775d35 100644 --- a/tests/baselines/reference/fluentClasses.js +++ b/tests/baselines/reference/fluentClasses.js @@ -20,7 +20,11 @@ var z = c.foo().bar().baz(); // Fluent pattern //// [fluentClasses.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/for-inStatements.js b/tests/baselines/reference/for-inStatements.js index b34fd91192b..90ab9a3f96b 100644 --- a/tests/baselines/reference/for-inStatements.js +++ b/tests/baselines/reference/for-inStatements.js @@ -82,7 +82,11 @@ for (var x in Color.Blue) { } //// [for-inStatements.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/for-inStatementsInvalid.js b/tests/baselines/reference/for-inStatementsInvalid.js index 3d39fb2903b..2ba55110f2e 100644 --- a/tests/baselines/reference/for-inStatementsInvalid.js +++ b/tests/baselines/reference/for-inStatementsInvalid.js @@ -65,7 +65,11 @@ for (var x in i[42]) { } //// [for-inStatementsInvalid.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/forStatementsMultipleInvalidDecl.js b/tests/baselines/reference/forStatementsMultipleInvalidDecl.js index 8ca8c794cf5..31398cb2af9 100644 --- a/tests/baselines/reference/forStatementsMultipleInvalidDecl.js +++ b/tests/baselines/reference/forStatementsMultipleInvalidDecl.js @@ -56,7 +56,11 @@ for( var m = M.A;;){} //// [forStatementsMultipleInvalidDecl.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/functionImplementationErrors.js b/tests/baselines/reference/functionImplementationErrors.js index 5c8defcf814..a91b1b78f07 100644 --- a/tests/baselines/reference/functionImplementationErrors.js +++ b/tests/baselines/reference/functionImplementationErrors.js @@ -76,7 +76,11 @@ var f13 = () => { //// [functionImplementationErrors.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/functionImplementations.js b/tests/baselines/reference/functionImplementations.js index e73e5095701..4854d715c32 100644 --- a/tests/baselines/reference/functionImplementations.js +++ b/tests/baselines/reference/functionImplementations.js @@ -159,7 +159,11 @@ var f12: (x: number) => any = x => { // should be (x: number) => Base | AnotherC //// [functionImplementations.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/functionSubtypingOfVarArgs.js b/tests/baselines/reference/functionSubtypingOfVarArgs.js index 89e8b1e95ef..4cd1f1096f3 100644 --- a/tests/baselines/reference/functionSubtypingOfVarArgs.js +++ b/tests/baselines/reference/functionSubtypingOfVarArgs.js @@ -16,7 +16,11 @@ class StringEvent extends EventBase { // should work //// [functionSubtypingOfVarArgs.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/functionSubtypingOfVarArgs2.js b/tests/baselines/reference/functionSubtypingOfVarArgs2.js index be9c293ae72..fc3562ca339 100644 --- a/tests/baselines/reference/functionSubtypingOfVarArgs2.js +++ b/tests/baselines/reference/functionSubtypingOfVarArgs2.js @@ -16,7 +16,11 @@ class StringEvent extends EventBase { //// [functionSubtypingOfVarArgs2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/generatedContextualTyping.js b/tests/baselines/reference/generatedContextualTyping.js index 06abd1b9a8b..0cf8767aa58 100644 --- a/tests/baselines/reference/generatedContextualTyping.js +++ b/tests/baselines/reference/generatedContextualTyping.js @@ -357,7 +357,11 @@ var x356 = function(n: Genric) { }; x356({ func: n => { return [d1, d2]; } //// [generatedContextualTyping.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericBaseClassLiteralProperty.js b/tests/baselines/reference/genericBaseClassLiteralProperty.js index b572cfae97d..753aa2f0733 100644 --- a/tests/baselines/reference/genericBaseClassLiteralProperty.js +++ b/tests/baselines/reference/genericBaseClassLiteralProperty.js @@ -14,7 +14,11 @@ class SubClass extends BaseClass { //// [genericBaseClassLiteralProperty.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericBaseClassLiteralProperty2.js b/tests/baselines/reference/genericBaseClassLiteralProperty2.js index 9e99dee2b4c..131fc2d36ab 100644 --- a/tests/baselines/reference/genericBaseClassLiteralProperty2.js +++ b/tests/baselines/reference/genericBaseClassLiteralProperty2.js @@ -17,7 +17,11 @@ class DataView2 extends BaseCollection2 { //// [genericBaseClassLiteralProperty2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.js b/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.js index 68a3e77f9ae..055ef9d2f86 100644 --- a/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.js +++ b/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.js @@ -110,7 +110,11 @@ var r11 = i.foo8(); // Base //// [genericCallWithConstraintsTypeArgumentInference.js] // Basic type inference with generic calls and constraints, no errors expected var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgs2.js b/tests/baselines/reference/genericCallWithObjectTypeArgs2.js index 0b643db14cb..e4399d19037 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgs2.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgs2.js @@ -34,7 +34,11 @@ var r4 = f2(i); // Base => Derived //// [genericCallWithObjectTypeArgs2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js index 98448645d15..f86cc2da293 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js @@ -42,7 +42,11 @@ var r7 = f3(null, x => x); // any // Generic call with constraints infering type parameter from object member properties // No errors expected var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js index 71bf682b0dc..01a11c7f90b 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js @@ -40,7 +40,11 @@ var r6 = f3(x => x, null); //// [genericCallWithObjectTypeArgsAndConstraints3.js] // Generic call with constraints infering type parameter from object member properties var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericCallbacksAndClassHierarchy.js b/tests/baselines/reference/genericCallbacksAndClassHierarchy.js index 67d0df1bc22..d4303fa2037 100644 --- a/tests/baselines/reference/genericCallbacksAndClassHierarchy.js +++ b/tests/baselines/reference/genericCallbacksAndClassHierarchy.js @@ -25,7 +25,11 @@ module M { //// [genericCallbacksAndClassHierarchy.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericClassExpressionInFunction.js b/tests/baselines/reference/genericClassExpressionInFunction.js index 3db4d9693af..ab826e2916d 100644 --- a/tests/baselines/reference/genericClassExpressionInFunction.js +++ b/tests/baselines/reference/genericClassExpressionInFunction.js @@ -33,7 +33,11 @@ s.genericVar = 12; //// [genericClassExpressionInFunction.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericClassInheritsConstructorFromNonGenericClass.js b/tests/baselines/reference/genericClassInheritsConstructorFromNonGenericClass.js index 307c891f928..dbd654576ec 100644 --- a/tests/baselines/reference/genericClassInheritsConstructorFromNonGenericClass.js +++ b/tests/baselines/reference/genericClassInheritsConstructorFromNonGenericClass.js @@ -7,7 +7,11 @@ class C { //// [genericClassInheritsConstructorFromNonGenericClass.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js b/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js index 147bbd8fb87..fa64843f29f 100644 --- a/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js +++ b/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js @@ -77,7 +77,11 @@ class ViewModel implements Contract { //// [genericClassPropertyInheritanceSpecialization.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericClassStaticMethod.js b/tests/baselines/reference/genericClassStaticMethod.js index 257e7dbce97..8345b3d93a7 100644 --- a/tests/baselines/reference/genericClassStaticMethod.js +++ b/tests/baselines/reference/genericClassStaticMethod.js @@ -12,7 +12,11 @@ class Bar extends Foo { //// [genericClassStaticMethod.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericClasses3.js b/tests/baselines/reference/genericClasses3.js index fbc62b23aab..2f8d09eae03 100644 --- a/tests/baselines/reference/genericClasses3.js +++ b/tests/baselines/reference/genericClasses3.js @@ -19,7 +19,11 @@ var z = v2.b; //// [genericClasses3.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js index 4043924bf54..73fed8b3ea2 100644 --- a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js +++ b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js @@ -28,7 +28,11 @@ module EndGate.Tweening { //// [genericConstraintOnExtendedBuiltinTypes.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js index 33394ee4fce..8ec4552b70d 100644 --- a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js +++ b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js @@ -27,7 +27,11 @@ module EndGate.Tweening { //// [genericConstraintOnExtendedBuiltinTypes2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.js b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.js index 413eed2a4c8..9da46a15ef7 100644 --- a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.js +++ b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.js @@ -14,7 +14,11 @@ x = y; // error //// [genericDerivedTypeWithSpecializedBase.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.js b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.js index da81eaf5640..df9c113ceb5 100644 --- a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.js +++ b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.js @@ -14,7 +14,11 @@ x = y; // error //// [genericDerivedTypeWithSpecializedBase2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericInheritedDefaultConstructors.js b/tests/baselines/reference/genericInheritedDefaultConstructors.js index d7aaa6224ef..f287a5f934c 100644 --- a/tests/baselines/reference/genericInheritedDefaultConstructors.js +++ b/tests/baselines/reference/genericInheritedDefaultConstructors.js @@ -12,7 +12,11 @@ var c:Constructor> = B; // shouldn't error here //// [genericInheritedDefaultConstructors.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericPrototypeProperty2.js b/tests/baselines/reference/genericPrototypeProperty2.js index 6ce627694ca..892e6cc0217 100644 --- a/tests/baselines/reference/genericPrototypeProperty2.js +++ b/tests/baselines/reference/genericPrototypeProperty2.js @@ -17,7 +17,11 @@ class MyEventWrapper extends BaseEventWrapper { //// [genericPrototypeProperty2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericPrototypeProperty3.js b/tests/baselines/reference/genericPrototypeProperty3.js index a2817d82e9f..03755b28683 100644 --- a/tests/baselines/reference/genericPrototypeProperty3.js +++ b/tests/baselines/reference/genericPrototypeProperty3.js @@ -16,7 +16,11 @@ class MyEventWrapper extends BaseEventWrapper { //// [genericPrototypeProperty3.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js index 2fbb5f7ef50..f5c12bacce8 100644 --- a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js +++ b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js @@ -28,7 +28,11 @@ module TypeScript2 { //// [genericRecursiveImplicitConstructorErrors2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js index c88dd78765a..3c680337351 100644 --- a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js +++ b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js @@ -32,7 +32,11 @@ module TypeScript { //// [genericRecursiveImplicitConstructorErrors3.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericTypeAssertions2.js b/tests/baselines/reference/genericTypeAssertions2.js index 25e4d3f3bae..d13e06a8ddd 100644 --- a/tests/baselines/reference/genericTypeAssertions2.js +++ b/tests/baselines/reference/genericTypeAssertions2.js @@ -15,7 +15,11 @@ var r5: A = >[]; // error //// [genericTypeAssertions2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericTypeAssertions4.js b/tests/baselines/reference/genericTypeAssertions4.js index d54f37408a3..e1c4cab059c 100644 --- a/tests/baselines/reference/genericTypeAssertions4.js +++ b/tests/baselines/reference/genericTypeAssertions4.js @@ -27,7 +27,11 @@ function foo2(x: T) { //// [genericTypeAssertions4.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericTypeAssertions6.js b/tests/baselines/reference/genericTypeAssertions6.js index 6ace4b38a13..20a13d5718e 100644 --- a/tests/baselines/reference/genericTypeAssertions6.js +++ b/tests/baselines/reference/genericTypeAssertions6.js @@ -26,7 +26,11 @@ var c: A = >b; //// [genericTypeAssertions6.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericTypeConstraints.js b/tests/baselines/reference/genericTypeConstraints.js index 4aae830a0d1..b2332451507 100644 --- a/tests/baselines/reference/genericTypeConstraints.js +++ b/tests/baselines/reference/genericTypeConstraints.js @@ -15,7 +15,11 @@ class BarExtended extends Bar { //// [genericTypeConstraints.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js index ec7029135a9..267666439b1 100644 --- a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js +++ b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js @@ -41,7 +41,11 @@ var k = null; // it is an error to use a generic type without type arguments // all of these are errors var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js index d3797663e0e..7fce4984d9c 100644 --- a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js +++ b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js @@ -41,7 +41,11 @@ var k = null; // it is an error to use a generic type without type arguments // all of these are errors var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js b/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js index b5c3316ab12..444043fbeac 100644 --- a/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js +++ b/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js @@ -16,7 +16,11 @@ export class ListItem extends CollectionItem { //// [genericWithIndexerOfTypeParameterType2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/heterogeneousArrayLiterals.js b/tests/baselines/reference/heterogeneousArrayLiterals.js index 43ec9a09587..6a9f8ae1453 100644 --- a/tests/baselines/reference/heterogeneousArrayLiterals.js +++ b/tests/baselines/reference/heterogeneousArrayLiterals.js @@ -134,7 +134,11 @@ function foo4(t: T, u: U) { //// [heterogeneousArrayLiterals.js] // type of an array is the best common type of its elements (plus its contextual type if it exists) var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/ifDoWhileStatements.js b/tests/baselines/reference/ifDoWhileStatements.js index 8d1ad1a834f..fea4eee36fa 100644 --- a/tests/baselines/reference/ifDoWhileStatements.js +++ b/tests/baselines/reference/ifDoWhileStatements.js @@ -165,7 +165,11 @@ do { }while(fn) //// [ifDoWhileStatements.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/illegalSuperCallsInConstructor.js b/tests/baselines/reference/illegalSuperCallsInConstructor.js index 5299bac5eb3..3de32da45c0 100644 --- a/tests/baselines/reference/illegalSuperCallsInConstructor.js +++ b/tests/baselines/reference/illegalSuperCallsInConstructor.js @@ -22,7 +22,11 @@ class Derived extends Base { //// [illegalSuperCallsInConstructor.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/implementClausePrecedingExtends.js b/tests/baselines/reference/implementClausePrecedingExtends.js index 669a6794618..5d717358863 100644 --- a/tests/baselines/reference/implementClausePrecedingExtends.js +++ b/tests/baselines/reference/implementClausePrecedingExtends.js @@ -4,7 +4,11 @@ class D implements C extends C { } //// [implementClausePrecedingExtends.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.js b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.js index 5d93d2b04a4..87b22c74f6b 100644 --- a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.js +++ b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.js @@ -87,7 +87,11 @@ module M2 { //// [implementingAnInterfaceExtendingClassWithPrivates2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.js b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.js index 082b9d801dc..68ecf9ede2b 100644 --- a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.js +++ b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.js @@ -43,7 +43,11 @@ class Bar8 extends Foo implements I { //// [implementingAnInterfaceExtendingClassWithProtecteds.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/importAsBaseClass.js b/tests/baselines/reference/importAsBaseClass.js index f61703de5f0..ea7c757e035 100644 --- a/tests/baselines/reference/importAsBaseClass.js +++ b/tests/baselines/reference/importAsBaseClass.js @@ -22,7 +22,11 @@ exports.Greeter = Greeter; //// [importAsBaseClass_1.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/importHelpers.js b/tests/baselines/reference/importHelpers.js index ec294a342de..0a9dcd4a780 100644 --- a/tests/baselines/reference/importHelpers.js +++ b/tests/baselines/reference/importHelpers.js @@ -69,7 +69,11 @@ C = tslib_1.__decorate([ ], C); //// [script.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/importHelpersNoHelpers.js b/tests/baselines/reference/importHelpersNoHelpers.js index 3a2e4823337..c7c575f5402 100644 --- a/tests/baselines/reference/importHelpersNoHelpers.js +++ b/tests/baselines/reference/importHelpersNoHelpers.js @@ -71,7 +71,11 @@ var y = tslib_1.__assign({}, o); var x = tslib_1.__rest(y, []); //// [script.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/importHelpersNoModule.js b/tests/baselines/reference/importHelpersNoModule.js index 991733f4b37..212bc7a54f7 100644 --- a/tests/baselines/reference/importHelpersNoModule.js +++ b/tests/baselines/reference/importHelpersNoModule.js @@ -61,7 +61,11 @@ C = tslib_1.__decorate([ ], C); //// [script.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/importShadowsGlobalName.js b/tests/baselines/reference/importShadowsGlobalName.js index abdf7e28cbb..8431a87ce03 100644 --- a/tests/baselines/reference/importShadowsGlobalName.js +++ b/tests/baselines/reference/importShadowsGlobalName.js @@ -22,7 +22,11 @@ define(["require", "exports"], function (require, exports) { }); //// [Bar.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/importUsedInExtendsList1.js b/tests/baselines/reference/importUsedInExtendsList1.js index 941436e7e75..f44a0fcfce4 100644 --- a/tests/baselines/reference/importUsedInExtendsList1.js +++ b/tests/baselines/reference/importUsedInExtendsList1.js @@ -22,7 +22,11 @@ exports.Super = Super; //// [importUsedInExtendsList1_1.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/indexerConstraints2.js b/tests/baselines/reference/indexerConstraints2.js index 81bb114e394..45980beb09c 100644 --- a/tests/baselines/reference/indexerConstraints2.js +++ b/tests/baselines/reference/indexerConstraints2.js @@ -30,7 +30,11 @@ class K extends J { //// [indexerConstraints2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/indirectSelfReference.js b/tests/baselines/reference/indirectSelfReference.js index a61a14a2d6b..931525d4b6b 100644 --- a/tests/baselines/reference/indirectSelfReference.js +++ b/tests/baselines/reference/indirectSelfReference.js @@ -4,7 +4,11 @@ class b extends a{ } //// [indirectSelfReference.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/indirectSelfReferenceGeneric.js b/tests/baselines/reference/indirectSelfReferenceGeneric.js index 989a02b1943..e7d2bdf2a2b 100644 --- a/tests/baselines/reference/indirectSelfReferenceGeneric.js +++ b/tests/baselines/reference/indirectSelfReferenceGeneric.js @@ -4,7 +4,11 @@ class b extends a { } //// [indirectSelfReferenceGeneric.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/infinitelyExpandingTypesNonGenericBase.js b/tests/baselines/reference/infinitelyExpandingTypesNonGenericBase.js index 7336e2c0f69..96a8e84ff60 100644 --- a/tests/baselines/reference/infinitelyExpandingTypesNonGenericBase.js +++ b/tests/baselines/reference/infinitelyExpandingTypesNonGenericBase.js @@ -26,7 +26,11 @@ o(A); //// [infinitelyExpandingTypesNonGenericBase.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritFromGenericTypeParameter.js b/tests/baselines/reference/inheritFromGenericTypeParameter.js index 57ad5b71bd8..d95150bbccc 100644 --- a/tests/baselines/reference/inheritFromGenericTypeParameter.js +++ b/tests/baselines/reference/inheritFromGenericTypeParameter.js @@ -4,7 +4,11 @@ interface I extends T { } //// [inheritFromGenericTypeParameter.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritSameNamePrivatePropertiesFromSameOrigin.js b/tests/baselines/reference/inheritSameNamePrivatePropertiesFromSameOrigin.js index 679e91dc38a..b1224117ede 100644 --- a/tests/baselines/reference/inheritSameNamePrivatePropertiesFromSameOrigin.js +++ b/tests/baselines/reference/inheritSameNamePrivatePropertiesFromSameOrigin.js @@ -12,7 +12,11 @@ interface A extends C, C2 { // ok //// [inheritSameNamePrivatePropertiesFromSameOrigin.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritance.js b/tests/baselines/reference/inheritance.js index 01fdd0a3d67..b9a7c5a336f 100644 --- a/tests/baselines/reference/inheritance.js +++ b/tests/baselines/reference/inheritance.js @@ -36,7 +36,11 @@ class Baad extends Good { //// [inheritance.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritance1.js b/tests/baselines/reference/inheritance1.js index c33c73a6e60..0e5bff48a3b 100644 --- a/tests/baselines/reference/inheritance1.js +++ b/tests/baselines/reference/inheritance1.js @@ -63,7 +63,11 @@ l1 = c; //// [inheritance1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js index 180f48f613c..bd4b70f7938 100644 --- a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js +++ b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js @@ -12,7 +12,11 @@ class C extends B { //// [inheritanceGrandParentPrivateMemberCollision.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js index 73121951e7c..d72f85cf599 100644 --- a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js +++ b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js @@ -12,7 +12,11 @@ class C extends B { //// [inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js b/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js index 60183c5749e..c6b32f6bc5d 100644 --- a/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js +++ b/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js @@ -12,7 +12,11 @@ class C extends B { //// [inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js b/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js index fc1ff97e8cf..fdc53cc7e9c 100644 --- a/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js @@ -19,7 +19,11 @@ class b extends a { //// [inheritanceMemberAccessorOverridingAccessor.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.js b/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.js index 0ba2a70f257..13e624a9d57 100644 --- a/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.js +++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.js @@ -16,7 +16,11 @@ class b extends a { //// [inheritanceMemberAccessorOverridingMethod.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js b/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js index 26c911694a2..243992d5bd3 100644 --- a/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js +++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js @@ -14,7 +14,11 @@ class b extends a { //// [inheritanceMemberAccessorOverridingProperty.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js b/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js index d0dfcc5923a..001f7b888e3 100644 --- a/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js @@ -16,7 +16,11 @@ class b extends a { //// [inheritanceMemberFuncOverridingAccessor.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.js b/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.js index 64e5e923178..33a35428b8e 100644 --- a/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.js +++ b/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.js @@ -13,7 +13,11 @@ class b extends a { //// [inheritanceMemberFuncOverridingMethod.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.js b/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.js index f3835a78f14..0675aead222 100644 --- a/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.js +++ b/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.js @@ -11,7 +11,11 @@ class b extends a { //// [inheritanceMemberFuncOverridingProperty.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js b/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js index 82fc4906ca6..ec3e8519e62 100644 --- a/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js @@ -15,7 +15,11 @@ class b extends a { //// [inheritanceMemberPropertyOverridingAccessor.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.js b/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.js index e13a111fef9..e2e1d734001 100644 --- a/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.js +++ b/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.js @@ -11,7 +11,11 @@ class b extends a { //// [inheritanceMemberPropertyOverridingMethod.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberPropertyOverridingProperty.js b/tests/baselines/reference/inheritanceMemberPropertyOverridingProperty.js index b6496085a61..50d6b108588 100644 --- a/tests/baselines/reference/inheritanceMemberPropertyOverridingProperty.js +++ b/tests/baselines/reference/inheritanceMemberPropertyOverridingProperty.js @@ -9,7 +9,11 @@ class b extends a { //// [inheritanceMemberPropertyOverridingProperty.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js b/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js index ac99c90e829..871acd1d624 100644 --- a/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js +++ b/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js @@ -9,7 +9,11 @@ var b3 = new B(); // error, could not select overload for 'new' expression //// [inheritanceOfGenericConstructorMethod1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js b/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js index 406675d88d9..72f12c8f81f 100644 --- a/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js +++ b/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js @@ -16,7 +16,11 @@ var n3 = new N.D2(); // no error, D2 //// [inheritanceOfGenericConstructorMethod2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js b/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js index 3faa8f8388d..c58a0643a06 100644 --- a/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js @@ -19,7 +19,11 @@ class b extends a { //// [inheritanceStaticAccessorOverridingAccessor.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js b/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js index 543651ea6f0..beba3dbdf5e 100644 --- a/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js +++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js @@ -16,7 +16,11 @@ class b extends a { //// [inheritanceStaticAccessorOverridingMethod.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js b/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js index 5053cd3946a..d3f4b177e95 100644 --- a/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js +++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js @@ -14,7 +14,11 @@ class b extends a { //// [inheritanceStaticAccessorOverridingProperty.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js index 6090bd4f74f..d86d08e7add 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js @@ -16,7 +16,11 @@ class b extends a { //// [inheritanceStaticFuncOverridingAccessor.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js index 5213eae20dd..1decf45e015 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js @@ -13,7 +13,11 @@ class b extends a { //// [inheritanceStaticFuncOverridingAccessorOfFuncType.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.js b/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.js index 4d85f383ef6..e9ea5d2f6a1 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.js @@ -13,7 +13,11 @@ class b extends a { //// [inheritanceStaticFuncOverridingMethod.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.js b/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.js index a548d70861b..dd2260ecf31 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.js @@ -11,7 +11,11 @@ class b extends a { //// [inheritanceStaticFuncOverridingProperty.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.js b/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.js index 9f2a7acfd14..9a555ce218f 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.js @@ -11,7 +11,11 @@ class b extends a { //// [inheritanceStaticFuncOverridingPropertyOfFuncType.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticFunctionOverridingInstanceProperty.js b/tests/baselines/reference/inheritanceStaticFunctionOverridingInstanceProperty.js index c489493375e..e357eb6e01f 100644 --- a/tests/baselines/reference/inheritanceStaticFunctionOverridingInstanceProperty.js +++ b/tests/baselines/reference/inheritanceStaticFunctionOverridingInstanceProperty.js @@ -11,7 +11,11 @@ class b extends a { //// [inheritanceStaticFunctionOverridingInstanceProperty.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticMembersCompatible.js b/tests/baselines/reference/inheritanceStaticMembersCompatible.js index b57ada54212..044db517290 100644 --- a/tests/baselines/reference/inheritanceStaticMembersCompatible.js +++ b/tests/baselines/reference/inheritanceStaticMembersCompatible.js @@ -9,7 +9,11 @@ class b extends a { //// [inheritanceStaticMembersCompatible.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticMembersIncompatible.js b/tests/baselines/reference/inheritanceStaticMembersIncompatible.js index 11e8e0117db..0c21f4a1af5 100644 --- a/tests/baselines/reference/inheritanceStaticMembersIncompatible.js +++ b/tests/baselines/reference/inheritanceStaticMembersIncompatible.js @@ -9,7 +9,11 @@ class b extends a { //// [inheritanceStaticMembersIncompatible.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js b/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js index 7283ee4dbb0..de05071c116 100644 --- a/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js @@ -14,7 +14,11 @@ class b extends a { //// [inheritanceStaticPropertyOverridingAccessor.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.js b/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.js index e9308f977db..4c1ca7e00cb 100644 --- a/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.js +++ b/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.js @@ -11,7 +11,11 @@ class b extends a { //// [inheritanceStaticPropertyOverridingMethod.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticPropertyOverridingProperty.js b/tests/baselines/reference/inheritanceStaticPropertyOverridingProperty.js index 4feb0e06b8c..a351a84d98b 100644 --- a/tests/baselines/reference/inheritanceStaticPropertyOverridingProperty.js +++ b/tests/baselines/reference/inheritanceStaticPropertyOverridingProperty.js @@ -9,7 +9,11 @@ class b extends a { //// [inheritanceStaticPropertyOverridingProperty.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritedConstructorWithRestParams.js b/tests/baselines/reference/inheritedConstructorWithRestParams.js index 4d3b055dcdb..e9f362ead42 100644 --- a/tests/baselines/reference/inheritedConstructorWithRestParams.js +++ b/tests/baselines/reference/inheritedConstructorWithRestParams.js @@ -16,7 +16,11 @@ new Derived(3); //// [inheritedConstructorWithRestParams.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritedConstructorWithRestParams2.js b/tests/baselines/reference/inheritedConstructorWithRestParams2.js index 146677ff09c..3d89d237ad5 100644 --- a/tests/baselines/reference/inheritedConstructorWithRestParams2.js +++ b/tests/baselines/reference/inheritedConstructorWithRestParams2.js @@ -36,7 +36,11 @@ new Derived("", 3, "", ""); //// [inheritedConstructorWithRestParams2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritedModuleMembersForClodule.js b/tests/baselines/reference/inheritedModuleMembersForClodule.js index 666f4d703be..512d8bbca57 100644 --- a/tests/baselines/reference/inheritedModuleMembersForClodule.js +++ b/tests/baselines/reference/inheritedModuleMembersForClodule.js @@ -23,7 +23,11 @@ class E extends D { //// [inheritedModuleMembersForClodule.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/instanceOfAssignability.js b/tests/baselines/reference/instanceOfAssignability.js index 1492a9f919b..4f7b0bead56 100644 --- a/tests/baselines/reference/instanceOfAssignability.js +++ b/tests/baselines/reference/instanceOfAssignability.js @@ -91,7 +91,11 @@ function fn8(x: Alpha|Beta|Gamma) { //// [instanceOfAssignability.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js b/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js index a421814ea2d..57c7e5161b2 100644 --- a/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js +++ b/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js @@ -44,7 +44,11 @@ module Generic { //// [instancePropertiesInheritedIntoClassType.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/instanceSubtypeCheck2.js b/tests/baselines/reference/instanceSubtypeCheck2.js index c6c657aa82e..7f4b0803382 100644 --- a/tests/baselines/reference/instanceSubtypeCheck2.js +++ b/tests/baselines/reference/instanceSubtypeCheck2.js @@ -9,7 +9,11 @@ class C2 extends C1 { //// [instanceSubtypeCheck2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/instanceofWithStructurallyIdenticalTypes.js b/tests/baselines/reference/instanceofWithStructurallyIdenticalTypes.js index 46c842c86a7..59ea1270155 100644 --- a/tests/baselines/reference/instanceofWithStructurallyIdenticalTypes.js +++ b/tests/baselines/reference/instanceofWithStructurallyIdenticalTypes.js @@ -73,7 +73,11 @@ function goo(x: A) { //// [instanceofWithStructurallyIdenticalTypes.js] // Repro from #7271 var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/instantiatedReturnTypeContravariance.js b/tests/baselines/reference/instantiatedReturnTypeContravariance.js index ac3470cb288..338a60610a0 100644 --- a/tests/baselines/reference/instantiatedReturnTypeContravariance.js +++ b/tests/baselines/reference/instantiatedReturnTypeContravariance.js @@ -32,7 +32,11 @@ return null; //// [instantiatedReturnTypeContravariance.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/interfaceClassMerging.js b/tests/baselines/reference/interfaceClassMerging.js index 931d94f6eda..36e4719549a 100644 --- a/tests/baselines/reference/interfaceClassMerging.js +++ b/tests/baselines/reference/interfaceClassMerging.js @@ -42,7 +42,11 @@ obj = bar; //// [interfaceClassMerging.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/interfaceClassMerging2.js b/tests/baselines/reference/interfaceClassMerging2.js index c0c9b17b3e8..f230544e492 100644 --- a/tests/baselines/reference/interfaceClassMerging2.js +++ b/tests/baselines/reference/interfaceClassMerging2.js @@ -38,7 +38,11 @@ foo = bar; //// [interfaceClassMerging2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/interfaceExtendsClass1.js b/tests/baselines/reference/interfaceExtendsClass1.js index 85b4a42302d..0afae83d4b9 100644 --- a/tests/baselines/reference/interfaceExtendsClass1.js +++ b/tests/baselines/reference/interfaceExtendsClass1.js @@ -20,7 +20,11 @@ class Location { //// [interfaceExtendsClass1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js b/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js index 05ae7d83678..0b493aded80 100644 --- a/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js +++ b/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js @@ -29,7 +29,11 @@ d = c; // error //// [interfaceExtendsClassWithPrivate1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js b/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js index a1ff0fff763..699b924a854 100644 --- a/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js +++ b/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js @@ -25,7 +25,11 @@ class D2 extends C implements I { // error //// [interfaceExtendsClassWithPrivate2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/interfaceImplementation8.js b/tests/baselines/reference/interfaceImplementation8.js index 2193189eaf1..04f341d1f06 100644 --- a/tests/baselines/reference/interfaceImplementation8.js +++ b/tests/baselines/reference/interfaceImplementation8.js @@ -42,7 +42,11 @@ class C8 extends C7 implements i2{ //// [interfaceImplementation8.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.js b/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.js index dc4284495b1..8fa200638e4 100644 --- a/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.js +++ b/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.js @@ -81,7 +81,11 @@ module YYY4 { //// [invalidModuleWithStatementsOfEveryKind.js] // All of these should be an error var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/invalidMultipleVariableDeclarations.js b/tests/baselines/reference/invalidMultipleVariableDeclarations.js index 2117e176f08..3380d5847a9 100644 --- a/tests/baselines/reference/invalidMultipleVariableDeclarations.js +++ b/tests/baselines/reference/invalidMultipleVariableDeclarations.js @@ -55,7 +55,11 @@ var m = M.A; //// [invalidMultipleVariableDeclarations.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/invalidReturnStatements.js b/tests/baselines/reference/invalidReturnStatements.js index 8f1adc05fa6..01982b322bb 100644 --- a/tests/baselines/reference/invalidReturnStatements.js +++ b/tests/baselines/reference/invalidReturnStatements.js @@ -22,7 +22,11 @@ function fn11(): D { return new C(); } //// [invalidReturnStatements.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/isolatedModulesImportExportElision.js b/tests/baselines/reference/isolatedModulesImportExportElision.js index e98932901e3..747e69d7c59 100644 --- a/tests/baselines/reference/isolatedModulesImportExportElision.js +++ b/tests/baselines/reference/isolatedModulesImportExportElision.js @@ -16,7 +16,11 @@ export var z = x; //// [file1.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/jsxViaImport.js b/tests/baselines/reference/jsxViaImport.js index 99b9229f2a5..61e196daaa4 100644 --- a/tests/baselines/reference/jsxViaImport.js +++ b/tests/baselines/reference/jsxViaImport.js @@ -26,7 +26,11 @@ class TestComponent extends React.Component { //// [consumer.jsx] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/keyofAndIndexedAccess.js b/tests/baselines/reference/keyofAndIndexedAccess.js index 50bb51dbae7..319875eef2c 100644 --- a/tests/baselines/reference/keyofAndIndexedAccess.js +++ b/tests/baselines/reference/keyofAndIndexedAccess.js @@ -295,7 +295,11 @@ var hashOfEmpty2 = on({ test: (x: boolean) => {} }); // { test: boolean } //// [keyofAndIndexedAccess.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/lambdaArgCrash.js b/tests/baselines/reference/lambdaArgCrash.js index 911232722bd..c4343a67452 100644 --- a/tests/baselines/reference/lambdaArgCrash.js +++ b/tests/baselines/reference/lambdaArgCrash.js @@ -36,7 +36,11 @@ class ItemSetEvent extends Event { //// [lambdaArgCrash.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/lift.js b/tests/baselines/reference/lift.js index cd6f4fffd00..44932a3ad14 100644 --- a/tests/baselines/reference/lift.js +++ b/tests/baselines/reference/lift.js @@ -19,7 +19,11 @@ class C extends B { //// [lift.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/localTypes1.js b/tests/baselines/reference/localTypes1.js index a887a3e07b0..2a3510860ef 100644 --- a/tests/baselines/reference/localTypes1.js +++ b/tests/baselines/reference/localTypes1.js @@ -143,7 +143,11 @@ function f6() { //// [localTypes1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/m7Bugs.js b/tests/baselines/reference/m7Bugs.js index 078c77c5e3c..0ae1f77a62a 100644 --- a/tests/baselines/reference/m7Bugs.js +++ b/tests/baselines/reference/m7Bugs.js @@ -28,7 +28,11 @@ var y3: C1 = {}; //// [m7Bugs.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/mergedDeclarations5.js b/tests/baselines/reference/mergedDeclarations5.js index f731d4de428..d8426a5ce28 100644 --- a/tests/baselines/reference/mergedDeclarations5.js +++ b/tests/baselines/reference/mergedDeclarations5.js @@ -20,7 +20,11 @@ var A = (function () { }()); //// [b.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/mergedDeclarations6.js b/tests/baselines/reference/mergedDeclarations6.js index 42ef5702061..c573190dc8b 100644 --- a/tests/baselines/reference/mergedDeclarations6.js +++ b/tests/baselines/reference/mergedDeclarations6.js @@ -38,7 +38,11 @@ define(["require", "exports"], function (require, exports) { }); //// [b.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/mergedInheritedClassInterface.js b/tests/baselines/reference/mergedInheritedClassInterface.js index 38d4f94adde..ec1b72bf5d7 100644 --- a/tests/baselines/reference/mergedInheritedClassInterface.js +++ b/tests/baselines/reference/mergedInheritedClassInterface.js @@ -48,7 +48,11 @@ grandchild.method2(); //// [mergedInheritedClassInterface.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.js b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.js index fd3d2da41e3..ac82060f270 100644 --- a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.js +++ b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.js @@ -33,7 +33,11 @@ var r2 = a.w; // error //// [mergedInterfacesWithInheritedPrivates2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.js b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.js index 1c8ba88d786..31c3deff6d1 100644 --- a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.js +++ b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.js @@ -40,7 +40,11 @@ module M { //// [mergedInterfacesWithInheritedPrivates3.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/missingPropertiesOfClassExpression.js b/tests/baselines/reference/missingPropertiesOfClassExpression.js index 8df4153b72d..aa832f39416 100644 --- a/tests/baselines/reference/missingPropertiesOfClassExpression.js +++ b/tests/baselines/reference/missingPropertiesOfClassExpression.js @@ -8,7 +8,11 @@ class George extends class { reset() { return this.y; } } { //// [missingPropertiesOfClassExpression.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/moduleAsBaseType.js b/tests/baselines/reference/moduleAsBaseType.js index a4caea585ac..00a4f417804 100644 --- a/tests/baselines/reference/moduleAsBaseType.js +++ b/tests/baselines/reference/moduleAsBaseType.js @@ -6,7 +6,11 @@ class C2 implements M { } //// [moduleAsBaseType.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/moduleImportedForTypeArgumentPosition.js b/tests/baselines/reference/moduleImportedForTypeArgumentPosition.js index bf074378d4b..a12c2af9439 100644 --- a/tests/baselines/reference/moduleImportedForTypeArgumentPosition.js +++ b/tests/baselines/reference/moduleImportedForTypeArgumentPosition.js @@ -17,7 +17,11 @@ define(["require", "exports"], function (require, exports) { }); //// [moduleImportedForTypeArgumentPosition_1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/moduleWithStatementsOfEveryKind.js b/tests/baselines/reference/moduleWithStatementsOfEveryKind.js index 6efcddf7201..7a36ad10376 100644 --- a/tests/baselines/reference/moduleWithStatementsOfEveryKind.js +++ b/tests/baselines/reference/moduleWithStatementsOfEveryKind.js @@ -60,7 +60,11 @@ module Y { //// [moduleWithStatementsOfEveryKind.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/multipleInheritance.js b/tests/baselines/reference/multipleInheritance.js index d05f10568ad..4122bcb40ee 100644 --- a/tests/baselines/reference/multipleInheritance.js +++ b/tests/baselines/reference/multipleInheritance.js @@ -40,7 +40,11 @@ class Baad extends Good { //// [multipleInheritance.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/mutuallyRecursiveGenericBaseTypes2.js b/tests/baselines/reference/mutuallyRecursiveGenericBaseTypes2.js index 570a93e8534..1ac0e7db55d 100644 --- a/tests/baselines/reference/mutuallyRecursiveGenericBaseTypes2.js +++ b/tests/baselines/reference/mutuallyRecursiveGenericBaseTypes2.js @@ -12,7 +12,11 @@ var test = new foo(); //// [mutuallyRecursiveGenericBaseTypes2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/noImplicitAnyMissingGetAccessor.js b/tests/baselines/reference/noImplicitAnyMissingGetAccessor.js index 78ea4e74a97..e08985796c3 100644 --- a/tests/baselines/reference/noImplicitAnyMissingGetAccessor.js +++ b/tests/baselines/reference/noImplicitAnyMissingGetAccessor.js @@ -14,7 +14,11 @@ class Child extends Parent { //// [noImplicitAnyMissingGetAccessor.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/noImplicitAnyMissingSetAccessor.js b/tests/baselines/reference/noImplicitAnyMissingSetAccessor.js index 64c480cc8e1..45cf29fd567 100644 --- a/tests/baselines/reference/noImplicitAnyMissingSetAccessor.js +++ b/tests/baselines/reference/noImplicitAnyMissingSetAccessor.js @@ -13,7 +13,11 @@ class Child extends Parent { //// [noImplicitAnyMissingSetAccessor.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/nonGenericClassExtendingGenericClassWithAny.js b/tests/baselines/reference/nonGenericClassExtendingGenericClassWithAny.js index 33f7e696126..270ea7f3bfc 100644 --- a/tests/baselines/reference/nonGenericClassExtendingGenericClassWithAny.js +++ b/tests/baselines/reference/nonGenericClassExtendingGenericClassWithAny.js @@ -7,7 +7,11 @@ class Bar extends Foo { } // Valid //// [nonGenericClassExtendingGenericClassWithAny.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js index c8ec0d9da78..2f2be923f17 100644 --- a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js +++ b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js @@ -48,7 +48,11 @@ var b: { [x: number]: A } = { //// [numericIndexerConstrainsPropertyDeclarations2.js] // String indexer providing a constraint of a user defined type var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/numericIndexerConstraint3.js b/tests/baselines/reference/numericIndexerConstraint3.js index 02b54a2bbad..85556b4c83d 100644 --- a/tests/baselines/reference/numericIndexerConstraint3.js +++ b/tests/baselines/reference/numericIndexerConstraint3.js @@ -14,7 +14,11 @@ class C { //// [numericIndexerConstraint3.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/numericIndexerConstraint4.js b/tests/baselines/reference/numericIndexerConstraint4.js index 0f82789285d..8958392fe78 100644 --- a/tests/baselines/reference/numericIndexerConstraint4.js +++ b/tests/baselines/reference/numericIndexerConstraint4.js @@ -14,7 +14,11 @@ var x: { //// [numericIndexerConstraint4.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/numericIndexerTyping2.js b/tests/baselines/reference/numericIndexerTyping2.js index 1086d974590..5ce85e4c5eb 100644 --- a/tests/baselines/reference/numericIndexerTyping2.js +++ b/tests/baselines/reference/numericIndexerTyping2.js @@ -14,7 +14,11 @@ var r2: string = i2[1]; // error: numeric indexer returns the type of the string //// [numericIndexerTyping2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectCreationOfElementAccessExpression.js b/tests/baselines/reference/objectCreationOfElementAccessExpression.js index 2b7ac176c7e..3f251e47029 100644 --- a/tests/baselines/reference/objectCreationOfElementAccessExpression.js +++ b/tests/baselines/reference/objectCreationOfElementAccessExpression.js @@ -57,7 +57,11 @@ var foods2: MonsterFood[] = new PetFood[new IceCream('Mint chocolate chip') , Co //// [objectCreationOfElementAccessExpression.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js b/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js index 301761c2849..05dfd4bc818 100644 --- a/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js +++ b/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js @@ -56,7 +56,11 @@ var r4: void = b.valueOf(); //// [objectTypeHidingMembersOfExtendedObject.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js index 1b889269724..9518317f230 100644 --- a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js +++ b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js @@ -125,7 +125,11 @@ function foo16(x: any) { } //// [objectTypesIdentityWithNumericIndexers1.js] // object types are identical structurally var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js index 767f10adc88..a5b93a32853 100644 --- a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js +++ b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js @@ -128,7 +128,11 @@ function foo16(x: any) { } //// [objectTypesIdentityWithNumericIndexers2.js] // object types are identical structurally var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js index 8ae7b92b4dd..14a70059adc 100644 --- a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js +++ b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js @@ -125,7 +125,11 @@ function foo16(x: any) { } //// [objectTypesIdentityWithNumericIndexers3.js] // object types are identical structurally var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypesIdentityWithPrivates.js b/tests/baselines/reference/objectTypesIdentityWithPrivates.js index 9f9319a3cf8..0d3ebae0bb8 100644 --- a/tests/baselines/reference/objectTypesIdentityWithPrivates.js +++ b/tests/baselines/reference/objectTypesIdentityWithPrivates.js @@ -123,7 +123,11 @@ function foo16(x: any) { } //// [objectTypesIdentityWithPrivates.js] // object types are identical structurally var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypesIdentityWithPrivates2.js b/tests/baselines/reference/objectTypesIdentityWithPrivates2.js index e1426e4a3b5..4fa90889d81 100644 --- a/tests/baselines/reference/objectTypesIdentityWithPrivates2.js +++ b/tests/baselines/reference/objectTypesIdentityWithPrivates2.js @@ -41,7 +41,11 @@ function foo6(x: any): any { } //// [objectTypesIdentityWithPrivates2.js] // object types are identical structurally var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypesIdentityWithPrivates3.js b/tests/baselines/reference/objectTypesIdentityWithPrivates3.js index 1105c06c204..6ca413637f5 100644 --- a/tests/baselines/reference/objectTypesIdentityWithPrivates3.js +++ b/tests/baselines/reference/objectTypesIdentityWithPrivates3.js @@ -27,7 +27,11 @@ var c3: C3; //// [objectTypesIdentityWithPrivates3.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js b/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js index 9f076b52c60..6758afd5cb3 100644 --- a/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js +++ b/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js @@ -125,7 +125,11 @@ function foo16(x: any) { } //// [objectTypesIdentityWithStringIndexers.js] // object types are identical structurally var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js b/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js index 75ad2243fe3..370c71533fb 100644 --- a/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js +++ b/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js @@ -128,7 +128,11 @@ function foo16(x: any) { } //// [objectTypesIdentityWithStringIndexers2.js] // object types are identical structurally var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/optionalConstructorArgInSuper.js b/tests/baselines/reference/optionalConstructorArgInSuper.js index 4ebc1226146..e13ea6a702d 100644 --- a/tests/baselines/reference/optionalConstructorArgInSuper.js +++ b/tests/baselines/reference/optionalConstructorArgInSuper.js @@ -12,7 +12,11 @@ d2.foo(); //// [optionalConstructorArgInSuper.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/optionalMethods.js b/tests/baselines/reference/optionalMethods.js index 5cbd798ec89..b0af91c92f8 100644 --- a/tests/baselines/reference/optionalMethods.js +++ b/tests/baselines/reference/optionalMethods.js @@ -59,7 +59,11 @@ class Derived extends Base { //// [optionalMethods.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/optionalParamArgsTest.js b/tests/baselines/reference/optionalParamArgsTest.js index 23ab5150579..91507916a55 100644 --- a/tests/baselines/reference/optionalParamArgsTest.js +++ b/tests/baselines/reference/optionalParamArgsTest.js @@ -126,7 +126,11 @@ fnOpt2(1, [2, 3], [1], true); //// [optionalParamArgsTest.js] // Optional parameter and default argument tests var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/optionalParamInOverride.js b/tests/baselines/reference/optionalParamInOverride.js index 9d318cd9ae5..bc60d2507b0 100644 --- a/tests/baselines/reference/optionalParamInOverride.js +++ b/tests/baselines/reference/optionalParamInOverride.js @@ -9,7 +9,11 @@ class Y extends Z { //// [optionalParamInOverride.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/optionalParameterProperty.js b/tests/baselines/reference/optionalParameterProperty.js index 3203c4e2e09..62058c1ecb3 100644 --- a/tests/baselines/reference/optionalParameterProperty.js +++ b/tests/baselines/reference/optionalParameterProperty.js @@ -13,7 +13,11 @@ class D extends C { //// [optionalParameterProperty.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/outModuleConcatAmd.js b/tests/baselines/reference/outModuleConcatAmd.js index cab6be31d07..8a28677dbbf 100644 --- a/tests/baselines/reference/outModuleConcatAmd.js +++ b/tests/baselines/reference/outModuleConcatAmd.js @@ -10,7 +10,11 @@ export class B extends A { } //// [all.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/outModuleConcatAmd.js.map b/tests/baselines/reference/outModuleConcatAmd.js.map index 9187aca0646..937bec93969 100644 --- a/tests/baselines/reference/outModuleConcatAmd.js.map +++ b/tests/baselines/reference/outModuleConcatAmd.js.map @@ -1,2 +1,2 @@ //// [all.js.map] -{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":";;;;;;;IACA;QAAA;QAAiB,CAAC;QAAD,QAAC;IAAD,CAAC,AAAlB,IAAkB;IAAL,cAAC;;;;ICAd;QAAuB,qBAAC;QAAxB;;QAA2B,CAAC;QAAD,QAAC;IAAD,CAAC,AAA5B,CAAuB,KAAC,GAAI;IAAf,cAAC"} \ No newline at end of file +{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":";;;;;;;;;;;IACA;QAAA;QAAiB,CAAC;QAAD,QAAC;IAAD,CAAC,AAAlB,IAAkB;IAAL,cAAC;;;;ICAd;QAAuB,qBAAC;QAAxB;;QAA2B,CAAC;QAAD,QAAC;IAAD,CAAC,AAA5B,CAAuB,KAAC,GAAI;IAAf,cAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt b/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt index f07a95163f6..75af3bb54ac 100644 --- a/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt +++ b/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt @@ -9,7 +9,11 @@ emittedFile:all.js sourceFile:tests/cases/compiler/ref/a.ts ------------------------------------------------------------------- >>>var __extends = (this && this.__extends) || function (d, b) { ->>> Object.setPrototypeOf(d, b); +>>> if (typeof Object.setPrototypeOf === "function") { +>>> Object.setPrototypeOf(d, b); +>>> } else { +>>> d.__proto__ = b; +>>> } >>> function __() { this.constructor = d; } >>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); >>>}; @@ -20,13 +24,13 @@ sourceFile:tests/cases/compiler/ref/a.ts 2 > ^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(8, 5) Source(2, 1) + SourceIndex(0) +1 >Emitted(12, 5) Source(2, 1) + SourceIndex(0) --- >>> function A() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(9, 9) Source(2, 1) + SourceIndex(0) +1->Emitted(13, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -34,16 +38,16 @@ sourceFile:tests/cases/compiler/ref/a.ts 3 > ^^^^^^^^^-> 1->export class A { 2 > } -1->Emitted(10, 9) Source(2, 18) + SourceIndex(0) -2 >Emitted(10, 10) Source(2, 19) + SourceIndex(0) +1->Emitted(14, 9) Source(2, 18) + SourceIndex(0) +2 >Emitted(14, 10) Source(2, 19) + SourceIndex(0) --- >>> return A; 1->^^^^^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(11, 9) Source(2, 18) + SourceIndex(0) -2 >Emitted(11, 17) Source(2, 19) + SourceIndex(0) +1->Emitted(15, 9) Source(2, 18) + SourceIndex(0) +2 >Emitted(15, 17) Source(2, 19) + SourceIndex(0) --- >>> }()); 1 >^^^^ @@ -55,18 +59,18 @@ sourceFile:tests/cases/compiler/ref/a.ts 2 > } 3 > 4 > export class A { } -1 >Emitted(12, 5) Source(2, 18) + SourceIndex(0) -2 >Emitted(12, 6) Source(2, 19) + SourceIndex(0) -3 >Emitted(12, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(12, 10) Source(2, 19) + SourceIndex(0) +1 >Emitted(16, 5) Source(2, 18) + SourceIndex(0) +2 >Emitted(16, 6) Source(2, 19) + SourceIndex(0) +3 >Emitted(16, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(16, 10) Source(2, 19) + SourceIndex(0) --- >>> exports.A = A; 1->^^^^ 2 > ^^^^^^^^^^^^^^ 1-> 2 > A -1->Emitted(13, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(13, 19) Source(2, 15) + SourceIndex(0) +1->Emitted(17, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(17, 19) Source(2, 15) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:all.js @@ -80,21 +84,21 @@ sourceFile:tests/cases/compiler/b.ts 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >import {A} from "./ref/a"; > -1 >Emitted(17, 5) Source(2, 1) + SourceIndex(1) +1 >Emitted(21, 5) Source(2, 1) + SourceIndex(1) --- >>> __extends(B, _super); 1->^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^ 1->export class B extends 2 > A -1->Emitted(18, 9) Source(2, 24) + SourceIndex(1) -2 >Emitted(18, 30) Source(2, 25) + SourceIndex(1) +1->Emitted(22, 9) Source(2, 24) + SourceIndex(1) +2 >Emitted(22, 30) Source(2, 25) + SourceIndex(1) --- >>> function B() { 1 >^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > -1 >Emitted(19, 9) Source(2, 1) + SourceIndex(1) +1 >Emitted(23, 9) Source(2, 1) + SourceIndex(1) --- >>> return _super.apply(this, arguments) || this; >>> } @@ -103,16 +107,16 @@ sourceFile:tests/cases/compiler/b.ts 3 > ^^^^^^^^^-> 1->export class B extends A { 2 > } -1->Emitted(21, 9) Source(2, 28) + SourceIndex(1) -2 >Emitted(21, 10) Source(2, 29) + SourceIndex(1) +1->Emitted(25, 9) Source(2, 28) + SourceIndex(1) +2 >Emitted(25, 10) Source(2, 29) + SourceIndex(1) --- >>> return B; 1->^^^^^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(22, 9) Source(2, 28) + SourceIndex(1) -2 >Emitted(22, 17) Source(2, 29) + SourceIndex(1) +1->Emitted(26, 9) Source(2, 28) + SourceIndex(1) +2 >Emitted(26, 17) Source(2, 29) + SourceIndex(1) --- >>> }(a_1.A)); 1 >^^^^ @@ -128,20 +132,20 @@ sourceFile:tests/cases/compiler/b.ts 4 > export class B extends 5 > A 6 > { } -1 >Emitted(23, 5) Source(2, 28) + SourceIndex(1) -2 >Emitted(23, 6) Source(2, 29) + SourceIndex(1) -3 >Emitted(23, 6) Source(2, 1) + SourceIndex(1) -4 >Emitted(23, 7) Source(2, 24) + SourceIndex(1) -5 >Emitted(23, 12) Source(2, 25) + SourceIndex(1) -6 >Emitted(23, 15) Source(2, 29) + SourceIndex(1) +1 >Emitted(27, 5) Source(2, 28) + SourceIndex(1) +2 >Emitted(27, 6) Source(2, 29) + SourceIndex(1) +3 >Emitted(27, 6) Source(2, 1) + SourceIndex(1) +4 >Emitted(27, 7) Source(2, 24) + SourceIndex(1) +5 >Emitted(27, 12) Source(2, 25) + SourceIndex(1) +6 >Emitted(27, 15) Source(2, 29) + SourceIndex(1) --- >>> exports.B = B; 1->^^^^ 2 > ^^^^^^^^^^^^^^ 1-> 2 > B -1->Emitted(24, 5) Source(2, 14) + SourceIndex(1) -2 >Emitted(24, 19) Source(2, 15) + SourceIndex(1) +1->Emitted(28, 5) Source(2, 14) + SourceIndex(1) +2 >Emitted(28, 19) Source(2, 15) + SourceIndex(1) --- >>>}); >>>//# sourceMappingURL=all.js.map \ No newline at end of file diff --git a/tests/baselines/reference/outModuleConcatSystem.js b/tests/baselines/reference/outModuleConcatSystem.js index 6f6e1c3b366..4a7552bcde8 100644 --- a/tests/baselines/reference/outModuleConcatSystem.js +++ b/tests/baselines/reference/outModuleConcatSystem.js @@ -10,7 +10,11 @@ export class B extends A { } //// [all.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/outModuleConcatSystem.js.map b/tests/baselines/reference/outModuleConcatSystem.js.map index ac8fb23d87c..275b47b1363 100644 --- a/tests/baselines/reference/outModuleConcatSystem.js.map +++ b/tests/baselines/reference/outModuleConcatSystem.js.map @@ -1,2 +1,2 @@ //// [all.js.map] -{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":";;;;;;;;;;;;YACA;gBAAA;gBAAiB,CAAC;gBAAD,QAAC;YAAD,CAAC,AAAlB,IAAkB;;QAClB,CAAC;;;;;;;;;;;;;;YCDD;gBAAuB,qBAAC;gBAAxB;;gBAA2B,CAAC;gBAAD,QAAC;YAAD,CAAC,AAA5B,CAAuB,KAAC,GAAI;;QAAA,CAAC"} \ No newline at end of file +{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;YACA;gBAAA;gBAAiB,CAAC;gBAAD,QAAC;YAAD,CAAC,AAAlB,IAAkB;;QAClB,CAAC;;;;;;;;;;;;;;YCDD;gBAAuB,qBAAC;gBAAxB;;gBAA2B,CAAC;gBAAD,QAAC;YAAD,CAAC,AAA5B,CAAuB,KAAC,GAAI;;QAAA,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt b/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt index 47558a3812a..e5a439aea1a 100644 --- a/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt +++ b/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt @@ -9,7 +9,11 @@ emittedFile:all.js sourceFile:tests/cases/compiler/ref/a.ts ------------------------------------------------------------------- >>>var __extends = (this && this.__extends) || function (d, b) { ->>> Object.setPrototypeOf(d, b); +>>> if (typeof Object.setPrototypeOf === "function") { +>>> Object.setPrototypeOf(d, b); +>>> } else { +>>> d.__proto__ = b; +>>> } >>> function __() { this.constructor = d; } >>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); >>>}; @@ -25,13 +29,13 @@ sourceFile:tests/cases/compiler/ref/a.ts 2 > ^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(13, 13) Source(2, 1) + SourceIndex(0) +1 >Emitted(17, 13) Source(2, 1) + SourceIndex(0) --- >>> function A() { 1->^^^^^^^^^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(14, 17) Source(2, 1) + SourceIndex(0) +1->Emitted(18, 17) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^^^^^^^^^ @@ -39,16 +43,16 @@ sourceFile:tests/cases/compiler/ref/a.ts 3 > ^^^^^^^^^-> 1->export class A { 2 > } -1->Emitted(15, 17) Source(2, 18) + SourceIndex(0) -2 >Emitted(15, 18) Source(2, 19) + SourceIndex(0) +1->Emitted(19, 17) Source(2, 18) + SourceIndex(0) +2 >Emitted(19, 18) Source(2, 19) + SourceIndex(0) --- >>> return A; 1->^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(16, 17) Source(2, 18) + SourceIndex(0) -2 >Emitted(16, 25) Source(2, 19) + SourceIndex(0) +1->Emitted(20, 17) Source(2, 18) + SourceIndex(0) +2 >Emitted(20, 25) Source(2, 19) + SourceIndex(0) --- >>> }()); 1 >^^^^^^^^^^^^ @@ -60,10 +64,10 @@ sourceFile:tests/cases/compiler/ref/a.ts 2 > } 3 > 4 > export class A { } -1 >Emitted(17, 13) Source(2, 18) + SourceIndex(0) -2 >Emitted(17, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(17, 14) Source(2, 1) + SourceIndex(0) -4 >Emitted(17, 18) Source(2, 19) + SourceIndex(0) +1 >Emitted(21, 13) Source(2, 18) + SourceIndex(0) +2 >Emitted(21, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(21, 14) Source(2, 1) + SourceIndex(0) +4 >Emitted(21, 18) Source(2, 19) + SourceIndex(0) --- >>> exports_1("A", A); >>> } @@ -72,8 +76,8 @@ sourceFile:tests/cases/compiler/ref/a.ts 1-> > 2 > -1->Emitted(19, 9) Source(3, 1) + SourceIndex(0) -2 >Emitted(19, 10) Source(3, 2) + SourceIndex(0) +1->Emitted(23, 9) Source(3, 1) + SourceIndex(0) +2 >Emitted(23, 10) Source(3, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:all.js @@ -97,21 +101,21 @@ sourceFile:tests/cases/compiler/b.ts 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >import {A} from "./ref/a"; > -1 >Emitted(33, 13) Source(2, 1) + SourceIndex(1) +1 >Emitted(37, 13) Source(2, 1) + SourceIndex(1) --- >>> __extends(B, _super); 1->^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^ 1->export class B extends 2 > A -1->Emitted(34, 17) Source(2, 24) + SourceIndex(1) -2 >Emitted(34, 38) Source(2, 25) + SourceIndex(1) +1->Emitted(38, 17) Source(2, 24) + SourceIndex(1) +2 >Emitted(38, 38) Source(2, 25) + SourceIndex(1) --- >>> function B() { 1 >^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > -1 >Emitted(35, 17) Source(2, 1) + SourceIndex(1) +1 >Emitted(39, 17) Source(2, 1) + SourceIndex(1) --- >>> return _super.apply(this, arguments) || this; >>> } @@ -120,16 +124,16 @@ sourceFile:tests/cases/compiler/b.ts 3 > ^^^^^^^^^-> 1->export class B extends A { 2 > } -1->Emitted(37, 17) Source(2, 28) + SourceIndex(1) -2 >Emitted(37, 18) Source(2, 29) + SourceIndex(1) +1->Emitted(41, 17) Source(2, 28) + SourceIndex(1) +2 >Emitted(41, 18) Source(2, 29) + SourceIndex(1) --- >>> return B; 1->^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(38, 17) Source(2, 28) + SourceIndex(1) -2 >Emitted(38, 25) Source(2, 29) + SourceIndex(1) +1->Emitted(42, 17) Source(2, 28) + SourceIndex(1) +2 >Emitted(42, 25) Source(2, 29) + SourceIndex(1) --- >>> }(a_1.A)); 1 >^^^^^^^^^^^^ @@ -145,12 +149,12 @@ sourceFile:tests/cases/compiler/b.ts 4 > export class B extends 5 > A 6 > { } -1 >Emitted(39, 13) Source(2, 28) + SourceIndex(1) -2 >Emitted(39, 14) Source(2, 29) + SourceIndex(1) -3 >Emitted(39, 14) Source(2, 1) + SourceIndex(1) -4 >Emitted(39, 15) Source(2, 24) + SourceIndex(1) -5 >Emitted(39, 20) Source(2, 25) + SourceIndex(1) -6 >Emitted(39, 23) Source(2, 29) + SourceIndex(1) +1 >Emitted(43, 13) Source(2, 28) + SourceIndex(1) +2 >Emitted(43, 14) Source(2, 29) + SourceIndex(1) +3 >Emitted(43, 14) Source(2, 1) + SourceIndex(1) +4 >Emitted(43, 15) Source(2, 24) + SourceIndex(1) +5 >Emitted(43, 20) Source(2, 25) + SourceIndex(1) +6 >Emitted(43, 23) Source(2, 29) + SourceIndex(1) --- >>> exports_2("B", B); >>> } @@ -158,8 +162,8 @@ sourceFile:tests/cases/compiler/b.ts 2 > ^ 1-> 2 > -1->Emitted(41, 9) Source(2, 29) + SourceIndex(1) -2 >Emitted(41, 10) Source(2, 30) + SourceIndex(1) +1->Emitted(45, 9) Source(2, 29) + SourceIndex(1) +2 >Emitted(45, 10) Source(2, 30) + SourceIndex(1) --- >>> }; >>>}); diff --git a/tests/baselines/reference/outModuleTripleSlashRefs.js b/tests/baselines/reference/outModuleTripleSlashRefs.js index 5f6def67a48..c5f6da0fdf5 100644 --- a/tests/baselines/reference/outModuleTripleSlashRefs.js +++ b/tests/baselines/reference/outModuleTripleSlashRefs.js @@ -32,7 +32,11 @@ export class B extends A { } //// [all.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/outModuleTripleSlashRefs.js.map b/tests/baselines/reference/outModuleTripleSlashRefs.js.map index 5ccc59aeabf..cb10515edd2 100644 --- a/tests/baselines/reference/outModuleTripleSlashRefs.js.map +++ b/tests/baselines/reference/outModuleTripleSlashRefs.js.map @@ -1,2 +1,2 @@ //// [all.js.map] -{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/b.ts","tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":";;;;;AAAA,iCAAiC;AACjC;IAAA;IAEA,CAAC;IAAD,UAAC;AAAD,CAAC,AAFD,IAEC;;;ICFD,+BAA+B;IAC/B;QAAA;QAEA,CAAC;QAAD,QAAC;IAAD,CAAC,AAFD,IAEC;IAFY,cAAC;;;;ICDd;QAAuB,qBAAC;QAAxB;;QAA2B,CAAC;QAAD,QAAC;IAAD,CAAC,AAA5B,CAAuB,KAAC,GAAI;IAAf,cAAC"} \ No newline at end of file +{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/b.ts","tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":";;;;;;;;;AAAA,iCAAiC;AACjC;IAAA;IAEA,CAAC;IAAD,UAAC;AAAD,CAAC,AAFD,IAEC;;;ICFD,+BAA+B;IAC/B;QAAA;QAEA,CAAC;QAAD,QAAC;IAAD,CAAC,AAFD,IAEC;IAFY,cAAC;;;;ICDd;QAAuB,qBAAC;QAAxB;;QAA2B,CAAC;QAAD,QAAC;IAAD,CAAC,AAA5B,CAAuB,KAAC,GAAI;IAAf,cAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt b/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt index 9f15bc0eaee..c3e619a4c2d 100644 --- a/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt +++ b/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt @@ -9,7 +9,11 @@ emittedFile:all.js sourceFile:tests/cases/compiler/ref/b.ts ------------------------------------------------------------------- >>>var __extends = (this && this.__extends) || function (d, b) { ->>> Object.setPrototypeOf(d, b); +>>> if (typeof Object.setPrototypeOf === "function") { +>>> Object.setPrototypeOf(d, b); +>>> } else { +>>> d.__proto__ = b; +>>> } >>> function __() { this.constructor = d; } >>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); >>>}; @@ -18,21 +22,21 @@ sourceFile:tests/cases/compiler/ref/b.ts 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1 > 2 >/// -1 >Emitted(6, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(6, 34) Source(1, 34) + SourceIndex(0) +1 >Emitted(10, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(10, 34) Source(1, 34) + SourceIndex(0) --- >>>var Foo = (function () { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(7, 1) Source(2, 1) + SourceIndex(0) +1 >Emitted(11, 1) Source(2, 1) + SourceIndex(0) --- >>> function Foo() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(8, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(12, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -42,16 +46,16 @@ sourceFile:tests/cases/compiler/ref/b.ts > member: Bar; > 2 > } -1->Emitted(9, 5) Source(4, 1) + SourceIndex(0) -2 >Emitted(9, 6) Source(4, 2) + SourceIndex(0) +1->Emitted(13, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(4, 2) + SourceIndex(0) --- >>> return Foo; 1->^^^^ 2 > ^^^^^^^^^^ 1-> 2 > } -1->Emitted(10, 5) Source(4, 1) + SourceIndex(0) -2 >Emitted(10, 15) Source(4, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(14, 15) Source(4, 2) + SourceIndex(0) --- >>>}()); 1 > @@ -65,10 +69,10 @@ sourceFile:tests/cases/compiler/ref/b.ts 4 > class Foo { > member: Bar; > } -1 >Emitted(11, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(11, 2) Source(4, 2) + SourceIndex(0) -3 >Emitted(11, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(11, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(15, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(15, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(15, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(15, 6) Source(4, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:all.js @@ -82,21 +86,21 @@ sourceFile:tests/cases/compiler/ref/a.ts 1-> > 2 > /// -1->Emitted(14, 5) Source(2, 1) + SourceIndex(1) -2 >Emitted(14, 36) Source(2, 32) + SourceIndex(1) +1->Emitted(18, 5) Source(2, 1) + SourceIndex(1) +2 >Emitted(18, 36) Source(2, 32) + SourceIndex(1) --- >>> var A = (function () { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(15, 5) Source(3, 1) + SourceIndex(1) +1 >Emitted(19, 5) Source(3, 1) + SourceIndex(1) --- >>> function A() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(16, 9) Source(3, 1) + SourceIndex(1) +1->Emitted(20, 9) Source(3, 1) + SourceIndex(1) --- >>> } 1->^^^^^^^^ @@ -106,16 +110,16 @@ sourceFile:tests/cases/compiler/ref/a.ts > member: typeof GlobalFoo; > 2 > } -1->Emitted(17, 9) Source(5, 1) + SourceIndex(1) -2 >Emitted(17, 10) Source(5, 2) + SourceIndex(1) +1->Emitted(21, 9) Source(5, 1) + SourceIndex(1) +2 >Emitted(21, 10) Source(5, 2) + SourceIndex(1) --- >>> return A; 1->^^^^^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(18, 9) Source(5, 1) + SourceIndex(1) -2 >Emitted(18, 17) Source(5, 2) + SourceIndex(1) +1->Emitted(22, 9) Source(5, 1) + SourceIndex(1) +2 >Emitted(22, 17) Source(5, 2) + SourceIndex(1) --- >>> }()); 1 >^^^^ @@ -129,18 +133,18 @@ sourceFile:tests/cases/compiler/ref/a.ts 4 > export class A { > member: typeof GlobalFoo; > } -1 >Emitted(19, 5) Source(5, 1) + SourceIndex(1) -2 >Emitted(19, 6) Source(5, 2) + SourceIndex(1) -3 >Emitted(19, 6) Source(3, 1) + SourceIndex(1) -4 >Emitted(19, 10) Source(5, 2) + SourceIndex(1) +1 >Emitted(23, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(23, 6) Source(5, 2) + SourceIndex(1) +3 >Emitted(23, 6) Source(3, 1) + SourceIndex(1) +4 >Emitted(23, 10) Source(5, 2) + SourceIndex(1) --- >>> exports.A = A; 1->^^^^ 2 > ^^^^^^^^^^^^^^ 1-> 2 > A -1->Emitted(20, 5) Source(3, 14) + SourceIndex(1) -2 >Emitted(20, 19) Source(3, 15) + SourceIndex(1) +1->Emitted(24, 5) Source(3, 14) + SourceIndex(1) +2 >Emitted(24, 19) Source(3, 15) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:all.js @@ -154,21 +158,21 @@ sourceFile:tests/cases/compiler/b.ts 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >import {A} from "./ref/a"; > -1 >Emitted(24, 5) Source(2, 1) + SourceIndex(2) +1 >Emitted(28, 5) Source(2, 1) + SourceIndex(2) --- >>> __extends(B, _super); 1->^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^ 1->export class B extends 2 > A -1->Emitted(25, 9) Source(2, 24) + SourceIndex(2) -2 >Emitted(25, 30) Source(2, 25) + SourceIndex(2) +1->Emitted(29, 9) Source(2, 24) + SourceIndex(2) +2 >Emitted(29, 30) Source(2, 25) + SourceIndex(2) --- >>> function B() { 1 >^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > -1 >Emitted(26, 9) Source(2, 1) + SourceIndex(2) +1 >Emitted(30, 9) Source(2, 1) + SourceIndex(2) --- >>> return _super.apply(this, arguments) || this; >>> } @@ -177,16 +181,16 @@ sourceFile:tests/cases/compiler/b.ts 3 > ^^^^^^^^^-> 1->export class B extends A { 2 > } -1->Emitted(28, 9) Source(2, 28) + SourceIndex(2) -2 >Emitted(28, 10) Source(2, 29) + SourceIndex(2) +1->Emitted(32, 9) Source(2, 28) + SourceIndex(2) +2 >Emitted(32, 10) Source(2, 29) + SourceIndex(2) --- >>> return B; 1->^^^^^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(29, 9) Source(2, 28) + SourceIndex(2) -2 >Emitted(29, 17) Source(2, 29) + SourceIndex(2) +1->Emitted(33, 9) Source(2, 28) + SourceIndex(2) +2 >Emitted(33, 17) Source(2, 29) + SourceIndex(2) --- >>> }(a_1.A)); 1 >^^^^ @@ -202,20 +206,20 @@ sourceFile:tests/cases/compiler/b.ts 4 > export class B extends 5 > A 6 > { } -1 >Emitted(30, 5) Source(2, 28) + SourceIndex(2) -2 >Emitted(30, 6) Source(2, 29) + SourceIndex(2) -3 >Emitted(30, 6) Source(2, 1) + SourceIndex(2) -4 >Emitted(30, 7) Source(2, 24) + SourceIndex(2) -5 >Emitted(30, 12) Source(2, 25) + SourceIndex(2) -6 >Emitted(30, 15) Source(2, 29) + SourceIndex(2) +1 >Emitted(34, 5) Source(2, 28) + SourceIndex(2) +2 >Emitted(34, 6) Source(2, 29) + SourceIndex(2) +3 >Emitted(34, 6) Source(2, 1) + SourceIndex(2) +4 >Emitted(34, 7) Source(2, 24) + SourceIndex(2) +5 >Emitted(34, 12) Source(2, 25) + SourceIndex(2) +6 >Emitted(34, 15) Source(2, 29) + SourceIndex(2) --- >>> exports.B = B; 1->^^^^ 2 > ^^^^^^^^^^^^^^ 1-> 2 > B -1->Emitted(31, 5) Source(2, 14) + SourceIndex(2) -2 >Emitted(31, 19) Source(2, 15) + SourceIndex(2) +1->Emitted(35, 5) Source(2, 14) + SourceIndex(2) +2 >Emitted(35, 19) Source(2, 15) + SourceIndex(2) --- >>>}); >>>//# sourceMappingURL=all.js.map \ No newline at end of file diff --git a/tests/baselines/reference/overload1.js b/tests/baselines/reference/overload1.js index 6cbfb843812..8377a62f2c7 100644 --- a/tests/baselines/reference/overload1.js +++ b/tests/baselines/reference/overload1.js @@ -41,7 +41,11 @@ var v=x.g; //// [overload1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks1.js b/tests/baselines/reference/overloadOnConstConstraintChecks1.js index 8bc8ccd1612..ae8e1178be5 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks1.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks1.js @@ -24,7 +24,11 @@ class D implements MyDoc { //// [overloadOnConstConstraintChecks1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks2.js b/tests/baselines/reference/overloadOnConstConstraintChecks2.js index 16cfb630a5d..43468e15fd8 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks2.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks2.js @@ -13,7 +13,11 @@ function foo(name: any): A { //// [overloadOnConstConstraintChecks2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks3.js b/tests/baselines/reference/overloadOnConstConstraintChecks3.js index 1540bc4dc49..5e8d70d3d6e 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks3.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks3.js @@ -14,7 +14,11 @@ function foo(name: any): A { //// [overloadOnConstConstraintChecks3.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks4.js b/tests/baselines/reference/overloadOnConstConstraintChecks4.js index a634547a36b..c4ac235a671 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks4.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks4.js @@ -15,7 +15,11 @@ function foo(name: any): Z { //// [overloadOnConstConstraintChecks4.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js b/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js index 0edadc3c692..58807808f5c 100644 --- a/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js +++ b/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js @@ -13,7 +13,11 @@ foo("HI"); //// [overloadOnConstantsInvalidOverload1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadResolution.js b/tests/baselines/reference/overloadResolution.js index 56ebebc454e..bb1fce13a0a 100644 --- a/tests/baselines/reference/overloadResolution.js +++ b/tests/baselines/reference/overloadResolution.js @@ -96,7 +96,11 @@ var s = fn5((n) => n.substr(0)); //// [overloadResolution.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadResolutionClassConstructors.js b/tests/baselines/reference/overloadResolutionClassConstructors.js index 5cf41a3b44a..16bdd16eaa2 100644 --- a/tests/baselines/reference/overloadResolutionClassConstructors.js +++ b/tests/baselines/reference/overloadResolutionClassConstructors.js @@ -103,7 +103,11 @@ new fn5((n) => n.blah); // Error //// [overloadResolutionClassConstructors.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadResolutionConstructors.js b/tests/baselines/reference/overloadResolutionConstructors.js index 85ec9fb06fb..4b7e487466c 100644 --- a/tests/baselines/reference/overloadResolutionConstructors.js +++ b/tests/baselines/reference/overloadResolutionConstructors.js @@ -104,7 +104,11 @@ var s = new fn5((n) => n.substr(0)); //// [overloadResolutionConstructors.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadingOnConstants1.js b/tests/baselines/reference/overloadingOnConstants1.js index c8f5a8fd9ae..d52d97cefc7 100644 --- a/tests/baselines/reference/overloadingOnConstants1.js +++ b/tests/baselines/reference/overloadingOnConstants1.js @@ -27,7 +27,11 @@ var htmlSpanElement2: Derived1 = d2.createElement("span"); //// [overloadingOnConstants1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadingOnConstants2.js b/tests/baselines/reference/overloadingOnConstants2.js index 9792485e1cf..3b666b2351b 100644 --- a/tests/baselines/reference/overloadingOnConstants2.js +++ b/tests/baselines/reference/overloadingOnConstants2.js @@ -29,7 +29,11 @@ var f: C = bar("um", []); // C //// [overloadingOnConstants2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overridingPrivateStaticMembers.js b/tests/baselines/reference/overridingPrivateStaticMembers.js index 50f957c7fdd..f1cc4b05a40 100644 --- a/tests/baselines/reference/overridingPrivateStaticMembers.js +++ b/tests/baselines/reference/overridingPrivateStaticMembers.js @@ -9,7 +9,11 @@ class Derived2 extends Base2 { //// [overridingPrivateStaticMembers.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parseErrorInHeritageClause1.js b/tests/baselines/reference/parseErrorInHeritageClause1.js index 3409c13e2f1..a82e4eb8ea7 100644 --- a/tests/baselines/reference/parseErrorInHeritageClause1.js +++ b/tests/baselines/reference/parseErrorInHeritageClause1.js @@ -4,7 +4,11 @@ class C extends A # { //// [parseErrorInHeritageClause1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parser509630.js b/tests/baselines/reference/parser509630.js index cce7df3db54..3c80c2bfd16 100644 --- a/tests/baselines/reference/parser509630.js +++ b/tests/baselines/reference/parser509630.js @@ -8,7 +8,11 @@ class Any extends Type { //// [parser509630.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserAstSpans1.js b/tests/baselines/reference/parserAstSpans1.js index 12de33e4738..5ba4ba4d96d 100644 --- a/tests/baselines/reference/parserAstSpans1.js +++ b/tests/baselines/reference/parserAstSpans1.js @@ -221,7 +221,11 @@ class c6 extends c5 { //// [parserAstSpans1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserClassDeclaration1.js b/tests/baselines/reference/parserClassDeclaration1.js index 555d625d522..4ce80bdec21 100644 --- a/tests/baselines/reference/parserClassDeclaration1.js +++ b/tests/baselines/reference/parserClassDeclaration1.js @@ -4,7 +4,11 @@ class C extends A extends B { //// [parserClassDeclaration1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserClassDeclaration3.js b/tests/baselines/reference/parserClassDeclaration3.js index b63483411b2..ac58fb23342 100644 --- a/tests/baselines/reference/parserClassDeclaration3.js +++ b/tests/baselines/reference/parserClassDeclaration3.js @@ -4,7 +4,11 @@ class C implements A extends B { //// [parserClassDeclaration3.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserClassDeclaration4.js b/tests/baselines/reference/parserClassDeclaration4.js index 2f3cdf0e166..fa85ee2659c 100644 --- a/tests/baselines/reference/parserClassDeclaration4.js +++ b/tests/baselines/reference/parserClassDeclaration4.js @@ -4,7 +4,11 @@ class C extends A implements B extends C { //// [parserClassDeclaration4.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserClassDeclaration5.js b/tests/baselines/reference/parserClassDeclaration5.js index da843d06292..a77e0867d59 100644 --- a/tests/baselines/reference/parserClassDeclaration5.js +++ b/tests/baselines/reference/parserClassDeclaration5.js @@ -4,7 +4,11 @@ class C extends A implements B implements C { //// [parserClassDeclaration5.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserClassDeclaration6.js b/tests/baselines/reference/parserClassDeclaration6.js index 842b811de9b..23820f706df 100644 --- a/tests/baselines/reference/parserClassDeclaration6.js +++ b/tests/baselines/reference/parserClassDeclaration6.js @@ -4,7 +4,11 @@ class C extends A, B { //// [parserClassDeclaration6.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause2.js b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause2.js index 22225819435..d81e0e7cf65 100644 --- a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause2.js +++ b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause2.js @@ -4,7 +4,11 @@ class C extends A, { //// [parserErrorRecovery_ExtendsOrImplementsClause2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause4.js b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause4.js index 92af44f7cc4..34f0bce2d1c 100644 --- a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause4.js +++ b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause4.js @@ -4,7 +4,11 @@ class C extends A implements { //// [parserErrorRecovery_ExtendsOrImplementsClause4.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause5.js b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause5.js index 07adb1e2001..9eb5a995637 100644 --- a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause5.js +++ b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause5.js @@ -4,7 +4,11 @@ class C extends A, implements B, { //// [parserErrorRecovery_ExtendsOrImplementsClause5.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserGenericsInTypeContexts1.js b/tests/baselines/reference/parserGenericsInTypeContexts1.js index ef93433301b..99cfeb0c61f 100644 --- a/tests/baselines/reference/parserGenericsInTypeContexts1.js +++ b/tests/baselines/reference/parserGenericsInTypeContexts1.js @@ -19,7 +19,11 @@ function f2(): F { //// [parserGenericsInTypeContexts1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserGenericsInTypeContexts2.js b/tests/baselines/reference/parserGenericsInTypeContexts2.js index a3bfafc19b4..b34364d5b9e 100644 --- a/tests/baselines/reference/parserGenericsInTypeContexts2.js +++ b/tests/baselines/reference/parserGenericsInTypeContexts2.js @@ -19,7 +19,11 @@ function f2(): F, Y>> { //// [parserGenericsInTypeContexts2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserRealSource10.js b/tests/baselines/reference/parserRealSource10.js index b89e47d3e75..25112efe231 100644 --- a/tests/baselines/reference/parserRealSource10.js +++ b/tests/baselines/reference/parserRealSource10.js @@ -459,7 +459,11 @@ module TypeScript { // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. // See LICENSE.txt in the project root for complete license information. var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserRealSource11.js b/tests/baselines/reference/parserRealSource11.js index daaa9f79cee..23ea8da3d5c 100644 --- a/tests/baselines/reference/parserRealSource11.js +++ b/tests/baselines/reference/parserRealSource11.js @@ -2368,7 +2368,11 @@ module TypeScript { // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. // See LICENSE.txt in the project root for complete license information. var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserharness.js b/tests/baselines/reference/parserharness.js index fd432660b52..ac60a5b18ad 100644 --- a/tests/baselines/reference/parserharness.js +++ b/tests/baselines/reference/parserharness.js @@ -2097,7 +2097,11 @@ module Harness { // limitations under the License. // var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/partiallyAnnotatedFunctionInferenceError.js b/tests/baselines/reference/partiallyAnnotatedFunctionInferenceError.js index c81647e79b5..b57b3a8bff6 100644 --- a/tests/baselines/reference/partiallyAnnotatedFunctionInferenceError.js +++ b/tests/baselines/reference/partiallyAnnotatedFunctionInferenceError.js @@ -17,7 +17,11 @@ testError((t1, t2, t3: D) => {}) //// [partiallyAnnotatedFunctionInferenceError.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/partiallyAnnotatedFunctionInferenceWithTypeParameter.js b/tests/baselines/reference/partiallyAnnotatedFunctionInferenceWithTypeParameter.js index e54441df4d6..f8bd04cde38 100644 --- a/tests/baselines/reference/partiallyAnnotatedFunctionInferenceWithTypeParameter.js +++ b/tests/baselines/reference/partiallyAnnotatedFunctionInferenceWithTypeParameter.js @@ -36,7 +36,11 @@ testRest((t2, ...t3: D[]) => {}) //// [partiallyAnnotatedFunctionInferenceWithTypeParameter.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/primitiveMembers.js b/tests/baselines/reference/primitiveMembers.js index 64b699496bf..2aa2efbba10 100644 --- a/tests/baselines/reference/primitiveMembers.js +++ b/tests/baselines/reference/primitiveMembers.js @@ -33,7 +33,11 @@ class foo extends baz { public bar(){ return undefined}; } //// [primitiveMembers.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/privacyClass.js b/tests/baselines/reference/privacyClass.js index 64e1c63eca1..c310bf6e77d 100644 --- a/tests/baselines/reference/privacyClass.js +++ b/tests/baselines/reference/privacyClass.js @@ -130,7 +130,11 @@ export class glo_C12_public extends glo_c_private implements glo_i_private, glo //// [privacyClass.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js b/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js index 377b4082bea..68feed955d3 100644 --- a/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js +++ b/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js @@ -100,7 +100,11 @@ class publicClassExtendingPublicClassInGlobal extends publicClassInGlobal { //// [privacyClassExtendsClauseDeclFile_externalModule.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -286,7 +290,11 @@ var publicClassExtendingFromPrivateModuleClass = (function (_super) { exports.publicClassExtendingFromPrivateModuleClass = publicClassExtendingFromPrivateModuleClass; //// [privacyClassExtendsClauseDeclFile_GlobalFile.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/privacyGloClass.js b/tests/baselines/reference/privacyGloClass.js index b93ed51025d..4824da462ad 100644 --- a/tests/baselines/reference/privacyGloClass.js +++ b/tests/baselines/reference/privacyGloClass.js @@ -62,7 +62,11 @@ class glo_C11_public extends glo_c_public implements glo_i_public { //// [privacyGloClass.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/privateAccessInSubclass1.js b/tests/baselines/reference/privateAccessInSubclass1.js index 2118eb072d7..63e8172576a 100644 --- a/tests/baselines/reference/privateAccessInSubclass1.js +++ b/tests/baselines/reference/privateAccessInSubclass1.js @@ -11,7 +11,11 @@ class D extends Base { //// [privateAccessInSubclass1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/privateInstanceMemberAccessibility.js b/tests/baselines/reference/privateInstanceMemberAccessibility.js index 98b2671d23e..3df2708569c 100644 --- a/tests/baselines/reference/privateInstanceMemberAccessibility.js +++ b/tests/baselines/reference/privateInstanceMemberAccessibility.js @@ -15,7 +15,11 @@ class Derived extends Base { //// [privateInstanceMemberAccessibility.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/privateProtectedMembersAreNotAccessibleDestructuring.js b/tests/baselines/reference/privateProtectedMembersAreNotAccessibleDestructuring.js index bcef17bf63f..239d0a4281b 100644 --- a/tests/baselines/reference/privateProtectedMembersAreNotAccessibleDestructuring.js +++ b/tests/baselines/reference/privateProtectedMembersAreNotAccessibleDestructuring.js @@ -23,7 +23,11 @@ let { priv: a, prot: b, privateMethod: f } = k; // error //// [privateProtectedMembersAreNotAccessibleDestructuring.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/privateStaticMemberAccessibility.js b/tests/baselines/reference/privateStaticMemberAccessibility.js index 438f485e031..d21d13070d8 100644 --- a/tests/baselines/reference/privateStaticMemberAccessibility.js +++ b/tests/baselines/reference/privateStaticMemberAccessibility.js @@ -10,7 +10,11 @@ class Derived extends Base { //// [privateStaticMemberAccessibility.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/privateStaticNotAccessibleInClodule2.js b/tests/baselines/reference/privateStaticNotAccessibleInClodule2.js index 618d6d88e8a..e7e1e468aed 100644 --- a/tests/baselines/reference/privateStaticNotAccessibleInClodule2.js +++ b/tests/baselines/reference/privateStaticNotAccessibleInClodule2.js @@ -17,7 +17,11 @@ module D { //// [privateStaticNotAccessibleInClodule2.js] // Any attempt to access a private property member outside the class body that contains its declaration results in a compile-time error. var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/amd/testGlo.js b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/amd/testGlo.js index ef754cba47d..93d8685224b 100644 --- a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/amd/testGlo.js +++ b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/amd/testGlo.js @@ -1,5 +1,9 @@ var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/node/testGlo.js b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/node/testGlo.js index ef754cba47d..93d8685224b 100644 --- a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/node/testGlo.js +++ b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/node/testGlo.js @@ -1,5 +1,9 @@ var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/project/prologueEmit/amd/out.js b/tests/baselines/reference/project/prologueEmit/amd/out.js index 8273c054fbd..f80f316d3c8 100644 --- a/tests/baselines/reference/project/prologueEmit/amd/out.js +++ b/tests/baselines/reference/project/prologueEmit/amd/out.js @@ -1,5 +1,9 @@ var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/project/prologueEmit/node/out.js b/tests/baselines/reference/project/prologueEmit/node/out.js index 8273c054fbd..f80f316d3c8 100644 --- a/tests/baselines/reference/project/prologueEmit/node/out.js +++ b/tests/baselines/reference/project/prologueEmit/node/out.js @@ -1,5 +1,9 @@ var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/project/quotesInFileAndDirectoryNames/amd/m'ain.js b/tests/baselines/reference/project/quotesInFileAndDirectoryNames/amd/m'ain.js index dac535093f5..65483bd492a 100644 --- a/tests/baselines/reference/project/quotesInFileAndDirectoryNames/amd/m'ain.js +++ b/tests/baselines/reference/project/quotesInFileAndDirectoryNames/amd/m'ain.js @@ -1,6 +1,10 @@ /// var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/project/quotesInFileAndDirectoryNames/node/m'ain.js b/tests/baselines/reference/project/quotesInFileAndDirectoryNames/node/m'ain.js index dac535093f5..65483bd492a 100644 --- a/tests/baselines/reference/project/quotesInFileAndDirectoryNames/node/m'ain.js +++ b/tests/baselines/reference/project/quotesInFileAndDirectoryNames/node/m'ain.js @@ -1,6 +1,10 @@ /// var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/propertiesAndIndexers.js b/tests/baselines/reference/propertiesAndIndexers.js index ccf7c50ebc9..9d65b48702e 100644 --- a/tests/baselines/reference/propertiesAndIndexers.js +++ b/tests/baselines/reference/propertiesAndIndexers.js @@ -53,7 +53,11 @@ var c: { //// [propertiesAndIndexers.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/propertyAccess.js b/tests/baselines/reference/propertyAccess.js index 3240f46a935..3da9b5cc647 100644 --- a/tests/baselines/reference/propertyAccess.js +++ b/tests/baselines/reference/propertyAccess.js @@ -152,7 +152,11 @@ var x3: A; //// [propertyAccess.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js index e813239484b..cc874197c3c 100644 --- a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js @@ -84,7 +84,11 @@ var r4 = b.foo(aB, aB); // no inferences for T so constraint isn't satisfied, er //// [propertyAccessOnTypeParameterWithConstraints2.js] // generic types should behave as if they have properties of their constraint type var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js index b10642c73c5..bcaa1458325 100644 --- a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js @@ -59,7 +59,11 @@ var r4 = b.foo(new B()); // valid call to an invalid function //// [propertyAccessOnTypeParameterWithConstraints3.js] // generic types should behave as if they have properties of their constraint type var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js index 97f8e18f917..8cc85faa100 100644 --- a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js @@ -46,7 +46,11 @@ var r4 = b.foo(new B()); // error after constraints above made illegal, doesn't //// [propertyAccessOnTypeParameterWithConstraints5.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass.js index 226ad97f81f..babef969a10 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass.js @@ -40,7 +40,11 @@ class E extends C { //// [protectedClassPropertyAccessibleWithinNestedSubclass.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass1.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass1.js index c98abd2a89a..3a3013d6704 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass1.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass1.js @@ -116,7 +116,11 @@ d4.x; // Error, neither within their declaring class nor class //// [protectedClassPropertyAccessibleWithinNestedSubclass1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js index 2557a8abcf9..3c59a316d71 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js @@ -22,7 +22,11 @@ class C extends B { //// [protectedClassPropertyAccessibleWithinSubclass.js] // no errors var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass2.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass2.js index 8ee957ec64f..fb818c42c7e 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass2.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass2.js @@ -96,7 +96,11 @@ d4.x; // Error, neither within their declaring class nor class //// [protectedClassPropertyAccessibleWithinSubclass2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass3.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass3.js index 31c2f3d149c..20984b107b9 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass3.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass3.js @@ -15,7 +15,11 @@ class Derived extends Base { //// [protectedClassPropertyAccessibleWithinSubclass3.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedInstanceMemberAccessibility.js b/tests/baselines/reference/protectedInstanceMemberAccessibility.js index 84400a37aa7..c906f456d67 100644 --- a/tests/baselines/reference/protectedInstanceMemberAccessibility.js +++ b/tests/baselines/reference/protectedInstanceMemberAccessibility.js @@ -46,7 +46,11 @@ class C extends A { //// [protectedInstanceMemberAccessibility.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedMembers.js b/tests/baselines/reference/protectedMembers.js index 4757f6134a3..d2e8bfe47ce 100644 --- a/tests/baselines/reference/protectedMembers.js +++ b/tests/baselines/reference/protectedMembers.js @@ -117,7 +117,11 @@ class B3 extends A3 { //// [protectedMembers.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass.js b/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass.js index ffe163716ed..e0ad17934c3 100644 --- a/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass.js +++ b/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass.js @@ -45,7 +45,11 @@ Derived3.x; // Error, neither within their declaring class nor classes deriv //// [protectedStaticClassPropertyAccessibleWithinSubclass.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass2.js b/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass2.js index d21e6511c34..37ddb2b0d2c 100644 --- a/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass2.js +++ b/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass2.js @@ -23,7 +23,11 @@ class Derived2 extends Derived1 { //// [protectedStaticClassPropertyAccessibleWithinSubclass2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/qualifiedName_entity-name-resolution-does-not-affect-class-heritage.js b/tests/baselines/reference/qualifiedName_entity-name-resolution-does-not-affect-class-heritage.js index d345bb7e1b1..3fc3b29ff45 100644 --- a/tests/baselines/reference/qualifiedName_entity-name-resolution-does-not-affect-class-heritage.js +++ b/tests/baselines/reference/qualifiedName_entity-name-resolution-does-not-affect-class-heritage.js @@ -8,7 +8,11 @@ class Beta extends Alpha.x { //// [qualifiedName_entity-name-resolution-does-not-affect-class-heritage.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/readonlyConstructorAssignment.js b/tests/baselines/reference/readonlyConstructorAssignment.js index d8275690d4a..a3a46c4e14f 100644 --- a/tests/baselines/reference/readonlyConstructorAssignment.js +++ b/tests/baselines/reference/readonlyConstructorAssignment.js @@ -42,7 +42,11 @@ class E extends D { //// [readonlyConstructorAssignment.js] // Tests that readonly parameter properties behave like regular readonly properties var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/recursiveBaseCheck3.js b/tests/baselines/reference/recursiveBaseCheck3.js index 92835b848ce..bd89b8c6574 100644 --- a/tests/baselines/reference/recursiveBaseCheck3.js +++ b/tests/baselines/reference/recursiveBaseCheck3.js @@ -6,7 +6,11 @@ class C extends A { } //// [recursiveBaseCheck3.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/recursiveBaseCheck4.js b/tests/baselines/reference/recursiveBaseCheck4.js index f0271b2d36a..f89b52e719f 100644 --- a/tests/baselines/reference/recursiveBaseCheck4.js +++ b/tests/baselines/reference/recursiveBaseCheck4.js @@ -4,7 +4,11 @@ class M extends M { } //// [recursiveBaseCheck4.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/recursiveBaseCheck6.js b/tests/baselines/reference/recursiveBaseCheck6.js index 97e6cb483e3..05a72e11213 100644 --- a/tests/baselines/reference/recursiveBaseCheck6.js +++ b/tests/baselines/reference/recursiveBaseCheck6.js @@ -4,7 +4,11 @@ class S18 extends S18<{ S19: A; }>{ } //// [recursiveBaseCheck6.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/recursiveBaseConstructorCreation1.js b/tests/baselines/reference/recursiveBaseConstructorCreation1.js index d20d43c405d..b0a11841dd8 100644 --- a/tests/baselines/reference/recursiveBaseConstructorCreation1.js +++ b/tests/baselines/reference/recursiveBaseConstructorCreation1.js @@ -8,7 +8,11 @@ var x = new C2(); // Valid //// [recursiveBaseConstructorCreation1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/recursiveClassInstantiationsWithDefaultConstructors.js b/tests/baselines/reference/recursiveClassInstantiationsWithDefaultConstructors.js index eeda7ef86f4..bfd014a3fe1 100644 --- a/tests/baselines/reference/recursiveClassInstantiationsWithDefaultConstructors.js +++ b/tests/baselines/reference/recursiveClassInstantiationsWithDefaultConstructors.js @@ -11,7 +11,11 @@ export class MemberNameArray extends MemberName { //// [recursiveClassInstantiationsWithDefaultConstructors.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/recursiveClassReferenceTest.js b/tests/baselines/reference/recursiveClassReferenceTest.js index e59f3ad4c36..11eb4f8ba8f 100644 --- a/tests/baselines/reference/recursiveClassReferenceTest.js +++ b/tests/baselines/reference/recursiveClassReferenceTest.js @@ -106,7 +106,11 @@ module Sample.Thing.Languages.PlainText { // Scenario 1: Test reqursive function call with "this" parameter // Scenario 2: Test recursive function call with cast and "this" parameter var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/recursiveClassReferenceTest.js.map b/tests/baselines/reference/recursiveClassReferenceTest.js.map index 0b9bb8281bc..f322d6f0510 100644 --- a/tests/baselines/reference/recursiveClassReferenceTest.js.map +++ b/tests/baselines/reference/recursiveClassReferenceTest.js.map @@ -1,2 +1,2 @@ //// [recursiveClassReferenceTest.js.map] -{"version":3,"file":"recursiveClassReferenceTest.js","sourceRoot":"","sources":["recursiveClassReferenceTest.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,0EAA0E;;;;;;AA8B1E,IAAO,MAAM,CAUZ;AAVD,WAAO,MAAM;IAAC,IAAA,OAAO,CAUpB;IAVa,WAAA,OAAO;QAAC,IAAA,KAAK,CAU1B;QAVqB,WAAA,OAAK;YAAC,IAAA,IAAI,CAU/B;YAV2B,WAAA,IAAI;gBAC/B;oBAAA;oBAQA,CAAC;oBANO,+BAAK,GAAZ,cAAiB,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;oBAExB,6BAAG,GAAV,UAAW,KAA6B;wBAEvC,MAAM,CAAC,IAAI,CAAC;oBACb,CAAC;oBACF,sBAAC;gBAAD,CAAC,AARD,IAQC;gBARY,oBAAe,kBAQ3B,CAAA;YACF,CAAC,EAV2B,IAAI,GAAJ,YAAI,KAAJ,YAAI,QAU/B;QAAD,CAAC,EAVqB,KAAK,GAAL,aAAK,KAAL,aAAK,QAU1B;IAAD,CAAC,EAVa,OAAO,GAAP,cAAO,KAAP,cAAO,QAUpB;AAAD,CAAC,EAVM,MAAM,KAAN,MAAM,QAUZ;AAED,WAAO,MAAM;IAAC,IAAA,KAAK,CAoBlB;IApBa,WAAA,KAAK;QAAC,IAAA,OAAO,CAoB1B;QApBmB,WAAA,OAAO;YAC1B;gBAKC,oBAAoB,SAAkC;oBAAlC,cAAS,GAAT,SAAS,CAAyB;oBAD9C,YAAO,GAAO,IAAI,CAAC;oBAEvB,aAAa;oBACb,SAAS,CAAC,SAAS,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;gBAC3C,CAAC;gBANM,wBAAG,GAAV,UAAW,MAAyC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;oBAAA,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;gBAAA,CAAC,CAAA,CAAC;gBAQlF,+BAAU,GAAjB;oBACC,MAAM,CAAC,OAAO,CAAC;gBAChB,CAAC;gBAEM,4BAAO,GAAd;gBAEA,CAAC;gBAEF,iBAAC;YAAD,CAAC,AAlBD,IAkBC;YAlBY,kBAAU,aAkBtB,CAAA;QACF,CAAC,EApBmB,OAAO,GAAP,aAAO,KAAP,aAAO,QAoB1B;IAAD,CAAC,EApBa,KAAK,GAAL,YAAK,KAAL,YAAK,QAoBlB;AAAD,CAAC,EApBM,MAAM,KAAN,MAAM,QAoBZ;AAGD;IAAA;IAAuF,CAAC;IAA3C,sCAAe,GAAtB,cAAmC,MAAM,CAAC,IAAI,CAAC,CAAA,CAAC;IAAC,mBAAC;AAAD,CAAC,AAAxF,IAAwF;AASxF,WAAO,MAAM;IAAC,IAAA,KAAK,CAwBlB;IAxBa,WAAA,KAAK;QAAC,IAAA,SAAS,CAwB5B;QAxBmB,WAAA,SAAS;YAAC,IAAA,SAAS,CAwBtC;YAxB6B,WAAA,SAAS;gBAEtC;oBACO,eAAoB,IAAW;wBAAX,SAAI,GAAJ,IAAI,CAAO;oBAAI,CAAC;oBACnC,qBAAK,GAAZ;wBACC,MAAM,CAAC,IAAI,CAAC;oBACb,CAAC;oBAEM,sBAAM,GAAb,UAAc,KAAY;wBACzB,MAAM,CAAC,IAAI,KAAK,KAAK,CAAC;oBACvB,CAAC;oBAEM,uBAAO,GAAd,cAA0B,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;oBACzC,YAAC;gBAAD,CAAC,AAXD,IAWC;gBAXY,eAAK,QAWjB,CAAA;gBAED;oBAA0B,wBAAY;oBAAtC;;oBAQA,CAAC;oBANA,aAAa;oBACN,8BAAe,GAAtB;wBACC,MAAM,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC;oBACxB,CAAC;oBAGF,WAAC;gBAAD,CAAC,AARD,CAA0B,YAAY,GAQrC;gBARY,cAAI,OAQhB,CAAA;YACF,CAAC,EAxB6B,SAAS,GAAT,mBAAS,KAAT,mBAAS,QAwBtC;QAAD,CAAC,EAxBmB,SAAS,GAAT,eAAS,KAAT,eAAS,QAwB5B;IAAD,CAAC,EAxBa,KAAK,GAAL,YAAK,KAAL,YAAK,QAwBlB;AAAD,CAAC,EAxBM,MAAM,KAAN,MAAM,QAwBZ"} \ No newline at end of file +{"version":3,"file":"recursiveClassReferenceTest.js","sourceRoot":"","sources":["recursiveClassReferenceTest.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,0EAA0E;;;;;;;;;;AA8B1E,IAAO,MAAM,CAUZ;AAVD,WAAO,MAAM;IAAC,IAAA,OAAO,CAUpB;IAVa,WAAA,OAAO;QAAC,IAAA,KAAK,CAU1B;QAVqB,WAAA,OAAK;YAAC,IAAA,IAAI,CAU/B;YAV2B,WAAA,IAAI;gBAC/B;oBAAA;oBAQA,CAAC;oBANO,+BAAK,GAAZ,cAAiB,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;oBAExB,6BAAG,GAAV,UAAW,KAA6B;wBAEvC,MAAM,CAAC,IAAI,CAAC;oBACb,CAAC;oBACF,sBAAC;gBAAD,CAAC,AARD,IAQC;gBARY,oBAAe,kBAQ3B,CAAA;YACF,CAAC,EAV2B,IAAI,GAAJ,YAAI,KAAJ,YAAI,QAU/B;QAAD,CAAC,EAVqB,KAAK,GAAL,aAAK,KAAL,aAAK,QAU1B;IAAD,CAAC,EAVa,OAAO,GAAP,cAAO,KAAP,cAAO,QAUpB;AAAD,CAAC,EAVM,MAAM,KAAN,MAAM,QAUZ;AAED,WAAO,MAAM;IAAC,IAAA,KAAK,CAoBlB;IApBa,WAAA,KAAK;QAAC,IAAA,OAAO,CAoB1B;QApBmB,WAAA,OAAO;YAC1B;gBAKC,oBAAoB,SAAkC;oBAAlC,cAAS,GAAT,SAAS,CAAyB;oBAD9C,YAAO,GAAO,IAAI,CAAC;oBAEvB,aAAa;oBACb,SAAS,CAAC,SAAS,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;gBAC3C,CAAC;gBANM,wBAAG,GAAV,UAAW,MAAyC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;oBAAA,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;gBAAA,CAAC,CAAA,CAAC;gBAQlF,+BAAU,GAAjB;oBACC,MAAM,CAAC,OAAO,CAAC;gBAChB,CAAC;gBAEM,4BAAO,GAAd;gBAEA,CAAC;gBAEF,iBAAC;YAAD,CAAC,AAlBD,IAkBC;YAlBY,kBAAU,aAkBtB,CAAA;QACF,CAAC,EApBmB,OAAO,GAAP,aAAO,KAAP,aAAO,QAoB1B;IAAD,CAAC,EApBa,KAAK,GAAL,YAAK,KAAL,YAAK,QAoBlB;AAAD,CAAC,EApBM,MAAM,KAAN,MAAM,QAoBZ;AAGD;IAAA;IAAuF,CAAC;IAA3C,sCAAe,GAAtB,cAAmC,MAAM,CAAC,IAAI,CAAC,CAAA,CAAC;IAAC,mBAAC;AAAD,CAAC,AAAxF,IAAwF;AASxF,WAAO,MAAM;IAAC,IAAA,KAAK,CAwBlB;IAxBa,WAAA,KAAK;QAAC,IAAA,SAAS,CAwB5B;QAxBmB,WAAA,SAAS;YAAC,IAAA,SAAS,CAwBtC;YAxB6B,WAAA,SAAS;gBAEtC;oBACO,eAAoB,IAAW;wBAAX,SAAI,GAAJ,IAAI,CAAO;oBAAI,CAAC;oBACnC,qBAAK,GAAZ;wBACC,MAAM,CAAC,IAAI,CAAC;oBACb,CAAC;oBAEM,sBAAM,GAAb,UAAc,KAAY;wBACzB,MAAM,CAAC,IAAI,KAAK,KAAK,CAAC;oBACvB,CAAC;oBAEM,uBAAO,GAAd,cAA0B,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;oBACzC,YAAC;gBAAD,CAAC,AAXD,IAWC;gBAXY,eAAK,QAWjB,CAAA;gBAED;oBAA0B,wBAAY;oBAAtC;;oBAQA,CAAC;oBANA,aAAa;oBACN,8BAAe,GAAtB;wBACC,MAAM,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC;oBACxB,CAAC;oBAGF,WAAC;gBAAD,CAAC,AARD,CAA0B,YAAY,GAQrC;gBARY,cAAI,OAQhB,CAAA;YACF,CAAC,EAxB6B,SAAS,GAAT,mBAAS,KAAT,mBAAS,QAwBtC;QAAD,CAAC,EAxBmB,SAAS,GAAT,eAAS,KAAT,eAAS,QAwB5B;IAAD,CAAC,EAxBa,KAAK,GAAL,YAAK,KAAL,YAAK,QAwBlB;AAAD,CAAC,EAxBM,MAAM,KAAN,MAAM,QAwBZ"} \ No newline at end of file diff --git a/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt b/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt index 8bfac267dbf..5bb43de1b9f 100644 --- a/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt +++ b/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt @@ -27,7 +27,11 @@ sourceFile:recursiveClassReferenceTest.ts 2 >Emitted(2, 75) Source(2, 75) + SourceIndex(0) --- >>>var __extends = (this && this.__extends) || function (d, b) { ->>> Object.setPrototypeOf(d, b); +>>> if (typeof Object.setPrototypeOf === "function") { +>>> Object.setPrototypeOf(d, b); +>>> } else { +>>> d.__proto__ = b; +>>> } >>> function __() { this.constructor = d; } >>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); >>>}; @@ -81,10 +85,10 @@ sourceFile:recursiveClassReferenceTest.ts > } > } > } -1 >Emitted(8, 1) Source(32, 1) + SourceIndex(0) -2 >Emitted(8, 5) Source(32, 8) + SourceIndex(0) -3 >Emitted(8, 11) Source(32, 14) + SourceIndex(0) -4 >Emitted(8, 12) Source(42, 2) + SourceIndex(0) +1 >Emitted(12, 1) Source(32, 1) + SourceIndex(0) +2 >Emitted(12, 5) Source(32, 8) + SourceIndex(0) +3 >Emitted(12, 11) Source(32, 14) + SourceIndex(0) +4 >Emitted(12, 12) Source(42, 2) + SourceIndex(0) --- >>>(function (Sample) { 1-> @@ -93,9 +97,9 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 >module 3 > Sample -1->Emitted(9, 1) Source(32, 1) + SourceIndex(0) -2 >Emitted(9, 12) Source(32, 8) + SourceIndex(0) -3 >Emitted(9, 18) Source(32, 14) + SourceIndex(0) +1->Emitted(13, 1) Source(32, 1) + SourceIndex(0) +2 >Emitted(13, 12) Source(32, 8) + SourceIndex(0) +3 >Emitted(13, 18) Source(32, 14) + SourceIndex(0) --- >>> var Actions; 1 >^^^^ @@ -117,10 +121,10 @@ sourceFile:recursiveClassReferenceTest.ts > } > } > } -1 >Emitted(10, 5) Source(32, 15) + SourceIndex(0) -2 >Emitted(10, 9) Source(32, 15) + SourceIndex(0) -3 >Emitted(10, 16) Source(32, 22) + SourceIndex(0) -4 >Emitted(10, 17) Source(42, 2) + SourceIndex(0) +1 >Emitted(14, 5) Source(32, 15) + SourceIndex(0) +2 >Emitted(14, 9) Source(32, 15) + SourceIndex(0) +3 >Emitted(14, 16) Source(32, 22) + SourceIndex(0) +4 >Emitted(14, 17) Source(42, 2) + SourceIndex(0) --- >>> (function (Actions) { 1->^^^^ @@ -129,9 +133,9 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 > 3 > Actions -1->Emitted(11, 5) Source(32, 15) + SourceIndex(0) -2 >Emitted(11, 16) Source(32, 15) + SourceIndex(0) -3 >Emitted(11, 23) Source(32, 22) + SourceIndex(0) +1->Emitted(15, 5) Source(32, 15) + SourceIndex(0) +2 >Emitted(15, 16) Source(32, 15) + SourceIndex(0) +3 >Emitted(15, 23) Source(32, 22) + SourceIndex(0) --- >>> var Thing; 1 >^^^^^^^^ @@ -153,10 +157,10 @@ sourceFile:recursiveClassReferenceTest.ts > } > } > } -1 >Emitted(12, 9) Source(32, 23) + SourceIndex(0) -2 >Emitted(12, 13) Source(32, 23) + SourceIndex(0) -3 >Emitted(12, 18) Source(32, 28) + SourceIndex(0) -4 >Emitted(12, 19) Source(42, 2) + SourceIndex(0) +1 >Emitted(16, 9) Source(32, 23) + SourceIndex(0) +2 >Emitted(16, 13) Source(32, 23) + SourceIndex(0) +3 >Emitted(16, 18) Source(32, 28) + SourceIndex(0) +4 >Emitted(16, 19) Source(42, 2) + SourceIndex(0) --- >>> (function (Thing_1) { 1->^^^^^^^^ @@ -165,9 +169,9 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 > 3 > Thing -1->Emitted(13, 9) Source(32, 23) + SourceIndex(0) -2 >Emitted(13, 20) Source(32, 23) + SourceIndex(0) -3 >Emitted(13, 27) Source(32, 28) + SourceIndex(0) +1->Emitted(17, 9) Source(32, 23) + SourceIndex(0) +2 >Emitted(17, 20) Source(32, 23) + SourceIndex(0) +3 >Emitted(17, 27) Source(32, 28) + SourceIndex(0) --- >>> var Find; 1 >^^^^^^^^^^^^ @@ -189,10 +193,10 @@ sourceFile:recursiveClassReferenceTest.ts > } > } > } -1 >Emitted(14, 13) Source(32, 29) + SourceIndex(0) -2 >Emitted(14, 17) Source(32, 29) + SourceIndex(0) -3 >Emitted(14, 21) Source(32, 33) + SourceIndex(0) -4 >Emitted(14, 22) Source(42, 2) + SourceIndex(0) +1 >Emitted(18, 13) Source(32, 29) + SourceIndex(0) +2 >Emitted(18, 17) Source(32, 29) + SourceIndex(0) +3 >Emitted(18, 21) Source(32, 33) + SourceIndex(0) +4 >Emitted(18, 22) Source(42, 2) + SourceIndex(0) --- >>> (function (Find) { 1->^^^^^^^^^^^^ @@ -202,22 +206,22 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 > 3 > Find -1->Emitted(15, 13) Source(32, 29) + SourceIndex(0) -2 >Emitted(15, 24) Source(32, 29) + SourceIndex(0) -3 >Emitted(15, 28) Source(32, 33) + SourceIndex(0) +1->Emitted(19, 13) Source(32, 29) + SourceIndex(0) +2 >Emitted(19, 24) Source(32, 29) + SourceIndex(0) +3 >Emitted(19, 28) Source(32, 33) + SourceIndex(0) --- >>> var StartFindAction = (function () { 1->^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> { > -1->Emitted(16, 17) Source(33, 2) + SourceIndex(0) +1->Emitted(20, 17) Source(33, 2) + SourceIndex(0) --- >>> function StartFindAction() { 1->^^^^^^^^^^^^^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(17, 21) Source(33, 2) + SourceIndex(0) +1->Emitted(21, 21) Source(33, 2) + SourceIndex(0) --- >>> } 1->^^^^^^^^^^^^^^^^^^^^ @@ -233,8 +237,8 @@ sourceFile:recursiveClassReferenceTest.ts > } > 2 > } -1->Emitted(18, 21) Source(41, 2) + SourceIndex(0) -2 >Emitted(18, 22) Source(41, 3) + SourceIndex(0) +1->Emitted(22, 21) Source(41, 2) + SourceIndex(0) +2 >Emitted(22, 22) Source(41, 3) + SourceIndex(0) --- >>> StartFindAction.prototype.getId = function () { return "yo"; }; 1->^^^^^^^^^^^^^^^^^^^^ @@ -257,16 +261,16 @@ sourceFile:recursiveClassReferenceTest.ts 8 > ; 9 > 10> } -1->Emitted(19, 21) Source(35, 10) + SourceIndex(0) -2 >Emitted(19, 52) Source(35, 15) + SourceIndex(0) -3 >Emitted(19, 55) Source(35, 3) + SourceIndex(0) -4 >Emitted(19, 69) Source(35, 20) + SourceIndex(0) -5 >Emitted(19, 75) Source(35, 26) + SourceIndex(0) -6 >Emitted(19, 76) Source(35, 27) + SourceIndex(0) -7 >Emitted(19, 80) Source(35, 31) + SourceIndex(0) -8 >Emitted(19, 81) Source(35, 32) + SourceIndex(0) -9 >Emitted(19, 82) Source(35, 33) + SourceIndex(0) -10>Emitted(19, 83) Source(35, 34) + SourceIndex(0) +1->Emitted(23, 21) Source(35, 10) + SourceIndex(0) +2 >Emitted(23, 52) Source(35, 15) + SourceIndex(0) +3 >Emitted(23, 55) Source(35, 3) + SourceIndex(0) +4 >Emitted(23, 69) Source(35, 20) + SourceIndex(0) +5 >Emitted(23, 75) Source(35, 26) + SourceIndex(0) +6 >Emitted(23, 76) Source(35, 27) + SourceIndex(0) +7 >Emitted(23, 80) Source(35, 31) + SourceIndex(0) +8 >Emitted(23, 81) Source(35, 32) + SourceIndex(0) +9 >Emitted(23, 82) Source(35, 33) + SourceIndex(0) +10>Emitted(23, 83) Source(35, 34) + SourceIndex(0) --- >>> StartFindAction.prototype.run = function (Thing) { 1 >^^^^^^^^^^^^^^^^^^^^ @@ -281,11 +285,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > 4 > public run( 5 > Thing:Sample.Thing.ICodeThing -1 >Emitted(20, 21) Source(37, 10) + SourceIndex(0) -2 >Emitted(20, 50) Source(37, 13) + SourceIndex(0) -3 >Emitted(20, 53) Source(37, 3) + SourceIndex(0) -4 >Emitted(20, 63) Source(37, 14) + SourceIndex(0) -5 >Emitted(20, 68) Source(37, 43) + SourceIndex(0) +1 >Emitted(24, 21) Source(37, 10) + SourceIndex(0) +2 >Emitted(24, 50) Source(37, 13) + SourceIndex(0) +3 >Emitted(24, 53) Source(37, 3) + SourceIndex(0) +4 >Emitted(24, 63) Source(37, 14) + SourceIndex(0) +5 >Emitted(24, 68) Source(37, 43) + SourceIndex(0) --- >>> return true; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -300,11 +304,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > 4 > true 5 > ; -1 >Emitted(21, 25) Source(39, 4) + SourceIndex(0) -2 >Emitted(21, 31) Source(39, 10) + SourceIndex(0) -3 >Emitted(21, 32) Source(39, 11) + SourceIndex(0) -4 >Emitted(21, 36) Source(39, 15) + SourceIndex(0) -5 >Emitted(21, 37) Source(39, 16) + SourceIndex(0) +1 >Emitted(25, 25) Source(39, 4) + SourceIndex(0) +2 >Emitted(25, 31) Source(39, 10) + SourceIndex(0) +3 >Emitted(25, 32) Source(39, 11) + SourceIndex(0) +4 >Emitted(25, 36) Source(39, 15) + SourceIndex(0) +5 >Emitted(25, 37) Source(39, 16) + SourceIndex(0) --- >>> }; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -313,8 +317,8 @@ sourceFile:recursiveClassReferenceTest.ts 1 > > 2 > } -1 >Emitted(22, 21) Source(40, 3) + SourceIndex(0) -2 >Emitted(22, 22) Source(40, 4) + SourceIndex(0) +1 >Emitted(26, 21) Source(40, 3) + SourceIndex(0) +2 >Emitted(26, 22) Source(40, 4) + SourceIndex(0) --- >>> return StartFindAction; 1->^^^^^^^^^^^^^^^^^^^^ @@ -322,8 +326,8 @@ sourceFile:recursiveClassReferenceTest.ts 1-> > 2 > } -1->Emitted(23, 21) Source(41, 2) + SourceIndex(0) -2 >Emitted(23, 43) Source(41, 3) + SourceIndex(0) +1->Emitted(27, 21) Source(41, 2) + SourceIndex(0) +2 >Emitted(27, 43) Source(41, 3) + SourceIndex(0) --- >>> }()); 1 >^^^^^^^^^^^^^^^^ @@ -343,10 +347,10 @@ sourceFile:recursiveClassReferenceTest.ts > return true; > } > } -1 >Emitted(24, 17) Source(41, 2) + SourceIndex(0) -2 >Emitted(24, 18) Source(41, 3) + SourceIndex(0) -3 >Emitted(24, 18) Source(33, 2) + SourceIndex(0) -4 >Emitted(24, 22) Source(41, 3) + SourceIndex(0) +1 >Emitted(28, 17) Source(41, 2) + SourceIndex(0) +2 >Emitted(28, 18) Source(41, 3) + SourceIndex(0) +3 >Emitted(28, 18) Source(33, 2) + SourceIndex(0) +4 >Emitted(28, 22) Source(41, 3) + SourceIndex(0) --- >>> Find.StartFindAction = StartFindAction; 1->^^^^^^^^^^^^^^^^ @@ -366,10 +370,10 @@ sourceFile:recursiveClassReferenceTest.ts > } > } 4 > -1->Emitted(25, 17) Source(33, 15) + SourceIndex(0) -2 >Emitted(25, 37) Source(33, 30) + SourceIndex(0) -3 >Emitted(25, 55) Source(41, 3) + SourceIndex(0) -4 >Emitted(25, 56) Source(41, 3) + SourceIndex(0) +1->Emitted(29, 17) Source(33, 15) + SourceIndex(0) +2 >Emitted(29, 37) Source(33, 30) + SourceIndex(0) +3 >Emitted(29, 55) Source(41, 3) + SourceIndex(0) +4 >Emitted(29, 56) Source(41, 3) + SourceIndex(0) --- >>> })(Find = Thing_1.Find || (Thing_1.Find = {})); 1->^^^^^^^^^^^^ @@ -401,15 +405,15 @@ sourceFile:recursiveClassReferenceTest.ts > } > } > } -1->Emitted(26, 13) Source(42, 1) + SourceIndex(0) -2 >Emitted(26, 14) Source(42, 2) + SourceIndex(0) -3 >Emitted(26, 16) Source(32, 29) + SourceIndex(0) -4 >Emitted(26, 20) Source(32, 33) + SourceIndex(0) -5 >Emitted(26, 23) Source(32, 29) + SourceIndex(0) -6 >Emitted(26, 35) Source(32, 33) + SourceIndex(0) -7 >Emitted(26, 40) Source(32, 29) + SourceIndex(0) -8 >Emitted(26, 52) Source(32, 33) + SourceIndex(0) -9 >Emitted(26, 60) Source(42, 2) + SourceIndex(0) +1->Emitted(30, 13) Source(42, 1) + SourceIndex(0) +2 >Emitted(30, 14) Source(42, 2) + SourceIndex(0) +3 >Emitted(30, 16) Source(32, 29) + SourceIndex(0) +4 >Emitted(30, 20) Source(32, 33) + SourceIndex(0) +5 >Emitted(30, 23) Source(32, 29) + SourceIndex(0) +6 >Emitted(30, 35) Source(32, 33) + SourceIndex(0) +7 >Emitted(30, 40) Source(32, 29) + SourceIndex(0) +8 >Emitted(30, 52) Source(32, 33) + SourceIndex(0) +9 >Emitted(30, 60) Source(42, 2) + SourceIndex(0) --- >>> })(Thing = Actions.Thing || (Actions.Thing = {})); 1 >^^^^^^^^ @@ -441,15 +445,15 @@ sourceFile:recursiveClassReferenceTest.ts > } > } > } -1 >Emitted(27, 9) Source(42, 1) + SourceIndex(0) -2 >Emitted(27, 10) Source(42, 2) + SourceIndex(0) -3 >Emitted(27, 12) Source(32, 23) + SourceIndex(0) -4 >Emitted(27, 17) Source(32, 28) + SourceIndex(0) -5 >Emitted(27, 20) Source(32, 23) + SourceIndex(0) -6 >Emitted(27, 33) Source(32, 28) + SourceIndex(0) -7 >Emitted(27, 38) Source(32, 23) + SourceIndex(0) -8 >Emitted(27, 51) Source(32, 28) + SourceIndex(0) -9 >Emitted(27, 59) Source(42, 2) + SourceIndex(0) +1 >Emitted(31, 9) Source(42, 1) + SourceIndex(0) +2 >Emitted(31, 10) Source(42, 2) + SourceIndex(0) +3 >Emitted(31, 12) Source(32, 23) + SourceIndex(0) +4 >Emitted(31, 17) Source(32, 28) + SourceIndex(0) +5 >Emitted(31, 20) Source(32, 23) + SourceIndex(0) +6 >Emitted(31, 33) Source(32, 28) + SourceIndex(0) +7 >Emitted(31, 38) Source(32, 23) + SourceIndex(0) +8 >Emitted(31, 51) Source(32, 28) + SourceIndex(0) +9 >Emitted(31, 59) Source(42, 2) + SourceIndex(0) --- >>> })(Actions = Sample.Actions || (Sample.Actions = {})); 1->^^^^ @@ -480,15 +484,15 @@ sourceFile:recursiveClassReferenceTest.ts > } > } > } -1->Emitted(28, 5) Source(42, 1) + SourceIndex(0) -2 >Emitted(28, 6) Source(42, 2) + SourceIndex(0) -3 >Emitted(28, 8) Source(32, 15) + SourceIndex(0) -4 >Emitted(28, 15) Source(32, 22) + SourceIndex(0) -5 >Emitted(28, 18) Source(32, 15) + SourceIndex(0) -6 >Emitted(28, 32) Source(32, 22) + SourceIndex(0) -7 >Emitted(28, 37) Source(32, 15) + SourceIndex(0) -8 >Emitted(28, 51) Source(32, 22) + SourceIndex(0) -9 >Emitted(28, 59) Source(42, 2) + SourceIndex(0) +1->Emitted(32, 5) Source(42, 1) + SourceIndex(0) +2 >Emitted(32, 6) Source(42, 2) + SourceIndex(0) +3 >Emitted(32, 8) Source(32, 15) + SourceIndex(0) +4 >Emitted(32, 15) Source(32, 22) + SourceIndex(0) +5 >Emitted(32, 18) Source(32, 15) + SourceIndex(0) +6 >Emitted(32, 32) Source(32, 22) + SourceIndex(0) +7 >Emitted(32, 37) Source(32, 15) + SourceIndex(0) +8 >Emitted(32, 51) Source(32, 22) + SourceIndex(0) +9 >Emitted(32, 59) Source(42, 2) + SourceIndex(0) --- >>>})(Sample || (Sample = {})); 1 > @@ -515,13 +519,13 @@ sourceFile:recursiveClassReferenceTest.ts > } > } > } -1 >Emitted(29, 1) Source(42, 1) + SourceIndex(0) -2 >Emitted(29, 2) Source(42, 2) + SourceIndex(0) -3 >Emitted(29, 4) Source(32, 8) + SourceIndex(0) -4 >Emitted(29, 10) Source(32, 14) + SourceIndex(0) -5 >Emitted(29, 15) Source(32, 8) + SourceIndex(0) -6 >Emitted(29, 21) Source(32, 14) + SourceIndex(0) -7 >Emitted(29, 29) Source(42, 2) + SourceIndex(0) +1 >Emitted(33, 1) Source(42, 1) + SourceIndex(0) +2 >Emitted(33, 2) Source(42, 2) + SourceIndex(0) +3 >Emitted(33, 4) Source(32, 8) + SourceIndex(0) +4 >Emitted(33, 10) Source(32, 14) + SourceIndex(0) +5 >Emitted(33, 15) Source(32, 8) + SourceIndex(0) +6 >Emitted(33, 21) Source(32, 14) + SourceIndex(0) +7 >Emitted(33, 29) Source(42, 2) + SourceIndex(0) --- >>>(function (Sample) { 1 > @@ -532,9 +536,9 @@ sourceFile:recursiveClassReferenceTest.ts > 2 >module 3 > Sample -1 >Emitted(30, 1) Source(44, 1) + SourceIndex(0) -2 >Emitted(30, 12) Source(44, 8) + SourceIndex(0) -3 >Emitted(30, 18) Source(44, 14) + SourceIndex(0) +1 >Emitted(34, 1) Source(44, 1) + SourceIndex(0) +2 >Emitted(34, 12) Source(44, 8) + SourceIndex(0) +3 >Emitted(34, 18) Source(44, 14) + SourceIndex(0) --- >>> var Thing; 1 >^^^^ @@ -566,10 +570,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(31, 5) Source(44, 15) + SourceIndex(0) -2 >Emitted(31, 9) Source(44, 15) + SourceIndex(0) -3 >Emitted(31, 14) Source(44, 20) + SourceIndex(0) -4 >Emitted(31, 15) Source(64, 2) + SourceIndex(0) +1 >Emitted(35, 5) Source(44, 15) + SourceIndex(0) +2 >Emitted(35, 9) Source(44, 15) + SourceIndex(0) +3 >Emitted(35, 14) Source(44, 20) + SourceIndex(0) +4 >Emitted(35, 15) Source(64, 2) + SourceIndex(0) --- >>> (function (Thing) { 1->^^^^ @@ -579,9 +583,9 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 > 3 > Thing -1->Emitted(32, 5) Source(44, 15) + SourceIndex(0) -2 >Emitted(32, 16) Source(44, 15) + SourceIndex(0) -3 >Emitted(32, 21) Source(44, 20) + SourceIndex(0) +1->Emitted(36, 5) Source(44, 15) + SourceIndex(0) +2 >Emitted(36, 16) Source(44, 15) + SourceIndex(0) +3 >Emitted(36, 21) Source(44, 20) + SourceIndex(0) --- >>> var Widgets; 1->^^^^^^^^ @@ -613,10 +617,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1->Emitted(33, 9) Source(44, 21) + SourceIndex(0) -2 >Emitted(33, 13) Source(44, 21) + SourceIndex(0) -3 >Emitted(33, 20) Source(44, 28) + SourceIndex(0) -4 >Emitted(33, 21) Source(64, 2) + SourceIndex(0) +1->Emitted(37, 9) Source(44, 21) + SourceIndex(0) +2 >Emitted(37, 13) Source(44, 21) + SourceIndex(0) +3 >Emitted(37, 20) Source(44, 28) + SourceIndex(0) +4 >Emitted(37, 21) Source(64, 2) + SourceIndex(0) --- >>> (function (Widgets) { 1->^^^^^^^^ @@ -626,16 +630,16 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 > 3 > Widgets -1->Emitted(34, 9) Source(44, 21) + SourceIndex(0) -2 >Emitted(34, 20) Source(44, 21) + SourceIndex(0) -3 >Emitted(34, 27) Source(44, 28) + SourceIndex(0) +1->Emitted(38, 9) Source(44, 21) + SourceIndex(0) +2 >Emitted(38, 20) Source(44, 21) + SourceIndex(0) +3 >Emitted(38, 27) Source(44, 28) + SourceIndex(0) --- >>> var FindWidget = (function () { 1->^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> { > -1->Emitted(35, 13) Source(45, 2) + SourceIndex(0) +1->Emitted(39, 13) Source(45, 2) + SourceIndex(0) --- >>> function FindWidget(codeThing) { 1->^^^^^^^^^^^^^^^^ @@ -650,9 +654,9 @@ sourceFile:recursiveClassReferenceTest.ts > 2 > constructor(private 3 > codeThing: Sample.Thing.ICodeThing -1->Emitted(36, 17) Source(50, 3) + SourceIndex(0) -2 >Emitted(36, 37) Source(50, 23) + SourceIndex(0) -3 >Emitted(36, 46) Source(50, 57) + SourceIndex(0) +1->Emitted(40, 17) Source(50, 3) + SourceIndex(0) +2 >Emitted(40, 37) Source(50, 23) + SourceIndex(0) +3 >Emitted(40, 46) Source(50, 57) + SourceIndex(0) --- >>> this.codeThing = codeThing; 1->^^^^^^^^^^^^^^^^^^^^ @@ -665,11 +669,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > 4 > codeThing 5 > : Sample.Thing.ICodeThing -1->Emitted(37, 21) Source(50, 23) + SourceIndex(0) -2 >Emitted(37, 35) Source(50, 32) + SourceIndex(0) -3 >Emitted(37, 38) Source(50, 23) + SourceIndex(0) -4 >Emitted(37, 47) Source(50, 32) + SourceIndex(0) -5 >Emitted(37, 48) Source(50, 57) + SourceIndex(0) +1->Emitted(41, 21) Source(50, 23) + SourceIndex(0) +2 >Emitted(41, 35) Source(50, 32) + SourceIndex(0) +3 >Emitted(41, 38) Source(50, 23) + SourceIndex(0) +4 >Emitted(41, 47) Source(50, 32) + SourceIndex(0) +5 >Emitted(41, 48) Source(50, 57) + SourceIndex(0) --- >>> this.domNode = null; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -682,11 +686,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > :any = 4 > null 5 > ; -1 >Emitted(38, 21) Source(49, 11) + SourceIndex(0) -2 >Emitted(38, 33) Source(49, 18) + SourceIndex(0) -3 >Emitted(38, 36) Source(49, 25) + SourceIndex(0) -4 >Emitted(38, 40) Source(49, 29) + SourceIndex(0) -5 >Emitted(38, 41) Source(49, 30) + SourceIndex(0) +1 >Emitted(42, 21) Source(49, 11) + SourceIndex(0) +2 >Emitted(42, 33) Source(49, 18) + SourceIndex(0) +3 >Emitted(42, 36) Source(49, 25) + SourceIndex(0) +4 >Emitted(42, 40) Source(49, 29) + SourceIndex(0) +5 >Emitted(42, 41) Source(49, 30) + SourceIndex(0) --- >>> // scenario 1 1 >^^^^^^^^^^^^^^^^^^^^ @@ -696,8 +700,8 @@ sourceFile:recursiveClassReferenceTest.ts > constructor(private codeThing: Sample.Thing.ICodeThing) { > 2 > // scenario 1 -1 >Emitted(39, 21) Source(51, 7) + SourceIndex(0) -2 >Emitted(39, 34) Source(51, 20) + SourceIndex(0) +1 >Emitted(43, 21) Source(51, 7) + SourceIndex(0) +2 >Emitted(43, 34) Source(51, 20) + SourceIndex(0) --- >>> codeThing.addWidget("addWidget", this); 1->^^^^^^^^^^^^^^^^^^^^ @@ -721,16 +725,16 @@ sourceFile:recursiveClassReferenceTest.ts 8 > this 9 > ) 10> ; -1->Emitted(40, 21) Source(52, 7) + SourceIndex(0) -2 >Emitted(40, 30) Source(52, 16) + SourceIndex(0) -3 >Emitted(40, 31) Source(52, 17) + SourceIndex(0) -4 >Emitted(40, 40) Source(52, 26) + SourceIndex(0) -5 >Emitted(40, 41) Source(52, 27) + SourceIndex(0) -6 >Emitted(40, 52) Source(52, 38) + SourceIndex(0) -7 >Emitted(40, 54) Source(52, 40) + SourceIndex(0) -8 >Emitted(40, 58) Source(52, 44) + SourceIndex(0) -9 >Emitted(40, 59) Source(52, 45) + SourceIndex(0) -10>Emitted(40, 60) Source(52, 46) + SourceIndex(0) +1->Emitted(44, 21) Source(52, 7) + SourceIndex(0) +2 >Emitted(44, 30) Source(52, 16) + SourceIndex(0) +3 >Emitted(44, 31) Source(52, 17) + SourceIndex(0) +4 >Emitted(44, 40) Source(52, 26) + SourceIndex(0) +5 >Emitted(44, 41) Source(52, 27) + SourceIndex(0) +6 >Emitted(44, 52) Source(52, 38) + SourceIndex(0) +7 >Emitted(44, 54) Source(52, 40) + SourceIndex(0) +8 >Emitted(44, 58) Source(52, 44) + SourceIndex(0) +9 >Emitted(44, 59) Source(52, 45) + SourceIndex(0) +10>Emitted(44, 60) Source(52, 46) + SourceIndex(0) --- >>> } 1 >^^^^^^^^^^^^^^^^ @@ -739,8 +743,8 @@ sourceFile:recursiveClassReferenceTest.ts 1 > > 2 > } -1 >Emitted(41, 17) Source(53, 3) + SourceIndex(0) -2 >Emitted(41, 18) Source(53, 4) + SourceIndex(0) +1 >Emitted(45, 17) Source(53, 3) + SourceIndex(0) +2 >Emitted(45, 18) Source(53, 4) + SourceIndex(0) --- >>> FindWidget.prototype.gar = function (runner) { if (true) { 1->^^^^^^^^^^^^^^^^ @@ -769,19 +773,19 @@ sourceFile:recursiveClassReferenceTest.ts 11> ) 12> 13> { -1->Emitted(42, 17) Source(47, 10) + SourceIndex(0) -2 >Emitted(42, 41) Source(47, 13) + SourceIndex(0) -3 >Emitted(42, 44) Source(47, 3) + SourceIndex(0) -4 >Emitted(42, 54) Source(47, 14) + SourceIndex(0) -5 >Emitted(42, 60) Source(47, 55) + SourceIndex(0) -6 >Emitted(42, 64) Source(47, 59) + SourceIndex(0) -7 >Emitted(42, 66) Source(47, 61) + SourceIndex(0) -8 >Emitted(42, 67) Source(47, 62) + SourceIndex(0) -9 >Emitted(42, 68) Source(47, 63) + SourceIndex(0) -10>Emitted(42, 72) Source(47, 67) + SourceIndex(0) -11>Emitted(42, 73) Source(47, 68) + SourceIndex(0) -12>Emitted(42, 74) Source(47, 69) + SourceIndex(0) -13>Emitted(42, 75) Source(47, 70) + SourceIndex(0) +1->Emitted(46, 17) Source(47, 10) + SourceIndex(0) +2 >Emitted(46, 41) Source(47, 13) + SourceIndex(0) +3 >Emitted(46, 44) Source(47, 3) + SourceIndex(0) +4 >Emitted(46, 54) Source(47, 14) + SourceIndex(0) +5 >Emitted(46, 60) Source(47, 55) + SourceIndex(0) +6 >Emitted(46, 64) Source(47, 59) + SourceIndex(0) +7 >Emitted(46, 66) Source(47, 61) + SourceIndex(0) +8 >Emitted(46, 67) Source(47, 62) + SourceIndex(0) +9 >Emitted(46, 68) Source(47, 63) + SourceIndex(0) +10>Emitted(46, 72) Source(47, 67) + SourceIndex(0) +11>Emitted(46, 73) Source(47, 68) + SourceIndex(0) +12>Emitted(46, 74) Source(47, 69) + SourceIndex(0) +13>Emitted(46, 75) Source(47, 70) + SourceIndex(0) --- >>> return runner(this); 1 >^^^^^^^^^^^^^^^^^^^^ @@ -800,14 +804,14 @@ sourceFile:recursiveClassReferenceTest.ts 6 > this 7 > ) 8 > ; -1 >Emitted(43, 21) Source(47, 70) + SourceIndex(0) -2 >Emitted(43, 27) Source(47, 76) + SourceIndex(0) -3 >Emitted(43, 28) Source(47, 77) + SourceIndex(0) -4 >Emitted(43, 34) Source(47, 83) + SourceIndex(0) -5 >Emitted(43, 35) Source(47, 84) + SourceIndex(0) -6 >Emitted(43, 39) Source(47, 88) + SourceIndex(0) -7 >Emitted(43, 40) Source(47, 89) + SourceIndex(0) -8 >Emitted(43, 41) Source(47, 90) + SourceIndex(0) +1 >Emitted(47, 21) Source(47, 70) + SourceIndex(0) +2 >Emitted(47, 27) Source(47, 76) + SourceIndex(0) +3 >Emitted(47, 28) Source(47, 77) + SourceIndex(0) +4 >Emitted(47, 34) Source(47, 83) + SourceIndex(0) +5 >Emitted(47, 35) Source(47, 84) + SourceIndex(0) +6 >Emitted(47, 39) Source(47, 88) + SourceIndex(0) +7 >Emitted(47, 40) Source(47, 89) + SourceIndex(0) +8 >Emitted(47, 41) Source(47, 90) + SourceIndex(0) --- >>> } }; 1 >^^^^^^^^^^^^^^^^ @@ -819,10 +823,10 @@ sourceFile:recursiveClassReferenceTest.ts 2 > } 3 > 4 > } -1 >Emitted(44, 17) Source(47, 90) + SourceIndex(0) -2 >Emitted(44, 18) Source(47, 91) + SourceIndex(0) -3 >Emitted(44, 19) Source(47, 91) + SourceIndex(0) -4 >Emitted(44, 20) Source(47, 92) + SourceIndex(0) +1 >Emitted(48, 17) Source(47, 90) + SourceIndex(0) +2 >Emitted(48, 18) Source(47, 91) + SourceIndex(0) +3 >Emitted(48, 19) Source(47, 91) + SourceIndex(0) +4 >Emitted(48, 20) Source(47, 92) + SourceIndex(0) --- >>> FindWidget.prototype.getDomNode = function () { 1->^^^^^^^^^^^^^^^^ @@ -839,9 +843,9 @@ sourceFile:recursiveClassReferenceTest.ts > public 2 > getDomNode 3 > -1->Emitted(45, 17) Source(55, 10) + SourceIndex(0) -2 >Emitted(45, 48) Source(55, 20) + SourceIndex(0) -3 >Emitted(45, 51) Source(55, 3) + SourceIndex(0) +1->Emitted(49, 17) Source(55, 10) + SourceIndex(0) +2 >Emitted(49, 48) Source(55, 20) + SourceIndex(0) +3 >Emitted(49, 51) Source(55, 3) + SourceIndex(0) --- >>> return domNode; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -855,11 +859,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > 4 > domNode 5 > ; -1 >Emitted(46, 21) Source(56, 4) + SourceIndex(0) -2 >Emitted(46, 27) Source(56, 10) + SourceIndex(0) -3 >Emitted(46, 28) Source(56, 11) + SourceIndex(0) -4 >Emitted(46, 35) Source(56, 18) + SourceIndex(0) -5 >Emitted(46, 36) Source(56, 19) + SourceIndex(0) +1 >Emitted(50, 21) Source(56, 4) + SourceIndex(0) +2 >Emitted(50, 27) Source(56, 10) + SourceIndex(0) +3 >Emitted(50, 28) Source(56, 11) + SourceIndex(0) +4 >Emitted(50, 35) Source(56, 18) + SourceIndex(0) +5 >Emitted(50, 36) Source(56, 19) + SourceIndex(0) --- >>> }; 1 >^^^^^^^^^^^^^^^^ @@ -868,8 +872,8 @@ sourceFile:recursiveClassReferenceTest.ts 1 > > 2 > } -1 >Emitted(47, 17) Source(57, 3) + SourceIndex(0) -2 >Emitted(47, 18) Source(57, 4) + SourceIndex(0) +1 >Emitted(51, 17) Source(57, 3) + SourceIndex(0) +2 >Emitted(51, 18) Source(57, 4) + SourceIndex(0) --- >>> FindWidget.prototype.destroy = function () { 1->^^^^^^^^^^^^^^^^ @@ -880,9 +884,9 @@ sourceFile:recursiveClassReferenceTest.ts > public 2 > destroy 3 > -1->Emitted(48, 17) Source(59, 10) + SourceIndex(0) -2 >Emitted(48, 45) Source(59, 17) + SourceIndex(0) -3 >Emitted(48, 48) Source(59, 3) + SourceIndex(0) +1->Emitted(52, 17) Source(59, 10) + SourceIndex(0) +2 >Emitted(52, 45) Source(59, 17) + SourceIndex(0) +3 >Emitted(52, 48) Source(59, 3) + SourceIndex(0) --- >>> }; 1 >^^^^^^^^^^^^^^^^ @@ -892,8 +896,8 @@ sourceFile:recursiveClassReferenceTest.ts > > 2 > } -1 >Emitted(49, 17) Source(61, 3) + SourceIndex(0) -2 >Emitted(49, 18) Source(61, 4) + SourceIndex(0) +1 >Emitted(53, 17) Source(61, 3) + SourceIndex(0) +2 >Emitted(53, 18) Source(61, 4) + SourceIndex(0) --- >>> return FindWidget; 1->^^^^^^^^^^^^^^^^ @@ -902,8 +906,8 @@ sourceFile:recursiveClassReferenceTest.ts > > 2 > } -1->Emitted(50, 17) Source(63, 2) + SourceIndex(0) -2 >Emitted(50, 34) Source(63, 3) + SourceIndex(0) +1->Emitted(54, 17) Source(63, 2) + SourceIndex(0) +2 >Emitted(54, 34) Source(63, 3) + SourceIndex(0) --- >>> }()); 1 >^^^^^^^^^^^^ @@ -933,10 +937,10 @@ sourceFile:recursiveClassReferenceTest.ts > } > > } -1 >Emitted(51, 13) Source(63, 2) + SourceIndex(0) -2 >Emitted(51, 14) Source(63, 3) + SourceIndex(0) -3 >Emitted(51, 14) Source(45, 2) + SourceIndex(0) -4 >Emitted(51, 18) Source(63, 3) + SourceIndex(0) +1 >Emitted(55, 13) Source(63, 2) + SourceIndex(0) +2 >Emitted(55, 14) Source(63, 3) + SourceIndex(0) +3 >Emitted(55, 14) Source(45, 2) + SourceIndex(0) +4 >Emitted(55, 18) Source(63, 3) + SourceIndex(0) --- >>> Widgets.FindWidget = FindWidget; 1->^^^^^^^^^^^^ @@ -966,10 +970,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } 4 > -1->Emitted(52, 13) Source(45, 15) + SourceIndex(0) -2 >Emitted(52, 31) Source(45, 25) + SourceIndex(0) -3 >Emitted(52, 44) Source(63, 3) + SourceIndex(0) -4 >Emitted(52, 45) Source(63, 3) + SourceIndex(0) +1->Emitted(56, 13) Source(45, 15) + SourceIndex(0) +2 >Emitted(56, 31) Source(45, 25) + SourceIndex(0) +3 >Emitted(56, 44) Source(63, 3) + SourceIndex(0) +4 >Emitted(56, 45) Source(63, 3) + SourceIndex(0) --- >>> })(Widgets = Thing.Widgets || (Thing.Widgets = {})); 1->^^^^^^^^ @@ -1011,15 +1015,15 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1->Emitted(53, 9) Source(64, 1) + SourceIndex(0) -2 >Emitted(53, 10) Source(64, 2) + SourceIndex(0) -3 >Emitted(53, 12) Source(44, 21) + SourceIndex(0) -4 >Emitted(53, 19) Source(44, 28) + SourceIndex(0) -5 >Emitted(53, 22) Source(44, 21) + SourceIndex(0) -6 >Emitted(53, 35) Source(44, 28) + SourceIndex(0) -7 >Emitted(53, 40) Source(44, 21) + SourceIndex(0) -8 >Emitted(53, 53) Source(44, 28) + SourceIndex(0) -9 >Emitted(53, 61) Source(64, 2) + SourceIndex(0) +1->Emitted(57, 9) Source(64, 1) + SourceIndex(0) +2 >Emitted(57, 10) Source(64, 2) + SourceIndex(0) +3 >Emitted(57, 12) Source(44, 21) + SourceIndex(0) +4 >Emitted(57, 19) Source(44, 28) + SourceIndex(0) +5 >Emitted(57, 22) Source(44, 21) + SourceIndex(0) +6 >Emitted(57, 35) Source(44, 28) + SourceIndex(0) +7 >Emitted(57, 40) Source(44, 21) + SourceIndex(0) +8 >Emitted(57, 53) Source(44, 28) + SourceIndex(0) +9 >Emitted(57, 61) Source(64, 2) + SourceIndex(0) --- >>> })(Thing = Sample.Thing || (Sample.Thing = {})); 1 >^^^^ @@ -1060,15 +1064,15 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(54, 5) Source(64, 1) + SourceIndex(0) -2 >Emitted(54, 6) Source(64, 2) + SourceIndex(0) -3 >Emitted(54, 8) Source(44, 15) + SourceIndex(0) -4 >Emitted(54, 13) Source(44, 20) + SourceIndex(0) -5 >Emitted(54, 16) Source(44, 15) + SourceIndex(0) -6 >Emitted(54, 28) Source(44, 20) + SourceIndex(0) -7 >Emitted(54, 33) Source(44, 15) + SourceIndex(0) -8 >Emitted(54, 45) Source(44, 20) + SourceIndex(0) -9 >Emitted(54, 53) Source(64, 2) + SourceIndex(0) +1 >Emitted(58, 5) Source(64, 1) + SourceIndex(0) +2 >Emitted(58, 6) Source(64, 2) + SourceIndex(0) +3 >Emitted(58, 8) Source(44, 15) + SourceIndex(0) +4 >Emitted(58, 13) Source(44, 20) + SourceIndex(0) +5 >Emitted(58, 16) Source(44, 15) + SourceIndex(0) +6 >Emitted(58, 28) Source(44, 20) + SourceIndex(0) +7 >Emitted(58, 33) Source(44, 15) + SourceIndex(0) +8 >Emitted(58, 45) Source(44, 20) + SourceIndex(0) +9 >Emitted(58, 53) Source(64, 2) + SourceIndex(0) --- >>>})(Sample || (Sample = {})); 1 > @@ -1106,13 +1110,13 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(55, 1) Source(64, 1) + SourceIndex(0) -2 >Emitted(55, 2) Source(64, 2) + SourceIndex(0) -3 >Emitted(55, 4) Source(44, 8) + SourceIndex(0) -4 >Emitted(55, 10) Source(44, 14) + SourceIndex(0) -5 >Emitted(55, 15) Source(44, 8) + SourceIndex(0) -6 >Emitted(55, 21) Source(44, 14) + SourceIndex(0) -7 >Emitted(55, 29) Source(64, 2) + SourceIndex(0) +1 >Emitted(59, 1) Source(64, 1) + SourceIndex(0) +2 >Emitted(59, 2) Source(64, 2) + SourceIndex(0) +3 >Emitted(59, 4) Source(44, 8) + SourceIndex(0) +4 >Emitted(59, 10) Source(44, 14) + SourceIndex(0) +5 >Emitted(59, 15) Source(44, 8) + SourceIndex(0) +6 >Emitted(59, 21) Source(44, 14) + SourceIndex(0) +7 >Emitted(59, 29) Source(64, 2) + SourceIndex(0) --- >>>var AbstractMode = (function () { 1-> @@ -1121,13 +1125,13 @@ sourceFile:recursiveClassReferenceTest.ts > >interface IMode { getInitialState(): IState;} > -1->Emitted(56, 1) Source(67, 1) + SourceIndex(0) +1->Emitted(60, 1) Source(67, 1) + SourceIndex(0) --- >>> function AbstractMode() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(57, 5) Source(67, 1) + SourceIndex(0) +1->Emitted(61, 5) Source(67, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -1135,8 +1139,8 @@ sourceFile:recursiveClassReferenceTest.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1->class AbstractMode implements IMode { public getInitialState(): IState { return null;} 2 > } -1->Emitted(58, 5) Source(67, 88) + SourceIndex(0) -2 >Emitted(58, 6) Source(67, 89) + SourceIndex(0) +1->Emitted(62, 5) Source(67, 88) + SourceIndex(0) +2 >Emitted(62, 6) Source(67, 89) + SourceIndex(0) --- >>> AbstractMode.prototype.getInitialState = function () { return null; }; 1->^^^^ @@ -1159,24 +1163,24 @@ sourceFile:recursiveClassReferenceTest.ts 8 > ; 9 > 10> } -1->Emitted(59, 5) Source(67, 46) + SourceIndex(0) -2 >Emitted(59, 43) Source(67, 61) + SourceIndex(0) -3 >Emitted(59, 46) Source(67, 39) + SourceIndex(0) -4 >Emitted(59, 60) Source(67, 74) + SourceIndex(0) -5 >Emitted(59, 66) Source(67, 80) + SourceIndex(0) -6 >Emitted(59, 67) Source(67, 81) + SourceIndex(0) -7 >Emitted(59, 71) Source(67, 85) + SourceIndex(0) -8 >Emitted(59, 72) Source(67, 86) + SourceIndex(0) -9 >Emitted(59, 73) Source(67, 86) + SourceIndex(0) -10>Emitted(59, 74) Source(67, 87) + SourceIndex(0) +1->Emitted(63, 5) Source(67, 46) + SourceIndex(0) +2 >Emitted(63, 43) Source(67, 61) + SourceIndex(0) +3 >Emitted(63, 46) Source(67, 39) + SourceIndex(0) +4 >Emitted(63, 60) Source(67, 74) + SourceIndex(0) +5 >Emitted(63, 66) Source(67, 80) + SourceIndex(0) +6 >Emitted(63, 67) Source(67, 81) + SourceIndex(0) +7 >Emitted(63, 71) Source(67, 85) + SourceIndex(0) +8 >Emitted(63, 72) Source(67, 86) + SourceIndex(0) +9 >Emitted(63, 73) Source(67, 86) + SourceIndex(0) +10>Emitted(63, 74) Source(67, 87) + SourceIndex(0) --- >>> return AbstractMode; 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^ 1 > 2 > } -1 >Emitted(60, 5) Source(67, 88) + SourceIndex(0) -2 >Emitted(60, 24) Source(67, 89) + SourceIndex(0) +1 >Emitted(64, 5) Source(67, 88) + SourceIndex(0) +2 >Emitted(64, 24) Source(67, 89) + SourceIndex(0) --- >>>}()); 1 > @@ -1188,10 +1192,10 @@ sourceFile:recursiveClassReferenceTest.ts 2 >} 3 > 4 > class AbstractMode implements IMode { public getInitialState(): IState { return null;} } -1 >Emitted(61, 1) Source(67, 88) + SourceIndex(0) -2 >Emitted(61, 2) Source(67, 89) + SourceIndex(0) -3 >Emitted(61, 2) Source(67, 1) + SourceIndex(0) -4 >Emitted(61, 6) Source(67, 89) + SourceIndex(0) +1 >Emitted(65, 1) Source(67, 88) + SourceIndex(0) +2 >Emitted(65, 2) Source(67, 89) + SourceIndex(0) +3 >Emitted(65, 2) Source(67, 1) + SourceIndex(0) +4 >Emitted(65, 6) Source(67, 89) + SourceIndex(0) --- >>>(function (Sample) { 1-> @@ -1209,9 +1213,9 @@ sourceFile:recursiveClassReferenceTest.ts > 2 >module 3 > Sample -1->Emitted(62, 1) Source(76, 1) + SourceIndex(0) -2 >Emitted(62, 12) Source(76, 8) + SourceIndex(0) -3 >Emitted(62, 18) Source(76, 14) + SourceIndex(0) +1->Emitted(66, 1) Source(76, 1) + SourceIndex(0) +2 >Emitted(66, 12) Source(76, 8) + SourceIndex(0) +3 >Emitted(66, 18) Source(76, 14) + SourceIndex(0) --- >>> var Thing; 1 >^^^^ @@ -1247,10 +1251,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(63, 5) Source(76, 15) + SourceIndex(0) -2 >Emitted(63, 9) Source(76, 15) + SourceIndex(0) -3 >Emitted(63, 14) Source(76, 20) + SourceIndex(0) -4 >Emitted(63, 15) Source(100, 2) + SourceIndex(0) +1 >Emitted(67, 5) Source(76, 15) + SourceIndex(0) +2 >Emitted(67, 9) Source(76, 15) + SourceIndex(0) +3 >Emitted(67, 14) Source(76, 20) + SourceIndex(0) +4 >Emitted(67, 15) Source(100, 2) + SourceIndex(0) --- >>> (function (Thing) { 1->^^^^ @@ -1260,9 +1264,9 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 > 3 > Thing -1->Emitted(64, 5) Source(76, 15) + SourceIndex(0) -2 >Emitted(64, 16) Source(76, 15) + SourceIndex(0) -3 >Emitted(64, 21) Source(76, 20) + SourceIndex(0) +1->Emitted(68, 5) Source(76, 15) + SourceIndex(0) +2 >Emitted(68, 16) Source(76, 15) + SourceIndex(0) +3 >Emitted(68, 21) Source(76, 20) + SourceIndex(0) --- >>> var Languages; 1->^^^^^^^^ @@ -1298,10 +1302,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1->Emitted(65, 9) Source(76, 21) + SourceIndex(0) -2 >Emitted(65, 13) Source(76, 21) + SourceIndex(0) -3 >Emitted(65, 22) Source(76, 30) + SourceIndex(0) -4 >Emitted(65, 23) Source(100, 2) + SourceIndex(0) +1->Emitted(69, 9) Source(76, 21) + SourceIndex(0) +2 >Emitted(69, 13) Source(76, 21) + SourceIndex(0) +3 >Emitted(69, 22) Source(76, 30) + SourceIndex(0) +4 >Emitted(69, 23) Source(100, 2) + SourceIndex(0) --- >>> (function (Languages) { 1->^^^^^^^^ @@ -1310,9 +1314,9 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 > 3 > Languages -1->Emitted(66, 9) Source(76, 21) + SourceIndex(0) -2 >Emitted(66, 20) Source(76, 21) + SourceIndex(0) -3 >Emitted(66, 29) Source(76, 30) + SourceIndex(0) +1->Emitted(70, 9) Source(76, 21) + SourceIndex(0) +2 >Emitted(70, 20) Source(76, 21) + SourceIndex(0) +3 >Emitted(70, 29) Source(76, 30) + SourceIndex(0) --- >>> var PlainText; 1 >^^^^^^^^^^^^ @@ -1348,10 +1352,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(67, 13) Source(76, 31) + SourceIndex(0) -2 >Emitted(67, 17) Source(76, 31) + SourceIndex(0) -3 >Emitted(67, 26) Source(76, 40) + SourceIndex(0) -4 >Emitted(67, 27) Source(100, 2) + SourceIndex(0) +1 >Emitted(71, 13) Source(76, 31) + SourceIndex(0) +2 >Emitted(71, 17) Source(76, 31) + SourceIndex(0) +3 >Emitted(71, 26) Source(76, 40) + SourceIndex(0) +4 >Emitted(71, 27) Source(100, 2) + SourceIndex(0) --- >>> (function (PlainText) { 1->^^^^^^^^^^^^ @@ -1361,9 +1365,9 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 > 3 > PlainText -1->Emitted(68, 13) Source(76, 31) + SourceIndex(0) -2 >Emitted(68, 24) Source(76, 31) + SourceIndex(0) -3 >Emitted(68, 33) Source(76, 40) + SourceIndex(0) +1->Emitted(72, 13) Source(76, 31) + SourceIndex(0) +2 >Emitted(72, 24) Source(76, 31) + SourceIndex(0) +3 >Emitted(72, 33) Source(76, 40) + SourceIndex(0) --- >>> var State = (function () { 1->^^^^^^^^^^^^^^^^ @@ -1371,7 +1375,7 @@ sourceFile:recursiveClassReferenceTest.ts 1-> { > > -1->Emitted(69, 17) Source(78, 2) + SourceIndex(0) +1->Emitted(73, 17) Source(78, 2) + SourceIndex(0) --- >>> function State(mode) { 1->^^^^^^^^^^^^^^^^^^^^ @@ -1382,9 +1386,9 @@ sourceFile:recursiveClassReferenceTest.ts > 2 > constructor(private 3 > mode: IMode -1->Emitted(70, 21) Source(79, 9) + SourceIndex(0) -2 >Emitted(70, 36) Source(79, 29) + SourceIndex(0) -3 >Emitted(70, 40) Source(79, 40) + SourceIndex(0) +1->Emitted(74, 21) Source(79, 9) + SourceIndex(0) +2 >Emitted(74, 36) Source(79, 29) + SourceIndex(0) +3 >Emitted(74, 40) Source(79, 40) + SourceIndex(0) --- >>> this.mode = mode; 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1397,11 +1401,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > 4 > mode 5 > : IMode -1->Emitted(71, 25) Source(79, 29) + SourceIndex(0) -2 >Emitted(71, 34) Source(79, 33) + SourceIndex(0) -3 >Emitted(71, 37) Source(79, 29) + SourceIndex(0) -4 >Emitted(71, 41) Source(79, 33) + SourceIndex(0) -5 >Emitted(71, 42) Source(79, 40) + SourceIndex(0) +1->Emitted(75, 25) Source(79, 29) + SourceIndex(0) +2 >Emitted(75, 34) Source(79, 33) + SourceIndex(0) +3 >Emitted(75, 37) Source(79, 29) + SourceIndex(0) +4 >Emitted(75, 41) Source(79, 33) + SourceIndex(0) +5 >Emitted(75, 42) Source(79, 40) + SourceIndex(0) --- >>> } 1 >^^^^^^^^^^^^^^^^^^^^ @@ -1409,8 +1413,8 @@ sourceFile:recursiveClassReferenceTest.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >) { 2 > } -1 >Emitted(72, 21) Source(79, 44) + SourceIndex(0) -2 >Emitted(72, 22) Source(79, 45) + SourceIndex(0) +1 >Emitted(76, 21) Source(79, 44) + SourceIndex(0) +2 >Emitted(76, 22) Source(79, 45) + SourceIndex(0) --- >>> State.prototype.clone = function () { 1->^^^^^^^^^^^^^^^^^^^^ @@ -1420,9 +1424,9 @@ sourceFile:recursiveClassReferenceTest.ts > public 2 > clone 3 > -1->Emitted(73, 21) Source(80, 10) + SourceIndex(0) -2 >Emitted(73, 42) Source(80, 15) + SourceIndex(0) -3 >Emitted(73, 45) Source(80, 3) + SourceIndex(0) +1->Emitted(77, 21) Source(80, 10) + SourceIndex(0) +2 >Emitted(77, 42) Source(80, 15) + SourceIndex(0) +3 >Emitted(77, 45) Source(80, 3) + SourceIndex(0) --- >>> return this; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1436,11 +1440,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > 4 > this 5 > ; -1 >Emitted(74, 25) Source(81, 4) + SourceIndex(0) -2 >Emitted(74, 31) Source(81, 10) + SourceIndex(0) -3 >Emitted(74, 32) Source(81, 11) + SourceIndex(0) -4 >Emitted(74, 36) Source(81, 15) + SourceIndex(0) -5 >Emitted(74, 37) Source(81, 16) + SourceIndex(0) +1 >Emitted(78, 25) Source(81, 4) + SourceIndex(0) +2 >Emitted(78, 31) Source(81, 10) + SourceIndex(0) +3 >Emitted(78, 32) Source(81, 11) + SourceIndex(0) +4 >Emitted(78, 36) Source(81, 15) + SourceIndex(0) +5 >Emitted(78, 37) Source(81, 16) + SourceIndex(0) --- >>> }; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -1449,8 +1453,8 @@ sourceFile:recursiveClassReferenceTest.ts 1 > > 2 > } -1 >Emitted(75, 21) Source(82, 3) + SourceIndex(0) -2 >Emitted(75, 22) Source(82, 4) + SourceIndex(0) +1 >Emitted(79, 21) Source(82, 3) + SourceIndex(0) +2 >Emitted(79, 22) Source(82, 4) + SourceIndex(0) --- >>> State.prototype.equals = function (other) { 1->^^^^^^^^^^^^^^^^^^^^ @@ -1465,11 +1469,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > 4 > public equals( 5 > other:IState -1->Emitted(76, 21) Source(84, 10) + SourceIndex(0) -2 >Emitted(76, 43) Source(84, 16) + SourceIndex(0) -3 >Emitted(76, 46) Source(84, 3) + SourceIndex(0) -4 >Emitted(76, 56) Source(84, 17) + SourceIndex(0) -5 >Emitted(76, 61) Source(84, 29) + SourceIndex(0) +1->Emitted(80, 21) Source(84, 10) + SourceIndex(0) +2 >Emitted(80, 43) Source(84, 16) + SourceIndex(0) +3 >Emitted(80, 46) Source(84, 3) + SourceIndex(0) +4 >Emitted(80, 56) Source(84, 17) + SourceIndex(0) +5 >Emitted(80, 61) Source(84, 29) + SourceIndex(0) --- >>> return this === other; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1487,13 +1491,13 @@ sourceFile:recursiveClassReferenceTest.ts 5 > === 6 > other 7 > ; -1 >Emitted(77, 25) Source(85, 4) + SourceIndex(0) -2 >Emitted(77, 31) Source(85, 10) + SourceIndex(0) -3 >Emitted(77, 32) Source(85, 11) + SourceIndex(0) -4 >Emitted(77, 36) Source(85, 15) + SourceIndex(0) -5 >Emitted(77, 41) Source(85, 20) + SourceIndex(0) -6 >Emitted(77, 46) Source(85, 25) + SourceIndex(0) -7 >Emitted(77, 47) Source(85, 26) + SourceIndex(0) +1 >Emitted(81, 25) Source(85, 4) + SourceIndex(0) +2 >Emitted(81, 31) Source(85, 10) + SourceIndex(0) +3 >Emitted(81, 32) Source(85, 11) + SourceIndex(0) +4 >Emitted(81, 36) Source(85, 15) + SourceIndex(0) +5 >Emitted(81, 41) Source(85, 20) + SourceIndex(0) +6 >Emitted(81, 46) Source(85, 25) + SourceIndex(0) +7 >Emitted(81, 47) Source(85, 26) + SourceIndex(0) --- >>> }; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -1502,8 +1506,8 @@ sourceFile:recursiveClassReferenceTest.ts 1 > > 2 > } -1 >Emitted(78, 21) Source(86, 3) + SourceIndex(0) -2 >Emitted(78, 22) Source(86, 4) + SourceIndex(0) +1 >Emitted(82, 21) Source(86, 3) + SourceIndex(0) +2 >Emitted(82, 22) Source(86, 4) + SourceIndex(0) --- >>> State.prototype.getMode = function () { return mode; }; 1->^^^^^^^^^^^^^^^^^^^^ @@ -1528,16 +1532,16 @@ sourceFile:recursiveClassReferenceTest.ts 8 > ; 9 > 10> } -1->Emitted(79, 21) Source(88, 10) + SourceIndex(0) -2 >Emitted(79, 44) Source(88, 17) + SourceIndex(0) -3 >Emitted(79, 47) Source(88, 3) + SourceIndex(0) -4 >Emitted(79, 61) Source(88, 29) + SourceIndex(0) -5 >Emitted(79, 67) Source(88, 35) + SourceIndex(0) -6 >Emitted(79, 68) Source(88, 36) + SourceIndex(0) -7 >Emitted(79, 72) Source(88, 40) + SourceIndex(0) -8 >Emitted(79, 73) Source(88, 41) + SourceIndex(0) -9 >Emitted(79, 74) Source(88, 42) + SourceIndex(0) -10>Emitted(79, 75) Source(88, 43) + SourceIndex(0) +1->Emitted(83, 21) Source(88, 10) + SourceIndex(0) +2 >Emitted(83, 44) Source(88, 17) + SourceIndex(0) +3 >Emitted(83, 47) Source(88, 3) + SourceIndex(0) +4 >Emitted(83, 61) Source(88, 29) + SourceIndex(0) +5 >Emitted(83, 67) Source(88, 35) + SourceIndex(0) +6 >Emitted(83, 68) Source(88, 36) + SourceIndex(0) +7 >Emitted(83, 72) Source(88, 40) + SourceIndex(0) +8 >Emitted(83, 73) Source(88, 41) + SourceIndex(0) +9 >Emitted(83, 74) Source(88, 42) + SourceIndex(0) +10>Emitted(83, 75) Source(88, 43) + SourceIndex(0) --- >>> return State; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -1545,8 +1549,8 @@ sourceFile:recursiveClassReferenceTest.ts 1 > > 2 > } -1 >Emitted(80, 21) Source(89, 2) + SourceIndex(0) -2 >Emitted(80, 33) Source(89, 3) + SourceIndex(0) +1 >Emitted(84, 21) Source(89, 2) + SourceIndex(0) +2 >Emitted(84, 33) Source(89, 3) + SourceIndex(0) --- >>> }()); 1 >^^^^^^^^^^^^^^^^ @@ -1569,10 +1573,10 @@ sourceFile:recursiveClassReferenceTest.ts > > public getMode(): IMode { return mode; } > } -1 >Emitted(81, 17) Source(89, 2) + SourceIndex(0) -2 >Emitted(81, 18) Source(89, 3) + SourceIndex(0) -3 >Emitted(81, 18) Source(78, 2) + SourceIndex(0) -4 >Emitted(81, 22) Source(89, 3) + SourceIndex(0) +1 >Emitted(85, 17) Source(89, 2) + SourceIndex(0) +2 >Emitted(85, 18) Source(89, 3) + SourceIndex(0) +3 >Emitted(85, 18) Source(78, 2) + SourceIndex(0) +4 >Emitted(85, 22) Source(89, 3) + SourceIndex(0) --- >>> PlainText.State = State; 1->^^^^^^^^^^^^^^^^ @@ -1595,10 +1599,10 @@ sourceFile:recursiveClassReferenceTest.ts > public getMode(): IMode { return mode; } > } 4 > -1->Emitted(82, 17) Source(78, 15) + SourceIndex(0) -2 >Emitted(82, 32) Source(78, 20) + SourceIndex(0) -3 >Emitted(82, 40) Source(89, 3) + SourceIndex(0) -4 >Emitted(82, 41) Source(89, 3) + SourceIndex(0) +1->Emitted(86, 17) Source(78, 15) + SourceIndex(0) +2 >Emitted(86, 32) Source(78, 20) + SourceIndex(0) +3 >Emitted(86, 40) Source(89, 3) + SourceIndex(0) +4 >Emitted(86, 41) Source(89, 3) + SourceIndex(0) --- >>> var Mode = (function (_super) { 1->^^^^^^^^^^^^^^^^ @@ -1606,21 +1610,21 @@ sourceFile:recursiveClassReferenceTest.ts 1-> > > -1->Emitted(83, 17) Source(91, 2) + SourceIndex(0) +1->Emitted(87, 17) Source(91, 2) + SourceIndex(0) --- >>> __extends(Mode, _super); 1->^^^^^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^ 1->export class Mode extends 2 > AbstractMode -1->Emitted(84, 21) Source(91, 28) + SourceIndex(0) -2 >Emitted(84, 45) Source(91, 40) + SourceIndex(0) +1->Emitted(88, 21) Source(91, 28) + SourceIndex(0) +2 >Emitted(88, 45) Source(91, 40) + SourceIndex(0) --- >>> function Mode() { 1 >^^^^^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > -1 >Emitted(85, 21) Source(91, 2) + SourceIndex(0) +1 >Emitted(89, 21) Source(91, 2) + SourceIndex(0) --- >>> return _super.apply(this, arguments) || this; >>> } @@ -1637,8 +1641,8 @@ sourceFile:recursiveClassReferenceTest.ts > > 2 > } -1->Emitted(87, 21) Source(99, 2) + SourceIndex(0) -2 >Emitted(87, 22) Source(99, 3) + SourceIndex(0) +1->Emitted(91, 21) Source(99, 2) + SourceIndex(0) +2 >Emitted(91, 22) Source(99, 3) + SourceIndex(0) --- >>> // scenario 2 1->^^^^^^^^^^^^^^^^^^^^ @@ -1646,8 +1650,8 @@ sourceFile:recursiveClassReferenceTest.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 > // scenario 2 -1->Emitted(88, 21) Source(93, 3) + SourceIndex(0) -2 >Emitted(88, 34) Source(93, 16) + SourceIndex(0) +1->Emitted(92, 21) Source(93, 3) + SourceIndex(0) +2 >Emitted(92, 34) Source(93, 16) + SourceIndex(0) --- >>> Mode.prototype.getInitialState = function () { 1->^^^^^^^^^^^^^^^^^^^^ @@ -1657,9 +1661,9 @@ sourceFile:recursiveClassReferenceTest.ts > public 2 > getInitialState 3 > -1->Emitted(89, 21) Source(94, 10) + SourceIndex(0) -2 >Emitted(89, 51) Source(94, 25) + SourceIndex(0) -3 >Emitted(89, 54) Source(94, 3) + SourceIndex(0) +1->Emitted(93, 21) Source(94, 10) + SourceIndex(0) +2 >Emitted(93, 51) Source(94, 25) + SourceIndex(0) +3 >Emitted(93, 54) Source(94, 3) + SourceIndex(0) --- >>> return new State(self); 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1681,15 +1685,15 @@ sourceFile:recursiveClassReferenceTest.ts 7 > self 8 > ) 9 > ; -1 >Emitted(90, 25) Source(95, 4) + SourceIndex(0) -2 >Emitted(90, 31) Source(95, 10) + SourceIndex(0) -3 >Emitted(90, 32) Source(95, 11) + SourceIndex(0) -4 >Emitted(90, 36) Source(95, 15) + SourceIndex(0) -5 >Emitted(90, 41) Source(95, 20) + SourceIndex(0) -6 >Emitted(90, 42) Source(95, 21) + SourceIndex(0) -7 >Emitted(90, 46) Source(95, 25) + SourceIndex(0) -8 >Emitted(90, 47) Source(95, 26) + SourceIndex(0) -9 >Emitted(90, 48) Source(95, 27) + SourceIndex(0) +1 >Emitted(94, 25) Source(95, 4) + SourceIndex(0) +2 >Emitted(94, 31) Source(95, 10) + SourceIndex(0) +3 >Emitted(94, 32) Source(95, 11) + SourceIndex(0) +4 >Emitted(94, 36) Source(95, 15) + SourceIndex(0) +5 >Emitted(94, 41) Source(95, 20) + SourceIndex(0) +6 >Emitted(94, 42) Source(95, 21) + SourceIndex(0) +7 >Emitted(94, 46) Source(95, 25) + SourceIndex(0) +8 >Emitted(94, 47) Source(95, 26) + SourceIndex(0) +9 >Emitted(94, 48) Source(95, 27) + SourceIndex(0) --- >>> }; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -1698,8 +1702,8 @@ sourceFile:recursiveClassReferenceTest.ts 1 > > 2 > } -1 >Emitted(91, 21) Source(96, 3) + SourceIndex(0) -2 >Emitted(91, 22) Source(96, 4) + SourceIndex(0) +1 >Emitted(95, 21) Source(96, 3) + SourceIndex(0) +2 >Emitted(95, 22) Source(96, 4) + SourceIndex(0) --- >>> return Mode; 1->^^^^^^^^^^^^^^^^^^^^ @@ -1710,8 +1714,8 @@ sourceFile:recursiveClassReferenceTest.ts > > 2 > } -1->Emitted(92, 21) Source(99, 2) + SourceIndex(0) -2 >Emitted(92, 32) Source(99, 3) + SourceIndex(0) +1->Emitted(96, 21) Source(99, 2) + SourceIndex(0) +2 >Emitted(96, 32) Source(99, 3) + SourceIndex(0) --- >>> }(AbstractMode)); 1->^^^^^^^^^^^^^^^^ @@ -1735,12 +1739,12 @@ sourceFile:recursiveClassReferenceTest.ts > > > } -1->Emitted(93, 17) Source(99, 2) + SourceIndex(0) -2 >Emitted(93, 18) Source(99, 3) + SourceIndex(0) -3 >Emitted(93, 18) Source(91, 2) + SourceIndex(0) -4 >Emitted(93, 19) Source(91, 28) + SourceIndex(0) -5 >Emitted(93, 31) Source(91, 40) + SourceIndex(0) -6 >Emitted(93, 34) Source(99, 3) + SourceIndex(0) +1->Emitted(97, 17) Source(99, 2) + SourceIndex(0) +2 >Emitted(97, 18) Source(99, 3) + SourceIndex(0) +3 >Emitted(97, 18) Source(91, 2) + SourceIndex(0) +4 >Emitted(97, 19) Source(91, 28) + SourceIndex(0) +5 >Emitted(97, 31) Source(91, 40) + SourceIndex(0) +6 >Emitted(97, 34) Source(99, 3) + SourceIndex(0) --- >>> PlainText.Mode = Mode; 1->^^^^^^^^^^^^^^^^ @@ -1760,10 +1764,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } 4 > -1->Emitted(94, 17) Source(91, 15) + SourceIndex(0) -2 >Emitted(94, 31) Source(91, 19) + SourceIndex(0) -3 >Emitted(94, 38) Source(99, 3) + SourceIndex(0) -4 >Emitted(94, 39) Source(99, 3) + SourceIndex(0) +1->Emitted(98, 17) Source(91, 15) + SourceIndex(0) +2 >Emitted(98, 31) Source(91, 19) + SourceIndex(0) +3 >Emitted(98, 38) Source(99, 3) + SourceIndex(0) +4 >Emitted(98, 39) Source(99, 3) + SourceIndex(0) --- >>> })(PlainText = Languages.PlainText || (Languages.PlainText = {})); 1->^^^^^^^^^^^^ @@ -1809,15 +1813,15 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1->Emitted(95, 13) Source(100, 1) + SourceIndex(0) -2 >Emitted(95, 14) Source(100, 2) + SourceIndex(0) -3 >Emitted(95, 16) Source(76, 31) + SourceIndex(0) -4 >Emitted(95, 25) Source(76, 40) + SourceIndex(0) -5 >Emitted(95, 28) Source(76, 31) + SourceIndex(0) -6 >Emitted(95, 47) Source(76, 40) + SourceIndex(0) -7 >Emitted(95, 52) Source(76, 31) + SourceIndex(0) -8 >Emitted(95, 71) Source(76, 40) + SourceIndex(0) -9 >Emitted(95, 79) Source(100, 2) + SourceIndex(0) +1->Emitted(99, 13) Source(100, 1) + SourceIndex(0) +2 >Emitted(99, 14) Source(100, 2) + SourceIndex(0) +3 >Emitted(99, 16) Source(76, 31) + SourceIndex(0) +4 >Emitted(99, 25) Source(76, 40) + SourceIndex(0) +5 >Emitted(99, 28) Source(76, 31) + SourceIndex(0) +6 >Emitted(99, 47) Source(76, 40) + SourceIndex(0) +7 >Emitted(99, 52) Source(76, 31) + SourceIndex(0) +8 >Emitted(99, 71) Source(76, 40) + SourceIndex(0) +9 >Emitted(99, 79) Source(100, 2) + SourceIndex(0) --- >>> })(Languages = Thing.Languages || (Thing.Languages = {})); 1 >^^^^^^^^ @@ -1862,15 +1866,15 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(96, 9) Source(100, 1) + SourceIndex(0) -2 >Emitted(96, 10) Source(100, 2) + SourceIndex(0) -3 >Emitted(96, 12) Source(76, 21) + SourceIndex(0) -4 >Emitted(96, 21) Source(76, 30) + SourceIndex(0) -5 >Emitted(96, 24) Source(76, 21) + SourceIndex(0) -6 >Emitted(96, 39) Source(76, 30) + SourceIndex(0) -7 >Emitted(96, 44) Source(76, 21) + SourceIndex(0) -8 >Emitted(96, 59) Source(76, 30) + SourceIndex(0) -9 >Emitted(96, 67) Source(100, 2) + SourceIndex(0) +1 >Emitted(100, 9) Source(100, 1) + SourceIndex(0) +2 >Emitted(100, 10) Source(100, 2) + SourceIndex(0) +3 >Emitted(100, 12) Source(76, 21) + SourceIndex(0) +4 >Emitted(100, 21) Source(76, 30) + SourceIndex(0) +5 >Emitted(100, 24) Source(76, 21) + SourceIndex(0) +6 >Emitted(100, 39) Source(76, 30) + SourceIndex(0) +7 >Emitted(100, 44) Source(76, 21) + SourceIndex(0) +8 >Emitted(100, 59) Source(76, 30) + SourceIndex(0) +9 >Emitted(100, 67) Source(100, 2) + SourceIndex(0) --- >>> })(Thing = Sample.Thing || (Sample.Thing = {})); 1 >^^^^ @@ -1915,15 +1919,15 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(97, 5) Source(100, 1) + SourceIndex(0) -2 >Emitted(97, 6) Source(100, 2) + SourceIndex(0) -3 >Emitted(97, 8) Source(76, 15) + SourceIndex(0) -4 >Emitted(97, 13) Source(76, 20) + SourceIndex(0) -5 >Emitted(97, 16) Source(76, 15) + SourceIndex(0) -6 >Emitted(97, 28) Source(76, 20) + SourceIndex(0) -7 >Emitted(97, 33) Source(76, 15) + SourceIndex(0) -8 >Emitted(97, 45) Source(76, 20) + SourceIndex(0) -9 >Emitted(97, 53) Source(100, 2) + SourceIndex(0) +1 >Emitted(101, 5) Source(100, 1) + SourceIndex(0) +2 >Emitted(101, 6) Source(100, 2) + SourceIndex(0) +3 >Emitted(101, 8) Source(76, 15) + SourceIndex(0) +4 >Emitted(101, 13) Source(76, 20) + SourceIndex(0) +5 >Emitted(101, 16) Source(76, 15) + SourceIndex(0) +6 >Emitted(101, 28) Source(76, 20) + SourceIndex(0) +7 >Emitted(101, 33) Source(76, 15) + SourceIndex(0) +8 >Emitted(101, 45) Source(76, 20) + SourceIndex(0) +9 >Emitted(101, 53) Source(100, 2) + SourceIndex(0) --- >>>})(Sample || (Sample = {})); 1 > @@ -1965,12 +1969,12 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(98, 1) Source(100, 1) + SourceIndex(0) -2 >Emitted(98, 2) Source(100, 2) + SourceIndex(0) -3 >Emitted(98, 4) Source(76, 8) + SourceIndex(0) -4 >Emitted(98, 10) Source(76, 14) + SourceIndex(0) -5 >Emitted(98, 15) Source(76, 8) + SourceIndex(0) -6 >Emitted(98, 21) Source(76, 14) + SourceIndex(0) -7 >Emitted(98, 29) Source(100, 2) + SourceIndex(0) +1 >Emitted(102, 1) Source(100, 1) + SourceIndex(0) +2 >Emitted(102, 2) Source(100, 2) + SourceIndex(0) +3 >Emitted(102, 4) Source(76, 8) + SourceIndex(0) +4 >Emitted(102, 10) Source(76, 14) + SourceIndex(0) +5 >Emitted(102, 15) Source(76, 8) + SourceIndex(0) +6 >Emitted(102, 21) Source(76, 14) + SourceIndex(0) +7 >Emitted(102, 29) Source(100, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=recursiveClassReferenceTest.js.map \ No newline at end of file diff --git a/tests/baselines/reference/recursiveComplicatedClasses.js b/tests/baselines/reference/recursiveComplicatedClasses.js index 57000180db4..c9b3dfb6d7a 100644 --- a/tests/baselines/reference/recursiveComplicatedClasses.js +++ b/tests/baselines/reference/recursiveComplicatedClasses.js @@ -26,7 +26,11 @@ class TypeSymbol extends InferenceSymbol { //// [recursiveComplicatedClasses.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/recursivelySpecializedConstructorDeclaration.js b/tests/baselines/reference/recursivelySpecializedConstructorDeclaration.js index 5f6e3ab0b06..e7ce63794fd 100644 --- a/tests/baselines/reference/recursivelySpecializedConstructorDeclaration.js +++ b/tests/baselines/reference/recursivelySpecializedConstructorDeclaration.js @@ -31,7 +31,11 @@ declare module MsPortal.Controls.Base.ItemList { //// [recursivelySpecializedConstructorDeclaration.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/reexportClassDefinition.js b/tests/baselines/reference/reexportClassDefinition.js index d7b644514cc..37ba6aab5d4 100644 --- a/tests/baselines/reference/reexportClassDefinition.js +++ b/tests/baselines/reference/reexportClassDefinition.js @@ -34,7 +34,11 @@ module.exports = { //// [foo3.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js b/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js index 77417da53f3..d81c9a0e2a7 100644 --- a/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js +++ b/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js @@ -1021,7 +1021,11 @@ module caurinus { //// [resolvingClassDeclarationWhenInBaseTypeResolution.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/returnInConstructor1.js b/tests/baselines/reference/returnInConstructor1.js index cd56b78f0a3..2f2c4a3fdb5 100644 --- a/tests/baselines/reference/returnInConstructor1.js +++ b/tests/baselines/reference/returnInConstructor1.js @@ -68,7 +68,11 @@ class I extends G { //// [returnInConstructor1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/returnStatements.js b/tests/baselines/reference/returnStatements.js index 783ffb5899e..3488ebd8ac0 100644 --- a/tests/baselines/reference/returnStatements.js +++ b/tests/baselines/reference/returnStatements.js @@ -26,7 +26,11 @@ function fn13(): C { return null; } //// [returnStatements.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.js b/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.js index 1ab4b160e7c..67013c3922e 100644 --- a/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.js +++ b/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.js @@ -10,7 +10,11 @@ class D extends C { //// [scopeCheckExtendedClassInsidePublicMethod2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.js b/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.js index 9d1fafea4c9..7bb90a136ba 100644 --- a/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.js +++ b/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.js @@ -10,7 +10,11 @@ class D extends C { //// [scopeCheckExtendedClassInsideStaticMethod1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/scopeTests.js b/tests/baselines/reference/scopeTests.js index 0ab152adf11..d2061241cac 100644 --- a/tests/baselines/reference/scopeTests.js +++ b/tests/baselines/reference/scopeTests.js @@ -13,7 +13,11 @@ class D extends C { //// [scopeTests.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/shadowPrivateMembers.js b/tests/baselines/reference/shadowPrivateMembers.js index 305c7581959..251622f1308 100644 --- a/tests/baselines/reference/shadowPrivateMembers.js +++ b/tests/baselines/reference/shadowPrivateMembers.js @@ -5,7 +5,11 @@ class derived extends base { private n() {} } //// [shadowPrivateMembers.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js index d3ac854d4dd..07be6489141 100644 --- a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js +++ b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js @@ -9,7 +9,11 @@ class Greeter extends AbstractGreeter { //// [sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js.map b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js.map index 6b18a783dfa..27577a7e338 100644 --- a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js.map +++ b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js.map] -{"version":3,"file":"sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js","sourceRoot":"","sources":["sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts"],"names":[],"mappings":";;;;;AAAA;IAAA;IACA,CAAC;IAAD,sBAAC;AAAD,CAAC,AADD,IACC;AAED;IAAsB,2BAAe;IAArC;QAAA,kDAGC;QAFU,OAAC,GAAG,EAAE,CAAC;QACP,WAAK,GAAG,KAAK,CAAC;;IACzB,CAAC;IAAD,cAAC;AAAD,CAAC,AAHD,CAAsB,eAAe,GAGpC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js","sourceRoot":"","sources":["sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts"],"names":[],"mappings":";;;;;;;;;AAAA;IAAA;IACA,CAAC;IAAD,sBAAC;AAAD,CAAC,AADD,IACC;AAED;IAAsB,2BAAe;IAArC;QAAA,kDAGC;QAFU,OAAC,GAAG,EAAE,CAAC;QACP,WAAK,GAAG,KAAK,CAAC;;IACzB,CAAC;IAAD,cAAC;AAAD,CAAC,AAHD,CAAsB,eAAe,GAGpC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt index 68dea53e96b..cb083f766e8 100644 --- a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt @@ -9,7 +9,11 @@ emittedFile:tests/cases/compiler/sourceMapValidationClassWithDefaultConstructorA sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts ------------------------------------------------------------------- >>>var __extends = (this && this.__extends) || function (d, b) { ->>> Object.setPrototypeOf(d, b); +>>> if (typeof Object.setPrototypeOf === "function") { +>>> Object.setPrototypeOf(d, b); +>>> } else { +>>> d.__proto__ = b; +>>> } >>> function __() { this.constructor = d; } >>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); >>>}; @@ -17,13 +21,13 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > -1 >Emitted(6, 1) Source(1, 1) + SourceIndex(0) +1 >Emitted(10, 1) Source(1, 1) + SourceIndex(0) --- >>> function AbstractGreeter() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(7, 5) Source(1, 1) + SourceIndex(0) +1->Emitted(11, 5) Source(1, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -32,16 +36,16 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts 1->class AbstractGreeter { > 2 > } -1->Emitted(8, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(8, 6) Source(2, 2) + SourceIndex(0) +1->Emitted(12, 5) Source(2, 1) + SourceIndex(0) +2 >Emitted(12, 6) Source(2, 2) + SourceIndex(0) --- >>> return AbstractGreeter; 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(9, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(9, 27) Source(2, 2) + SourceIndex(0) +1->Emitted(13, 5) Source(2, 1) + SourceIndex(0) +2 >Emitted(13, 27) Source(2, 2) + SourceIndex(0) --- >>>}()); 1 > @@ -54,10 +58,10 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts 3 > 4 > class AbstractGreeter { > } -1 >Emitted(10, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(10, 2) Source(2, 2) + SourceIndex(0) -3 >Emitted(10, 2) Source(1, 1) + SourceIndex(0) -4 >Emitted(10, 6) Source(2, 2) + SourceIndex(0) +1 >Emitted(14, 1) Source(2, 1) + SourceIndex(0) +2 >Emitted(14, 2) Source(2, 2) + SourceIndex(0) +3 >Emitted(14, 2) Source(1, 1) + SourceIndex(0) +4 >Emitted(14, 6) Source(2, 2) + SourceIndex(0) --- >>>var Greeter = (function (_super) { 1-> @@ -65,21 +69,21 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts 1-> > > -1->Emitted(11, 1) Source(4, 1) + SourceIndex(0) +1->Emitted(15, 1) Source(4, 1) + SourceIndex(0) --- >>> __extends(Greeter, _super); 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1->class Greeter extends 2 > AbstractGreeter -1->Emitted(12, 5) Source(4, 23) + SourceIndex(0) -2 >Emitted(12, 32) Source(4, 38) + SourceIndex(0) +1->Emitted(16, 5) Source(4, 23) + SourceIndex(0) +2 >Emitted(16, 32) Source(4, 38) + SourceIndex(0) --- >>> function Greeter() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > -1 >Emitted(13, 5) Source(4, 1) + SourceIndex(0) +1 >Emitted(17, 5) Source(4, 1) + SourceIndex(0) --- >>> var _this = _super.apply(this, arguments) || this; 1->^^^^^^^^ @@ -89,8 +93,8 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts > public a = 10; > public nameA = "Ten"; > } -1->Emitted(14, 9) Source(4, 1) + SourceIndex(0) -2 >Emitted(14, 59) Source(7, 2) + SourceIndex(0) +1->Emitted(18, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(18, 59) Source(7, 2) + SourceIndex(0) --- >>> _this.a = 10; 1 >^^^^^^^^ @@ -104,11 +108,11 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts 3 > = 4 > 10 5 > ; -1 >Emitted(15, 9) Source(5, 12) + SourceIndex(0) -2 >Emitted(15, 16) Source(5, 13) + SourceIndex(0) -3 >Emitted(15, 19) Source(5, 16) + SourceIndex(0) -4 >Emitted(15, 21) Source(5, 18) + SourceIndex(0) -5 >Emitted(15, 22) Source(5, 19) + SourceIndex(0) +1 >Emitted(19, 9) Source(5, 12) + SourceIndex(0) +2 >Emitted(19, 16) Source(5, 13) + SourceIndex(0) +3 >Emitted(19, 19) Source(5, 16) + SourceIndex(0) +4 >Emitted(19, 21) Source(5, 18) + SourceIndex(0) +5 >Emitted(19, 22) Source(5, 19) + SourceIndex(0) --- >>> _this.nameA = "Ten"; 1->^^^^^^^^ @@ -122,11 +126,11 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts 3 > = 4 > "Ten" 5 > ; -1->Emitted(16, 9) Source(6, 12) + SourceIndex(0) -2 >Emitted(16, 20) Source(6, 17) + SourceIndex(0) -3 >Emitted(16, 23) Source(6, 20) + SourceIndex(0) -4 >Emitted(16, 28) Source(6, 25) + SourceIndex(0) -5 >Emitted(16, 29) Source(6, 26) + SourceIndex(0) +1->Emitted(20, 9) Source(6, 12) + SourceIndex(0) +2 >Emitted(20, 20) Source(6, 17) + SourceIndex(0) +3 >Emitted(20, 23) Source(6, 20) + SourceIndex(0) +4 >Emitted(20, 28) Source(6, 25) + SourceIndex(0) +5 >Emitted(20, 29) Source(6, 26) + SourceIndex(0) --- >>> return _this; >>> } @@ -136,8 +140,8 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts 1 > > 2 > } -1 >Emitted(18, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(18, 6) Source(7, 2) + SourceIndex(0) +1 >Emitted(22, 5) Source(7, 1) + SourceIndex(0) +2 >Emitted(22, 6) Source(7, 2) + SourceIndex(0) --- >>> return Greeter; 1->^^^^ @@ -145,8 +149,8 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts 3 > ^^^-> 1-> 2 > } -1->Emitted(19, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(19, 19) Source(7, 2) + SourceIndex(0) +1->Emitted(23, 5) Source(7, 1) + SourceIndex(0) +2 >Emitted(23, 19) Source(7, 2) + SourceIndex(0) --- >>>}(AbstractGreeter)); 1-> @@ -165,11 +169,11 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts > public a = 10; > public nameA = "Ten"; > } -1->Emitted(20, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(20, 2) Source(7, 2) + SourceIndex(0) -3 >Emitted(20, 2) Source(4, 1) + SourceIndex(0) -4 >Emitted(20, 3) Source(4, 23) + SourceIndex(0) -5 >Emitted(20, 18) Source(4, 38) + SourceIndex(0) -6 >Emitted(20, 21) Source(7, 2) + SourceIndex(0) +1->Emitted(24, 1) Source(7, 1) + SourceIndex(0) +2 >Emitted(24, 2) Source(7, 2) + SourceIndex(0) +3 >Emitted(24, 2) Source(4, 1) + SourceIndex(0) +4 >Emitted(24, 3) Source(4, 23) + SourceIndex(0) +5 >Emitted(24, 18) Source(4, 38) + SourceIndex(0) +6 >Emitted(24, 21) Source(7, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js.map \ No newline at end of file diff --git a/tests/baselines/reference/specializedInheritedConstructors1.js b/tests/baselines/reference/specializedInheritedConstructors1.js index 56fd271bb34..2560437b43d 100644 --- a/tests/baselines/reference/specializedInheritedConstructors1.js +++ b/tests/baselines/reference/specializedInheritedConstructors1.js @@ -19,7 +19,11 @@ var myView = new MyView(m); // was error //// [specializedInheritedConstructors1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/specializedOverloadWithRestParameters.js b/tests/baselines/reference/specializedOverloadWithRestParameters.js index 3f31e7f61df..0ea23b1b850 100644 --- a/tests/baselines/reference/specializedOverloadWithRestParameters.js +++ b/tests/baselines/reference/specializedOverloadWithRestParameters.js @@ -14,7 +14,11 @@ function g(tagName: any): Base { //// [specializedOverloadWithRestParameters.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/staticFactory1.js b/tests/baselines/reference/staticFactory1.js index d8c53470b81..e9e4a286eb6 100644 --- a/tests/baselines/reference/staticFactory1.js +++ b/tests/baselines/reference/staticFactory1.js @@ -15,7 +15,11 @@ d.foo(); //// [staticFactory1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/staticInheritance.js b/tests/baselines/reference/staticInheritance.js index c6c95c1e6bf..181c8aa9659 100644 --- a/tests/baselines/reference/staticInheritance.js +++ b/tests/baselines/reference/staticInheritance.js @@ -13,7 +13,11 @@ doThing(B); //OK //// [staticInheritance.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/staticMemberAccessOffDerivedType1.js b/tests/baselines/reference/staticMemberAccessOffDerivedType1.js index ededeec9c5c..6634d3c3519 100644 --- a/tests/baselines/reference/staticMemberAccessOffDerivedType1.js +++ b/tests/baselines/reference/staticMemberAccessOffDerivedType1.js @@ -11,7 +11,11 @@ class P extends SomeBase { //// [staticMemberAccessOffDerivedType1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/staticPropSuper.js b/tests/baselines/reference/staticPropSuper.js index fdb63a556e0..10519dace00 100644 --- a/tests/baselines/reference/staticPropSuper.js +++ b/tests/baselines/reference/staticPropSuper.js @@ -37,7 +37,11 @@ class E extends A { //// [staticPropSuper.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/strictModeInConstructor.js b/tests/baselines/reference/strictModeInConstructor.js index ac78decef58..0598932c4bb 100644 --- a/tests/baselines/reference/strictModeInConstructor.js +++ b/tests/baselines/reference/strictModeInConstructor.js @@ -62,7 +62,11 @@ class Ds extends A { //// [strictModeInConstructor.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/strictModeReservedWord.js b/tests/baselines/reference/strictModeReservedWord.js index e376167c667..f15efc6e765 100644 --- a/tests/baselines/reference/strictModeReservedWord.js +++ b/tests/baselines/reference/strictModeReservedWord.js @@ -29,7 +29,11 @@ function foo() { //// [strictModeReservedWord.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/strictModeReservedWordInClassDeclaration.js b/tests/baselines/reference/strictModeReservedWordInClassDeclaration.js index f6b864047a8..6f13aac7608 100644 --- a/tests/baselines/reference/strictModeReservedWordInClassDeclaration.js +++ b/tests/baselines/reference/strictModeReservedWordInClassDeclaration.js @@ -30,7 +30,11 @@ class H extends package.A { } //// [strictModeReservedWordInClassDeclaration.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js b/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js index 6836a7adff3..adcc83a1841 100644 --- a/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js +++ b/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js @@ -42,7 +42,11 @@ var b: { [x: string]: A } = { //// [stringIndexerConstrainsPropertyDeclarations2.js] // String indexer providing a constraint of a user defined type var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypesOfTypeParameter.js b/tests/baselines/reference/subtypesOfTypeParameter.js index 4407e02a1e7..2d42c1e4d79 100644 --- a/tests/baselines/reference/subtypesOfTypeParameter.js +++ b/tests/baselines/reference/subtypesOfTypeParameter.js @@ -108,7 +108,11 @@ function f2(x: T, y: U) { //// [subtypesOfTypeParameter.js] // checking whether other types are subtypes of type parameters var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints.js b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints.js index ec44364d4a4..a3b5ecaeb26 100644 --- a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints.js +++ b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints.js @@ -170,7 +170,11 @@ class D29 extends C3 { //// [subtypesOfTypeParameterWithConstraints.js] // checking whether other types are subtypes of type parameters with constraints var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints4.js b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints4.js index f25a43a353f..1aa94ba7c99 100644 --- a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints4.js +++ b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints4.js @@ -81,7 +81,11 @@ class D9 extends B1 { //// [subtypesOfTypeParameterWithConstraints4.js] // checking whether other types are subtypes of type parameters with constraints var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypesOfTypeParameterWithRecursiveConstraints.js b/tests/baselines/reference/subtypesOfTypeParameterWithRecursiveConstraints.js index 16797d0e5b5..05cc496f25a 100644 --- a/tests/baselines/reference/subtypesOfTypeParameterWithRecursiveConstraints.js +++ b/tests/baselines/reference/subtypesOfTypeParameterWithRecursiveConstraints.js @@ -160,7 +160,11 @@ module M2 { //// [subtypesOfTypeParameterWithRecursiveConstraints.js] // checking whether other types are subtypes of type parameters with constraints var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingTransitivity.js b/tests/baselines/reference/subtypingTransitivity.js index ca52f7ed49f..5c06121d5a2 100644 --- a/tests/baselines/reference/subtypingTransitivity.js +++ b/tests/baselines/reference/subtypingTransitivity.js @@ -21,7 +21,11 @@ b.x = 1; // assigned number to string //// [subtypingTransitivity.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithCallSignatures2.js b/tests/baselines/reference/subtypingWithCallSignatures2.js index 8086362951f..6b82e0d4841 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures2.js +++ b/tests/baselines/reference/subtypingWithCallSignatures2.js @@ -175,7 +175,11 @@ var r18 = foo18(r18arg1); //// [subtypingWithCallSignatures2.js] // checking subtype relations for function types as it relates to contextual signature instantiation var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithCallSignatures3.js b/tests/baselines/reference/subtypingWithCallSignatures3.js index 1fa01910cdb..49405cbd070 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures3.js +++ b/tests/baselines/reference/subtypingWithCallSignatures3.js @@ -122,7 +122,11 @@ module WithGenericSignaturesInBaseType { // checking subtype relations for function types as it relates to contextual signature instantiation // error cases, so function calls will all result in 'any' var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithCallSignatures4.js b/tests/baselines/reference/subtypingWithCallSignatures4.js index 5aaa139f19a..2e526d41fba 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures4.js +++ b/tests/baselines/reference/subtypingWithCallSignatures4.js @@ -114,7 +114,11 @@ var r18 = foo18(r18arg); //// [subtypingWithCallSignatures4.js] // checking subtype relations for function types as it relates to contextual signature instantiation var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithConstructSignatures2.js b/tests/baselines/reference/subtypingWithConstructSignatures2.js index 1f7ae528b5b..867beb93596 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures2.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures2.js @@ -175,7 +175,11 @@ var r18 = foo18(r18arg1); //// [subtypingWithConstructSignatures2.js] // checking subtype relations for function types as it relates to contextual signature instantiation var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithConstructSignatures3.js b/tests/baselines/reference/subtypingWithConstructSignatures3.js index d86b0519ebe..f13a56664ce 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures3.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures3.js @@ -124,7 +124,11 @@ module WithGenericSignaturesInBaseType { // checking subtype relations for function types as it relates to contextual signature instantiation // error cases, so function calls will all result in 'any' var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithConstructSignatures4.js b/tests/baselines/reference/subtypingWithConstructSignatures4.js index f11d2e3c211..32f9b33fc71 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures4.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures4.js @@ -114,7 +114,11 @@ var r18 = foo18(r18arg); //// [subtypingWithConstructSignatures4.js] // checking subtype relations for function types as it relates to contextual signature instantiation var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithConstructSignatures5.js b/tests/baselines/reference/subtypingWithConstructSignatures5.js index bdce522f104..2c177201732 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures5.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures5.js @@ -52,7 +52,11 @@ interface I extends B { // checking subtype relations for function types as it relates to contextual signature instantiation // same as subtypingWithConstructSignatures2 just with an extra level of indirection in the inheritance chain var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithConstructSignatures6.js b/tests/baselines/reference/subtypingWithConstructSignatures6.js index 2c0b10744f2..065d312c086 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures6.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures6.js @@ -55,7 +55,11 @@ interface I9 extends A { // same as subtypingWithConstructSignatures4 but using class type parameters instead of generic signatures // all are errors var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithNumericIndexer.js b/tests/baselines/reference/subtypingWithNumericIndexer.js index efe3d5927a9..1c1ade16a08 100644 --- a/tests/baselines/reference/subtypingWithNumericIndexer.js +++ b/tests/baselines/reference/subtypingWithNumericIndexer.js @@ -42,7 +42,11 @@ module Generics { //// [subtypingWithNumericIndexer.js] // Derived type indexer must be subtype of base type indexer var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithNumericIndexer3.js b/tests/baselines/reference/subtypingWithNumericIndexer3.js index a3b1034d6a8..2c0da66f8c9 100644 --- a/tests/baselines/reference/subtypingWithNumericIndexer3.js +++ b/tests/baselines/reference/subtypingWithNumericIndexer3.js @@ -46,7 +46,11 @@ module Generics { //// [subtypingWithNumericIndexer3.js] // Derived type indexer must be subtype of base type indexer var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithNumericIndexer4.js b/tests/baselines/reference/subtypingWithNumericIndexer4.js index f2657654c8b..1881825eb24 100644 --- a/tests/baselines/reference/subtypingWithNumericIndexer4.js +++ b/tests/baselines/reference/subtypingWithNumericIndexer4.js @@ -30,7 +30,11 @@ module Generics { //// [subtypingWithNumericIndexer4.js] // Derived type indexer must be subtype of base type indexer var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithObjectMembers.js b/tests/baselines/reference/subtypingWithObjectMembers.js index 04f05b81cef..263bb117d34 100644 --- a/tests/baselines/reference/subtypingWithObjectMembers.js +++ b/tests/baselines/reference/subtypingWithObjectMembers.js @@ -69,7 +69,11 @@ module TwoLevels { //// [subtypingWithObjectMembers.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithObjectMembers4.js b/tests/baselines/reference/subtypingWithObjectMembers4.js index 2cdf1b4401b..03d7228b2f9 100644 --- a/tests/baselines/reference/subtypingWithObjectMembers4.js +++ b/tests/baselines/reference/subtypingWithObjectMembers4.js @@ -36,7 +36,11 @@ class B3 extends A3 { //// [subtypingWithObjectMembers4.js] // subtyping when property names do not match var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithObjectMembersAccessibility.js b/tests/baselines/reference/subtypingWithObjectMembersAccessibility.js index 386ce781675..0eb506d3210 100644 --- a/tests/baselines/reference/subtypingWithObjectMembersAccessibility.js +++ b/tests/baselines/reference/subtypingWithObjectMembersAccessibility.js @@ -36,7 +36,11 @@ class B3 extends A3 { //// [subtypingWithObjectMembersAccessibility.js] // Derived member is private, base member is not causes errors var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.js b/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.js index 5227eac7db4..f171736911b 100644 --- a/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.js +++ b/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.js @@ -64,7 +64,11 @@ module ImplicitPublic { //// [subtypingWithObjectMembersAccessibility2.js] // Derived member is private, base member is not causes errors var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithStringIndexer.js b/tests/baselines/reference/subtypingWithStringIndexer.js index a1ec5e1f46f..bffca920982 100644 --- a/tests/baselines/reference/subtypingWithStringIndexer.js +++ b/tests/baselines/reference/subtypingWithStringIndexer.js @@ -43,7 +43,11 @@ module Generics { //// [subtypingWithStringIndexer.js] // Derived type indexer must be subtype of base type indexer var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithStringIndexer3.js b/tests/baselines/reference/subtypingWithStringIndexer3.js index ea193a206ed..0ff4b73c848 100644 --- a/tests/baselines/reference/subtypingWithStringIndexer3.js +++ b/tests/baselines/reference/subtypingWithStringIndexer3.js @@ -46,7 +46,11 @@ module Generics { //// [subtypingWithStringIndexer3.js] // Derived type indexer must be subtype of base type indexer var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithStringIndexer4.js b/tests/baselines/reference/subtypingWithStringIndexer4.js index b5a8c75a03e..347df7c1720 100644 --- a/tests/baselines/reference/subtypingWithStringIndexer4.js +++ b/tests/baselines/reference/subtypingWithStringIndexer4.js @@ -30,7 +30,11 @@ module Generics { //// [subtypingWithStringIndexer4.js] // Derived type indexer must be subtype of base type indexer var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/super.js b/tests/baselines/reference/super.js index 6607c7897dd..bbf1862bd0f 100644 --- a/tests/baselines/reference/super.js +++ b/tests/baselines/reference/super.js @@ -39,7 +39,11 @@ s.foo() + ss.foo(); //// [super.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/super1.js b/tests/baselines/reference/super1.js index 44a48adab77..d437c923fe6 100644 --- a/tests/baselines/reference/super1.js +++ b/tests/baselines/reference/super1.js @@ -68,7 +68,11 @@ module Base4 { //// [super1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/super2.js b/tests/baselines/reference/super2.js index e46b2825481..b8a679c4c8d 100644 --- a/tests/baselines/reference/super2.js +++ b/tests/baselines/reference/super2.js @@ -52,7 +52,11 @@ results1.x() + results1.y() + results2.y(); //// [super2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superAccess.js b/tests/baselines/reference/superAccess.js index b300f75b5fa..f2f6ccbaf4a 100644 --- a/tests/baselines/reference/superAccess.js +++ b/tests/baselines/reference/superAccess.js @@ -15,7 +15,11 @@ class MyDerived extends MyBase { //// [superAccess.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superAccess2.js b/tests/baselines/reference/superAccess2.js index 0388b8d7f10..021589c1e79 100644 --- a/tests/baselines/reference/superAccess2.js +++ b/tests/baselines/reference/superAccess2.js @@ -26,7 +26,11 @@ class Q extends P { //// [superAccess2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superAccessInFatArrow1.js b/tests/baselines/reference/superAccessInFatArrow1.js index ec8488f0dad..e62db8c823b 100644 --- a/tests/baselines/reference/superAccessInFatArrow1.js +++ b/tests/baselines/reference/superAccessInFatArrow1.js @@ -17,7 +17,11 @@ module test { //// [superAccessInFatArrow1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallArgsMustMatch.js b/tests/baselines/reference/superCallArgsMustMatch.js index 7ca13891555..ec83550a9f0 100644 --- a/tests/baselines/reference/superCallArgsMustMatch.js +++ b/tests/baselines/reference/superCallArgsMustMatch.js @@ -27,7 +27,11 @@ class T6 extends T5{ //// [superCallArgsMustMatch.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallAssignResult.js b/tests/baselines/reference/superCallAssignResult.js index d7ad39fc7a6..f1407cac107 100644 --- a/tests/baselines/reference/superCallAssignResult.js +++ b/tests/baselines/reference/superCallAssignResult.js @@ -12,7 +12,11 @@ class H extends E { //// [superCallAssignResult.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing1.js b/tests/baselines/reference/superCallBeforeThisAccessing1.js index 916d1568232..151e9da2f15 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing1.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing1.js @@ -18,7 +18,11 @@ class D extends Base { //// [superCallBeforeThisAccessing1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing2.js b/tests/baselines/reference/superCallBeforeThisAccessing2.js index c5a8d293fff..7655b2df83b 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing2.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing2.js @@ -12,7 +12,11 @@ class D extends Base { //// [superCallBeforeThisAccessing2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing3.js b/tests/baselines/reference/superCallBeforeThisAccessing3.js index 8a59226d1d6..34555c677ba 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing3.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing3.js @@ -15,7 +15,11 @@ class D extends Base { //// [superCallBeforeThisAccessing3.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing4.js b/tests/baselines/reference/superCallBeforeThisAccessing4.js index 6870662435e..9fc2987e96e 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing4.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing4.js @@ -17,7 +17,11 @@ class E extends null { //// [superCallBeforeThisAccessing4.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing5.js b/tests/baselines/reference/superCallBeforeThisAccessing5.js index 0c2f3aa1c2d..1f3b0040e49 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing5.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing5.js @@ -9,7 +9,11 @@ class D extends null { //// [superCallBeforeThisAccessing5.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing6.js b/tests/baselines/reference/superCallBeforeThisAccessing6.js index 2fe03ab52b5..740f90d2e2b 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing6.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing6.js @@ -12,7 +12,11 @@ class D extends Base { //// [superCallBeforeThisAccessing6.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing7.js b/tests/baselines/reference/superCallBeforeThisAccessing7.js index a843456be76..65d95769c40 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing7.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing7.js @@ -15,7 +15,11 @@ class D extends Base { //// [superCallBeforeThisAccessing7.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing8.js b/tests/baselines/reference/superCallBeforeThisAccessing8.js index 3b23949584f..b5e454139c0 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing8.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing8.js @@ -15,7 +15,11 @@ class D extends Base { //// [superCallBeforeThisAccessing8.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType1.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType1.js index e4f1d4ed105..464c879212e 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType1.js @@ -13,7 +13,11 @@ class D extends B { //// [superCallFromClassThatDerivesFromGenericType1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType2.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType2.js index 47d1b5007fe..6ebe47532c8 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType2.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType2.js @@ -12,7 +12,11 @@ class D extends B { //// [superCallFromClassThatDerivesFromGenericType2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js index d29377ed246..19e480378a4 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js @@ -12,7 +12,11 @@ class B extends A { //// [superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js index 844b24a0698..48855cb0d11 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js @@ -12,7 +12,11 @@ class B extends A { //// [superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js b/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js index 71587371fa0..abfe5294a93 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js @@ -12,7 +12,11 @@ class B extends A { //// [superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallInNonStaticMethod.js b/tests/baselines/reference/superCallInNonStaticMethod.js index 99a026a38fd..dbea09ebced 100644 --- a/tests/baselines/reference/superCallInNonStaticMethod.js +++ b/tests/baselines/reference/superCallInNonStaticMethod.js @@ -52,7 +52,11 @@ class Other extends Doing { //// [superCallInNonStaticMethod.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallInStaticMethod.js b/tests/baselines/reference/superCallInStaticMethod.js index b65b2b270c5..104f8821dca 100644 --- a/tests/baselines/reference/superCallInStaticMethod.js +++ b/tests/baselines/reference/superCallInStaticMethod.js @@ -48,7 +48,11 @@ class Other extends Doing { //// [superCallInStaticMethod.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallInsideClassDeclaration.js b/tests/baselines/reference/superCallInsideClassDeclaration.js index 0b6c768c86f..4f7a0087ab1 100644 --- a/tests/baselines/reference/superCallInsideClassDeclaration.js +++ b/tests/baselines/reference/superCallInsideClassDeclaration.js @@ -18,7 +18,11 @@ class B extends A { //// [superCallInsideClassDeclaration.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallInsideClassExpression.js b/tests/baselines/reference/superCallInsideClassExpression.js index c3bd2425dd4..01bce40d204 100644 --- a/tests/baselines/reference/superCallInsideClassExpression.js +++ b/tests/baselines/reference/superCallInsideClassExpression.js @@ -18,7 +18,11 @@ class B extends A { //// [superCallInsideClassExpression.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallInsideObjectLiteralExpression.js b/tests/baselines/reference/superCallInsideObjectLiteralExpression.js index 45b6301a871..613997e789f 100644 --- a/tests/baselines/reference/superCallInsideObjectLiteralExpression.js +++ b/tests/baselines/reference/superCallInsideObjectLiteralExpression.js @@ -14,7 +14,11 @@ class B extends A { //// [superCallInsideObjectLiteralExpression.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallOutsideConstructor.js b/tests/baselines/reference/superCallOutsideConstructor.js index a98a9b3a322..0e1f3fbd837 100644 --- a/tests/baselines/reference/superCallOutsideConstructor.js +++ b/tests/baselines/reference/superCallOutsideConstructor.js @@ -24,7 +24,11 @@ var d = new D(); //// [superCallOutsideConstructor.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallParameterContextualTyping1.js b/tests/baselines/reference/superCallParameterContextualTyping1.js index 46aeb976987..132cb003921 100644 --- a/tests/baselines/reference/superCallParameterContextualTyping1.js +++ b/tests/baselines/reference/superCallParameterContextualTyping1.js @@ -14,7 +14,11 @@ class B extends A { //// [superCallParameterContextualTyping1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallParameterContextualTyping2.js b/tests/baselines/reference/superCallParameterContextualTyping2.js index a6aed2d1cae..bbb0871d385 100644 --- a/tests/baselines/reference/superCallParameterContextualTyping2.js +++ b/tests/baselines/reference/superCallParameterContextualTyping2.js @@ -13,7 +13,11 @@ class C extends A { //// [superCallParameterContextualTyping2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallParameterContextualTyping3.js b/tests/baselines/reference/superCallParameterContextualTyping3.js index 8445e86cfce..4469c918b31 100644 --- a/tests/baselines/reference/superCallParameterContextualTyping3.js +++ b/tests/baselines/reference/superCallParameterContextualTyping3.js @@ -33,7 +33,11 @@ class C extends CBase { //// [superCallParameterContextualTyping3.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallWithCommentEmit01.js b/tests/baselines/reference/superCallWithCommentEmit01.js index ea23eb3be03..ae7f053e5d4 100644 --- a/tests/baselines/reference/superCallWithCommentEmit01.js +++ b/tests/baselines/reference/superCallWithCommentEmit01.js @@ -12,7 +12,11 @@ class B extends A { //// [superCallWithCommentEmit01.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallWithMissingBaseClass.js b/tests/baselines/reference/superCallWithMissingBaseClass.js index 9dff2bc4c56..766c121d42b 100644 --- a/tests/baselines/reference/superCallWithMissingBaseClass.js +++ b/tests/baselines/reference/superCallWithMissingBaseClass.js @@ -11,7 +11,11 @@ class Foo extends Bar { //// [superCallWithMissingBaseClass.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCalls.js b/tests/baselines/reference/superCalls.js index d5a9af8e06a..47292405faf 100644 --- a/tests/baselines/reference/superCalls.js +++ b/tests/baselines/reference/superCalls.js @@ -32,7 +32,11 @@ class OtherDerived extends OtherBase { //// [superCalls.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallsInConstructor.js b/tests/baselines/reference/superCallsInConstructor.js index 540eef99840..707757b37b6 100644 --- a/tests/baselines/reference/superCallsInConstructor.js +++ b/tests/baselines/reference/superCallsInConstructor.js @@ -22,7 +22,11 @@ class Derived extends Base { //// [superCallsInConstructor.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superErrors.js b/tests/baselines/reference/superErrors.js index c52b2a22173..9b9681b2dee 100644 --- a/tests/baselines/reference/superErrors.js +++ b/tests/baselines/reference/superErrors.js @@ -53,7 +53,11 @@ class RegisteredUser extends User { //// [superErrors.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superInCatchBlock1.js b/tests/baselines/reference/superInCatchBlock1.js index 17ac62b8491..bf8f9bd5e02 100644 --- a/tests/baselines/reference/superInCatchBlock1.js +++ b/tests/baselines/reference/superInCatchBlock1.js @@ -15,7 +15,11 @@ class B extends A { //// [superInCatchBlock1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superInConstructorParam1.js b/tests/baselines/reference/superInConstructorParam1.js index 7f53128e99e..869dfde8e51 100644 --- a/tests/baselines/reference/superInConstructorParam1.js +++ b/tests/baselines/reference/superInConstructorParam1.js @@ -12,7 +12,11 @@ class C extends B { //// [superInConstructorParam1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superInLambdas.js b/tests/baselines/reference/superInLambdas.js index 8c3d37efb34..1e040f627c8 100644 --- a/tests/baselines/reference/superInLambdas.js +++ b/tests/baselines/reference/superInLambdas.js @@ -69,7 +69,11 @@ class RegisteredUser4 extends User { //// [superInLambdas.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superInObjectLiterals_ES5.js b/tests/baselines/reference/superInObjectLiterals_ES5.js index f31a2492f3d..77f55772b69 100644 --- a/tests/baselines/reference/superInObjectLiterals_ES5.js +++ b/tests/baselines/reference/superInObjectLiterals_ES5.js @@ -61,7 +61,11 @@ class B extends A { //// [superInObjectLiterals_ES5.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superNewCall1.js b/tests/baselines/reference/superNewCall1.js index 2b6231691b2..c532b4556c8 100644 --- a/tests/baselines/reference/superNewCall1.js +++ b/tests/baselines/reference/superNewCall1.js @@ -14,7 +14,11 @@ class B extends A { //// [superNewCall1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superPropertyAccess.js b/tests/baselines/reference/superPropertyAccess.js index 72353c27624..eb92e66a131 100644 --- a/tests/baselines/reference/superPropertyAccess.js +++ b/tests/baselines/reference/superPropertyAccess.js @@ -38,7 +38,11 @@ class MyDerived extends MyBase { //// [superPropertyAccess.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superPropertyAccess1.js b/tests/baselines/reference/superPropertyAccess1.js index 7e07c236eec..f15bdde29e2 100644 --- a/tests/baselines/reference/superPropertyAccess1.js +++ b/tests/baselines/reference/superPropertyAccess1.js @@ -29,7 +29,11 @@ class D extends C { //// [superPropertyAccess1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superPropertyAccess2.js b/tests/baselines/reference/superPropertyAccess2.js index f0776992312..98f1d0a190c 100644 --- a/tests/baselines/reference/superPropertyAccess2.js +++ b/tests/baselines/reference/superPropertyAccess2.js @@ -29,7 +29,11 @@ class D extends C { //// [superPropertyAccess2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superPropertyAccessInComputedPropertiesOfNestedType_ES5.js b/tests/baselines/reference/superPropertyAccessInComputedPropertiesOfNestedType_ES5.js index cb5e98ee2d2..d60310be5e7 100644 --- a/tests/baselines/reference/superPropertyAccessInComputedPropertiesOfNestedType_ES5.js +++ b/tests/baselines/reference/superPropertyAccessInComputedPropertiesOfNestedType_ES5.js @@ -16,7 +16,11 @@ class B extends A { //// [superPropertyAccessInComputedPropertiesOfNestedType_ES5.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superPropertyAccessNoError.js b/tests/baselines/reference/superPropertyAccessNoError.js index 0f4efbc719f..d2829eba561 100644 --- a/tests/baselines/reference/superPropertyAccessNoError.js +++ b/tests/baselines/reference/superPropertyAccessNoError.js @@ -78,7 +78,11 @@ instance.returnThis().fn(); //super.publicStaticMemberFunction in static member function of derived class //super.publicStaticMemberFunction in static member accessor(get and set) of derived class var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superPropertyAccess_ES5.js b/tests/baselines/reference/superPropertyAccess_ES5.js index 159b3b86c4c..e8f4dd3f872 100644 --- a/tests/baselines/reference/superPropertyAccess_ES5.js +++ b/tests/baselines/reference/superPropertyAccess_ES5.js @@ -31,7 +31,11 @@ class B extends A { //// [superPropertyAccess_ES5.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superSymbolIndexedAccess5.js b/tests/baselines/reference/superSymbolIndexedAccess5.js index 43565251f79..3c5aaf9b843 100644 --- a/tests/baselines/reference/superSymbolIndexedAccess5.js +++ b/tests/baselines/reference/superSymbolIndexedAccess5.js @@ -15,7 +15,11 @@ class Bar extends Foo { //// [superSymbolIndexedAccess5.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superSymbolIndexedAccess6.js b/tests/baselines/reference/superSymbolIndexedAccess6.js index 2f47d38660e..ff11a4c1b65 100644 --- a/tests/baselines/reference/superSymbolIndexedAccess6.js +++ b/tests/baselines/reference/superSymbolIndexedAccess6.js @@ -15,7 +15,11 @@ class Bar extends Foo { //// [superSymbolIndexedAccess6.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superWithGenericSpecialization.js b/tests/baselines/reference/superWithGenericSpecialization.js index e024285dc9e..8e23bfb25c4 100644 --- a/tests/baselines/reference/superWithGenericSpecialization.js +++ b/tests/baselines/reference/superWithGenericSpecialization.js @@ -16,7 +16,11 @@ var r2: number = d.y; //// [superWithGenericSpecialization.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superWithGenerics.js b/tests/baselines/reference/superWithGenerics.js index c8c99ef56cf..5e83df296d2 100644 --- a/tests/baselines/reference/superWithGenerics.js +++ b/tests/baselines/reference/superWithGenerics.js @@ -13,7 +13,11 @@ class D extends B { //// [superWithGenerics.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superWithTypeArgument.js b/tests/baselines/reference/superWithTypeArgument.js index 638b970d7ff..51a4f93a4e4 100644 --- a/tests/baselines/reference/superWithTypeArgument.js +++ b/tests/baselines/reference/superWithTypeArgument.js @@ -11,7 +11,11 @@ class D extends C { //// [superWithTypeArgument.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superWithTypeArgument2.js b/tests/baselines/reference/superWithTypeArgument2.js index 4241cc6a699..3744e797615 100644 --- a/tests/baselines/reference/superWithTypeArgument2.js +++ b/tests/baselines/reference/superWithTypeArgument2.js @@ -11,7 +11,11 @@ class D extends C { //// [superWithTypeArgument2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superWithTypeArgument3.js b/tests/baselines/reference/superWithTypeArgument3.js index 8f9d6252a87..9f76cc1ecff 100644 --- a/tests/baselines/reference/superWithTypeArgument3.js +++ b/tests/baselines/reference/superWithTypeArgument3.js @@ -15,7 +15,11 @@ class D extends C { //// [superWithTypeArgument3.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/super_inside-object-literal-getters-and-setters.js b/tests/baselines/reference/super_inside-object-literal-getters-and-setters.js index e244f318328..077affd0eda 100644 --- a/tests/baselines/reference/super_inside-object-literal-getters-and-setters.js +++ b/tests/baselines/reference/super_inside-object-literal-getters-and-setters.js @@ -29,7 +29,11 @@ class SuperObjectTest extends F { //// [super_inside-object-literal-getters-and-setters.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/switchStatements.js b/tests/baselines/reference/switchStatements.js index 20a92712670..05a7fafb046 100644 --- a/tests/baselines/reference/switchStatements.js +++ b/tests/baselines/reference/switchStatements.js @@ -57,7 +57,11 @@ switch (((x: T) => '')(1)) { } //// [switchStatements.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/systemModuleWithSuperClass.js b/tests/baselines/reference/systemModuleWithSuperClass.js index cbb2b5d05dd..e31370d0acd 100644 --- a/tests/baselines/reference/systemModuleWithSuperClass.js +++ b/tests/baselines/reference/systemModuleWithSuperClass.js @@ -33,7 +33,11 @@ System.register([], function (exports_1, context_1) { System.register(["./foo"], function (exports_1, context_1) { "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/targetTypeBaseCalls.js b/tests/baselines/reference/targetTypeBaseCalls.js index 3c1daae5d31..d359aa91628 100644 --- a/tests/baselines/reference/targetTypeBaseCalls.js +++ b/tests/baselines/reference/targetTypeBaseCalls.js @@ -20,7 +20,11 @@ class Bar extends Foo { constructor() { super(function(s) { s = 5 }) } } // err //// [targetTypeBaseCalls.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/thisInInvalidContexts.js b/tests/baselines/reference/thisInInvalidContexts.js index 5eaac48383c..6b16742cca2 100644 --- a/tests/baselines/reference/thisInInvalidContexts.js +++ b/tests/baselines/reference/thisInInvalidContexts.js @@ -50,7 +50,11 @@ enum SomeEnum { //// [thisInInvalidContexts.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/thisInInvalidContextsExternalModule.js b/tests/baselines/reference/thisInInvalidContextsExternalModule.js index 788eb974e89..68579bb2368 100644 --- a/tests/baselines/reference/thisInInvalidContextsExternalModule.js +++ b/tests/baselines/reference/thisInInvalidContextsExternalModule.js @@ -51,7 +51,11 @@ export = this; // Should be an error //// [thisInInvalidContextsExternalModule.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/thisInSuperCall.js b/tests/baselines/reference/thisInSuperCall.js index f49a0b8eb65..b8120fe732c 100644 --- a/tests/baselines/reference/thisInSuperCall.js +++ b/tests/baselines/reference/thisInSuperCall.js @@ -24,7 +24,11 @@ class Foo3 extends Base { //// [thisInSuperCall.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/thisInSuperCall1.js b/tests/baselines/reference/thisInSuperCall1.js index bfc9d8b4f17..3adc1c2a5b3 100644 --- a/tests/baselines/reference/thisInSuperCall1.js +++ b/tests/baselines/reference/thisInSuperCall1.js @@ -12,7 +12,11 @@ class Foo extends Base { //// [thisInSuperCall1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/thisInSuperCall2.js b/tests/baselines/reference/thisInSuperCall2.js index df5dee1a321..f310654acae 100644 --- a/tests/baselines/reference/thisInSuperCall2.js +++ b/tests/baselines/reference/thisInSuperCall2.js @@ -21,7 +21,11 @@ class Foo2 extends Base { //// [thisInSuperCall2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/thisInSuperCall3.js b/tests/baselines/reference/thisInSuperCall3.js index ac47e685c38..b0f4d62c746 100644 --- a/tests/baselines/reference/thisInSuperCall3.js +++ b/tests/baselines/reference/thisInSuperCall3.js @@ -14,7 +14,11 @@ class Foo extends Base { //// [thisInSuperCall3.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/thisTypeInFunctions.js b/tests/baselines/reference/thisTypeInFunctions.js index 3169e0cd06b..ae95aac22b5 100644 --- a/tests/baselines/reference/thisTypeInFunctions.js +++ b/tests/baselines/reference/thisTypeInFunctions.js @@ -196,7 +196,11 @@ function missingTypeIsImplicitAny(this, a: number) { return this.anything + a; } //// [thisTypeInFunctions.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/thisTypeInFunctionsNegative.js b/tests/baselines/reference/thisTypeInFunctionsNegative.js index 4b936e0198f..2591f9fe019 100644 --- a/tests/baselines/reference/thisTypeInFunctionsNegative.js +++ b/tests/baselines/reference/thisTypeInFunctionsNegative.js @@ -178,7 +178,11 @@ c.explicitProperty = (this, m) => m + this.n; //// [thisTypeInFunctionsNegative.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/tsxCorrectlyParseLessThanComparison1.js b/tests/baselines/reference/tsxCorrectlyParseLessThanComparison1.js index 6cfb957dd39..b6c5295b482 100644 --- a/tests/baselines/reference/tsxCorrectlyParseLessThanComparison1.js +++ b/tests/baselines/reference/tsxCorrectlyParseLessThanComparison1.js @@ -22,7 +22,11 @@ export class ShortDetails extends React.Component<{ id: number }, {}> { //// [tsxCorrectlyParseLessThanComparison1.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/tsxDynamicTagName5.js b/tests/baselines/reference/tsxDynamicTagName5.js index 200a8e2d78d..3a1ac6d2246 100644 --- a/tests/baselines/reference/tsxDynamicTagName5.js +++ b/tests/baselines/reference/tsxDynamicTagName5.js @@ -22,7 +22,11 @@ export class Text extends React.Component<{}, {}> { //// [app.jsx] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/tsxDynamicTagName7.js b/tests/baselines/reference/tsxDynamicTagName7.js index 717caa83310..f584dbf960a 100644 --- a/tests/baselines/reference/tsxDynamicTagName7.js +++ b/tests/baselines/reference/tsxDynamicTagName7.js @@ -22,7 +22,11 @@ export class Text extends React.Component<{}, {}> { //// [app.jsx] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/tsxDynamicTagName8.js b/tests/baselines/reference/tsxDynamicTagName8.js index 725eeec0326..bf3ab5d4a69 100644 --- a/tests/baselines/reference/tsxDynamicTagName8.js +++ b/tests/baselines/reference/tsxDynamicTagName8.js @@ -22,7 +22,11 @@ export class Text extends React.Component<{}, {}> { //// [app.jsx] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/tsxDynamicTagName9.js b/tests/baselines/reference/tsxDynamicTagName9.js index ff7e4a9a7e2..fefa118d704 100644 --- a/tests/baselines/reference/tsxDynamicTagName9.js +++ b/tests/baselines/reference/tsxDynamicTagName9.js @@ -22,7 +22,11 @@ export class Text extends React.Component<{}, {}> { //// [app.jsx] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/tsxExternalModuleEmit1.js b/tests/baselines/reference/tsxExternalModuleEmit1.js index 0d515ac2114..29f4e78100e 100644 --- a/tests/baselines/reference/tsxExternalModuleEmit1.js +++ b/tests/baselines/reference/tsxExternalModuleEmit1.js @@ -34,7 +34,11 @@ export class Button extends React.Component { //// [button.jsx] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -53,7 +57,11 @@ exports.Button = Button; //// [app.jsx] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/tsxStatelessFunctionComponents2.js b/tests/baselines/reference/tsxStatelessFunctionComponents2.js index 7352f7edef7..75284a28702 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponents2.js +++ b/tests/baselines/reference/tsxStatelessFunctionComponents2.js @@ -41,7 +41,11 @@ let i =
x.propertyNotOnHtmlDivElement} />; //// [file.jsx] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/tsxUnionTypeComponent1.js b/tests/baselines/reference/tsxUnionTypeComponent1.js index a832e26806e..215046ba2b6 100644 --- a/tests/baselines/reference/tsxUnionTypeComponent1.js +++ b/tests/baselines/reference/tsxUnionTypeComponent1.js @@ -27,7 +27,11 @@ class MyButtonComponent extends React.Component<{},{}> { //// [file.js] "use strict"; var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeAssertions.js b/tests/baselines/reference/typeAssertions.js index 9e7e39be710..e3cf89b0800 100644 --- a/tests/baselines/reference/typeAssertions.js +++ b/tests/baselines/reference/typeAssertions.js @@ -53,7 +53,11 @@ if((numOrStr === undefined) as numOrStr is string) { // Error //// [typeAssertions.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardFunction.js b/tests/baselines/reference/typeGuardFunction.js index e261492d35f..f16b6d1ce5a 100644 --- a/tests/baselines/reference/typeGuardFunction.js +++ b/tests/baselines/reference/typeGuardFunction.js @@ -85,7 +85,11 @@ let union3: boolean | B = isA(union2) || union2; //// [typeGuardFunction.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardFunctionErrors.js b/tests/baselines/reference/typeGuardFunctionErrors.js index 2ceec7e12e2..3e9b8f08cd4 100644 --- a/tests/baselines/reference/typeGuardFunctionErrors.js +++ b/tests/baselines/reference/typeGuardFunctionErrors.js @@ -147,7 +147,11 @@ if (hasMissingParameter()) { //// [typeGuardFunctionErrors.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardFunctionGenerics.js b/tests/baselines/reference/typeGuardFunctionGenerics.js index a2b9df419ad..ffe263f9985 100644 --- a/tests/baselines/reference/typeGuardFunctionGenerics.js +++ b/tests/baselines/reference/typeGuardFunctionGenerics.js @@ -35,7 +35,11 @@ let test3: B = funE(isB, 1); //// [typeGuardFunctionGenerics.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardFunctionOfFormThis.js b/tests/baselines/reference/typeGuardFunctionOfFormThis.js index f9f102e06ae..a1d1b7842d4 100644 --- a/tests/baselines/reference/typeGuardFunctionOfFormThis.js +++ b/tests/baselines/reference/typeGuardFunctionOfFormThis.js @@ -143,7 +143,11 @@ interface MimicGuardInterface { //// [typeGuardFunctionOfFormThis.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.js b/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.js index c1e5b6b0af1..7ec705bdc2d 100644 --- a/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.js +++ b/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.js @@ -61,7 +61,11 @@ else { //// [typeGuardFunctionOfFormThisErrors.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardOfFormInstanceOf.js b/tests/baselines/reference/typeGuardOfFormInstanceOf.js index 75f0ccdf492..67d216d0f58 100644 --- a/tests/baselines/reference/typeGuardOfFormInstanceOf.js +++ b/tests/baselines/reference/typeGuardOfFormInstanceOf.js @@ -74,7 +74,11 @@ else { // it is a subtype of the type of x, or // - when false, has no effect on the type of x. var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardOfFormIsType.js b/tests/baselines/reference/typeGuardOfFormIsType.js index c48034dfc36..88d0ac11a09 100644 --- a/tests/baselines/reference/typeGuardOfFormIsType.js +++ b/tests/baselines/reference/typeGuardOfFormIsType.js @@ -39,7 +39,11 @@ var r2: C2 | D1 = isC1(c2Ord1) && c2Ord1; // C2 | D1 //// [typeGuardOfFormIsType.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardOfFormThisMember.js b/tests/baselines/reference/typeGuardOfFormThisMember.js index eaaa656a08e..6dc97fb0152 100644 --- a/tests/baselines/reference/typeGuardOfFormThisMember.js +++ b/tests/baselines/reference/typeGuardOfFormThisMember.js @@ -84,7 +84,11 @@ namespace Test { //// [typeGuardOfFormThisMember.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js b/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js index cb7fa087fe1..fbc2f23e547 100644 --- a/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js +++ b/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js @@ -34,7 +34,11 @@ namespace Test { //// [typeGuardOfFormThisMemberErrors.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeMatch2.js b/tests/baselines/reference/typeMatch2.js index 9721d17aac4..e4c7925a90b 100644 --- a/tests/baselines/reference/typeMatch2.js +++ b/tests/baselines/reference/typeMatch2.js @@ -46,7 +46,11 @@ function f4() { //// [typeMatch2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeOfSuperCall.js b/tests/baselines/reference/typeOfSuperCall.js index 7bad868e33c..9ac69544460 100644 --- a/tests/baselines/reference/typeOfSuperCall.js +++ b/tests/baselines/reference/typeOfSuperCall.js @@ -10,7 +10,11 @@ class D extends C { //// [typeOfSuperCall.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeParameterAsBaseClass.js b/tests/baselines/reference/typeParameterAsBaseClass.js index 4629854dd37..062ac61fd51 100644 --- a/tests/baselines/reference/typeParameterAsBaseClass.js +++ b/tests/baselines/reference/typeParameterAsBaseClass.js @@ -4,7 +4,11 @@ class C2 implements T {} //// [typeParameterAsBaseClass.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeParameterAsBaseType.js b/tests/baselines/reference/typeParameterAsBaseType.js index 64d0f20c2f0..e77c3b6e0d4 100644 --- a/tests/baselines/reference/typeParameterAsBaseType.js +++ b/tests/baselines/reference/typeParameterAsBaseType.js @@ -14,7 +14,11 @@ interface I2 extends U { } // type parameters cannot be used as base types // these are all errors var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeParameterExtendingUnion1.js b/tests/baselines/reference/typeParameterExtendingUnion1.js index 73efba3f0d7..5d15b09720f 100644 --- a/tests/baselines/reference/typeParameterExtendingUnion1.js +++ b/tests/baselines/reference/typeParameterExtendingUnion1.js @@ -14,7 +14,11 @@ function f(a: T) { //// [typeParameterExtendingUnion1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeParameterExtendingUnion2.js b/tests/baselines/reference/typeParameterExtendingUnion2.js index 17d8d02cd9a..d274169391f 100644 --- a/tests/baselines/reference/typeParameterExtendingUnion2.js +++ b/tests/baselines/reference/typeParameterExtendingUnion2.js @@ -14,7 +14,11 @@ function f(a: T) { //// [typeParameterExtendingUnion2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeRelationships.js b/tests/baselines/reference/typeRelationships.js index 0d30916767e..745e2dffe00 100644 --- a/tests/baselines/reference/typeRelationships.js +++ b/tests/baselines/reference/typeRelationships.js @@ -42,7 +42,11 @@ class D extends C { //// [typeRelationships.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeValueConflict1.js b/tests/baselines/reference/typeValueConflict1.js index 3abbb5cd21b..c66ed5fbfd4 100644 --- a/tests/baselines/reference/typeValueConflict1.js +++ b/tests/baselines/reference/typeValueConflict1.js @@ -13,7 +13,11 @@ module M2 { //// [typeValueConflict1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeValueConflict2.js b/tests/baselines/reference/typeValueConflict2.js index 604acf71d15..c72115d0dfc 100644 --- a/tests/baselines/reference/typeValueConflict2.js +++ b/tests/baselines/reference/typeValueConflict2.js @@ -20,7 +20,11 @@ module M3 { //// [typeValueConflict2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeofClass2.js b/tests/baselines/reference/typeofClass2.js index fb04510e23f..46f9d7dc7f9 100644 --- a/tests/baselines/reference/typeofClass2.js +++ b/tests/baselines/reference/typeofClass2.js @@ -23,7 +23,11 @@ var r2: typeof d; //// [typeofClass2.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typesWithSpecializedCallSignatures.js b/tests/baselines/reference/typesWithSpecializedCallSignatures.js index e46c2a3c267..d011126edeb 100644 --- a/tests/baselines/reference/typesWithSpecializedCallSignatures.js +++ b/tests/baselines/reference/typesWithSpecializedCallSignatures.js @@ -44,7 +44,11 @@ var r3: Base = c.foo('hm'); //// [typesWithSpecializedCallSignatures.js] // basic uses of specialized signatures without errors var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typesWithSpecializedConstructSignatures.js b/tests/baselines/reference/typesWithSpecializedConstructSignatures.js index 37fc51c3f3a..79cd99f249d 100644 --- a/tests/baselines/reference/typesWithSpecializedConstructSignatures.js +++ b/tests/baselines/reference/typesWithSpecializedConstructSignatures.js @@ -42,7 +42,11 @@ var r3: Base = new a('hm'); //// [typesWithSpecializedConstructSignatures.js] // basic uses of specialized signatures without errors var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/undeclaredBase.js b/tests/baselines/reference/undeclaredBase.js index 3d07bc89571..a96a892e9a2 100644 --- a/tests/baselines/reference/undeclaredBase.js +++ b/tests/baselines/reference/undeclaredBase.js @@ -5,7 +5,11 @@ module M { export class C extends M.I { } } //// [undeclaredBase.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/undefinedIsSubtypeOfEverything.js b/tests/baselines/reference/undefinedIsSubtypeOfEverything.js index 393c5e24544..aa4fac8d6eb 100644 --- a/tests/baselines/reference/undefinedIsSubtypeOfEverything.js +++ b/tests/baselines/reference/undefinedIsSubtypeOfEverything.js @@ -124,7 +124,11 @@ class D17 extends Base { //// [undefinedIsSubtypeOfEverything.js] // undefined is a subtype of every other types, no errors expected below var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/underscoreMapFirst.js b/tests/baselines/reference/underscoreMapFirst.js index 3edb48cd2d1..4f3990b7b57 100644 --- a/tests/baselines/reference/underscoreMapFirst.js +++ b/tests/baselines/reference/underscoreMapFirst.js @@ -50,7 +50,11 @@ class MyView extends View { //// [underscoreMapFirst.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/underscoreThisInDerivedClass01.js b/tests/baselines/reference/underscoreThisInDerivedClass01.js index c7f30f0ec87..439c33df0ec 100644 --- a/tests/baselines/reference/underscoreThisInDerivedClass01.js +++ b/tests/baselines/reference/underscoreThisInDerivedClass01.js @@ -26,7 +26,11 @@ class D extends C { //// [underscoreThisInDerivedClass01.js] // @target es5 var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/underscoreThisInDerivedClass02.js b/tests/baselines/reference/underscoreThisInDerivedClass02.js index 89d3bf5a4f9..26f2796e4b0 100644 --- a/tests/baselines/reference/underscoreThisInDerivedClass02.js +++ b/tests/baselines/reference/underscoreThisInDerivedClass02.js @@ -20,7 +20,11 @@ class D extends C { //// [underscoreThisInDerivedClass02.js] // @target es5 var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/unionTypeEquivalence.js b/tests/baselines/reference/unionTypeEquivalence.js index bcb1f28f12b..1cafbc8d65c 100644 --- a/tests/baselines/reference/unionTypeEquivalence.js +++ b/tests/baselines/reference/unionTypeEquivalence.js @@ -21,7 +21,11 @@ var z1: string | typeof BC; //// [unionTypeEquivalence.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/unionTypeFromArrayLiteral.js b/tests/baselines/reference/unionTypeFromArrayLiteral.js index a908067574f..12d524f8616 100644 --- a/tests/baselines/reference/unionTypeFromArrayLiteral.js +++ b/tests/baselines/reference/unionTypeFromArrayLiteral.js @@ -29,7 +29,11 @@ var arr9 = [e, f]; // (E|F)[] // Otherwise, if the array literal is contextually typed by a type that has a property with the numeric name ‘0’, the resulting type is a tuple type constructed from the types of the element expressions. // Otherwise, the resulting type is an array type with an element type that is the union of the types of the element expressions. var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/unionTypesAssignability.js b/tests/baselines/reference/unionTypesAssignability.js index 38c991bed61..bf5c69f93e9 100644 --- a/tests/baselines/reference/unionTypesAssignability.js +++ b/tests/baselines/reference/unionTypesAssignability.js @@ -75,7 +75,11 @@ function foo(t: T, u: U) { //// [unionTypesAssignability.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/unknownSymbols1.js b/tests/baselines/reference/unknownSymbols1.js index 9fed0f3a716..3768213892a 100644 --- a/tests/baselines/reference/unknownSymbols1.js +++ b/tests/baselines/reference/unknownSymbols1.js @@ -34,7 +34,11 @@ class C5 { //// [unknownSymbols1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/unspecializedConstraints.js b/tests/baselines/reference/unspecializedConstraints.js index e4c102d882d..fbb4c157665 100644 --- a/tests/baselines/reference/unspecializedConstraints.js +++ b/tests/baselines/reference/unspecializedConstraints.js @@ -155,7 +155,11 @@ module ts { //// [unspecializedConstraints.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js b/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js index a651fdf7e8e..67e3d579dc4 100644 --- a/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js +++ b/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js @@ -45,7 +45,11 @@ c5(1); // error //// [untypedFunctionCallsWithTypeParameters1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/unusedClassesinNamespace4.js b/tests/baselines/reference/unusedClassesinNamespace4.js index bf5e996d2d2..af2c9d96f52 100644 --- a/tests/baselines/reference/unusedClassesinNamespace4.js +++ b/tests/baselines/reference/unusedClassesinNamespace4.js @@ -16,7 +16,11 @@ namespace Validation { //// [unusedClassesinNamespace4.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/unusedIdentifiersConsolidated1.js b/tests/baselines/reference/unusedIdentifiersConsolidated1.js index 6419fbe250b..7bea43688ad 100644 --- a/tests/baselines/reference/unusedIdentifiersConsolidated1.js +++ b/tests/baselines/reference/unusedIdentifiersConsolidated1.js @@ -104,7 +104,11 @@ namespace Greeter { //// [unusedIdentifiersConsolidated1.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/validUseOfThisInSuper.js b/tests/baselines/reference/validUseOfThisInSuper.js index b5eecf1720d..b32d9413bdf 100644 --- a/tests/baselines/reference/validUseOfThisInSuper.js +++ b/tests/baselines/reference/validUseOfThisInSuper.js @@ -11,7 +11,11 @@ class Super extends Base { //// [validUseOfThisInSuper.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/varArgsOnConstructorTypes.js b/tests/baselines/reference/varArgsOnConstructorTypes.js index 547260c6197..f9674ceb328 100644 --- a/tests/baselines/reference/varArgsOnConstructorTypes.js +++ b/tests/baselines/reference/varArgsOnConstructorTypes.js @@ -26,7 +26,11 @@ reg.register(B); //// [varArgsOnConstructorTypes.js] var __extends = (this && this.__extends) || function (d, b) { - Object.setPrototypeOf(d, b); + if (typeof Object.setPrototypeOf === "function") { + Object.setPrototypeOf(d, b); + } else { + d.__proto__ = b; + } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; From 570575ad43678509f94ce6cbc49b292be6440e9e Mon Sep 17 00:00:00 2001 From: vvakame Date: Sat, 3 Dec 2016 11:30:36 +0900 Subject: [PATCH 03/15] 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 fff52a8705e..72770307400 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 fb158c687ba..e244964048a 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 ec67e66bd3f..9df25d0ba4c 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 8e16f9ccc29..f2b1a7e5007 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 40eae697b44..612d1b47230 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 900f7aebcdd..f559b3c6123 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 fa137057be4..73ae1427571 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 b468f1307df..5fdaacd464c 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 aacadd6589f..024c25a909f 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 df8662ac8cf..d84a03277eb 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 a8606050394..031be503cff 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 2ce51261eaa..f0207e82c86 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 8e69665b03c..20b2028bbb1 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 cf96549def6..a8b77a8e6cb 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 d660bf2db67..00b7a231897 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 e81917ed8a3..fe73404e8b4 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 ee4a62008b1..17b73079f00 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 83c9bf080be..9a88c68421f 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 319d3a75d01..3af1905dc03 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 8cc81a46cd7..2f5a3f8147e 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 ba5d63e3579..dfc3414aef1 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 ac8ada2d86f..f2254fea530 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 a112a5a7a90..90aa6740f4b 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 9ce41a2563a..8d2fe2376a3 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 a14277c795b..37d0d1084f7 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 1e5dcd2e45e..d43db0f6376 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 e6e097c8b44..939878aa086 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 701811e33de..352e31d0851 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 e425ebf9337..b5e2cde6760 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 f241b28597d..fcc7e402296 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 eade43f4dc8..066f2e5ead2 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 36a024cbd3f..2d1d545bb42 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 eb727863c77..83f28340210 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 bff2b84f273..d0349f1734f 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 8aefc846d9b..b5d1804c1da 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 b21074b8ff3..ecec65f380f 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 95f585e8929..610d893c369 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 05dce80507d..5380e982fea 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 7785aa2b01f..e2346a74055 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 dbc0612153f..39faa9a62c4 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 fcbea350773..2fb80642d9e 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 91f212c9fd9..82a90a3c4de 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 a0fb08df8d2..b59fa359b8e 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 e4fa0fcc6b7..84dbed907d7 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 a90d4254c61..55bff7302db 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 d516e1e9b7b..9d7dcaefd29 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 9684189d565..29e4c9fdc4d 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 b1cb7c05ffc..8ccd2e5f335 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 5f7f6550ab9..e408805edb8 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 822c9584e1f..bb55cc0f9a4 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 e45b934f1ad..1962e4d8244 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 c5e124e638a..c43bfc7177f 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 1390eeb5a5d..0df9198a447 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 17c9242e6aa..18b903bea70 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 3d7d1167db5..1bf31ad9028 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 8674a9def64..704ddfe5adf 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 3173b6bd661..db8c0fa0b52 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 b1c387fb3e7..eca44c3c59f 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 1b7688262cb..c17b84f8594 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 c5d6bbf2401..00bf93a092d 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 062d50e8ad9..43f8e8964df 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 4b45f444f54..b4916cdbd65 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 6c8453c2348..cb313122a9a 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 769f74d39ae..b56e5a93206 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 cd65885b152..243022a81c2 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 fece927ea9c..d1dc6839b8f 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 143514be551..6fe42a69934 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 a080d62434f..642ded30216 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 2309600b2b8..1b9b1fd2b03 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 cc3838fd40d..76853f4a210 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 e6183330d97..4c2e04c46df 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 3040a118a75..d67fb3451f0 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 899128b6836..9bcf0ba1668 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 6f2d3213aeb..154b0c8c68d 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 92403f0cb6b..357ce10188c 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 704ff554a00..915055bc991 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 107d8274369..e9a60f8c713 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 f9fa0ba2b32..1d5967b96a9 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 addb71da717..c07390da7dd 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 486fe97f838..46406731e59 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 4681a422c8d..1c76bd43fb5 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 ebaef77181a..dbf585c86d2 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 96a0c1207be..22732bdc2b4 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 3b93e78aebd..13dd7957aeb 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 59cd1186ef9..c8b1d61aa9e 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 c63b2673713..9d46086bc70 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 421f3278489..56644d06a79 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 397d5a3a411..011df09e258 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 6cbf33cddff..c4e4b15bf3c 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 61ce64ef19b..3946dcb82de 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 8d0f9ad4069..6226c80750e 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 2433a6d3934..26fc8fcfe3d 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 b29e3f06503..6d480641484 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 10031b9c74e..898b475f5ff 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 1521745f951..e9208d7d783 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 24df98a089f..ca548e2ecd7 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 88a1ab19d14..b154c47f70c 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 86d4509310d..1243b967219 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 0d999b57a1a..7564c6274b3 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 3c9db5e28ac..b44fb0a1dc8 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 d2be7a12da2..b492f64c680 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 a81efb38bd0..c00c6ead988 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 7760490a244..e1f08388848 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 d14663b4edc..5cdf91d1b20 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 9ce3714c1bd..087a16b3525 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 9e1a855379c..642ab4671af 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 ff7f19fc68d..6b56f16547f 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 9a7d4551cf3..f144f13c5b8 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 adf590b6804..6c07a405804 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 45598142549..b3584f42511 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 187108fcf54..56d13af039d 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 4d63c45f2c9..7f529967cda 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 e5b5651153c..6babd7fb0b3 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 9e935e789e4..9777735d4a9 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 68167082021..b4329897528 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 fa433e139c7..2d6b25bea37 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 933c5162477..89ed5042964 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 e13cd6dee6e..29f029bd626 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 bef7ca9f8cf..a12b90dce44 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 e9df1ddf908..1a073528bad 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 a324fa1ce72..c42b937a85c 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 7cef2b247cc..7028383c349 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 5171dbc0085..d68d39a1acb 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 ad16e0aacaa..9dd314f8c1d 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 4e284b0c64c..603fd5d6997 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 3314583f338..087696113d4 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 0aeda35463f..756e5df939a 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 40fd20005e1..c6e50df32b0 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 631b5b38560..0b19e3d3aa7 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 a54c02f4b6b..941fc02a1ce 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 c2987ac066e..1e2eb13419a 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 8bce9236899..5c65f63cc03 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 23506947e9b..509433205e9 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 df822eff312..861d84ebbac 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 d05dd72e245..a80e58fe3cd 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 22596246d64..a872fe3165f 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 bdaaec468f8..09bddc4b22b 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 34c7467a864..49ddf4daa72 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 a9fb0919930..55f5b6863aa 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 89dd0bded24..1cb5c51e963 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 b23e0a13ba1..9bc92274b47 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 c3609f99b86..96dc9dea8c5 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 4a1b09ff350..aee0b38fef8 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 5563e859c6a..e327c76afcf 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 c88b0ccae0e..57ab3282526 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 1bb3fc7b705..88a39a07003 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 2242c6667a6..d7bf933004d 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 e761534649e..c725285a368 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 70a9b22ddbd..b9bbd23c538 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 258ad86c096..69beacb953b 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 81ef63068e6..adf4a62a9b8 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 355bf0af8af..d6909c50783 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 33512c60658..e63bf4d9ac5 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 ee582bddbc5..48b1298a545 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 e36a2a3cbad..6c8f5a8fe34 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 7413002635d..ccc2d90f5f3 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 0a7e21e8ca2..554148becf8 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 5b12a0f9a9d..211602b2c14 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 d3270d4db57..e80dc2b8ebb 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 691854bffb0..cba27b5f2e8 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 3053f86f345..afaf71ca9b2 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 bf522a88367..236804898c3 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 50e31f1d79c..0408116f8cf 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 8e4e7e7840d..44fceec0004 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 f208bd500cd..641b75e8688 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 4cff1bf0584..cc75533ef97 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 0a7cbce0c32..5fa26a64469 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 bf8a6024faa..0a9a731428d 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 f1e06f733e4..669202334b8 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 78a7b456924..983d756c8c0 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 d08b7fbf11b..f7cc1cd02c7 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 d1f29b650c6..f39f869018b 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 34cc2754746..fb481259bd3 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 0e3dc9f3d31..c63df9b0c9b 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 8d17fcbfe10..b918701f5a1 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 e7d1bef436e..a4812a00cc6 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 426b7cbaa65..8ac5c5be0b8 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 239a5cada1a..12f3c1e301d 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 89e8dd39169..f4a9d79af0f 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 7438ea49fd2..88319039ee6 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 132f811b49e..696da70eb93 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 63e448df3c1..3b4c663602d 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 e3145b8c0a1..a727f478603 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 383da77c550..d2bde183b8b 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 43bf2849333..b39e2375cb5 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 933e6ea66ff..a74e87bbfd5 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 c3a197e2a64..aa8b62c16e7 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 0a1e2be65e9..8f4f4b20a56 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 05cb517f9e0..170f5ba5dae 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 754abfd106e..e104a1f8e89 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 c1747ba54ff..fddad137136 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 9b6d7599516..06b273e9801 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 c7b62f9521f..6ca8645ee9e 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 c328a70455f..41ad9ead849 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 4f2addd338b..cb5e254d6b2 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 a8bac464ac3..b9389d26fc8 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 001a0656c91..5f5a3d7b565 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 4132399c970..13e2317bb6f 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 339edd29823..e8c04ace7ef 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 551b2644518..76d260f780d 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 5aca4c6583a..a3302dc70f9 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 063f4c72443..e202486ecec 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 706d2522cfb..be129d5f1ec 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 6c670b245c5..2f481a58bea 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 9a172c202b2..39cbbe78c00 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 c573962825b..0a6794472a1 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 9ee11aeb985..7788ee44382 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 2d7ca989a81..2e2bdd009d2 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 483c1ca4481..d362a5f04d9 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 f7465149b92..f0805f9617f 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 8d0e10f73f9..c1be3af34e1 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 f579968df06..402b19c0ff3 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 4f01f058b19..2d0bb3ce500 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 8f38d09160f..65fee8c91e4 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 cacaa587609..0a79b9be3bc 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 acda2589195..4fb5b585c99 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 8f0c53f66ac..e059e44f140 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 902ddc08bc0..19d59529486 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 31c8c3f722c..f92b9ab7c99 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 b948302a2d5..2fa9323295a 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 cf5454d704f..3fe81a587af 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 0d483a3eff6..da2abf23166 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 8306e702cb1..14549e8d9c4 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 c32560eca59..b88ce8d37ee 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 03addf8ace5..d44fc6a483d 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 0cfe6f3dd9d..8f8e913c82b 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 d18fd9d1a30..2825524d224 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 2d89040ff13..9d4c76a8384 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 2ef057082bd..6390636e09f 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 4a1f7c0cbeb..3ce6c5d1966 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 cdf1ab4cbbd..340aa0f5709 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 c7a90e31dfe..7238b7d1af3 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 3d3aacdf55b..6a79fd2d2a2 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 c5ea3722feb..b6cd5a284e4 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 bf9f1dbb574..05648a00507 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 d149d9f5aa9..a280316b639 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 2d48cf28728..2d32ece1375 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 b376364e542..64b6a1c995a 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 e5fe6eb2560..6c9ff2f36e7 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 5ac36e99b57..924526923f8 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 9994c1bfb05..9705b1e8d03 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 4183017f378..dd15ec7e66d 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 d21cb14bcc4..7a145b763c0 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 0acf65cd177..29cb878de46 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 696ebcc1f9e..79d26767df6 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 36f1dcc799b..38af357d6c3 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 afba93ccac6..6644fefcac4 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 c33bd3713fc..91224f98a5d 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 3e28aece101..926ca09274d 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 0c27e9b7f85..831cf209995 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 80613c66be8..79babde83e2 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 c0478a993c4..d7988562315 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 5d63f4f32af..fdec4c4e7be 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 22d641e3414..c87ad7d4189 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 f6f4ea759a6..e4ad120250f 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 3320b144f11..851a97663de 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 69691a62bb7..43d89076ade 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 ed9ac2d8dd5..42a2acf4317 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 e63005bfe1a..64227abe6b2 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 af87c3db821..68fa43fd64b 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 a20d939a794..e433f19ece3 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 11d494c6291..491bec40e74 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 9cd21f44685..d8f7f688ec0 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 e5d43bfaa9e..76485e8d91e 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 934b3bb6ef0..e83c10b59fd 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 4603ff26320..f144fbdbca8 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 285c96551b5..f453255379b 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 b3150a12bde..5242430513a 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 1ecd77668d3..d670758f324 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 73c19b72565..a2e55deaa26 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 bd3e01a7b29..08ad33d619b 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 28c5108f238..dc721dc343a 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 8a6da5f4fa7..f52b0382827 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 60f7a46a14f..57695fb5fcf 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 983c7220397..6578c4c9ce3 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 af5f78dfcec..f979a820f63 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 06326b54282..1e9681a0d3c 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 71555248556..502618d78ce 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 360c7775d35..887cb9c1feb 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 90ab9a3f96b..d03972b9f17 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 2ba55110f2e..938ab4daf87 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 31398cb2af9..5bb0709c13c 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 a91b1b78f07..94335364ec8 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 4854d715c32..2a19b4b841f 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 4cd1f1096f3..01a6a130823 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 fc3562ca339..a1aaf35748a 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 0cf8767aa58..1551b671b62 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 753aa2f0733..c0ef8541ad7 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 131fc2d36ab..53fb2472d05 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 055ef9d2f86..318f5aa1494 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 e4399d19037..dc5bf22658d 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 f86cc2da293..ce39f51d49c 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 01a11c7f90b..76d0f0854ea 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 d4303fa2037..645929e2c14 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 ab826e2916d..8d7098ba4f2 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 dbd654576ec..8219bf91c38 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 fa64843f29f..8563581f953 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 8345b3d93a7..85b09999c6a 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 2f8d09eae03..0097132b1e4 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 73fed8b3ea2..a956f444aec 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 8ec4552b70d..b51acfd80b4 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 9da46a15ef7..d17f3992c46 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 df9c113ceb5..3387beda5c4 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 f287a5f934c..f9d4979fb2a 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 892e6cc0217..f07c1f30594 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 03755b28683..a594644df6a 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 f5c12bacce8..d60d4c960bd 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 3c680337351..6ecbdcf8dae 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 d13e06a8ddd..df70516ad34 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 e1c4cab059c..f65447822c9 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 20a13d5718e..36262513319 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 b2332451507..fae7f381616 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 267666439b1..3d0e940eaa9 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 7fce4984d9c..552edc1f134 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 444043fbeac..c12bec69ba6 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 6a9f8ae1453..afb3477111f 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 fea4eee36fa..909b52ad0d6 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 3de32da45c0..1ddb27788d8 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 5d717358863..6aa751d7b54 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 87b22c74f6b..4ab1c3add23 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 68ecf9ede2b..21e99dfa07b 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 ea7c757e035..0f95c2d3dbb 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 0a9dcd4a780..06360b221b6 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 c7c575f5402..e48e51de44b 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 212bc7a54f7..9d655f401c7 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 8431a87ce03..61f715a2194 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 f44a0fcfce4..b4bc18ddb7f 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 45980beb09c..2fdfe55d22d 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 931525d4b6b..9a3c5e3cfeb 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 e7d2bdf2a2b..f9ba7ccc940 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 96a8e84ff60..bbcedbfa6b8 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 d95150bbccc..b8ffd010380 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 b1224117ede..b63252a4449 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 b9a7c5a336f..7cb4b76c740 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 0e5bff48a3b..4ad5c55dc62 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 bd4b70f7938..2fd7aa913d0 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 d72f85cf599..8f436ffd353 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 c6b32f6bc5d..e13c592eccb 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 fdc53cc7e9c..b593654036b 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 13e624a9d57..84c1f0d3a4c 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 243992d5bd3..b8cec2486d7 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 001f7b888e3..158c89d092e 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 33a35428b8e..a2c8a6b690e 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 0675aead222..bd0a9e55ba1 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 ec3e8519e62..2c7ae4fb6b6 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 e2e1d734001..0b604adae2a 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 50d6b108588..71a9731e828 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 871acd1d624..4c243028296 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 72f12c8f81f..1bf2fd4eed7 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 c58a0643a06..e35b3f24a5d 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 beba3dbdf5e..d1035ae3d48 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 d3f4b177e95..c51f321020d 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 d86d08e7add..778e7987f27 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 1decf45e015..a6afadefb3a 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 e9ea5d2f6a1..37b3113b855 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 dd2260ecf31..0d328df7c53 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 9a555ce218f..541cda8e1b2 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 e357eb6e01f..4ec01a1dc36 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 044db517290..74a86c64f8c 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 0c21f4a1af5..e1ac5204119 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 de05071c116..48cb36812a2 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 4c1ca7e00cb..f5130abe8bd 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 a351a84d98b..e60108ca25b 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 e9f362ead42..9abc3a38497 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 3d89d237ad5..925f5124753 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 512d8bbca57..f919c354e5e 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 4f7b0bead56..d6581fbfd09 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 57c7e5161b2..bf304bc0aab 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 7f4b0803382..791e72a6b4e 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 59ea1270155..938bf26dc44 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 338a60610a0..62de511b4c8 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 36e4719549a..d3d7b257465 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 f230544e492..9f7037048bd 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 0afae83d4b9..7b0865b0018 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 0b493aded80..a560df25986 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 699b924a854..3aa5f800d9c 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 04f341d1f06..c8a739a3a1f 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 8fa200638e4..9ed7be8e0f2 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 3380d5847a9..788b91f13c5 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 01982b322bb..ca25cdc9870 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 747e69d7c59..dddc8d56339 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 61e196daaa4..110cbba1ef6 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 319875eef2c..58092783f6e 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 c4343a67452..8fbe9a40728 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 44932a3ad14..a9f3b4b17ac 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 2a3510860ef..503a34c528c 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 0ae1f77a62a..b48fb3bbb3e 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 d8426a5ce28..e3273fd8115 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 c573190dc8b..d4f013e4ecc 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 ec1b72bf5d7..4b6457fe1dd 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 ac82060f270..3207ae8f8c5 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 31c3deff6d1..6a01a6cdd78 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 aa832f39416..54016af34af 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 00a4f417804..5a421d7d3f4 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 a12c2af9439..c57f7af6579 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 7a36ad10376..6fda8588f43 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 4122bcb40ee..2036f81bf92 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 1ac0e7db55d..0f86ca802a6 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 e08985796c3..1253860daa6 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 45cf29fd567..76011cee442 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 270ea7f3bfc..1dab2ae6fb8 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 2f2be923f17..b571573c18f 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 85556b4c83d..0dbcc5308c8 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 8958392fe78..0b4f1be5361 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 5ce85e4c5eb..d4e12eddd27 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 3f251e47029..0d6589f09e3 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 05dfd4bc818..8f9acd3615c 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 9518317f230..e995999e04b 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 a5b93a32853..81521fccedf 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 14a70059adc..c66084b049f 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 0d3ebae0bb8..e0cfd4b3be1 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 4fa90889d81..97f8179bfb1 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 6ca413637f5..740c9af666b 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 6758afd5cb3..fe72b6d409a 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 370c71533fb..9cd95ea9629 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 e13ea6a702d..927fbd25854 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 b0af91c92f8..4d89325803d 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 91507916a55..7f606887baa 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 bc60d2507b0..cfa9364bb68 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 62058c1ecb3..5a7bb5441dd 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 8a28677dbbf..867360fc49e 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 75af3bb54ac..ef5e9e9dcab 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 4a7552bcde8..db9191cedf7 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 e5a439aea1a..fa08e14d135 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 c5f6da0fdf5..d8b543ef727 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 c3e619a4c2d..f035719a690 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 8377a62f2c7..c4f19ef0ed7 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 ae8e1178be5..0888083df42 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 43468e15fd8..ab91c99f6ff 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 5e8d70d3d6e..d6d4ce137e6 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 c4ac235a671..53b6b904997 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 58807808f5c..0400ee2bb88 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 bb1fce13a0a..4b026d8c062 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 16bdd16eaa2..dcacbc4f9ec 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 4b7e487466c..89953cb378a 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 d52d97cefc7..981ad6358a0 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 3b666b2351b..4afdf483f2a 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 f1cc4b05a40..8372f54c40c 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 a82e4eb8ea7..7a29c55629a 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 3c80c2bfd16..d95819d1e45 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 5ba4ba4d96d..de26b5b2b3b 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 4ce80bdec21..47c15c9f6bf 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 ac58fb23342..4dd54e974cb 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 fa85ee2659c..4e3c3e84243 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 a77e0867d59..e5ae42ec1eb 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 23820f706df..eb698fd236f 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 d81e0e7cf65..d45ef8894b0 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 34f0bce2d1c..f69ce2ad600 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 9eb5a995637..ec6a0479169 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 99cfeb0c61f..69e53b2974d 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 b34364d5b9e..ac24d025b84 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 25112efe231..ea095e52c69 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 23ea8da3d5c..9f4f4fc2f70 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 ac60a5b18ad..16fe9508c2a 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 b57b3a8bff6..1c666d92c9d 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 f8bd04cde38..b43a5a5a2c9 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 2aa2efbba10..4c00a4fb3ea 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 c310bf6e77d..be90775cf0b 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 68feed955d3..1802f61717c 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 4824da462ad..d74a59d5ac2 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 63e8172576a..bbdcd5a4338 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 3df2708569c..d1efc894fc3 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 239d0a4281b..6f9b717888d 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 d21d13070d8..319f4fac001 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 e7e1e468aed..974dcb477f5 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 93d8685224b..3ab7685aec4 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 93d8685224b..3ab7685aec4 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 f80f316d3c8..08697664279 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 f80f316d3c8..08697664279 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 65483bd492a..dd192c40863 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 65483bd492a..dd192c40863 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 9d65b48702e..87f12dd7242 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 3da9b5cc647..89c6ed0efe9 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 cc874197c3c..346024cf470 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 bcaa1458325..c4d0a8e8ac4 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 8cc85faa100..4d677b85396 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 babef969a10..e0a051b3096 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 3a3013d6704..26d42b7b658 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 3c59a316d71..af3440f9fb8 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 fb818c42c7e..ba4c9f079f8 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 20984b107b9..8b45c46ec83 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 c906f456d67..682ff897e52 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 d2e8bfe47ce..f0553d72184 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 e0ad17934c3..76bb5d10455 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 37ddb2b0d2c..f694c9f301d 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 3fc3b29ff45..11c49dbb28d 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 a3a46c4e14f..eb268d9aafe 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 bd89b8c6574..435f87a6b1a 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 f89b52e719f..5790cabf7d8 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 05a72e11213..c9a7d685322 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 b0a11841dd8..b62f9f6622f 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 bfd014a3fe1..5c5d01c453d 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 11eb4f8ba8f..e03965b23ea 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 5bb43de1b9f..d8a6d74f0a8 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 c9b3dfb6d7a..9544c60b9f5 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 e7ce63794fd..e7c3ce7a3ce 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 37ba6aab5d4..db5486b1af7 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 d81c9a0e2a7..bdea9b287bb 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 2f2c4a3fdb5..625028055b4 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 3488ebd8ac0..b62ef87dadc 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 67013c3922e..3fdc1795c32 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 7bb90a136ba..237faa00fe3 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 d2061241cac..6090536a099 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 251622f1308..d842185b47c 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 07be6489141..b5216c1c168 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 cb083f766e8..2ca29e33e91 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 2560437b43d..76d6da2d5d2 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 0ea23b1b850..d1bf0a0d636 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 e9e4a286eb6..63ea3a01253 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 181c8aa9659..91fa33abd51 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 6634d3c3519..ee1f12df69e 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 10519dace00..241ebc529fb 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 0598932c4bb..71165d41360 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 f15efc6e765..ec075461129 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 6f13aac7608..fdf72090f2f 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 adcc83a1841..dd9341b4a42 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 2d42c1e4d79..8abd40b7eb5 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 a3b5ecaeb26..034b55ee1fc 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 1aa94ba7c99..b2f4f3eca49 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 05cc496f25a..413f915a618 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 5c06121d5a2..23c51619c80 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 6b82e0d4841..0e16d43f216 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 49405cbd070..f17007cba42 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 2e526d41fba..e6030bdb12d 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 867beb93596..24914baf2ed 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 f13a56664ce..f1153675c91 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 32f9b33fc71..10246582f12 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 2c177201732..7d3f9516c29 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 065d312c086..39f4e91f011 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 1c1ade16a08..994c5597569 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 2c0da66f8c9..25963e70449 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 1881825eb24..304dbee9e61 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 263bb117d34..0733679a120 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 03d7228b2f9..4b41ee1aaa7 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 0eb506d3210..976a7e1b8cd 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 f171736911b..9c2e2257112 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 bffca920982..042684e0c04 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 0ff4b73c848..23e7dbe37b6 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 347df7c1720..e17f0308609 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 bbf1862bd0f..a801d126895 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 d437c923fe6..bc1160411ae 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 b8a679c4c8d..cac924a6b69 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 f2f6ccbaf4a..1c37353813c 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 021589c1e79..b1476e5c8e6 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 e62db8c823b..c9208194e37 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 ec83550a9f0..a37a07439be 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 f1407cac107..6fa77382691 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 151e9da2f15..9990b5e7e1a 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 7655b2df83b..a7ef99d67cc 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 34555c677ba..90156d199d5 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 9fc2987e96e..e42decf54e8 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 1f3b0040e49..8477c576c77 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 740f90d2e2b..a5e291b9543 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 65d95769c40..69a54894cc4 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 b5e454139c0..51c4c727769 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 464c879212e..1b17766faf6 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 6ebe47532c8..159fa8786b3 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 19e480378a4..ccf1bf3746a 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 48855cb0d11..f109d657654 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 abfe5294a93..76fd322d519 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 dbea09ebced..737f51d9e27 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 104f8821dca..cbd8398a20a 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 4f7a0087ab1..71ef0041452 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 01bce40d204..1d6b849ae5e 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 613997e789f..e479206f9c5 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 0e1f3fbd837..9e4b98997c9 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 132cb003921..f71add3806a 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 bbb0871d385..5363dedff60 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 4469c918b31..c074252a692 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 ae7f053e5d4..5cd354a24b4 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 766c121d42b..27ecd48bf68 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 47292405faf..e974d75176b 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 707757b37b6..1b02c20b7a5 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 9b9681b2dee..86c1dae1a1c 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 bf8f9bd5e02..30d3494689a 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 869dfde8e51..a98e1fdb089 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 1e040f627c8..384b83c7239 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 77f55772b69..32369a7fc85 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 c532b4556c8..eee25fd2acc 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 eb92e66a131..39e8098407c 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 f15bdde29e2..77d6a4b1c12 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 98f1d0a190c..1b9c056d3b2 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 d60310be5e7..5506bedbcb6 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 d2829eba561..e91603f20d8 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 e8f4dd3f872..4e67455900a 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 3c5aaf9b843..c933334a506 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 ff11a4c1b65..61f98885443 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 8e23bfb25c4..645007e5a09 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 5e83df296d2..f0e9cacf8aa 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 51a4f93a4e4..8b7c07a27a5 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 3744e797615..349ead6b381 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 9f76cc1ecff..6e09952749c 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 077affd0eda..d7bab4380b4 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 05a7fafb046..d2754225e5b 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 e31370d0acd..c146e495c80 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 d359aa91628..a0faadf78a6 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 6b16742cca2..1b969e26547 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 68579bb2368..ee517c6e36f 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 b8120fe732c..80795c91e67 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 3adc1c2a5b3..f5e4e131cfc 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 f310654acae..663826999d3 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 b0f4d62c746..abba0499608 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 ae95aac22b5..27aae06ccf8 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 2591f9fe019..ca9eeb60fee 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 b6c5295b482..9c5c848b781 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 3a1ac6d2246..a895c2ec4dd 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 f584dbf960a..845eb400818 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 bf3ab5d4a69..7e1511af79a 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 fefa118d704..7867bea3873 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 29f4e78100e..5f594b4d1d5 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 75284a28702..c3ed400f65c 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 215046ba2b6..93b810483b6 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 e3cf89b0800..e9ab0f69449 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 f16b6d1ce5a..b38de5abcd2 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 3e9b8f08cd4..4a1f85e3e71 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 ffe263f9985..ce30137e322 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 a1d1b7842d4..c3e2d851db2 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 7ec705bdc2d..753a41b8e42 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 67d216d0f58..55d28ea2a58 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 88d0ac11a09..f9b90888a92 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 6dc97fb0152..1e96d089f1b 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 fbc2f23e547..0212d05c523 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 e4c7925a90b..9a75ed6616d 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 9ac69544460..f02a7c7de79 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 062ac61fd51..8b40f439ba2 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 e77c3b6e0d4..97627b41f10 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 5d15b09720f..6a189dc0ace 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 d274169391f..bf929f42c6a 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 745e2dffe00..2bdb91818a2 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 c66ed5fbfd4..467781c8c26 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 c72115d0dfc..0220bda6f9b 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 46f9d7dc7f9..929472aefee 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 d011126edeb..3403dc447a6 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 79cd99f249d..29c7eb186fa 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 a96a892e9a2..60fa6a01f63 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 aa4fac8d6eb..fbfe9f3b466 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 4f3990b7b57..760cc6a1ba7 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 439c33df0ec..2828c8dc287 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 26f2796e4b0..4d7a69b60c5 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 1cafbc8d65c..9de5ad9d470 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 12d524f8616..f6c1489ceee 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 bf5c69f93e9..8fc5f1e8f71 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 3768213892a..c64cc7224ba 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 fbb4c157665..ddc7d6e7598 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 67e3d579dc4..c46afba6440 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 af2c9d96f52..e3af0dd8567 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 7bea43688ad..37317f9fbe9 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 b32d9413bdf..a80a72f434a 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 f9674ceb328..9cb0dc77811 100644 --- a/tests/baselines/reference/varArgsOnConstructorTypes.js +++ b/tests/baselines/reference/varArgsOnConstructorTypes.js @@ -25,12 +25,12 @@ reg.register(B); //// [varArgsOnConstructorTypes.js] +var __extendStatics = (this && this.__extendStatics) || + Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; var __extends = (this && this.__extends) || function (d, b) { - if (typeof Object.setPrototypeOf === "function") { - Object.setPrototypeOf(d, b); - } else { - d.__proto__ = b; - } + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; From 074f2b7636102003acfaa54cdc9a4b86dbf5e50c Mon Sep 17 00:00:00 2001 From: vvakame Date: Thu, 8 Dec 2016 23:02:59 +0900 Subject: [PATCH 04/15] catch up --- .../reference/superPropertyInConstructorBeforeSuperCall.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/baselines/reference/superPropertyInConstructorBeforeSuperCall.js b/tests/baselines/reference/superPropertyInConstructorBeforeSuperCall.js index 15bc0c40f37..1686be4e2e9 100644 --- a/tests/baselines/reference/superPropertyInConstructorBeforeSuperCall.js +++ b/tests/baselines/reference/superPropertyInConstructorBeforeSuperCall.js @@ -16,8 +16,12 @@ class C2 extends B { } //// [superPropertyInConstructorBeforeSuperCall.js] +var __extendStatics = (this && this.__extendStatics) || + Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + __extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; From c09a8c91a29bd5788c732b7f8c486b39eb17f342 Mon Sep 17 00:00:00 2001 From: vvakame Date: Thu, 8 Dec 2016 23:33:06 +0900 Subject: [PATCH 05/15] address review comment --- src/compiler/transformers/es2015.ts | 19 +- ...sClassHeritageListMemberTypeAnnotations.js | 19 +- ...accessibleTypeInTypeParameterConstraint.js | 19 +- .../reference/abstractClassInLocalScope.js | 19 +- .../abstractClassInLocalScopeIsAbstract.js | 19 +- tests/baselines/reference/abstractProperty.js | 19 +- .../reference/abstractPropertyNegative.js | 19 +- .../accessOverriddenBaseClassMember1.js | 19 +- .../accessors_spec_section-4.5_inference.js | 19 +- .../reference/aliasUsageInAccessorsOfClass.js | 19 +- .../baselines/reference/aliasUsageInArray.js | 19 +- .../aliasUsageInFunctionExpression.js | 19 +- .../reference/aliasUsageInGenericFunction.js | 19 +- .../reference/aliasUsageInIndexerOfClass.js | 19 +- .../reference/aliasUsageInObjectLiteral.js | 19 +- .../reference/aliasUsageInOrExpression.js | 19 +- ...aliasUsageInTypeArgumentOfExtendsClause.js | 38 +- .../reference/aliasUsageInVarAssignment.js | 19 +- .../reference/ambiguousOverloadResolution.js | 19 +- .../reference/apparentTypeSubtyping.js | 19 +- .../reference/apparentTypeSupertype.js | 19 +- .../reference/arrayAssignmentTest1.js | 19 +- .../reference/arrayAssignmentTest2.js | 19 +- .../reference/arrayBestCommonTypes.js | 19 +- .../reference/arrayLiteralTypeInference.js | 19 +- tests/baselines/reference/arrayLiterals.js | 19 +- .../arrayLiteralsWithRecursiveGenerics.js | 19 +- ...rayOfSubtypeIsAssignableToReadonlyArray.js | 19 +- .../reference/arrowFunctionContexts.js | 19 +- .../assignmentCompatWithCallSignatures3.js | 19 +- .../assignmentCompatWithCallSignatures4.js | 19 +- .../assignmentCompatWithCallSignatures5.js | 19 +- .../assignmentCompatWithCallSignatures6.js | 19 +- ...ssignmentCompatWithConstructSignatures3.js | 19 +- ...ssignmentCompatWithConstructSignatures4.js | 19 +- ...ssignmentCompatWithConstructSignatures5.js | 19 +- ...ssignmentCompatWithConstructSignatures6.js | 19 +- .../assignmentCompatWithNumericIndexer.js | 19 +- .../assignmentCompatWithNumericIndexer3.js | 19 +- .../assignmentCompatWithObjectMembers4.js | 19 +- ...nmentCompatWithObjectMembersOptionality.js | 19 +- ...mentCompatWithObjectMembersOptionality2.js | 19 +- .../assignmentCompatWithStringIndexer.js | 19 +- .../reference/assignmentLHSIsValue.js | 19 +- .../reference/asyncImportedPromise_es5.js | 19 +- tests/baselines/reference/autolift4.js | 19 +- tests/baselines/reference/baseCheck.js | 19 +- .../reference/baseIndexSignatureResolution.js | 19 +- .../reference/baseTypeOrderChecking.js | 19 +- .../baseTypeWrappingInstantiationChain.js | 19 +- tests/baselines/reference/bases.js | 19 +- .../bestCommonTypeOfConditionalExpressions.js | 19 +- ...bestCommonTypeOfConditionalExpressions2.js | 19 +- .../reference/bestCommonTypeOfTuple2.js | 19 +- ...allSignatureAssignabilityInInheritance2.js | 19 +- ...allSignatureAssignabilityInInheritance3.js | 19 +- ...allSignatureAssignabilityInInheritance4.js | 19 +- ...allSignatureAssignabilityInInheritance5.js | 19 +- ...allSignatureAssignabilityInInheritance6.js | 19 +- tests/baselines/reference/callWithSpread.js | 19 +- .../reference/captureThisInSuperCall.js | 19 +- tests/baselines/reference/castingTuple.js | 19 +- .../baselines/reference/chainedAssignment3.js | 19 +- ...arameterConstrainedToOtherTypeParameter.js | 19 +- .../reference/checkForObjectTooStrict.js | 19 +- .../checkSuperCallBeforeThisAccessing1.js | 19 +- .../checkSuperCallBeforeThisAccessing2.js | 19 +- .../checkSuperCallBeforeThisAccessing3.js | 19 +- .../checkSuperCallBeforeThisAccessing4.js | 19 +- .../checkSuperCallBeforeThisAccessing5.js | 19 +- .../checkSuperCallBeforeThisAccessing6.js | 19 +- .../checkSuperCallBeforeThisAccessing7.js | 19 +- .../checkSuperCallBeforeThisAccessing8.js | 19 +- .../reference/circularImportAlias.js | 19 +- .../circularTypeofWithFunctionModule.js | 19 +- .../classAbstractConstructorAssignability.js | 19 +- .../reference/classAbstractCrashedOnce.js | 19 +- .../reference/classAbstractExtends.js | 19 +- .../reference/classAbstractFactoryFunction.js | 19 +- .../reference/classAbstractGeneric.js | 19 +- .../reference/classAbstractInAModule.js | 19 +- .../reference/classAbstractInheritance.js | 19 +- .../reference/classAbstractInstantiations1.js | 19 +- .../reference/classAbstractInstantiations2.js | 19 +- .../classAbstractOverrideWithAbstract.js | 19 +- .../reference/classAbstractSuperCalls.js | 19 +- .../classAbstractUsingAbstractMethod1.js | 19 +- .../classAbstractUsingAbstractMethods2.js | 19 +- .../classConstructorAccessibility2.js | 19 +- .../classConstructorAccessibility4.js | 19 +- .../classConstructorAccessibility5.js | 19 +- ...classConstructorParametersAccessibility.js | 19 +- ...lassConstructorParametersAccessibility2.js | 19 +- ...lassConstructorParametersAccessibility3.js | 19 +- ...clarationMergedInModuleWithContinuation.js | 19 +- .../classDeclaredBeforeClassFactory.js | 19 +- .../classDoesNotDependOnBaseTypes.js | 19 +- tests/baselines/reference/classExpression2.js | 19 +- tests/baselines/reference/classExpression3.js | 19 +- .../classExpressionExtendingAbstractClass.js | 19 +- .../reference/classExtendingBuiltinType.js | 19 +- .../reference/classExtendingClass.js | 19 +- .../reference/classExtendingClassLikeType.js | 19 +- .../reference/classExtendingNonConstructor.js | 19 +- .../baselines/reference/classExtendingNull.js | 19 +- .../reference/classExtendingPrimitive.js | 19 +- .../reference/classExtendingPrimitive2.js | 19 +- .../reference/classExtendingQualifiedName.js | 19 +- .../reference/classExtendingQualifiedName2.js | 19 +- .../reference/classExtendsAcrossFiles.js | 38 +- ...sMergedWithModuleNotReferingConstructor.js | 19 +- ...tendsClauseClassNotReferringConstructor.js | 19 +- .../reference/classExtendsEveryObjectType.js | 19 +- .../reference/classExtendsEveryObjectType2.js | 19 +- .../reference/classExtendsInterface.js | 19 +- .../classExtendsInterfaceInExpression.js | 19 +- .../classExtendsInterfaceInModule.js | 19 +- .../baselines/reference/classExtendsItself.js | 19 +- .../reference/classExtendsItselfIndirectly.js | 19 +- .../classExtendsItselfIndirectly2.js | 19 +- .../classExtendsItselfIndirectly3.js | 114 +-- .../classExtendsMultipleBaseClasses.js | 19 +- tests/baselines/reference/classExtendsNull.js | 19 +- ...classExtendsShadowedConstructorFunction.js | 19 +- .../classExtendsValidConstructorFunction.js | 19 +- .../classHeritageWithTrailingSeparator.js | 19 +- .../reference/classImplementsClass2.js | 19 +- .../reference/classImplementsClass3.js | 19 +- .../reference/classImplementsClass4.js | 19 +- .../reference/classImplementsClass5.js | 19 +- .../reference/classImplementsClass6.js | 19 +- tests/baselines/reference/classIndexer3.js | 19 +- tests/baselines/reference/classInheritence.js | 19 +- .../reference/classIsSubtypeOfBaseType.js | 19 +- tests/baselines/reference/classOrder2.js | 19 +- tests/baselines/reference/classOrderBug.js | 19 +- .../reference/classSideInheritance1.js | 19 +- .../reference/classSideInheritance2.js | 19 +- .../reference/classSideInheritance3.js | 19 +- tests/baselines/reference/classUpdateTests.js | 19 +- .../classWithBaseClassButNoConstructor.js | 19 +- .../reference/classWithConstructors.js | 19 +- .../reference/classWithProtectedProperty.js | 19 +- .../reference/classWithStaticMembers.js | 19 +- tests/baselines/reference/classdecl.js | 19 +- .../reference/clodulesDerivedClasses.js | 19 +- ...llisionSuperAndLocalFunctionInAccessors.js | 19 +- ...isionSuperAndLocalFunctionInConstructor.js | 19 +- .../collisionSuperAndLocalFunctionInMethod.js | 19 +- ...ollisionSuperAndLocalFunctionInProperty.js | 19 +- .../collisionSuperAndLocalVarInAccessors.js | 19 +- .../collisionSuperAndLocalVarInConstructor.js | 19 +- .../collisionSuperAndLocalVarInMethod.js | 19 +- .../collisionSuperAndLocalVarInProperty.js | 19 +- .../collisionSuperAndNameResolution.js | 19 +- .../reference/collisionSuperAndParameter.js | 19 +- .../reference/collisionSuperAndParameter1.js | 19 +- ...perAndPropertyNameAsConstuctorParameter.js | 19 +- ...xpressionAndLocalVarWithSuperExperssion.js | 19 +- .../reference/commentsInheritance.js | 19 +- .../comparisonOperatorWithIdenticalObjects.js | 19 +- ...ithNoRelationshipObjectsOnCallSignature.js | 19 +- ...lationshipObjectsOnConstructorSignature.js | 19 +- ...thNoRelationshipObjectsOnIndexSignature.js | 19 +- ...nshipObjectsOnInstantiatedCallSignature.js | 19 +- ...jectsOnInstantiatedConstructorSignature.js | 19 +- ...peratorWithSubtypeObjectOnCallSignature.js | 19 +- ...WithSubtypeObjectOnConstructorSignature.js | 19 +- ...eratorWithSubtypeObjectOnIndexSignature.js | 19 +- ...ubtypeObjectOnInstantiatedCallSignature.js | 19 +- ...bjectOnInstantiatedConstructorSignature.js | 19 +- ...isonOperatorWithSubtypeObjectOnProperty.js | 19 +- .../reference/complexClassRelationships.js | 19 +- ...catedGenericRecursiveBaseClassReference.js | 19 +- .../reference/compoundAssignmentLHSIsValue.js | 19 +- ...poundExponentiationAssignmentLHSIsValue.js | 19 +- .../reference/computedPropertyNames24_ES5.js | 19 +- .../reference/computedPropertyNames25_ES5.js | 19 +- .../reference/computedPropertyNames26_ES5.js | 19 +- .../reference/computedPropertyNames27_ES5.js | 19 +- .../reference/computedPropertyNames28_ES5.js | 19 +- .../reference/computedPropertyNames30_ES5.js | 19 +- .../reference/computedPropertyNames31_ES5.js | 19 +- .../reference/computedPropertyNames43_ES5.js | 19 +- .../reference/computedPropertyNames44_ES5.js | 19 +- .../reference/computedPropertyNames45_ES5.js | 19 +- .../conditionalOperatorWithIdenticalBCT.js | 19 +- .../conditionalOperatorWithoutIdenticalBCT.js | 19 +- .../reference/constantOverloadFunction.js | 19 +- .../constantOverloadFunctionNoSubtypeError.js | 19 +- ...nstraintCheckInGenericBaseTypeReference.js | 19 +- ...uctSignatureAssignabilityInInheritance2.js | 19 +- ...uctSignatureAssignabilityInInheritance3.js | 19 +- ...uctSignatureAssignabilityInInheritance4.js | 19 +- ...uctSignatureAssignabilityInInheritance5.js | 19 +- ...uctSignatureAssignabilityInInheritance6.js | 19 +- tests/baselines/reference/constructorArgs.js | 19 +- ...uctorFunctionTypeIsAssignableToBaseType.js | 19 +- ...ctorFunctionTypeIsAssignableToBaseType2.js | 19 +- .../constructorHasPrototypeProperty.js | 19 +- .../reference/constructorOverloads2.js | 19 +- .../reference/constructorOverloads3.js | 19 +- .../reference/constructorWithCapturedSuper.js | 19 +- ...constructorWithIncompleteTypeAnnotation.js | 19 +- .../contextualTypingArrayOfLambdas.js | 19 +- ...contextualTypingOfConditionalExpression.js | 19 +- ...ontextualTypingOfConditionalExpression2.js | 19 +- ...urcePropertyIsRelatableToTargetProperty.js | 19 +- .../reference/declFileClassExtendsNull.js | 19 +- .../declFileForFunctionTypeAsTypeParameter.js | 19 +- ...ileGenericClassWithGenericExtendedClass.js | 19 +- .../reference/declFileGenericType.js | 19 +- .../reference/declFileGenericType2.js | 19 +- ...lictingWithClassReferredByExtendsClause.js | 19 +- ...dsClauseThatHasItsContainerNameConflict.js | 19 +- .../declarationEmitExpressionInExtends.js | 19 +- .../declarationEmitExpressionInExtends2.js | 19 +- .../declarationEmitExpressionInExtends3.js | 19 +- .../declarationEmitExpressionInExtends4.js | 19 +- .../declarationEmitNameConflicts3.js | 19 +- .../declarationEmitProtectedMembers.js | 19 +- .../declarationEmitThisPredicates01.js | 19 +- ...tionEmitThisPredicatesWithPrivateName01.js | 19 +- .../reference/declareDottedExtend.js | 19 +- .../reference/decoratorOnClassConstructor2.js | 19 +- .../reference/decoratorOnClassConstructor3.js | 19 +- .../reference/decoratorOnClassMethod12.js | 19 +- ...edClassConstructorWithExplicitReturns01.js | 19 +- ...assConstructorWithExplicitReturns01.js.map | 2 +- ...tructorWithExplicitReturns01.sourcemap.txt | 281 +++---- ...derivedClassConstructorWithoutSuperCall.js | 19 +- ...ClassFunctionOverridesBaseClassAccessor.js | 19 +- .../derivedClassIncludesInheritedMembers.js | 19 +- ...idesIndexersWithAssignmentCompatibility.js | 19 +- .../derivedClassOverridesPrivateFunction1.js | 19 +- .../derivedClassOverridesPrivates.js | 19 +- .../derivedClassOverridesProtectedMembers.js | 19 +- .../derivedClassOverridesProtectedMembers2.js | 19 +- .../derivedClassOverridesProtectedMembers3.js | 19 +- .../derivedClassOverridesProtectedMembers4.js | 19 +- .../derivedClassOverridesPublicMembers.js | 19 +- .../derivedClassOverridesWithoutSubtype.js | 19 +- .../derivedClassParameterProperties.js | 19 +- ...dClassSuperCallsInNonConstructorMembers.js | 19 +- .../derivedClassSuperCallsWithThisArg.js | 19 +- .../reference/derivedClassTransitivity.js | 19 +- .../reference/derivedClassTransitivity2.js | 19 +- .../reference/derivedClassTransitivity3.js | 19 +- .../reference/derivedClassTransitivity4.js | 19 +- .../reference/derivedClassWithAny.js | 19 +- ...ivateInstanceShadowingProtectedInstance.js | 19 +- ...hPrivateInstanceShadowingPublicInstance.js | 19 +- ...thPrivateStaticShadowingProtectedStatic.js | 19 +- ...sWithPrivateStaticShadowingPublicStatic.js | 19 +- .../derivedClassWithoutExplicitConstructor.js | 19 +- ...derivedClassWithoutExplicitConstructor2.js | 19 +- ...derivedClassWithoutExplicitConstructor3.js | 19 +- tests/baselines/reference/derivedClasses.js | 19 +- .../reference/derivedGenericClassWithAny.js | 19 +- ...sesHiddenBaseCallViaSuperPropertyAccess.js | 19 +- .../derivedTypeDoesNotRequireExtendsClause.js | 19 +- .../destructuringParameterDeclaration5.js | 19 +- ...BeforeEmitParameterPropertyDeclaration1.js | 19 +- ...SuperCallBeforeEmitPropertyDeclaration1.js | 19 +- ...arationAndParameterPropertyDeclaration1.js | 19 +- .../reference/emitThisInSuperMethodCall.js | 19 +- tests/baselines/reference/emptyModuleName.js | 19 +- ...rorForwardReferenceForwadingConstructor.js | 19 +- tests/baselines/reference/errorSuperCalls.js | 19 +- .../reference/errorSuperPropertyAccess.js | 19 +- .../reference/errorsInGenericTypeReference.js | 19 +- .../reference/es6ClassSuperCodegenBug.js | 19 +- tests/baselines/reference/es6ClassTest.js | 19 +- tests/baselines/reference/es6ClassTest2.js | 19 +- tests/baselines/reference/es6ClassTest7.js | 19 +- .../exportAssignmentOfGenericType1.js | 19 +- .../exportDeclarationInInternalModule.js | 19 +- tests/baselines/reference/extBaseClass1.js | 19 +- tests/baselines/reference/extBaseClass2.js | 19 +- .../extendAndImplementTheSameBaseType.js | 19 +- .../extendAndImplementTheSameBaseType2.js | 19 +- .../extendBaseClassBeforeItsDeclared.js | 19 +- .../extendClassExpressionFromModule.js | 19 +- .../extendConstructSignatureInInterface.js | 19 +- .../reference/extendNonClassSymbol1.js | 19 +- .../reference/extendNonClassSymbol2.js | 19 +- .../extendPrivateConstructorClass.js | 19 +- ...xtendingClassFromAliasAndUsageInIndexer.js | 38 +- .../reference/extendsClauseAlreadySeen.js | 19 +- .../reference/extendsClauseAlreadySeen2.js | 19 +- tests/baselines/reference/fluentClasses.js | 19 +- tests/baselines/reference/for-inStatements.js | 19 +- .../reference/for-inStatementsInvalid.js | 19 +- .../forStatementsMultipleInvalidDecl.js | 19 +- .../reference/functionImplementationErrors.js | 19 +- .../reference/functionImplementations.js | 19 +- .../reference/functionSubtypingOfVarArgs.js | 19 +- .../reference/functionSubtypingOfVarArgs2.js | 19 +- .../reference/generatedContextualTyping.js | 19 +- .../genericBaseClassLiteralProperty.js | 19 +- .../genericBaseClassLiteralProperty2.js | 19 +- ...allWithConstraintsTypeArgumentInference.js | 19 +- .../genericCallWithObjectTypeArgs2.js | 19 +- ...icCallWithObjectTypeArgsAndConstraints2.js | 19 +- ...icCallWithObjectTypeArgsAndConstraints3.js | 19 +- .../genericCallbacksAndClassHierarchy.js | 19 +- .../genericClassExpressionInFunction.js | 19 +- ...sInheritsConstructorFromNonGenericClass.js | 19 +- ...cClassPropertyInheritanceSpecialization.js | 19 +- .../reference/genericClassStaticMethod.js | 19 +- tests/baselines/reference/genericClasses3.js | 19 +- ...genericConstraintOnExtendedBuiltinTypes.js | 19 +- ...enericConstraintOnExtendedBuiltinTypes2.js | 19 +- .../genericDerivedTypeWithSpecializedBase.js | 19 +- .../genericDerivedTypeWithSpecializedBase2.js | 19 +- .../genericInheritedDefaultConstructors.js | 19 +- .../reference/genericPrototypeProperty2.js | 19 +- .../reference/genericPrototypeProperty3.js | 19 +- ...ericRecursiveImplicitConstructorErrors2.js | 19 +- ...ericRecursiveImplicitConstructorErrors3.js | 19 +- .../reference/genericTypeAssertions2.js | 19 +- .../reference/genericTypeAssertions4.js | 19 +- .../reference/genericTypeAssertions6.js | 19 +- .../reference/genericTypeConstraints.js | 19 +- ...genericTypeReferenceWithoutTypeArgument.js | 19 +- ...enericTypeReferenceWithoutTypeArgument2.js | 19 +- .../genericWithIndexerOfTypeParameterType2.js | 19 +- .../reference/heterogeneousArrayLiterals.js | 19 +- .../reference/ifDoWhileStatements.js | 19 +- .../illegalSuperCallsInConstructor.js | 19 +- .../implementClausePrecedingExtends.js | 19 +- ...gAnInterfaceExtendingClassWithPrivates2.js | 19 +- ...AnInterfaceExtendingClassWithProtecteds.js | 19 +- .../baselines/reference/importAsBaseClass.js | 19 +- tests/baselines/reference/importHelpers.js | 19 +- .../reference/importHelpersNoHelpers.js | 19 +- .../reference/importHelpersNoModule.js | 19 +- .../reference/importShadowsGlobalName.js | 19 +- .../reference/importUsedInExtendsList1.js | 19 +- .../reference/indexerConstraints2.js | 19 +- .../reference/indirectSelfReference.js | 19 +- .../reference/indirectSelfReferenceGeneric.js | 19 +- .../infinitelyExpandingTypesNonGenericBase.js | 19 +- .../inheritFromGenericTypeParameter.js | 19 +- ...SameNamePrivatePropertiesFromSameOrigin.js | 19 +- tests/baselines/reference/inheritance.js | 19 +- tests/baselines/reference/inheritance1.js | 19 +- ...itanceGrandParentPrivateMemberCollision.js | 19 +- ...tPrivateMemberCollisionWithPublicMember.js | 19 +- ...tPublicMemberCollisionWithPrivateMember.js | 19 +- ...ritanceMemberAccessorOverridingAccessor.js | 19 +- ...heritanceMemberAccessorOverridingMethod.js | 19 +- ...ritanceMemberAccessorOverridingProperty.js | 19 +- ...inheritanceMemberFuncOverridingAccessor.js | 19 +- .../inheritanceMemberFuncOverridingMethod.js | 19 +- ...inheritanceMemberFuncOverridingProperty.js | 19 +- ...ritanceMemberPropertyOverridingAccessor.js | 19 +- ...heritanceMemberPropertyOverridingMethod.js | 19 +- ...ritanceMemberPropertyOverridingProperty.js | 19 +- .../inheritanceOfGenericConstructorMethod1.js | 19 +- .../inheritanceOfGenericConstructorMethod2.js | 19 +- ...ritanceStaticAccessorOverridingAccessor.js | 19 +- ...heritanceStaticAccessorOverridingMethod.js | 19 +- ...ritanceStaticAccessorOverridingProperty.js | 19 +- ...inheritanceStaticFuncOverridingAccessor.js | 19 +- ...eStaticFuncOverridingAccessorOfFuncType.js | 19 +- .../inheritanceStaticFuncOverridingMethod.js | 19 +- ...inheritanceStaticFuncOverridingProperty.js | 19 +- ...eStaticFuncOverridingPropertyOfFuncType.js | 19 +- ...taticFunctionOverridingInstanceProperty.js | 19 +- .../inheritanceStaticMembersCompatible.js | 19 +- .../inheritanceStaticMembersIncompatible.js | 19 +- ...ritanceStaticPropertyOverridingAccessor.js | 19 +- ...heritanceStaticPropertyOverridingMethod.js | 19 +- ...ritanceStaticPropertyOverridingProperty.js | 19 +- .../inheritedConstructorWithRestParams.js | 19 +- .../inheritedConstructorWithRestParams2.js | 19 +- .../inheritedModuleMembersForClodule.js | 19 +- .../reference/instanceOfAssignability.js | 19 +- ...nstancePropertiesInheritedIntoClassType.js | 19 +- .../reference/instanceSubtypeCheck2.js | 19 +- ...nstanceofWithStructurallyIdenticalTypes.js | 19 +- .../instantiatedReturnTypeContravariance.js | 19 +- .../reference/interfaceClassMerging.js | 19 +- .../reference/interfaceClassMerging2.js | 19 +- .../reference/interfaceExtendsClass1.js | 19 +- .../interfaceExtendsClassWithPrivate1.js | 19 +- .../interfaceExtendsClassWithPrivate2.js | 19 +- .../reference/interfaceImplementation8.js | 19 +- .../invalidModuleWithStatementsOfEveryKind.js | 19 +- .../invalidMultipleVariableDeclarations.js | 19 +- .../reference/invalidReturnStatements.js | 19 +- .../isolatedModulesImportExportElision.js | 19 +- tests/baselines/reference/jsxViaImport.js | 19 +- .../reference/keyofAndIndexedAccess.js | 19 +- tests/baselines/reference/lambdaArgCrash.js | 19 +- tests/baselines/reference/lift.js | 19 +- tests/baselines/reference/localTypes1.js | 19 +- tests/baselines/reference/m7Bugs.js | 19 +- .../reference/mergedDeclarations5.js | 19 +- .../reference/mergedDeclarations6.js | 19 +- .../mergedInheritedClassInterface.js | 19 +- .../mergedInterfacesWithInheritedPrivates2.js | 19 +- .../mergedInterfacesWithInheritedPrivates3.js | 19 +- .../missingPropertiesOfClassExpression.js | 19 +- tests/baselines/reference/moduleAsBaseType.js | 19 +- .../moduleImportedForTypeArgumentPosition.js | 19 +- .../moduleWithStatementsOfEveryKind.js | 19 +- .../reference/multipleInheritance.js | 19 +- .../mutuallyRecursiveGenericBaseTypes2.js | 19 +- .../noImplicitAnyMissingGetAccessor.js | 19 +- .../noImplicitAnyMissingSetAccessor.js | 19 +- ...enericClassExtendingGenericClassWithAny.js | 19 +- ...cIndexerConstrainsPropertyDeclarations2.js | 19 +- .../reference/numericIndexerConstraint3.js | 19 +- .../reference/numericIndexerConstraint4.js | 19 +- .../reference/numericIndexerTyping2.js | 19 +- ...objectCreationOfElementAccessExpression.js | 19 +- ...objectTypeHidingMembersOfExtendedObject.js | 19 +- ...objectTypesIdentityWithNumericIndexers1.js | 19 +- ...objectTypesIdentityWithNumericIndexers2.js | 19 +- ...objectTypesIdentityWithNumericIndexers3.js | 19 +- .../objectTypesIdentityWithPrivates.js | 19 +- .../objectTypesIdentityWithPrivates2.js | 19 +- .../objectTypesIdentityWithPrivates3.js | 19 +- .../objectTypesIdentityWithStringIndexers.js | 19 +- .../objectTypesIdentityWithStringIndexers2.js | 19 +- .../optionalConstructorArgInSuper.js | 19 +- tests/baselines/reference/optionalMethods.js | 19 +- .../reference/optionalParamArgsTest.js | 19 +- .../reference/optionalParamInOverride.js | 19 +- .../reference/optionalParameterProperty.js | 19 +- .../baselines/reference/outModuleConcatAmd.js | 19 +- .../reference/outModuleConcatAmd.js.map | 2 +- .../outModuleConcatAmd.sourcemap.txt | 75 +- .../reference/outModuleConcatSystem.js | 19 +- .../reference/outModuleConcatSystem.js.map | 2 +- .../outModuleConcatSystem.sourcemap.txt | 75 +- .../reference/outModuleTripleSlashRefs.js | 19 +- .../reference/outModuleTripleSlashRefs.js.map | 2 +- .../outModuleTripleSlashRefs.sourcemap.txt | 103 +-- tests/baselines/reference/overload1.js | 19 +- .../overloadOnConstConstraintChecks1.js | 19 +- .../overloadOnConstConstraintChecks2.js | 19 +- .../overloadOnConstConstraintChecks3.js | 19 +- .../overloadOnConstConstraintChecks4.js | 19 +- .../overloadOnConstantsInvalidOverload1.js | 19 +- .../baselines/reference/overloadResolution.js | 19 +- .../overloadResolutionClassConstructors.js | 19 +- .../overloadResolutionConstructors.js | 19 +- .../reference/overloadingOnConstants1.js | 19 +- .../reference/overloadingOnConstants2.js | 19 +- .../overridingPrivateStaticMembers.js | 19 +- .../reference/parseErrorInHeritageClause1.js | 19 +- tests/baselines/reference/parser509630.js | 19 +- tests/baselines/reference/parserAstSpans1.js | 19 +- .../reference/parserClassDeclaration1.js | 19 +- .../reference/parserClassDeclaration3.js | 19 +- .../reference/parserClassDeclaration4.js | 19 +- .../reference/parserClassDeclaration5.js | 19 +- .../reference/parserClassDeclaration6.js | 19 +- ...rrorRecovery_ExtendsOrImplementsClause2.js | 19 +- ...rrorRecovery_ExtendsOrImplementsClause4.js | 19 +- ...rrorRecovery_ExtendsOrImplementsClause5.js | 19 +- .../parserGenericsInTypeContexts1.js | 19 +- .../parserGenericsInTypeContexts2.js | 19 +- .../baselines/reference/parserRealSource10.js | 19 +- .../baselines/reference/parserRealSource11.js | 19 +- tests/baselines/reference/parserharness.js | 19 +- ...artiallyAnnotatedFunctionInferenceError.js | 19 +- ...tatedFunctionInferenceWithTypeParameter.js | 19 +- tests/baselines/reference/primitiveMembers.js | 19 +- tests/baselines/reference/privacyClass.js | 19 +- .../privacyClassExtendsClauseDeclFile.js | 38 +- tests/baselines/reference/privacyGloClass.js | 19 +- .../reference/privateAccessInSubclass1.js | 19 +- .../privateInstanceMemberAccessibility.js | 19 +- ...tedMembersAreNotAccessibleDestructuring.js | 19 +- .../privateStaticMemberAccessibility.js | 19 +- .../privateStaticNotAccessibleInClodule2.js | 19 +- .../amd/testGlo.js | 19 +- .../node/testGlo.js | 19 +- .../reference/project/prologueEmit/amd/out.js | 19 +- .../project/prologueEmit/node/out.js | 19 +- .../amd/m'ain.js | 19 +- .../node/m'ain.js | 19 +- .../reference/propertiesAndIndexers.js | 19 +- tests/baselines/reference/propertyAccess.js | 19 +- ...tyAccessOnTypeParameterWithConstraints2.js | 19 +- ...tyAccessOnTypeParameterWithConstraints3.js | 19 +- ...tyAccessOnTypeParameterWithConstraints5.js | 19 +- ...sPropertyAccessibleWithinNestedSubclass.js | 19 +- ...PropertyAccessibleWithinNestedSubclass1.js | 19 +- ...edClassPropertyAccessibleWithinSubclass.js | 19 +- ...dClassPropertyAccessibleWithinSubclass2.js | 19 +- ...dClassPropertyAccessibleWithinSubclass3.js | 19 +- .../protectedInstanceMemberAccessibility.js | 19 +- tests/baselines/reference/protectedMembers.js | 19 +- ...icClassPropertyAccessibleWithinSubclass.js | 19 +- ...cClassPropertyAccessibleWithinSubclass2.js | 19 +- ...solution-does-not-affect-class-heritage.js | 19 +- .../readonlyConstructorAssignment.js | 19 +- .../reference/recursiveBaseCheck3.js | 19 +- .../reference/recursiveBaseCheck4.js | 19 +- .../reference/recursiveBaseCheck6.js | 19 +- .../recursiveBaseConstructorCreation1.js | 19 +- ...ssInstantiationsWithDefaultConstructors.js | 19 +- .../reference/recursiveClassReferenceTest.js | 19 +- .../recursiveClassReferenceTest.js.map | 2 +- .../recursiveClassReferenceTest.sourcemap.txt | 789 +++++++++--------- .../reference/recursiveComplicatedClasses.js | 19 +- ...sivelySpecializedConstructorDeclaration.js | 19 +- .../reference/reexportClassDefinition.js | 19 +- ...lassDeclarationWhenInBaseTypeResolution.js | 19 +- .../reference/returnInConstructor1.js | 19 +- tests/baselines/reference/returnStatements.js | 19 +- ...peCheckExtendedClassInsidePublicMethod2.js | 19 +- ...peCheckExtendedClassInsideStaticMethod1.js | 19 +- tests/baselines/reference/scopeTests.js | 19 +- .../reference/shadowPrivateMembers.js | 19 +- ...sWithDefaultConstructorAndExtendsClause.js | 19 +- ...hDefaultConstructorAndExtendsClause.js.map | 2 +- ...tConstructorAndExtendsClause.sourcemap.txt | 91 +- .../specializedInheritedConstructors1.js | 19 +- .../specializedOverloadWithRestParameters.js | 19 +- tests/baselines/reference/staticFactory1.js | 19 +- .../baselines/reference/staticInheritance.js | 19 +- .../staticMemberAccessOffDerivedType1.js | 19 +- tests/baselines/reference/staticPropSuper.js | 19 +- .../reference/strictModeInConstructor.js | 19 +- .../reference/strictModeReservedWord.js | 19 +- ...trictModeReservedWordInClassDeclaration.js | 19 +- ...gIndexerConstrainsPropertyDeclarations2.js | 19 +- .../reference/subtypesOfTypeParameter.js | 19 +- .../subtypesOfTypeParameterWithConstraints.js | 19 +- ...subtypesOfTypeParameterWithConstraints4.js | 19 +- ...OfTypeParameterWithRecursiveConstraints.js | 19 +- .../reference/subtypingTransitivity.js | 19 +- .../reference/subtypingWithCallSignatures2.js | 19 +- .../reference/subtypingWithCallSignatures3.js | 19 +- .../reference/subtypingWithCallSignatures4.js | 19 +- .../subtypingWithConstructSignatures2.js | 19 +- .../subtypingWithConstructSignatures3.js | 19 +- .../subtypingWithConstructSignatures4.js | 19 +- .../subtypingWithConstructSignatures5.js | 19 +- .../subtypingWithConstructSignatures6.js | 19 +- .../reference/subtypingWithNumericIndexer.js | 19 +- .../reference/subtypingWithNumericIndexer3.js | 19 +- .../reference/subtypingWithNumericIndexer4.js | 19 +- .../reference/subtypingWithObjectMembers.js | 19 +- .../reference/subtypingWithObjectMembers4.js | 19 +- ...subtypingWithObjectMembersAccessibility.js | 19 +- ...ubtypingWithObjectMembersAccessibility2.js | 19 +- .../reference/subtypingWithStringIndexer.js | 19 +- .../reference/subtypingWithStringIndexer3.js | 19 +- .../reference/subtypingWithStringIndexer4.js | 19 +- tests/baselines/reference/super.js | 19 +- tests/baselines/reference/super1.js | 19 +- tests/baselines/reference/super2.js | 19 +- tests/baselines/reference/superAccess.js | 19 +- tests/baselines/reference/superAccess2.js | 19 +- .../reference/superAccessInFatArrow1.js | 19 +- .../reference/superCallArgsMustMatch.js | 19 +- .../reference/superCallAssignResult.js | 19 +- .../superCallBeforeThisAccessing1.js | 19 +- .../superCallBeforeThisAccessing2.js | 19 +- .../superCallBeforeThisAccessing3.js | 19 +- .../superCallBeforeThisAccessing4.js | 19 +- .../superCallBeforeThisAccessing5.js | 19 +- .../superCallBeforeThisAccessing6.js | 19 +- .../superCallBeforeThisAccessing7.js | 19 +- .../superCallBeforeThisAccessing8.js | 19 +- ...allFromClassThatDerivesFromGenericType1.js | 19 +- ...allFromClassThatDerivesFromGenericType2.js | 19 +- ...eButWithIncorrectNumberOfTypeArguments1.js | 19 +- ...sFromGenericTypeButWithNoTypeArguments1.js | 19 +- ...ivesNonGenericTypeButWithTypeArguments1.js | 19 +- .../reference/superCallInNonStaticMethod.js | 19 +- .../reference/superCallInStaticMethod.js | 19 +- .../superCallInsideClassDeclaration.js | 19 +- .../superCallInsideClassExpression.js | 19 +- .../superCallInsideObjectLiteralExpression.js | 19 +- .../reference/superCallOutsideConstructor.js | 19 +- .../superCallParameterContextualTyping1.js | 19 +- .../superCallParameterContextualTyping2.js | 19 +- .../superCallParameterContextualTyping3.js | 19 +- .../reference/superCallWithCommentEmit01.js | 19 +- .../superCallWithMissingBaseClass.js | 19 +- tests/baselines/reference/superCalls.js | 19 +- .../reference/superCallsInConstructor.js | 19 +- tests/baselines/reference/superErrors.js | 19 +- .../baselines/reference/superInCatchBlock1.js | 19 +- .../reference/superInConstructorParam1.js | 19 +- tests/baselines/reference/superInLambdas.js | 19 +- .../reference/superInObjectLiterals_ES5.js | 19 +- tests/baselines/reference/superNewCall1.js | 19 +- .../reference/superPropertyAccess.js | 19 +- .../reference/superPropertyAccess1.js | 19 +- .../reference/superPropertyAccess2.js | 19 +- ...essInComputedPropertiesOfNestedType_ES5.js | 19 +- .../reference/superPropertyAccessNoError.js | 19 +- .../reference/superPropertyAccess_ES5.js | 19 +- ...perPropertyInConstructorBeforeSuperCall.js | 19 +- .../reference/superSymbolIndexedAccess5.js | 19 +- .../reference/superSymbolIndexedAccess6.js | 19 +- .../superWithGenericSpecialization.js | 19 +- .../baselines/reference/superWithGenerics.js | 19 +- .../reference/superWithTypeArgument.js | 19 +- .../reference/superWithTypeArgument2.js | 19 +- .../reference/superWithTypeArgument3.js | 19 +- ...side-object-literal-getters-and-setters.js | 19 +- tests/baselines/reference/switchStatements.js | 19 +- .../reference/systemModuleWithSuperClass.js | 19 +- .../reference/targetTypeBaseCalls.js | 19 +- .../reference/thisInInvalidContexts.js | 19 +- .../thisInInvalidContextsExternalModule.js | 19 +- tests/baselines/reference/thisInSuperCall.js | 19 +- tests/baselines/reference/thisInSuperCall1.js | 19 +- tests/baselines/reference/thisInSuperCall2.js | 19 +- tests/baselines/reference/thisInSuperCall3.js | 19 +- .../reference/thisTypeInFunctions.js | 19 +- .../reference/thisTypeInFunctionsNegative.js | 19 +- .../tsxCorrectlyParseLessThanComparison1.js | 19 +- .../baselines/reference/tsxDynamicTagName5.js | 19 +- .../baselines/reference/tsxDynamicTagName7.js | 19 +- .../baselines/reference/tsxDynamicTagName8.js | 19 +- .../baselines/reference/tsxDynamicTagName9.js | 19 +- .../reference/tsxExternalModuleEmit1.js | 38 +- .../tsxStatelessFunctionComponents2.js | 19 +- .../reference/tsxUnionTypeComponent1.js | 19 +- tests/baselines/reference/typeAssertions.js | 19 +- .../baselines/reference/typeGuardFunction.js | 19 +- .../reference/typeGuardFunctionErrors.js | 19 +- .../reference/typeGuardFunctionGenerics.js | 19 +- .../reference/typeGuardFunctionOfFormThis.js | 19 +- .../typeGuardFunctionOfFormThisErrors.js | 19 +- .../reference/typeGuardOfFormInstanceOf.js | 19 +- .../reference/typeGuardOfFormIsType.js | 19 +- .../reference/typeGuardOfFormThisMember.js | 19 +- .../typeGuardOfFormThisMemberErrors.js | 19 +- tests/baselines/reference/typeMatch2.js | 19 +- tests/baselines/reference/typeOfSuperCall.js | 19 +- .../reference/typeParameterAsBaseClass.js | 19 +- .../reference/typeParameterAsBaseType.js | 19 +- .../reference/typeParameterExtendingUnion1.js | 19 +- .../reference/typeParameterExtendingUnion2.js | 19 +- .../baselines/reference/typeRelationships.js | 19 +- .../baselines/reference/typeValueConflict1.js | 19 +- .../baselines/reference/typeValueConflict2.js | 19 +- tests/baselines/reference/typeofClass2.js | 19 +- .../typesWithSpecializedCallSignatures.js | 19 +- ...typesWithSpecializedConstructSignatures.js | 19 +- tests/baselines/reference/undeclaredBase.js | 19 +- .../undefinedIsSubtypeOfEverything.js | 19 +- .../baselines/reference/underscoreMapFirst.js | 19 +- .../underscoreThisInDerivedClass01.js | 19 +- .../underscoreThisInDerivedClass02.js | 19 +- .../reference/unionTypeEquivalence.js | 19 +- .../reference/unionTypeFromArrayLiteral.js | 19 +- .../reference/unionTypesAssignability.js | 19 +- tests/baselines/reference/unknownSymbols1.js | 19 +- .../reference/unspecializedConstraints.js | 19 +- ...untypedFunctionCallsWithTypeParameters1.js | 19 +- .../reference/unusedClassesinNamespace4.js | 19 +- .../unusedIdentifiersConsolidated1.js | 19 +- .../reference/validUseOfThisInSuper.js | 19 +- .../reference/varArgsOnConstructorTypes.js | 19 +- 667 files changed, 7366 insertions(+), 6695 deletions(-) diff --git a/src/compiler/transformers/es2015.ts b/src/compiler/transformers/es2015.ts index dd7b8fe7f47..1fb777e11f3 100644 --- a/src/compiler/transformers/es2015.ts +++ b/src/compiler/transformers/es2015.ts @@ -3336,14 +3336,15 @@ namespace ts { scoped: false, priority: 0, text: ` - var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - };` + var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })();` }; } diff --git a/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js b/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js index e244964048a..13af9d45322 100644 --- a/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js +++ b/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js @@ -21,15 +21,16 @@ module A { //// [ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A; (function (A) { var Point = (function () { diff --git a/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js b/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js index 9df25d0ba4c..b3ff0c58e11 100644 --- a/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js +++ b/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js @@ -25,15 +25,16 @@ module A { //// [ExportClassWithInaccessibleTypeInTypeParameterConstraint.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A; (function (A) { var Point = (function () { diff --git a/tests/baselines/reference/abstractClassInLocalScope.js b/tests/baselines/reference/abstractClassInLocalScope.js index f2b1a7e5007..501743c1ad7 100644 --- a/tests/baselines/reference/abstractClassInLocalScope.js +++ b/tests/baselines/reference/abstractClassInLocalScope.js @@ -8,15 +8,16 @@ //// [abstractClassInLocalScope.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); (function () { var A = (function () { function A() { diff --git a/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js b/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js index 612d1b47230..c63088fcbbe 100644 --- a/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js +++ b/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js @@ -8,15 +8,16 @@ //// [abstractClassInLocalScopeIsAbstract.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); (function () { var A = (function () { function A() { diff --git a/tests/baselines/reference/abstractProperty.js b/tests/baselines/reference/abstractProperty.js index f559b3c6123..87c67d18205 100644 --- a/tests/baselines/reference/abstractProperty.js +++ b/tests/baselines/reference/abstractProperty.js @@ -22,15 +22,16 @@ class C extends B { } //// [abstractProperty.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var B = (function () { function B() { } diff --git a/tests/baselines/reference/abstractPropertyNegative.js b/tests/baselines/reference/abstractPropertyNegative.js index 73ae1427571..9728e047bf1 100644 --- a/tests/baselines/reference/abstractPropertyNegative.js +++ b/tests/baselines/reference/abstractPropertyNegative.js @@ -44,15 +44,16 @@ abstract class AbstractAccessorMismatch { //// [abstractPropertyNegative.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var B = (function () { function B() { } diff --git a/tests/baselines/reference/accessOverriddenBaseClassMember1.js b/tests/baselines/reference/accessOverriddenBaseClassMember1.js index 5fdaacd464c..9afff0a8ff9 100644 --- a/tests/baselines/reference/accessOverriddenBaseClassMember1.js +++ b/tests/baselines/reference/accessOverriddenBaseClassMember1.js @@ -16,15 +16,16 @@ class ColoredPoint extends Point { //// [accessOverriddenBaseClassMember1.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Point = (function () { function Point(x, y) { this.x = x; diff --git a/tests/baselines/reference/accessors_spec_section-4.5_inference.js b/tests/baselines/reference/accessors_spec_section-4.5_inference.js index 024c25a909f..eec92837d95 100644 --- a/tests/baselines/reference/accessors_spec_section-4.5_inference.js +++ b/tests/baselines/reference/accessors_spec_section-4.5_inference.js @@ -25,15 +25,16 @@ class LanguageSpec_section_4_5_inference { } //// [accessors_spec_section-4.5_inference.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/aliasUsageInAccessorsOfClass.js b/tests/baselines/reference/aliasUsageInAccessorsOfClass.js index d84a03277eb..9ccd5c16666 100644 --- a/tests/baselines/reference/aliasUsageInAccessorsOfClass.js +++ b/tests/baselines/reference/aliasUsageInAccessorsOfClass.js @@ -37,15 +37,16 @@ var Model = (function () { exports.Model = Model; //// [aliasUsage1_moduleA.js] "use strict"; -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Backbone = require("./aliasUsage1_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); diff --git a/tests/baselines/reference/aliasUsageInArray.js b/tests/baselines/reference/aliasUsageInArray.js index 031be503cff..f08236bbf41 100644 --- a/tests/baselines/reference/aliasUsageInArray.js +++ b/tests/baselines/reference/aliasUsageInArray.js @@ -31,15 +31,16 @@ var Model = (function () { exports.Model = Model; //// [aliasUsageInArray_moduleA.js] "use strict"; -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Backbone = require("./aliasUsageInArray_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); diff --git a/tests/baselines/reference/aliasUsageInFunctionExpression.js b/tests/baselines/reference/aliasUsageInFunctionExpression.js index f0207e82c86..c0f537ac0dd 100644 --- a/tests/baselines/reference/aliasUsageInFunctionExpression.js +++ b/tests/baselines/reference/aliasUsageInFunctionExpression.js @@ -30,15 +30,16 @@ var Model = (function () { exports.Model = Model; //// [aliasUsageInFunctionExpression_moduleA.js] "use strict"; -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Backbone = require("./aliasUsageInFunctionExpression_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); diff --git a/tests/baselines/reference/aliasUsageInGenericFunction.js b/tests/baselines/reference/aliasUsageInGenericFunction.js index 20b2028bbb1..222c8a78643 100644 --- a/tests/baselines/reference/aliasUsageInGenericFunction.js +++ b/tests/baselines/reference/aliasUsageInGenericFunction.js @@ -34,15 +34,16 @@ var Model = (function () { exports.Model = Model; //// [aliasUsageInGenericFunction_moduleA.js] "use strict"; -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Backbone = require("./aliasUsageInGenericFunction_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); diff --git a/tests/baselines/reference/aliasUsageInIndexerOfClass.js b/tests/baselines/reference/aliasUsageInIndexerOfClass.js index a8b77a8e6cb..c2ed9f345a0 100644 --- a/tests/baselines/reference/aliasUsageInIndexerOfClass.js +++ b/tests/baselines/reference/aliasUsageInIndexerOfClass.js @@ -36,15 +36,16 @@ var Model = (function () { exports.Model = Model; //// [aliasUsageInIndexerOfClass_moduleA.js] "use strict"; -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Backbone = require("./aliasUsageInIndexerOfClass_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); diff --git a/tests/baselines/reference/aliasUsageInObjectLiteral.js b/tests/baselines/reference/aliasUsageInObjectLiteral.js index 00b7a231897..d5ad53a981c 100644 --- a/tests/baselines/reference/aliasUsageInObjectLiteral.js +++ b/tests/baselines/reference/aliasUsageInObjectLiteral.js @@ -31,15 +31,16 @@ var Model = (function () { exports.Model = Model; //// [aliasUsageInObjectLiteral_moduleA.js] "use strict"; -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Backbone = require("./aliasUsageInObjectLiteral_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); diff --git a/tests/baselines/reference/aliasUsageInOrExpression.js b/tests/baselines/reference/aliasUsageInOrExpression.js index fe73404e8b4..2864b71595f 100644 --- a/tests/baselines/reference/aliasUsageInOrExpression.js +++ b/tests/baselines/reference/aliasUsageInOrExpression.js @@ -34,15 +34,16 @@ var Model = (function () { exports.Model = Model; //// [aliasUsageInOrExpression_moduleA.js] "use strict"; -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Backbone = require("./aliasUsageInOrExpression_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); diff --git a/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js b/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js index 17b73079f00..8fc0815fcff 100644 --- a/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js +++ b/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js @@ -34,15 +34,16 @@ var Model = (function () { exports.Model = Model; //// [aliasUsageInTypeArgumentOfExtendsClause_moduleA.js] "use strict"; -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Backbone = require("./aliasUsageInTypeArgumentOfExtendsClause_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); @@ -54,15 +55,16 @@ var VisualizationModel = (function (_super) { exports.VisualizationModel = VisualizationModel; //// [aliasUsageInTypeArgumentOfExtendsClause_main.js] "use strict"; -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var moduleA = require("./aliasUsageInTypeArgumentOfExtendsClause_moduleA"); var C = (function () { function C() { diff --git a/tests/baselines/reference/aliasUsageInVarAssignment.js b/tests/baselines/reference/aliasUsageInVarAssignment.js index 9a88c68421f..0b42447701b 100644 --- a/tests/baselines/reference/aliasUsageInVarAssignment.js +++ b/tests/baselines/reference/aliasUsageInVarAssignment.js @@ -30,15 +30,16 @@ var Model = (function () { exports.Model = Model; //// [aliasUsageInVarAssignment_moduleA.js] "use strict"; -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Backbone = require("./aliasUsageInVarAssignment_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); diff --git a/tests/baselines/reference/ambiguousOverloadResolution.js b/tests/baselines/reference/ambiguousOverloadResolution.js index 3af1905dc03..7adda16b65f 100644 --- a/tests/baselines/reference/ambiguousOverloadResolution.js +++ b/tests/baselines/reference/ambiguousOverloadResolution.js @@ -9,15 +9,16 @@ var x: B; var t: number = f(x, x); // Not an error //// [ambiguousOverloadResolution.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/apparentTypeSubtyping.js b/tests/baselines/reference/apparentTypeSubtyping.js index 2f5a3f8147e..2c4b343c813 100644 --- a/tests/baselines/reference/apparentTypeSubtyping.js +++ b/tests/baselines/reference/apparentTypeSubtyping.js @@ -24,15 +24,16 @@ class Derived2 extends Base2 { // error because of the prototy //// [apparentTypeSubtyping.js] // subtype checks use the apparent type of the target type // S is a subtype of a type T, and T is a supertype of S, if one of the following is true, where S' denotes the apparent type (section 3.8.1) of S: -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/apparentTypeSupertype.js b/tests/baselines/reference/apparentTypeSupertype.js index dfc3414aef1..028935c28c1 100644 --- a/tests/baselines/reference/apparentTypeSupertype.js +++ b/tests/baselines/reference/apparentTypeSupertype.js @@ -14,15 +14,16 @@ class Derived extends Base { // error //// [apparentTypeSupertype.js] // subtype checks use the apparent type of the target type // S is a subtype of a type T, and T is a supertype of S, if one of the following is true, where S' denotes the apparent type (section 3.8.1) of S: -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/arrayAssignmentTest1.js b/tests/baselines/reference/arrayAssignmentTest1.js index f2254fea530..ad1c748be75 100644 --- a/tests/baselines/reference/arrayAssignmentTest1.js +++ b/tests/baselines/reference/arrayAssignmentTest1.js @@ -86,15 +86,16 @@ arr_any = c3; // should be an error - is arr_any = i1; // should be an error - is //// [arrayAssignmentTest1.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C1 = (function () { function C1() { } diff --git a/tests/baselines/reference/arrayAssignmentTest2.js b/tests/baselines/reference/arrayAssignmentTest2.js index 90aa6740f4b..34c5c921bd3 100644 --- a/tests/baselines/reference/arrayAssignmentTest2.js +++ b/tests/baselines/reference/arrayAssignmentTest2.js @@ -60,15 +60,16 @@ arr_any = i1; // should be an error - is //// [arrayAssignmentTest2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C1 = (function () { function C1() { } diff --git a/tests/baselines/reference/arrayBestCommonTypes.js b/tests/baselines/reference/arrayBestCommonTypes.js index 8d2fe2376a3..f232b44ce28 100644 --- a/tests/baselines/reference/arrayBestCommonTypes.js +++ b/tests/baselines/reference/arrayBestCommonTypes.js @@ -108,15 +108,16 @@ module NonEmptyTypes { //// [arrayBestCommonTypes.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var EmptyTypes; (function (EmptyTypes) { var base = (function () { diff --git a/tests/baselines/reference/arrayLiteralTypeInference.js b/tests/baselines/reference/arrayLiteralTypeInference.js index 37d0d1084f7..95e4d98574d 100644 --- a/tests/baselines/reference/arrayLiteralTypeInference.js +++ b/tests/baselines/reference/arrayLiteralTypeInference.js @@ -52,15 +52,16 @@ var z3: { id: number }[] = //// [arrayLiteralTypeInference.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Action = (function () { function Action() { } diff --git a/tests/baselines/reference/arrayLiterals.js b/tests/baselines/reference/arrayLiterals.js index d43db0f6376..001e0ff525f 100644 --- a/tests/baselines/reference/arrayLiterals.js +++ b/tests/baselines/reference/arrayLiterals.js @@ -38,15 +38,16 @@ var context4: Base[] = [new Derived1(), new Derived1()]; //// [arrayLiterals.js] // Empty array literal with no contextual type has type Undefined[] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var arr1 = [[], [1], ['']]; var arr2 = [[null], [1], ['']]; // Array literal with elements of only EveryType E has type E[] diff --git a/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js b/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js index 939878aa086..b092fe4da32 100644 --- a/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js +++ b/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js @@ -26,15 +26,16 @@ var myDerivedList: DerivedList; var as = [list, myDerivedList]; // List[] //// [arrayLiteralsWithRecursiveGenerics.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var List = (function () { function List() { } diff --git a/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js b/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js index 352e31d0851..fcc3ab99d3c 100644 --- a/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js +++ b/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js @@ -20,15 +20,16 @@ rrb = cra; // error: 'A' is not assignable to 'B' //// [arrayOfSubtypeIsAssignableToReadonlyArray.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/arrowFunctionContexts.js b/tests/baselines/reference/arrowFunctionContexts.js index b5e2cde6760..5b1daa5b594 100644 --- a/tests/baselines/reference/arrowFunctionContexts.js +++ b/tests/baselines/reference/arrowFunctionContexts.js @@ -97,15 +97,16 @@ var asserted2: any; //// [arrowFunctionContexts.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var _this = this; // Arrow function used in with statement with (window) { diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures3.js b/tests/baselines/reference/assignmentCompatWithCallSignatures3.js index fcc7e402296..a748ec873ae 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures3.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures3.js @@ -101,15 +101,16 @@ b18 = a18; // ok //// [assignmentCompatWithCallSignatures3.js] // these are all permitted with the current rules, since we do not do contextual signature instantiation -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures4.js b/tests/baselines/reference/assignmentCompatWithCallSignatures4.js index 066f2e5ead2..409a7f5ceae 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures4.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures4.js @@ -100,15 +100,16 @@ module Errors { //// [assignmentCompatWithCallSignatures4.js] // These are mostly permitted with the current loose rules. All ok unless otherwise noted. -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Errors; (function (Errors) { var Base = (function () { diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures5.js b/tests/baselines/reference/assignmentCompatWithCallSignatures5.js index 2d1d545bb42..00acd326ba8 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures5.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures5.js @@ -67,15 +67,16 @@ b18 = a18; // ok //// [assignmentCompatWithCallSignatures5.js] // checking assignment compat for function types. No errors in this file -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures6.js b/tests/baselines/reference/assignmentCompatWithCallSignatures6.js index 83f28340210..f8fbe3b0b84 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures6.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures6.js @@ -44,15 +44,16 @@ b16 = x.a16; //// [assignmentCompatWithCallSignatures6.js] // checking assignment compatibility relations for function types. All valid -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js index d0349f1734f..fb991a85f05 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js @@ -101,15 +101,16 @@ b18 = a18; // ok //// [assignmentCompatWithConstructSignatures3.js] // checking assignment compatibility relations for function types. All of these are valid. -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js index b5d1804c1da..eb406898854 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js @@ -100,15 +100,16 @@ module Errors { //// [assignmentCompatWithConstructSignatures4.js] // checking assignment compatibility relations for function types. -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Errors; (function (Errors) { var Base = (function () { diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js index ecec65f380f..d246aec2509 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js @@ -67,15 +67,16 @@ b18 = a18; // ok //// [assignmentCompatWithConstructSignatures5.js] // checking assignment compat for function types. All valid -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js index 610d893c369..f3149664bc6 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js @@ -44,15 +44,16 @@ b16 = x.a16; //// [assignmentCompatWithConstructSignatures6.js] // checking assignment compatibility relations for function types. All valid. -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer.js b/tests/baselines/reference/assignmentCompatWithNumericIndexer.js index 5380e982fea..127f21bbfd7 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer.js +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer.js @@ -45,15 +45,16 @@ module Generics { //// [assignmentCompatWithNumericIndexer.js] // Derived type indexer must be subtype of base type indexer -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js b/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js index e2346a74055..704cf67ec83 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js @@ -42,15 +42,16 @@ module Generics { //// [assignmentCompatWithNumericIndexer3.js] // Derived type indexer must be subtype of base type indexer -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers4.js b/tests/baselines/reference/assignmentCompatWithObjectMembers4.js index 39faa9a62c4..88c77f2fb35 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers4.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers4.js @@ -93,15 +93,16 @@ module WithBase { //// [assignmentCompatWithObjectMembers4.js] // members N and M of types S and T have the same name, same accessibility, same optionality, and N is not assignable M -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var OnlyDerived; (function (OnlyDerived) { var Base = (function () { diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js index 2fb80642d9e..328b5192d96 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js @@ -90,15 +90,16 @@ module SourceHasOptional { //// [assignmentCompatWithObjectMembersOptionality.js] // Derived member is not optional but base member is, should be ok -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js index 82a90a3c4de..730fd15be7a 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js @@ -92,15 +92,16 @@ module SourceHasOptional { //// [assignmentCompatWithObjectMembersOptionality2.js] // M is optional and S contains no property with the same name as M // N is optional and T contains no property with the same name as N -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/assignmentCompatWithStringIndexer.js b/tests/baselines/reference/assignmentCompatWithStringIndexer.js index b59fa359b8e..7b871a20b3a 100644 --- a/tests/baselines/reference/assignmentCompatWithStringIndexer.js +++ b/tests/baselines/reference/assignmentCompatWithStringIndexer.js @@ -55,15 +55,16 @@ module Generics { //// [assignmentCompatWithStringIndexer.js] // index signatures must be compatible in assignments -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/assignmentLHSIsValue.js b/tests/baselines/reference/assignmentLHSIsValue.js index 84dbed907d7..1cf7c2ac317 100644 --- a/tests/baselines/reference/assignmentLHSIsValue.js +++ b/tests/baselines/reference/assignmentLHSIsValue.js @@ -71,15 +71,16 @@ foo() = value; (foo()) = value; //// [assignmentLHSIsValue.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); // expected error for all the LHS of assignments var value; // this diff --git a/tests/baselines/reference/asyncImportedPromise_es5.js b/tests/baselines/reference/asyncImportedPromise_es5.js index 55bff7302db..9a6ef70582a 100644 --- a/tests/baselines/reference/asyncImportedPromise_es5.js +++ b/tests/baselines/reference/asyncImportedPromise_es5.js @@ -11,15 +11,16 @@ class Test { //// [task.js] "use strict"; -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Task = (function (_super) { __extends(Task, _super); function Task() { diff --git a/tests/baselines/reference/autolift4.js b/tests/baselines/reference/autolift4.js index 9d7dcaefd29..aff1ce9986f 100644 --- a/tests/baselines/reference/autolift4.js +++ b/tests/baselines/reference/autolift4.js @@ -24,15 +24,16 @@ class Point3D extends Point { //// [autolift4.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Point = (function () { function Point(x, y) { this.x = x; diff --git a/tests/baselines/reference/baseCheck.js b/tests/baselines/reference/baseCheck.js index 29e4c9fdc4d..c8145c170b6 100644 --- a/tests/baselines/reference/baseCheck.js +++ b/tests/baselines/reference/baseCheck.js @@ -30,15 +30,16 @@ function f() { //// [baseCheck.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C(x, y) { } diff --git a/tests/baselines/reference/baseIndexSignatureResolution.js b/tests/baselines/reference/baseIndexSignatureResolution.js index 8ccd2e5f335..7389e2afe8b 100644 --- a/tests/baselines/reference/baseIndexSignatureResolution.js +++ b/tests/baselines/reference/baseIndexSignatureResolution.js @@ -25,15 +25,16 @@ var z: Derived = b.foo(); */ //// [baseIndexSignatureResolution.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/baseTypeOrderChecking.js b/tests/baselines/reference/baseTypeOrderChecking.js index e408805edb8..c2eb77a3b9e 100644 --- a/tests/baselines/reference/baseTypeOrderChecking.js +++ b/tests/baselines/reference/baseTypeOrderChecking.js @@ -37,15 +37,16 @@ class Class4 extends Class3 //// [baseTypeOrderChecking.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var someVariable; var Class1 = (function () { function Class1() { diff --git a/tests/baselines/reference/baseTypeWrappingInstantiationChain.js b/tests/baselines/reference/baseTypeWrappingInstantiationChain.js index bb55cc0f9a4..308637b576c 100644 --- a/tests/baselines/reference/baseTypeWrappingInstantiationChain.js +++ b/tests/baselines/reference/baseTypeWrappingInstantiationChain.js @@ -28,15 +28,16 @@ class C extends CBase { //// [baseTypeWrappingInstantiationChain.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var CBaseBase = (function () { function CBaseBase(x) { } diff --git a/tests/baselines/reference/bases.js b/tests/baselines/reference/bases.js index 1962e4d8244..201d0e7ac27 100644 --- a/tests/baselines/reference/bases.js +++ b/tests/baselines/reference/bases.js @@ -21,15 +21,16 @@ new C().y; //// [bases.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var B = (function () { function B() { this.y; diff --git a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js index c43bfc7177f..af0c24ca5d5 100644 --- a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js +++ b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js @@ -29,15 +29,16 @@ function foo5(t: T, u: U): Object { //// [bestCommonTypeOfConditionalExpressions.js] // conditional expressions return the best common type of the branches plus contextual type (using the first candidate if multiple BCTs exist) // no errors expected here -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a; var b; var Base = (function () { diff --git a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js index 0df9198a447..bf3c8b830aa 100644 --- a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js +++ b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js @@ -27,15 +27,16 @@ function foo3(t: T, u: U) { //// [bestCommonTypeOfConditionalExpressions2.js] // conditional expressions return the best common type of the branches plus contextual type (using the first candidate if multiple BCTs exist) // these are errors -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/bestCommonTypeOfTuple2.js b/tests/baselines/reference/bestCommonTypeOfTuple2.js index 18b903bea70..3bac937c8ae 100644 --- a/tests/baselines/reference/bestCommonTypeOfTuple2.js +++ b/tests/baselines/reference/bestCommonTypeOfTuple2.js @@ -23,15 +23,16 @@ var e51 = t5[2]; // {} //// [bestCommonTypeOfTuple2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js index 1bf31ad9028..662bfa931fb 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js @@ -71,15 +71,16 @@ interface I extends A { //// [callSignatureAssignabilityInInheritance2.js] // checking subtype relations for function types as it relates to contextual signature instantiation -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js index 704ddfe5adf..e27e4729cd4 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js @@ -116,15 +116,16 @@ module Errors { //// [callSignatureAssignabilityInInheritance3.js] // checking subtype relations for function types as it relates to contextual signature instantiation // error cases -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Errors; (function (Errors) { var Base = (function () { diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js index db8c0fa0b52..687cc9aa0e1 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js @@ -51,15 +51,16 @@ interface I extends A { //// [callSignatureAssignabilityInInheritance4.js] // checking subtype relations for function types as it relates to contextual signature instantiation -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js index eca44c3c59f..16e50218cd9 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js @@ -51,15 +51,16 @@ interface I extends B { //// [callSignatureAssignabilityInInheritance5.js] // checking subtype relations for function types as it relates to contextual signature instantiation // same as subtypingWithCallSignatures2 just with an extra level of indirection in the inheritance chain -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js index c17b84f8594..717fe64da4e 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js @@ -54,15 +54,16 @@ interface I9 extends A { // checking subtype relations for function types as it relates to contextual signature instantiation // same as subtypingWithCallSignatures4 but using class type parameters instead of generic signatures // all are errors -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/callWithSpread.js b/tests/baselines/reference/callWithSpread.js index 00bf93a092d..06ca3e91d02 100644 --- a/tests/baselines/reference/callWithSpread.js +++ b/tests/baselines/reference/callWithSpread.js @@ -59,15 +59,16 @@ class D extends C { //// [callWithSpread.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); function foo(x, y) { var z = []; for (var _i = 2; _i < arguments.length; _i++) { diff --git a/tests/baselines/reference/captureThisInSuperCall.js b/tests/baselines/reference/captureThisInSuperCall.js index 43f8e8964df..c218c8b1687 100644 --- a/tests/baselines/reference/captureThisInSuperCall.js +++ b/tests/baselines/reference/captureThisInSuperCall.js @@ -9,15 +9,16 @@ class B extends A { } //// [captureThisInSuperCall.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A(p) { } diff --git a/tests/baselines/reference/castingTuple.js b/tests/baselines/reference/castingTuple.js index b4916cdbd65..04965748c0d 100644 --- a/tests/baselines/reference/castingTuple.js +++ b/tests/baselines/reference/castingTuple.js @@ -33,15 +33,16 @@ t4[2] = 10; //// [castingTuple.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { this.a = 10; diff --git a/tests/baselines/reference/chainedAssignment3.js b/tests/baselines/reference/chainedAssignment3.js index cb313122a9a..2ddd0f7577e 100644 --- a/tests/baselines/reference/chainedAssignment3.js +++ b/tests/baselines/reference/chainedAssignment3.js @@ -23,15 +23,16 @@ a = b = new A(); //// [chainedAssignment3.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js index b56e5a93206..f820e6c39a3 100644 --- a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js +++ b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js @@ -20,15 +20,16 @@ class C extends B { (new Chain(new A)).then(a => new B).then(b => new C).then(c => new B).then(b => new A); //// [chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Chain = (function () { function Chain(value) { this.value = value; diff --git a/tests/baselines/reference/checkForObjectTooStrict.js b/tests/baselines/reference/checkForObjectTooStrict.js index 243022a81c2..dbf1a34b465 100644 --- a/tests/baselines/reference/checkForObjectTooStrict.js +++ b/tests/baselines/reference/checkForObjectTooStrict.js @@ -32,15 +32,16 @@ class Baz extends Object { //// [checkForObjectTooStrict.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Foo; (function (Foo) { var Object = (function () { diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js index d1dc6839b8f..8322bb81783 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js @@ -11,15 +11,16 @@ class Derived extends Based { } //// [checkSuperCallBeforeThisAccessing1.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Based = (function () { function Based() { } diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js index 6fe42a69934..6d787a70b8c 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js @@ -11,15 +11,16 @@ class Derived extends Based { } //// [checkSuperCallBeforeThisAccessing2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Based = (function () { function Based() { } diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js index 642ded30216..41092fcd984 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js @@ -16,15 +16,16 @@ class Derived extends Based { } //// [checkSuperCallBeforeThisAccessing3.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Based = (function () { function Based() { } diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js index 1b9b1fd2b03..9bc5cc6f82b 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js @@ -20,15 +20,16 @@ class Derived extends Based { } //// [checkSuperCallBeforeThisAccessing4.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Based = (function () { function Based() { } diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js index 76853f4a210..c178a78e84e 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js @@ -8,15 +8,16 @@ class Derived extends Based { } //// [checkSuperCallBeforeThisAccessing5.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Based = (function () { function Based() { var arg = []; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js index 4c2e04c46df..14cbda775d5 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js @@ -11,15 +11,16 @@ class Super extends Base { } //// [checkSuperCallBeforeThisAccessing6.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { var arg = []; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js index d67fb3451f0..ad85fa1736c 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js @@ -10,15 +10,16 @@ class Super extends Base { } //// [checkSuperCallBeforeThisAccessing7.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base(func) { } diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js index 9bcf0ba1668..3f824a00c96 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js @@ -11,15 +11,16 @@ class Super extends Base { } //// [checkSuperCallBeforeThisAccessing8.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { var arg = []; diff --git a/tests/baselines/reference/circularImportAlias.js b/tests/baselines/reference/circularImportAlias.js index 154b0c8c68d..2ca47382b32 100644 --- a/tests/baselines/reference/circularImportAlias.js +++ b/tests/baselines/reference/circularImportAlias.js @@ -21,15 +21,16 @@ var c = new B.a.C(); //// [circularImportAlias.js] // expected no error -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var B; (function (B) { B.a = A; diff --git a/tests/baselines/reference/circularTypeofWithFunctionModule.js b/tests/baselines/reference/circularTypeofWithFunctionModule.js index 357ce10188c..e1e3c1efe58 100644 --- a/tests/baselines/reference/circularTypeofWithFunctionModule.js +++ b/tests/baselines/reference/circularTypeofWithFunctionModule.js @@ -14,15 +14,16 @@ namespace maker { //// [circularTypeofWithFunctionModule.js] // Repro from #6072 -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Foo = (function () { function Foo() { } diff --git a/tests/baselines/reference/classAbstractConstructorAssignability.js b/tests/baselines/reference/classAbstractConstructorAssignability.js index 915055bc991..e9beaced63d 100644 --- a/tests/baselines/reference/classAbstractConstructorAssignability.js +++ b/tests/baselines/reference/classAbstractConstructorAssignability.js @@ -15,15 +15,16 @@ new BB; new CC; //// [classAbstractConstructorAssignability.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/classAbstractCrashedOnce.js b/tests/baselines/reference/classAbstractCrashedOnce.js index e9a60f8c713..319c6c237dc 100644 --- a/tests/baselines/reference/classAbstractCrashedOnce.js +++ b/tests/baselines/reference/classAbstractCrashedOnce.js @@ -11,15 +11,16 @@ class bar extends foo { var x = new bar(); //// [classAbstractCrashedOnce.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var foo = (function () { function foo() { } diff --git a/tests/baselines/reference/classAbstractExtends.js b/tests/baselines/reference/classAbstractExtends.js index 1d5967b96a9..9b4faff67c3 100644 --- a/tests/baselines/reference/classAbstractExtends.js +++ b/tests/baselines/reference/classAbstractExtends.js @@ -17,15 +17,16 @@ class E extends B { } //// [classAbstractExtends.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/classAbstractFactoryFunction.js b/tests/baselines/reference/classAbstractFactoryFunction.js index c07390da7dd..e7ddb867d28 100644 --- a/tests/baselines/reference/classAbstractFactoryFunction.js +++ b/tests/baselines/reference/classAbstractFactoryFunction.js @@ -18,15 +18,16 @@ NewB(A); NewB(B); //// [classAbstractFactoryFunction.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/classAbstractGeneric.js b/tests/baselines/reference/classAbstractGeneric.js index 46406731e59..5063d7fcdd6 100644 --- a/tests/baselines/reference/classAbstractGeneric.js +++ b/tests/baselines/reference/classAbstractGeneric.js @@ -26,15 +26,16 @@ class G extends A { } //// [classAbstractGeneric.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/classAbstractInAModule.js b/tests/baselines/reference/classAbstractInAModule.js index 1c76bd43fb5..73ff32d3d5e 100644 --- a/tests/baselines/reference/classAbstractInAModule.js +++ b/tests/baselines/reference/classAbstractInAModule.js @@ -8,15 +8,16 @@ new M.A; new M.B; //// [classAbstractInAModule.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var M; (function (M) { var A = (function () { diff --git a/tests/baselines/reference/classAbstractInheritance.js b/tests/baselines/reference/classAbstractInheritance.js index dbf585c86d2..8a173bb1bf4 100644 --- a/tests/baselines/reference/classAbstractInheritance.js +++ b/tests/baselines/reference/classAbstractInheritance.js @@ -22,15 +22,16 @@ class FF extends CC {} abstract class GG extends CC {} //// [classAbstractInheritance.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/classAbstractInstantiations1.js b/tests/baselines/reference/classAbstractInstantiations1.js index 22732bdc2b4..094bc755559 100644 --- a/tests/baselines/reference/classAbstractInstantiations1.js +++ b/tests/baselines/reference/classAbstractInstantiations1.js @@ -28,15 +28,16 @@ c = new B; // // Calling new with (non)abstract classes. // -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/classAbstractInstantiations2.js b/tests/baselines/reference/classAbstractInstantiations2.js index 13dd7957aeb..01277eb034a 100644 --- a/tests/baselines/reference/classAbstractInstantiations2.js +++ b/tests/baselines/reference/classAbstractInstantiations2.js @@ -52,15 +52,16 @@ class H { // error -- not declared abstract } //// [classAbstractInstantiations2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/classAbstractOverrideWithAbstract.js b/tests/baselines/reference/classAbstractOverrideWithAbstract.js index c8b1d61aa9e..8f304c709cf 100644 --- a/tests/baselines/reference/classAbstractOverrideWithAbstract.js +++ b/tests/baselines/reference/classAbstractOverrideWithAbstract.js @@ -24,15 +24,16 @@ class DD extends BB { } //// [classAbstractOverrideWithAbstract.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/classAbstractSuperCalls.js b/tests/baselines/reference/classAbstractSuperCalls.js index 9d46086bc70..ba9ed10795b 100644 --- a/tests/baselines/reference/classAbstractSuperCalls.js +++ b/tests/baselines/reference/classAbstractSuperCalls.js @@ -28,15 +28,16 @@ abstract class BB extends AA { //// [classAbstractSuperCalls.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/classAbstractUsingAbstractMethod1.js b/tests/baselines/reference/classAbstractUsingAbstractMethod1.js index 56644d06a79..8e23906e149 100644 --- a/tests/baselines/reference/classAbstractUsingAbstractMethod1.js +++ b/tests/baselines/reference/classAbstractUsingAbstractMethod1.js @@ -18,15 +18,16 @@ a = new C; // error, cannot instantiate abstract class. a.foo(); //// [classAbstractUsingAbstractMethod1.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/classAbstractUsingAbstractMethods2.js b/tests/baselines/reference/classAbstractUsingAbstractMethods2.js index 011df09e258..3d09949c0ae 100644 --- a/tests/baselines/reference/classAbstractUsingAbstractMethods2.js +++ b/tests/baselines/reference/classAbstractUsingAbstractMethods2.js @@ -28,15 +28,16 @@ class DD extends AA { } //// [classAbstractUsingAbstractMethods2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/classConstructorAccessibility2.js b/tests/baselines/reference/classConstructorAccessibility2.js index c4e4b15bf3c..e16a623ef43 100644 --- a/tests/baselines/reference/classConstructorAccessibility2.js +++ b/tests/baselines/reference/classConstructorAccessibility2.js @@ -47,15 +47,16 @@ var dc = new DerivedC(1); //// [classConstructorAccessibility2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var BaseA = (function () { function BaseA(x) { this.x = x; diff --git a/tests/baselines/reference/classConstructorAccessibility4.js b/tests/baselines/reference/classConstructorAccessibility4.js index 3946dcb82de..0680f590ef4 100644 --- a/tests/baselines/reference/classConstructorAccessibility4.js +++ b/tests/baselines/reference/classConstructorAccessibility4.js @@ -31,15 +31,16 @@ class D { } //// [classConstructorAccessibility4.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/classConstructorAccessibility5.js b/tests/baselines/reference/classConstructorAccessibility5.js index 6226c80750e..671530694e7 100644 --- a/tests/baselines/reference/classConstructorAccessibility5.js +++ b/tests/baselines/reference/classConstructorAccessibility5.js @@ -12,15 +12,16 @@ class Unrelated { //// [classConstructorAccessibility5.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/classConstructorParametersAccessibility.js b/tests/baselines/reference/classConstructorParametersAccessibility.js index 26fc8fcfe3d..4c3d3747157 100644 --- a/tests/baselines/reference/classConstructorParametersAccessibility.js +++ b/tests/baselines/reference/classConstructorParametersAccessibility.js @@ -27,15 +27,16 @@ class Derived extends C3 { //// [classConstructorParametersAccessibility.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C1 = (function () { function C1(x) { this.x = x; diff --git a/tests/baselines/reference/classConstructorParametersAccessibility2.js b/tests/baselines/reference/classConstructorParametersAccessibility2.js index 6d480641484..14f7a33a6b3 100644 --- a/tests/baselines/reference/classConstructorParametersAccessibility2.js +++ b/tests/baselines/reference/classConstructorParametersAccessibility2.js @@ -27,15 +27,16 @@ class Derived extends C3 { //// [classConstructorParametersAccessibility2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C1 = (function () { function C1(x) { this.x = x; diff --git a/tests/baselines/reference/classConstructorParametersAccessibility3.js b/tests/baselines/reference/classConstructorParametersAccessibility3.js index 898b475f5ff..1f02b7a75b5 100644 --- a/tests/baselines/reference/classConstructorParametersAccessibility3.js +++ b/tests/baselines/reference/classConstructorParametersAccessibility3.js @@ -14,15 +14,16 @@ var d: Derived; d.p; // public, OK //// [classConstructorParametersAccessibility3.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base(p) { this.p = p; diff --git a/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js b/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js index e9208d7d783..bf15fcf8fad 100644 --- a/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js +++ b/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js @@ -12,15 +12,16 @@ module M { } //// [classDeclarationMergedInModuleWithContinuation.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var M; (function (M) { var N = (function () { diff --git a/tests/baselines/reference/classDeclaredBeforeClassFactory.js b/tests/baselines/reference/classDeclaredBeforeClassFactory.js index ca548e2ecd7..8a49c6ca138 100644 --- a/tests/baselines/reference/classDeclaredBeforeClassFactory.js +++ b/tests/baselines/reference/classDeclaredBeforeClassFactory.js @@ -8,15 +8,16 @@ function makeBaseClass() { //// [classDeclaredBeforeClassFactory.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); // Should be OK due to hoisting var Derived = (function (_super) { __extends(Derived, _super); diff --git a/tests/baselines/reference/classDoesNotDependOnBaseTypes.js b/tests/baselines/reference/classDoesNotDependOnBaseTypes.js index b154c47f70c..17dc3850214 100644 --- a/tests/baselines/reference/classDoesNotDependOnBaseTypes.js +++ b/tests/baselines/reference/classDoesNotDependOnBaseTypes.js @@ -13,15 +13,16 @@ class StringTreeCollectionBase { class StringTreeCollection extends StringTreeCollectionBase { } //// [classDoesNotDependOnBaseTypes.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var x; if (typeof x !== "string") { x[0] = ""; diff --git a/tests/baselines/reference/classExpression2.js b/tests/baselines/reference/classExpression2.js index 1243b967219..01685865265 100644 --- a/tests/baselines/reference/classExpression2.js +++ b/tests/baselines/reference/classExpression2.js @@ -3,15 +3,16 @@ class D { } var v = class C extends D {}; //// [classExpression2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var D = (function () { function D() { } diff --git a/tests/baselines/reference/classExpression3.js b/tests/baselines/reference/classExpression3.js index 7564c6274b3..3acbcef1ab8 100644 --- a/tests/baselines/reference/classExpression3.js +++ b/tests/baselines/reference/classExpression3.js @@ -7,15 +7,16 @@ c.c; //// [classExpression3.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function (_super) { __extends(class_1, _super); function class_1() { diff --git a/tests/baselines/reference/classExpressionExtendingAbstractClass.js b/tests/baselines/reference/classExpressionExtendingAbstractClass.js index b44fb0a1dc8..1d661cafb65 100644 --- a/tests/baselines/reference/classExpressionExtendingAbstractClass.js +++ b/tests/baselines/reference/classExpressionExtendingAbstractClass.js @@ -9,15 +9,16 @@ var C = class extends A { // no error reported! //// [classExpressionExtendingAbstractClass.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/classExtendingBuiltinType.js b/tests/baselines/reference/classExtendingBuiltinType.js index b492f64c680..902b3327754 100644 --- a/tests/baselines/reference/classExtendingBuiltinType.js +++ b/tests/baselines/reference/classExtendingBuiltinType.js @@ -12,15 +12,16 @@ class C10 extends Array { } //// [classExtendingBuiltinType.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C1 = (function (_super) { __extends(C1, _super); function C1() { diff --git a/tests/baselines/reference/classExtendingClass.js b/tests/baselines/reference/classExtendingClass.js index c00c6ead988..f9085262904 100644 --- a/tests/baselines/reference/classExtendingClass.js +++ b/tests/baselines/reference/classExtendingClass.js @@ -32,15 +32,16 @@ var r7 = d2.thing(''); var r8 = D2.other(1); //// [classExtendingClass.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/classExtendingClassLikeType.js b/tests/baselines/reference/classExtendingClassLikeType.js index e1f08388848..d793534bd18 100644 --- a/tests/baselines/reference/classExtendingClassLikeType.js +++ b/tests/baselines/reference/classExtendingClassLikeType.js @@ -59,15 +59,16 @@ class D5 extends getBadBase() { //// [classExtendingClassLikeType.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); // Error, no Base constructor function var D0 = (function (_super) { __extends(D0, _super); diff --git a/tests/baselines/reference/classExtendingNonConstructor.js b/tests/baselines/reference/classExtendingNonConstructor.js index 5cdf91d1b20..43112c4076b 100644 --- a/tests/baselines/reference/classExtendingNonConstructor.js +++ b/tests/baselines/reference/classExtendingNonConstructor.js @@ -15,15 +15,16 @@ class C7 extends foo { } //// [classExtendingNonConstructor.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var x; function foo() { this.x = 1; diff --git a/tests/baselines/reference/classExtendingNull.js b/tests/baselines/reference/classExtendingNull.js index 087a16b3525..44fd8a51a86 100644 --- a/tests/baselines/reference/classExtendingNull.js +++ b/tests/baselines/reference/classExtendingNull.js @@ -4,15 +4,16 @@ class C2 extends (null) { } //// [classExtendingNull.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C1 = (function (_super) { __extends(C1, _super); function C1() { diff --git a/tests/baselines/reference/classExtendingPrimitive.js b/tests/baselines/reference/classExtendingPrimitive.js index 642ab4671af..15f225a6dbe 100644 --- a/tests/baselines/reference/classExtendingPrimitive.js +++ b/tests/baselines/reference/classExtendingPrimitive.js @@ -16,15 +16,16 @@ class C8 extends E { } //// [classExtendingPrimitive.js] // classes cannot extend primitives -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function (_super) { __extends(C, _super); function C() { diff --git a/tests/baselines/reference/classExtendingPrimitive2.js b/tests/baselines/reference/classExtendingPrimitive2.js index 6b56f16547f..49fbce51aa2 100644 --- a/tests/baselines/reference/classExtendingPrimitive2.js +++ b/tests/baselines/reference/classExtendingPrimitive2.js @@ -6,15 +6,16 @@ class C5a extends null { } //// [classExtendingPrimitive2.js] // classes cannot extend primitives -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C4a = (function () { function C4a() { } diff --git a/tests/baselines/reference/classExtendingQualifiedName.js b/tests/baselines/reference/classExtendingQualifiedName.js index f144f13c5b8..02346427ed3 100644 --- a/tests/baselines/reference/classExtendingQualifiedName.js +++ b/tests/baselines/reference/classExtendingQualifiedName.js @@ -8,15 +8,16 @@ module M { } //// [classExtendingQualifiedName.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var M; (function (M) { var C = (function () { diff --git a/tests/baselines/reference/classExtendingQualifiedName2.js b/tests/baselines/reference/classExtendingQualifiedName2.js index 6c07a405804..8add3046013 100644 --- a/tests/baselines/reference/classExtendingQualifiedName2.js +++ b/tests/baselines/reference/classExtendingQualifiedName2.js @@ -8,15 +8,16 @@ module M { } //// [classExtendingQualifiedName2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var M; (function (M) { var C = (function () { diff --git a/tests/baselines/reference/classExtendsAcrossFiles.js b/tests/baselines/reference/classExtendsAcrossFiles.js index b3584f42511..0f0fb5ba2d9 100644 --- a/tests/baselines/reference/classExtendsAcrossFiles.js +++ b/tests/baselines/reference/classExtendsAcrossFiles.js @@ -21,15 +21,16 @@ export const b = { //// [b.js] "use strict"; -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a_1 = require("./a"); exports.b = { f: function () { @@ -50,15 +51,16 @@ exports.b = { }; //// [a.js] "use strict"; -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var b_1 = require("./b"); exports.a = { f: function () { diff --git a/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js b/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js index 56d13af039d..9bca40631f9 100644 --- a/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js +++ b/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js @@ -14,15 +14,16 @@ module Foo { } //// [classExtendsClauseClassMergedWithModuleNotReferingConstructor.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.js b/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.js index 7f529967cda..3d02e381da9 100644 --- a/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.js +++ b/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.js @@ -7,15 +7,16 @@ module Foo { //// [classExtendsClauseClassNotReferringConstructor.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/classExtendsEveryObjectType.js b/tests/baselines/reference/classExtendsEveryObjectType.js index 6babd7fb0b3..91ccc496fcb 100644 --- a/tests/baselines/reference/classExtendsEveryObjectType.js +++ b/tests/baselines/reference/classExtendsEveryObjectType.js @@ -17,15 +17,16 @@ class C5 extends foo { } // error class C6 extends []{ } // error //// [classExtendsEveryObjectType.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function (_super) { __extends(C, _super); function C() { diff --git a/tests/baselines/reference/classExtendsEveryObjectType2.js b/tests/baselines/reference/classExtendsEveryObjectType2.js index 9777735d4a9..a30b3d8c8d8 100644 --- a/tests/baselines/reference/classExtendsEveryObjectType2.js +++ b/tests/baselines/reference/classExtendsEveryObjectType2.js @@ -4,15 +4,16 @@ class C2 extends { foo: string; } { } // error class C6 extends []{ } // error //// [classExtendsEveryObjectType2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C2 = (function (_super) { __extends(C2, _super); function C2() { diff --git a/tests/baselines/reference/classExtendsInterface.js b/tests/baselines/reference/classExtendsInterface.js index b4329897528..e5710190673 100644 --- a/tests/baselines/reference/classExtendsInterface.js +++ b/tests/baselines/reference/classExtendsInterface.js @@ -9,15 +9,16 @@ class B2 implements Comparable2 {} //// [classExtendsInterface.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function (_super) { __extends(A, _super); function A() { diff --git a/tests/baselines/reference/classExtendsInterfaceInExpression.js b/tests/baselines/reference/classExtendsInterfaceInExpression.js index 2d6b25bea37..e017ebb8e06 100644 --- a/tests/baselines/reference/classExtendsInterfaceInExpression.js +++ b/tests/baselines/reference/classExtendsInterfaceInExpression.js @@ -9,15 +9,16 @@ class C extends factory(A) {} //// [classExtendsInterfaceInExpression.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); function factory(a) { return null; } diff --git a/tests/baselines/reference/classExtendsInterfaceInModule.js b/tests/baselines/reference/classExtendsInterfaceInModule.js index 89ed5042964..3d100bcfb67 100644 --- a/tests/baselines/reference/classExtendsInterfaceInModule.js +++ b/tests/baselines/reference/classExtendsInterfaceInModule.js @@ -16,15 +16,16 @@ class D extends Mod.Nested.I {} //// [classExtendsInterfaceInModule.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C1 = (function (_super) { __extends(C1, _super); function C1() { diff --git a/tests/baselines/reference/classExtendsItself.js b/tests/baselines/reference/classExtendsItself.js index 29f029bd626..2f32d827dcb 100644 --- a/tests/baselines/reference/classExtendsItself.js +++ b/tests/baselines/reference/classExtendsItself.js @@ -6,15 +6,16 @@ class D extends D { } // error class E extends E { } // error //// [classExtendsItself.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function (_super) { __extends(C, _super); function C() { diff --git a/tests/baselines/reference/classExtendsItselfIndirectly.js b/tests/baselines/reference/classExtendsItselfIndirectly.js index a12b90dce44..d6ca939a910 100644 --- a/tests/baselines/reference/classExtendsItselfIndirectly.js +++ b/tests/baselines/reference/classExtendsItselfIndirectly.js @@ -12,15 +12,16 @@ class D2 extends C2 { bar: T; } class E2 extends D2 { baz: T; } //// [classExtendsItselfIndirectly.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function (_super) { __extends(C, _super); function C() { diff --git a/tests/baselines/reference/classExtendsItselfIndirectly2.js b/tests/baselines/reference/classExtendsItselfIndirectly2.js index 1a073528bad..6587c65a5fa 100644 --- a/tests/baselines/reference/classExtendsItselfIndirectly2.js +++ b/tests/baselines/reference/classExtendsItselfIndirectly2.js @@ -23,15 +23,16 @@ module O { } //// [classExtendsItselfIndirectly2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function (_super) { __extends(C, _super); function C() { diff --git a/tests/baselines/reference/classExtendsItselfIndirectly3.js b/tests/baselines/reference/classExtendsItselfIndirectly3.js index c42b937a85c..d36545bafd3 100644 --- a/tests/baselines/reference/classExtendsItselfIndirectly3.js +++ b/tests/baselines/reference/classExtendsItselfIndirectly3.js @@ -19,15 +19,16 @@ class D2 extends C2 { bar: T; } class E2 extends D2 { baz: T; } //// [classExtendsItselfIndirectly_file1.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function (_super) { __extends(C, _super); function C() { @@ -36,15 +37,16 @@ var C = (function (_super) { return C; }(E)); // error //// [classExtendsItselfIndirectly_file2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var D = (function (_super) { __extends(D, _super); function D() { @@ -53,15 +55,16 @@ var D = (function (_super) { return D; }(C)); //// [classExtendsItselfIndirectly_file3.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var E = (function (_super) { __extends(E, _super); function E() { @@ -70,15 +73,16 @@ var E = (function (_super) { return E; }(D)); //// [classExtendsItselfIndirectly_file4.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C2 = (function (_super) { __extends(C2, _super); function C2() { @@ -87,15 +91,16 @@ var C2 = (function (_super) { return C2; }(E2)); // error //// [classExtendsItselfIndirectly_file5.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var D2 = (function (_super) { __extends(D2, _super); function D2() { @@ -104,15 +109,16 @@ var D2 = (function (_super) { return D2; }(C2)); //// [classExtendsItselfIndirectly_file6.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var E2 = (function (_super) { __extends(E2, _super); function E2() { diff --git a/tests/baselines/reference/classExtendsMultipleBaseClasses.js b/tests/baselines/reference/classExtendsMultipleBaseClasses.js index 7028383c349..3b1fd2de5cf 100644 --- a/tests/baselines/reference/classExtendsMultipleBaseClasses.js +++ b/tests/baselines/reference/classExtendsMultipleBaseClasses.js @@ -4,15 +4,16 @@ class B { } class C extends A,B { } //// [classExtendsMultipleBaseClasses.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/classExtendsNull.js b/tests/baselines/reference/classExtendsNull.js index d68d39a1acb..d8cadbbe32b 100644 --- a/tests/baselines/reference/classExtendsNull.js +++ b/tests/baselines/reference/classExtendsNull.js @@ -13,15 +13,16 @@ class D extends null { } //// [classExtendsNull.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function (_super) { __extends(C, _super); function C() { diff --git a/tests/baselines/reference/classExtendsShadowedConstructorFunction.js b/tests/baselines/reference/classExtendsShadowedConstructorFunction.js index 9dd314f8c1d..79ae0cf243f 100644 --- a/tests/baselines/reference/classExtendsShadowedConstructorFunction.js +++ b/tests/baselines/reference/classExtendsShadowedConstructorFunction.js @@ -9,15 +9,16 @@ module M { } //// [classExtendsShadowedConstructorFunction.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/classExtendsValidConstructorFunction.js b/tests/baselines/reference/classExtendsValidConstructorFunction.js index 603fd5d6997..b2a38318bab 100644 --- a/tests/baselines/reference/classExtendsValidConstructorFunction.js +++ b/tests/baselines/reference/classExtendsValidConstructorFunction.js @@ -6,15 +6,16 @@ var x = new foo(); // can be used as a constructor function class C extends foo { } // error, cannot extend it though //// [classExtendsValidConstructorFunction.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); function foo() { } var x = new foo(); // can be used as a constructor function var C = (function (_super) { diff --git a/tests/baselines/reference/classHeritageWithTrailingSeparator.js b/tests/baselines/reference/classHeritageWithTrailingSeparator.js index 087696113d4..bd9f925b7d6 100644 --- a/tests/baselines/reference/classHeritageWithTrailingSeparator.js +++ b/tests/baselines/reference/classHeritageWithTrailingSeparator.js @@ -4,15 +4,16 @@ class D extends C, { } //// [classHeritageWithTrailingSeparator.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/classImplementsClass2.js b/tests/baselines/reference/classImplementsClass2.js index 756e5df939a..e564beda164 100644 --- a/tests/baselines/reference/classImplementsClass2.js +++ b/tests/baselines/reference/classImplementsClass2.js @@ -14,15 +14,16 @@ c = c2; c2 = c; //// [classImplementsClass2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/classImplementsClass3.js b/tests/baselines/reference/classImplementsClass3.js index c6e50df32b0..707a9dbe6b9 100644 --- a/tests/baselines/reference/classImplementsClass3.js +++ b/tests/baselines/reference/classImplementsClass3.js @@ -15,15 +15,16 @@ c = c2; c2 = c; //// [classImplementsClass3.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/classImplementsClass4.js b/tests/baselines/reference/classImplementsClass4.js index 0b19e3d3aa7..5748fbb30f5 100644 --- a/tests/baselines/reference/classImplementsClass4.js +++ b/tests/baselines/reference/classImplementsClass4.js @@ -17,15 +17,16 @@ c = c2; c2 = c; //// [classImplementsClass4.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { this.x = 1; diff --git a/tests/baselines/reference/classImplementsClass5.js b/tests/baselines/reference/classImplementsClass5.js index 941fc02a1ce..12388b65a17 100644 --- a/tests/baselines/reference/classImplementsClass5.js +++ b/tests/baselines/reference/classImplementsClass5.js @@ -18,15 +18,16 @@ c = c2; c2 = c; //// [classImplementsClass5.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { this.x = 1; diff --git a/tests/baselines/reference/classImplementsClass6.js b/tests/baselines/reference/classImplementsClass6.js index 1e2eb13419a..52959ed351a 100644 --- a/tests/baselines/reference/classImplementsClass6.js +++ b/tests/baselines/reference/classImplementsClass6.js @@ -22,15 +22,16 @@ c.bar(); // error c2.bar(); // should error //// [classImplementsClass6.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/classIndexer3.js b/tests/baselines/reference/classIndexer3.js index 5c65f63cc03..29dd552da9c 100644 --- a/tests/baselines/reference/classIndexer3.js +++ b/tests/baselines/reference/classIndexer3.js @@ -11,15 +11,16 @@ class D123 extends C123 { } //// [classIndexer3.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C123 = (function () { function C123() { } diff --git a/tests/baselines/reference/classInheritence.js b/tests/baselines/reference/classInheritence.js index 509433205e9..d53bdbd8214 100644 --- a/tests/baselines/reference/classInheritence.js +++ b/tests/baselines/reference/classInheritence.js @@ -3,15 +3,16 @@ class B extends A { } class A extends A { } //// [classInheritence.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var B = (function (_super) { __extends(B, _super); function B() { diff --git a/tests/baselines/reference/classIsSubtypeOfBaseType.js b/tests/baselines/reference/classIsSubtypeOfBaseType.js index 861d84ebbac..f8a691ead9a 100644 --- a/tests/baselines/reference/classIsSubtypeOfBaseType.js +++ b/tests/baselines/reference/classIsSubtypeOfBaseType.js @@ -16,15 +16,16 @@ class Derived2 extends Base<{ bar: string; }> { } //// [classIsSubtypeOfBaseType.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/classOrder2.js b/tests/baselines/reference/classOrder2.js index a80e58fe3cd..c9859337efe 100644 --- a/tests/baselines/reference/classOrder2.js +++ b/tests/baselines/reference/classOrder2.js @@ -20,15 +20,16 @@ a.foo(); //// [classOrder2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function (_super) { __extends(A, _super); function A() { diff --git a/tests/baselines/reference/classOrderBug.js b/tests/baselines/reference/classOrderBug.js index a872fe3165f..14ab934d77c 100644 --- a/tests/baselines/reference/classOrderBug.js +++ b/tests/baselines/reference/classOrderBug.js @@ -16,15 +16,16 @@ class foo extends baz {} //// [classOrderBug.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var bar = (function () { function bar() { this.baz = new foo(); diff --git a/tests/baselines/reference/classSideInheritance1.js b/tests/baselines/reference/classSideInheritance1.js index 09bddc4b22b..da6e44e42fe 100644 --- a/tests/baselines/reference/classSideInheritance1.js +++ b/tests/baselines/reference/classSideInheritance1.js @@ -16,15 +16,16 @@ A.bar(); // valid C2.bar(); // valid //// [classSideInheritance1.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/classSideInheritance2.js b/tests/baselines/reference/classSideInheritance2.js index 49ddf4daa72..a75bef9fbaf 100644 --- a/tests/baselines/reference/classSideInheritance2.js +++ b/tests/baselines/reference/classSideInheritance2.js @@ -21,15 +21,16 @@ class TextBase implements IText { } //// [classSideInheritance2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var SubText = (function (_super) { __extends(SubText, _super); function SubText(text, span) { diff --git a/tests/baselines/reference/classSideInheritance3.js b/tests/baselines/reference/classSideInheritance3.js index 55f5b6863aa..1538ed6e07e 100644 --- a/tests/baselines/reference/classSideInheritance3.js +++ b/tests/baselines/reference/classSideInheritance3.js @@ -19,15 +19,16 @@ var r2: new (x: string) => A = B; // error var r3: typeof A = C; // ok //// [classSideInheritance3.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A(x) { this.x = x; diff --git a/tests/baselines/reference/classUpdateTests.js b/tests/baselines/reference/classUpdateTests.js index 1cb5c51e963..5e11c448307 100644 --- a/tests/baselines/reference/classUpdateTests.js +++ b/tests/baselines/reference/classUpdateTests.js @@ -114,15 +114,16 @@ class R { } //// [classUpdateTests.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); // // test codegen for instance properties // diff --git a/tests/baselines/reference/classWithBaseClassButNoConstructor.js b/tests/baselines/reference/classWithBaseClassButNoConstructor.js index 9bc92274b47..d6638d88cec 100644 --- a/tests/baselines/reference/classWithBaseClassButNoConstructor.js +++ b/tests/baselines/reference/classWithBaseClassButNoConstructor.js @@ -41,15 +41,16 @@ var d5 = new D(); // error var d6 = new D(1); // ok //// [classWithBaseClassButNoConstructor.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base(x) { } diff --git a/tests/baselines/reference/classWithConstructors.js b/tests/baselines/reference/classWithConstructors.js index 96dc9dea8c5..fde7ad2da32 100644 --- a/tests/baselines/reference/classWithConstructors.js +++ b/tests/baselines/reference/classWithConstructors.js @@ -50,15 +50,16 @@ module Generics { } //// [classWithConstructors.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var NonGeneric; (function (NonGeneric) { var C = (function () { diff --git a/tests/baselines/reference/classWithProtectedProperty.js b/tests/baselines/reference/classWithProtectedProperty.js index aee0b38fef8..0188835fdac 100644 --- a/tests/baselines/reference/classWithProtectedProperty.js +++ b/tests/baselines/reference/classWithProtectedProperty.js @@ -29,15 +29,16 @@ class D extends C { //// [classWithProtectedProperty.js] // accessing any protected outside the class is an error -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { this.a = ''; diff --git a/tests/baselines/reference/classWithStaticMembers.js b/tests/baselines/reference/classWithStaticMembers.js index e327c76afcf..1ed38d2fee8 100644 --- a/tests/baselines/reference/classWithStaticMembers.js +++ b/tests/baselines/reference/classWithStaticMembers.js @@ -20,15 +20,16 @@ var r2 = r.x; var r3 = r.foo; //// [classWithStaticMembers.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C(a, b) { this.a = a; diff --git a/tests/baselines/reference/classdecl.js b/tests/baselines/reference/classdecl.js index 57ab3282526..ef7490f572d 100644 --- a/tests/baselines/reference/classdecl.js +++ b/tests/baselines/reference/classdecl.js @@ -94,15 +94,16 @@ class e { } //// [classdecl.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = (function () { function a(ns) { } diff --git a/tests/baselines/reference/clodulesDerivedClasses.js b/tests/baselines/reference/clodulesDerivedClasses.js index 88a39a07003..3fd40d61762 100644 --- a/tests/baselines/reference/clodulesDerivedClasses.js +++ b/tests/baselines/reference/clodulesDerivedClasses.js @@ -23,15 +23,16 @@ module Path.Utils { //// [clodulesDerivedClasses.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Shape = (function () { function Shape() { } diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js index d7bf933004d..77025b6aa0c 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js @@ -40,15 +40,16 @@ class c extends Foo { } //// [collisionSuperAndLocalFunctionInAccessors.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); function _super() { } var Foo = (function () { diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.js index c725285a368..02e88a60761 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.js +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.js @@ -25,15 +25,16 @@ class c extends Foo { } //// [collisionSuperAndLocalFunctionInConstructor.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); function _super() { } var Foo = (function () { diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.js index b9bbd23c538..91f9f5617df 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.js +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.js @@ -29,15 +29,16 @@ class c extends Foo { } //// [collisionSuperAndLocalFunctionInMethod.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); function _super() { } var Foo = (function () { diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js index 69beacb953b..520367125fe 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js @@ -19,15 +19,16 @@ class b extends Foo { } //// [collisionSuperAndLocalFunctionInProperty.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); function _super() { } var Foo = (function () { diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js b/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js index adf4a62a9b8..e77c21c058e 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js +++ b/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js @@ -33,15 +33,16 @@ class c extends Foo { } //// [collisionSuperAndLocalVarInAccessors.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var _super = 10; // No Error var Foo = (function () { function Foo() { diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js b/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js index d6909c50783..1a2f6b35800 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js +++ b/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js @@ -21,15 +21,16 @@ class c extends Foo { } //// [collisionSuperAndLocalVarInConstructor.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var _super = 10; // No Error var Foo = (function () { function Foo() { diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js b/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js index e63bf4d9ac5..028ce3ae4a9 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js +++ b/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js @@ -19,15 +19,16 @@ class c extends Foo { } //// [collisionSuperAndLocalVarInMethod.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var _super = 10; // No Error var Foo = (function () { function Foo() { diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js b/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js index 48b1298a545..c8ed5fc9d8f 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js +++ b/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js @@ -18,15 +18,16 @@ class b extends Foo { } //// [collisionSuperAndLocalVarInProperty.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var _super = 10; // No Error var Foo = (function () { function Foo() { diff --git a/tests/baselines/reference/collisionSuperAndNameResolution.js b/tests/baselines/reference/collisionSuperAndNameResolution.js index 6c8f5a8fe34..2c0316dc66b 100644 --- a/tests/baselines/reference/collisionSuperAndNameResolution.js +++ b/tests/baselines/reference/collisionSuperAndNameResolution.js @@ -12,15 +12,16 @@ class Foo extends base { } //// [collisionSuperAndNameResolution.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var console; var _super = 10; // No error var base = (function () { diff --git a/tests/baselines/reference/collisionSuperAndParameter.js b/tests/baselines/reference/collisionSuperAndParameter.js index ccc2d90f5f3..ef86232c1f1 100644 --- a/tests/baselines/reference/collisionSuperAndParameter.js +++ b/tests/baselines/reference/collisionSuperAndParameter.js @@ -63,15 +63,16 @@ class Foo4 extends Foo { } //// [collisionSuperAndParameter.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Foo = (function () { function Foo() { } diff --git a/tests/baselines/reference/collisionSuperAndParameter1.js b/tests/baselines/reference/collisionSuperAndParameter1.js index 554148becf8..d70f7da34e8 100644 --- a/tests/baselines/reference/collisionSuperAndParameter1.js +++ b/tests/baselines/reference/collisionSuperAndParameter1.js @@ -10,15 +10,16 @@ class Foo2 extends Foo { } //// [collisionSuperAndParameter1.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Foo = (function () { function Foo() { } diff --git a/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js b/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js index 211602b2c14..919265f587e 100644 --- a/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js +++ b/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js @@ -31,15 +31,16 @@ class b4 extends a { } //// [collisionSuperAndPropertyNameAsConstuctorParameter.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = (function () { function a() { } diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js b/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js index e80dc2b8ebb..f380d8dc4ba 100644 --- a/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js +++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js @@ -19,15 +19,16 @@ class b2 extends a { } //// [collisionThisExpressionAndLocalVarWithSuperExperssion.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = (function () { function a() { } diff --git a/tests/baselines/reference/commentsInheritance.js b/tests/baselines/reference/commentsInheritance.js index cba27b5f2e8..e7feed00b6a 100644 --- a/tests/baselines/reference/commentsInheritance.js +++ b/tests/baselines/reference/commentsInheritance.js @@ -152,15 +152,16 @@ i2_i = i3_i; //// [commentsInheritance.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var c1 = (function () { function c1() { } diff --git a/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.js b/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.js index afaf71ca9b2..15b82315972 100644 --- a/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.js +++ b/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.js @@ -195,15 +195,16 @@ var r8b6 = b5 !== a5; var r8b7 = b6 !== a6; //// [comparisonOperatorWithIdenticalObjects.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A1 = (function () { function A1() { } diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js index 236804898c3..7b541b2c304 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js @@ -169,15 +169,16 @@ var r8b6 = b6 !== a6; var r8b7 = b7 !== a7; //// [comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js index 0408116f8cf..9cf6be1f116 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js @@ -169,15 +169,16 @@ var r8b6 = b6 !== a6; var r8b7 = b7 !== a7; //// [comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js index 44fceec0004..f0fe513de27 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js @@ -112,15 +112,16 @@ var r8b3 = b3 !== a3; var r8b4 = b4 !== a4; //// [comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js index 641b75e8688..4b31f7403e1 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js @@ -150,15 +150,16 @@ var r8b5 = b5 !== a5; var r8b6 = b6 !== a6; //// [comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js index cc75533ef97..06472bc1527 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js @@ -150,15 +150,16 @@ var r8b5 = b5 !== a5; var r8b6 = b6 !== a6; //// [comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnCallSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnCallSignature.js index 5fa26a64469..91fa37507bf 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnCallSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnCallSignature.js @@ -260,15 +260,16 @@ var r8b11 = b11 !== a11; //var r8b12 = b12 !== a12; //// [comparisonOperatorWithSubtypeObjectOnCallSignature.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnConstructorSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnConstructorSignature.js index 0a9a731428d..2eb5c7de9e8 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnConstructorSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnConstructorSignature.js @@ -222,15 +222,16 @@ var r8b9 = b9 !== a9; //var r8b10 = b10 !== a10; //// [comparisonOperatorWithSubtypeObjectOnConstructorSignature.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnIndexSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnIndexSignature.js index 669202334b8..a5287dcb0af 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnIndexSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnIndexSignature.js @@ -108,15 +108,16 @@ var r8b1 = b3 !== a3; var r8b1 = b4 !== a4; //// [comparisonOperatorWithSubtypeObjectOnIndexSignature.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js index 983d756c8c0..c34ed06252f 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js @@ -165,15 +165,16 @@ var r8b6 = b6 !== a6; //var r8b7 = b7 !== a7; //// [comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js index f7cc1cd02c7..0056917d60d 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js @@ -165,15 +165,16 @@ var r8b6 = b6 !== a6; //var r8b7 = b7 !== a7; //// [comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.js index f39f869018b..73c2b62cd3a 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.js @@ -79,15 +79,16 @@ var rh3 = b1 !== a1; var rh4 = b2 !== a2; //// [comparisonOperatorWithSubtypeObjectOnProperty.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/complexClassRelationships.js b/tests/baselines/reference/complexClassRelationships.js index fb481259bd3..bfbbbab2bc5 100644 --- a/tests/baselines/reference/complexClassRelationships.js +++ b/tests/baselines/reference/complexClassRelationships.js @@ -48,15 +48,16 @@ class FooBase { } //// [complexClassRelationships.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); // There should be no errors in this file var Derived = (function (_super) { __extends(Derived, _super); diff --git a/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.js b/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.js index c63df9b0c9b..187a4389261 100644 --- a/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.js +++ b/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.js @@ -6,15 +6,16 @@ class S18 extends S18 //// [complicatedGenericRecursiveBaseClassReference.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var S18 = (function (_super) { __extends(S18, _super); function S18() { diff --git a/tests/baselines/reference/compoundAssignmentLHSIsValue.js b/tests/baselines/reference/compoundAssignmentLHSIsValue.js index b918701f5a1..ec8610a1164 100644 --- a/tests/baselines/reference/compoundAssignmentLHSIsValue.js +++ b/tests/baselines/reference/compoundAssignmentLHSIsValue.js @@ -124,15 +124,16 @@ foo() += value; (foo()) += value; //// [compoundAssignmentLHSIsValue.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); // expected error for all the LHS of compound assignments (arithmetic and addition) var value; // this diff --git a/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js b/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js index a4812a00cc6..c7060a5120d 100644 --- a/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js +++ b/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js @@ -86,15 +86,16 @@ foo() **= value; (foo()) **= value; //// [compoundExponentiationAssignmentLHSIsValue.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); // expected error for all the LHS of compound assignments (arithmetic and addition) var value; // this diff --git a/tests/baselines/reference/computedPropertyNames24_ES5.js b/tests/baselines/reference/computedPropertyNames24_ES5.js index 8ac5c5be0b8..75c032d7f91 100644 --- a/tests/baselines/reference/computedPropertyNames24_ES5.js +++ b/tests/baselines/reference/computedPropertyNames24_ES5.js @@ -9,15 +9,16 @@ class C extends Base { } //// [computedPropertyNames24_ES5.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/computedPropertyNames25_ES5.js b/tests/baselines/reference/computedPropertyNames25_ES5.js index 12f3c1e301d..a300b687f53 100644 --- a/tests/baselines/reference/computedPropertyNames25_ES5.js +++ b/tests/baselines/reference/computedPropertyNames25_ES5.js @@ -14,15 +14,16 @@ class C extends Base { } //// [computedPropertyNames25_ES5.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/computedPropertyNames26_ES5.js b/tests/baselines/reference/computedPropertyNames26_ES5.js index f4a9d79af0f..16566ec14e7 100644 --- a/tests/baselines/reference/computedPropertyNames26_ES5.js +++ b/tests/baselines/reference/computedPropertyNames26_ES5.js @@ -11,15 +11,16 @@ class C extends Base { } //// [computedPropertyNames26_ES5.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/computedPropertyNames27_ES5.js b/tests/baselines/reference/computedPropertyNames27_ES5.js index 88319039ee6..a7d16a4d18e 100644 --- a/tests/baselines/reference/computedPropertyNames27_ES5.js +++ b/tests/baselines/reference/computedPropertyNames27_ES5.js @@ -6,15 +6,16 @@ class C extends Base { } //// [computedPropertyNames27_ES5.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/computedPropertyNames28_ES5.js b/tests/baselines/reference/computedPropertyNames28_ES5.js index 696da70eb93..5eb7b307b62 100644 --- a/tests/baselines/reference/computedPropertyNames28_ES5.js +++ b/tests/baselines/reference/computedPropertyNames28_ES5.js @@ -11,15 +11,16 @@ class C extends Base { } //// [computedPropertyNames28_ES5.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/computedPropertyNames30_ES5.js b/tests/baselines/reference/computedPropertyNames30_ES5.js index 3b4c663602d..44b748a0af2 100644 --- a/tests/baselines/reference/computedPropertyNames30_ES5.js +++ b/tests/baselines/reference/computedPropertyNames30_ES5.js @@ -16,15 +16,16 @@ class C extends Base { } //// [computedPropertyNames30_ES5.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/computedPropertyNames31_ES5.js b/tests/baselines/reference/computedPropertyNames31_ES5.js index a727f478603..97f03e71923 100644 --- a/tests/baselines/reference/computedPropertyNames31_ES5.js +++ b/tests/baselines/reference/computedPropertyNames31_ES5.js @@ -16,15 +16,16 @@ class C extends Base { } //// [computedPropertyNames31_ES5.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/computedPropertyNames43_ES5.js b/tests/baselines/reference/computedPropertyNames43_ES5.js index d2bde183b8b..100258284ba 100644 --- a/tests/baselines/reference/computedPropertyNames43_ES5.js +++ b/tests/baselines/reference/computedPropertyNames43_ES5.js @@ -13,15 +13,16 @@ class D extends C { } //// [computedPropertyNames43_ES5.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Foo = (function () { function Foo() { } diff --git a/tests/baselines/reference/computedPropertyNames44_ES5.js b/tests/baselines/reference/computedPropertyNames44_ES5.js index b39e2375cb5..6064411248d 100644 --- a/tests/baselines/reference/computedPropertyNames44_ES5.js +++ b/tests/baselines/reference/computedPropertyNames44_ES5.js @@ -12,15 +12,16 @@ class D extends C { } //// [computedPropertyNames44_ES5.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Foo = (function () { function Foo() { } diff --git a/tests/baselines/reference/computedPropertyNames45_ES5.js b/tests/baselines/reference/computedPropertyNames45_ES5.js index a74e87bbfd5..d3b6ccc7552 100644 --- a/tests/baselines/reference/computedPropertyNames45_ES5.js +++ b/tests/baselines/reference/computedPropertyNames45_ES5.js @@ -13,15 +13,16 @@ class D extends C { } //// [computedPropertyNames45_ES5.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Foo = (function () { function Foo() { } diff --git a/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js b/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js index aa8b62c16e7..609c81f173d 100644 --- a/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js +++ b/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js @@ -48,15 +48,16 @@ var result11: any = true ? 1 : 'string'; //// [conditionalOperatorWithIdenticalBCT.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); //Cond ? Expr1 : Expr2, Expr1 and Expr2 have identical best common type var X = (function () { function X() { diff --git a/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js b/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js index 8f4f4b20a56..df5c7aac44f 100644 --- a/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js +++ b/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js @@ -24,15 +24,16 @@ var result61: (t: X) => number| string = true ? (m) => m.propertyX1 : (n) => n.p //// [conditionalOperatorWithoutIdenticalBCT.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); //Cond ? Expr1 : Expr2, Expr1 and Expr2 have no identical best common type var X = (function () { function X() { diff --git a/tests/baselines/reference/constantOverloadFunction.js b/tests/baselines/reference/constantOverloadFunction.js index 170f5ba5dae..70effecc498 100644 --- a/tests/baselines/reference/constantOverloadFunction.js +++ b/tests/baselines/reference/constantOverloadFunction.js @@ -14,15 +14,16 @@ function foo(tagName: any): Base { //// [constantOverloadFunction.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js b/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js index e104a1f8e89..74e70d97bd9 100644 --- a/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js +++ b/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js @@ -15,15 +15,16 @@ function foo(tagName: any): Base { //// [constantOverloadFunctionNoSubtypeError.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js b/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js index fddad137136..49f93e2497e 100644 --- a/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js +++ b/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js @@ -20,15 +20,16 @@ class Container { } //// [constraintCheckInGenericBaseTypeReference.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); // No errors var Constraint = (function () { function Constraint() { diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.js index 06b273e9801..e2a884c4589 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.js @@ -71,15 +71,16 @@ interface I extends A { //// [constructSignatureAssignabilityInInheritance2.js] // checking subtype relations for function types as it relates to contextual signature instantiation -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.js index 6ca8645ee9e..87392413b1b 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.js @@ -114,15 +114,16 @@ module Errors { //// [constructSignatureAssignabilityInInheritance3.js] // checking subtype relations for function types as it relates to contextual signature instantiation // error cases -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Errors; (function (Errors) { var Base = (function () { diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance4.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance4.js index 41ad9ead849..fb09253688d 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance4.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance4.js @@ -61,15 +61,16 @@ interface I extends A { //// [constructSignatureAssignabilityInInheritance4.js] // checking subtype relations for function types as it relates to contextual signature instantiation -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.js index cb5e254d6b2..6ad855c7d32 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.js @@ -51,15 +51,16 @@ interface I extends B { //// [constructSignatureAssignabilityInInheritance5.js] // checking subtype relations for function types as it relates to contextual signature instantiation // same as subtypingWithConstructSignatures2 just with an extra level of indirection in the inheritance chain -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.js index b9389d26fc8..5e768b4a41b 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.js @@ -54,15 +54,16 @@ interface I9 extends A { // checking subtype relations for function types as it relates to contextual signature instantiation // same as subtypingWithConstructSignatures4 but using class type parameters instead of generic signatures // all are errors -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/constructorArgs.js b/tests/baselines/reference/constructorArgs.js index 5f5a3d7b565..47c508cab06 100644 --- a/tests/baselines/reference/constructorArgs.js +++ b/tests/baselines/reference/constructorArgs.js @@ -16,15 +16,16 @@ class Sub extends Super { //// [constructorArgs.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Super = (function () { function Super(value) { } diff --git a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType.js b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType.js index 13e2317bb6f..633a7a155c5 100644 --- a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType.js +++ b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType.js @@ -20,15 +20,16 @@ class Derived2 extends Base { } //// [constructorFunctionTypeIsAssignableToBaseType.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js index e8c04ace7ef..07e11b5c681 100644 --- a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js +++ b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js @@ -34,15 +34,16 @@ class Derived2 extends Base { //// [constructorFunctionTypeIsAssignableToBaseType2.js] // the constructor function itself does not need to be a subtype of the base type constructor function -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base(x) { } diff --git a/tests/baselines/reference/constructorHasPrototypeProperty.js b/tests/baselines/reference/constructorHasPrototypeProperty.js index 76d260f780d..f2b90a57161 100644 --- a/tests/baselines/reference/constructorHasPrototypeProperty.js +++ b/tests/baselines/reference/constructorHasPrototypeProperty.js @@ -32,15 +32,16 @@ module Generic { } //// [constructorHasPrototypeProperty.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var NonGeneric; (function (NonGeneric) { var C = (function () { diff --git a/tests/baselines/reference/constructorOverloads2.js b/tests/baselines/reference/constructorOverloads2.js index a3302dc70f9..67df7fb4e22 100644 --- a/tests/baselines/reference/constructorOverloads2.js +++ b/tests/baselines/reference/constructorOverloads2.js @@ -26,15 +26,16 @@ f1.bar1(); //// [constructorOverloads2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var FooBase = (function () { function FooBase(x) { } diff --git a/tests/baselines/reference/constructorOverloads3.js b/tests/baselines/reference/constructorOverloads3.js index e202486ecec..79b648e0cbb 100644 --- a/tests/baselines/reference/constructorOverloads3.js +++ b/tests/baselines/reference/constructorOverloads3.js @@ -23,15 +23,16 @@ f1.bar1(); //// [constructorOverloads3.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Foo = (function (_super) { __extends(Foo, _super); function Foo(x, y) { diff --git a/tests/baselines/reference/constructorWithCapturedSuper.js b/tests/baselines/reference/constructorWithCapturedSuper.js index be129d5f1ec..2034ea11c4f 100644 --- a/tests/baselines/reference/constructorWithCapturedSuper.js +++ b/tests/baselines/reference/constructorWithCapturedSuper.js @@ -53,15 +53,16 @@ class D extends A { } //// [constructorWithCapturedSuper.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var oneA; var A = (function () { function A() { diff --git a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js index 2f481a58bea..dbeed3de1fd 100644 --- a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js +++ b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js @@ -281,15 +281,16 @@ TypeScriptAllInOne.Program.Main(); //// [constructorWithIncompleteTypeAnnotation.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var fs = module; ("fs"); var TypeScriptAllInOne; diff --git a/tests/baselines/reference/contextualTypingArrayOfLambdas.js b/tests/baselines/reference/contextualTypingArrayOfLambdas.js index 39cbbe78c00..60cc6d99771 100644 --- a/tests/baselines/reference/contextualTypingArrayOfLambdas.js +++ b/tests/baselines/reference/contextualTypingArrayOfLambdas.js @@ -15,15 +15,16 @@ var xs = [(x: A) => { }, (x: B) => { }, (x: C) => { }]; //// [contextualTypingArrayOfLambdas.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/contextualTypingOfConditionalExpression.js b/tests/baselines/reference/contextualTypingOfConditionalExpression.js index 0a6794472a1..063ae781b6f 100644 --- a/tests/baselines/reference/contextualTypingOfConditionalExpression.js +++ b/tests/baselines/reference/contextualTypingOfConditionalExpression.js @@ -15,15 +15,16 @@ var x2: (a: A) => void = true ? (a) => a.foo : (b) => b.foo; //// [contextualTypingOfConditionalExpression.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var x = true ? function (a) { return a.toExponential(); } : function (b) { return b.toFixed(); }; var A = (function () { function A() { diff --git a/tests/baselines/reference/contextualTypingOfConditionalExpression2.js b/tests/baselines/reference/contextualTypingOfConditionalExpression2.js index 7788ee44382..c2bf66b2973 100644 --- a/tests/baselines/reference/contextualTypingOfConditionalExpression2.js +++ b/tests/baselines/reference/contextualTypingOfConditionalExpression2.js @@ -13,15 +13,16 @@ var x2: (a: A) => void = true ? (a: C) => a.foo : (b: number) => { }; //// [contextualTypingOfConditionalExpression2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.js b/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.js index 2e2bdd009d2..8c6de85ca93 100644 --- a/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.js +++ b/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.js @@ -11,15 +11,16 @@ var a: D = foo("hi", []); //// [crashInsourcePropertyIsRelatableToTargetProperty.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { this.x = 1; diff --git a/tests/baselines/reference/declFileClassExtendsNull.js b/tests/baselines/reference/declFileClassExtendsNull.js index d362a5f04d9..b5d473c86ce 100644 --- a/tests/baselines/reference/declFileClassExtendsNull.js +++ b/tests/baselines/reference/declFileClassExtendsNull.js @@ -4,15 +4,16 @@ class ExtendsNull extends null { } //// [declFileClassExtendsNull.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var ExtendsNull = (function (_super) { __extends(ExtendsNull, _super); function ExtendsNull() { diff --git a/tests/baselines/reference/declFileForFunctionTypeAsTypeParameter.js b/tests/baselines/reference/declFileForFunctionTypeAsTypeParameter.js index f0805f9617f..3262454f72d 100644 --- a/tests/baselines/reference/declFileForFunctionTypeAsTypeParameter.js +++ b/tests/baselines/reference/declFileForFunctionTypeAsTypeParameter.js @@ -10,15 +10,16 @@ interface I extends X<() => number> { //// [declFileForFunctionTypeAsTypeParameter.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var X = (function () { function X() { } diff --git a/tests/baselines/reference/declFileGenericClassWithGenericExtendedClass.js b/tests/baselines/reference/declFileGenericClassWithGenericExtendedClass.js index c1be3af34e1..0333bf19d21 100644 --- a/tests/baselines/reference/declFileGenericClassWithGenericExtendedClass.js +++ b/tests/baselines/reference/declFileGenericClassWithGenericExtendedClass.js @@ -13,15 +13,16 @@ class Baz implements IBar { //// [declFileGenericClassWithGenericExtendedClass.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/declFileGenericType.js b/tests/baselines/reference/declFileGenericType.js index 402b19c0ff3..6946e840dbe 100644 --- a/tests/baselines/reference/declFileGenericType.js +++ b/tests/baselines/reference/declFileGenericType.js @@ -41,15 +41,16 @@ export var j = C.F6; //// [declFileGenericType.js] "use strict"; -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C; (function (C) { var A = (function () { diff --git a/tests/baselines/reference/declFileGenericType2.js b/tests/baselines/reference/declFileGenericType2.js index 2d0bb3ce500..1b9a79e95cb 100644 --- a/tests/baselines/reference/declFileGenericType2.js +++ b/tests/baselines/reference/declFileGenericType2.js @@ -43,15 +43,16 @@ module templa.dom.mvc.composite { //// [declFileGenericType2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); // Module var templa; (function (templa) { diff --git a/tests/baselines/reference/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js b/tests/baselines/reference/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js index 65fee8c91e4..5edd9c8c19d 100644 --- a/tests/baselines/reference/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js +++ b/tests/baselines/reference/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js @@ -21,15 +21,16 @@ module X.Y.base.Z { //// [declFileWithClassNameConflictingWithClassReferredByExtendsClause.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var X; (function (X) { var Y; diff --git a/tests/baselines/reference/declFileWithExtendsClauseThatHasItsContainerNameConflict.js b/tests/baselines/reference/declFileWithExtendsClauseThatHasItsContainerNameConflict.js index 0a79b9be3bc..07809bc8dec 100644 --- a/tests/baselines/reference/declFileWithExtendsClauseThatHasItsContainerNameConflict.js +++ b/tests/baselines/reference/declFileWithExtendsClauseThatHasItsContainerNameConflict.js @@ -19,15 +19,16 @@ module A.B.C { } //// [declFileWithExtendsClauseThatHasItsContainerNameConflict.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A; (function (A) { var B; diff --git a/tests/baselines/reference/declarationEmitExpressionInExtends.js b/tests/baselines/reference/declarationEmitExpressionInExtends.js index 4fb5b585c99..e3ebe2d0a42 100644 --- a/tests/baselines/reference/declarationEmitExpressionInExtends.js +++ b/tests/baselines/reference/declarationEmitExpressionInExtends.js @@ -15,15 +15,16 @@ var q: B; q.s; //// [declarationEmitExpressionInExtends.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var x; var Q = (function () { function Q() { diff --git a/tests/baselines/reference/declarationEmitExpressionInExtends2.js b/tests/baselines/reference/declarationEmitExpressionInExtends2.js index e059e44f140..284b0ca83ce 100644 --- a/tests/baselines/reference/declarationEmitExpressionInExtends2.js +++ b/tests/baselines/reference/declarationEmitExpressionInExtends2.js @@ -13,15 +13,16 @@ class MyClass extends getClass(2) { } //// [declarationEmitExpressionInExtends2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/declarationEmitExpressionInExtends3.js b/tests/baselines/reference/declarationEmitExpressionInExtends3.js index 19d59529486..41383d43d9e 100644 --- a/tests/baselines/reference/declarationEmitExpressionInExtends3.js +++ b/tests/baselines/reference/declarationEmitExpressionInExtends3.js @@ -45,15 +45,16 @@ export class MyClass4 extends getExportedClass(undefined)>>var __extendStatics = (this && this.__extendStatics) || ->>> Object.setPrototypeOf || ->>> ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || ->>> function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; ->>>var __extends = (this && this.__extends) || function (d, b) { ->>> __extendStatics(d, b); ->>> function __() { this.constructor = d; } ->>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); ->>>}; +>>>var __extends = (this && this.__extends) || (function () { +>>> var __extendStatics = Object.setPrototypeOf || +>>> ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +>>> function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; +>>> return function (d, b) { +>>> __extendStatics(d, b); +>>> function __() { this.constructor = d; } +>>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +>>> }; +>>>})(); >>>var C = (function () { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(10, 1) Source(2, 1) + SourceIndex(0) +1 >Emitted(11, 1) Source(2, 1) + SourceIndex(0) --- >>> function C(value) { 1->^^^^ @@ -37,9 +38,9 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts > 2 > constructor( 3 > value: number -1->Emitted(11, 5) Source(7, 5) + SourceIndex(0) -2 >Emitted(11, 16) Source(7, 17) + SourceIndex(0) -3 >Emitted(11, 21) Source(7, 30) + SourceIndex(0) +1->Emitted(12, 5) Source(7, 5) + SourceIndex(0) +2 >Emitted(12, 16) Source(7, 17) + SourceIndex(0) +3 >Emitted(12, 21) Source(7, 30) + SourceIndex(0) --- >>> this.cProp = 10; 1->^^^^^^^^ @@ -52,11 +53,11 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 3 > = 4 > 10 5 > ; -1->Emitted(12, 9) Source(3, 5) + SourceIndex(0) -2 >Emitted(12, 19) Source(3, 10) + SourceIndex(0) -3 >Emitted(12, 22) Source(3, 13) + SourceIndex(0) -4 >Emitted(12, 24) Source(3, 15) + SourceIndex(0) -5 >Emitted(12, 25) Source(3, 16) + SourceIndex(0) +1->Emitted(13, 9) Source(3, 5) + SourceIndex(0) +2 >Emitted(13, 19) Source(3, 10) + SourceIndex(0) +3 >Emitted(13, 22) Source(3, 13) + SourceIndex(0) +4 >Emitted(13, 24) Source(3, 15) + SourceIndex(0) +5 >Emitted(13, 25) Source(3, 16) + SourceIndex(0) --- >>> return { 1 >^^^^^^^^ @@ -71,9 +72,9 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts > 2 > return 3 > -1 >Emitted(13, 9) Source(8, 9) + SourceIndex(0) -2 >Emitted(13, 15) Source(8, 15) + SourceIndex(0) -3 >Emitted(13, 16) Source(8, 16) + SourceIndex(0) +1 >Emitted(14, 9) Source(8, 9) + SourceIndex(0) +2 >Emitted(14, 15) Source(8, 15) + SourceIndex(0) +3 >Emitted(14, 16) Source(8, 16) + SourceIndex(0) --- >>> cProp: value, 1->^^^^^^^^^^^^ @@ -86,10 +87,10 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 2 > cProp 3 > : 4 > value -1->Emitted(14, 13) Source(9, 13) + SourceIndex(0) -2 >Emitted(14, 18) Source(9, 18) + SourceIndex(0) -3 >Emitted(14, 20) Source(9, 20) + SourceIndex(0) -4 >Emitted(14, 25) Source(9, 25) + SourceIndex(0) +1->Emitted(15, 13) Source(9, 13) + SourceIndex(0) +2 >Emitted(15, 18) Source(9, 18) + SourceIndex(0) +3 >Emitted(15, 20) Source(9, 20) + SourceIndex(0) +4 >Emitted(15, 25) Source(9, 25) + SourceIndex(0) --- >>> foo: function () { 1->^^^^^^^^^^^^ @@ -98,8 +99,8 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 1->, > 2 > foo -1->Emitted(15, 13) Source(10, 13) + SourceIndex(0) -2 >Emitted(15, 16) Source(10, 16) + SourceIndex(0) +1->Emitted(16, 13) Source(10, 13) + SourceIndex(0) +2 >Emitted(16, 16) Source(10, 16) + SourceIndex(0) --- >>> return "well this looks kinda C-ish."; 1->^^^^^^^^^^^^^^^^ @@ -113,11 +114,11 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 3 > 4 > "well this looks kinda C-ish." 5 > ; -1->Emitted(16, 17) Source(11, 17) + SourceIndex(0) -2 >Emitted(16, 23) Source(11, 23) + SourceIndex(0) -3 >Emitted(16, 24) Source(11, 24) + SourceIndex(0) -4 >Emitted(16, 54) Source(11, 54) + SourceIndex(0) -5 >Emitted(16, 55) Source(11, 55) + SourceIndex(0) +1->Emitted(17, 17) Source(11, 17) + SourceIndex(0) +2 >Emitted(17, 23) Source(11, 23) + SourceIndex(0) +3 >Emitted(17, 24) Source(11, 24) + SourceIndex(0) +4 >Emitted(17, 54) Source(11, 54) + SourceIndex(0) +5 >Emitted(17, 55) Source(11, 55) + SourceIndex(0) --- >>> } 1 >^^^^^^^^^^^^ @@ -125,8 +126,8 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 1 > > 2 > } -1 >Emitted(17, 13) Source(12, 13) + SourceIndex(0) -2 >Emitted(17, 14) Source(12, 14) + SourceIndex(0) +1 >Emitted(18, 13) Source(12, 13) + SourceIndex(0) +2 >Emitted(18, 14) Source(12, 14) + SourceIndex(0) --- >>> }; 1 >^^^^^^^^^ @@ -134,8 +135,8 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 1 > > } 2 > -1 >Emitted(18, 10) Source(13, 10) + SourceIndex(0) -2 >Emitted(18, 11) Source(13, 10) + SourceIndex(0) +1 >Emitted(19, 10) Source(13, 10) + SourceIndex(0) +2 >Emitted(19, 11) Source(13, 10) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -144,8 +145,8 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 1 > > 2 > } -1 >Emitted(19, 5) Source(14, 5) + SourceIndex(0) -2 >Emitted(19, 6) Source(14, 6) + SourceIndex(0) +1 >Emitted(20, 5) Source(14, 5) + SourceIndex(0) +2 >Emitted(20, 6) Source(14, 6) + SourceIndex(0) --- >>> C.prototype.foo = function () { return "this never gets used."; }; 1->^^^^ @@ -168,16 +169,16 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 8 > ; 9 > 10> } -1->Emitted(20, 5) Source(5, 5) + SourceIndex(0) -2 >Emitted(20, 20) Source(5, 8) + SourceIndex(0) -3 >Emitted(20, 23) Source(5, 5) + SourceIndex(0) -4 >Emitted(20, 37) Source(5, 13) + SourceIndex(0) -5 >Emitted(20, 43) Source(5, 19) + SourceIndex(0) -6 >Emitted(20, 44) Source(5, 20) + SourceIndex(0) -7 >Emitted(20, 67) Source(5, 43) + SourceIndex(0) -8 >Emitted(20, 68) Source(5, 44) + SourceIndex(0) -9 >Emitted(20, 69) Source(5, 45) + SourceIndex(0) -10>Emitted(20, 70) Source(5, 46) + SourceIndex(0) +1->Emitted(21, 5) Source(5, 5) + SourceIndex(0) +2 >Emitted(21, 20) Source(5, 8) + SourceIndex(0) +3 >Emitted(21, 23) Source(5, 5) + SourceIndex(0) +4 >Emitted(21, 37) Source(5, 13) + SourceIndex(0) +5 >Emitted(21, 43) Source(5, 19) + SourceIndex(0) +6 >Emitted(21, 44) Source(5, 20) + SourceIndex(0) +7 >Emitted(21, 67) Source(5, 43) + SourceIndex(0) +8 >Emitted(21, 68) Source(5, 44) + SourceIndex(0) +9 >Emitted(21, 69) Source(5, 45) + SourceIndex(0) +10>Emitted(21, 70) Source(5, 46) + SourceIndex(0) --- >>> return C; 1 >^^^^ @@ -194,8 +195,8 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts > } > 2 > } -1 >Emitted(21, 5) Source(15, 1) + SourceIndex(0) -2 >Emitted(21, 13) Source(15, 2) + SourceIndex(0) +1 >Emitted(22, 5) Source(15, 1) + SourceIndex(0) +2 >Emitted(22, 13) Source(15, 2) + SourceIndex(0) --- >>>}()); 1 > @@ -220,10 +221,10 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts > } > } > } -1 >Emitted(22, 1) Source(15, 1) + SourceIndex(0) -2 >Emitted(22, 2) Source(15, 2) + SourceIndex(0) -3 >Emitted(22, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(22, 6) Source(15, 2) + SourceIndex(0) +1 >Emitted(23, 1) Source(15, 1) + SourceIndex(0) +2 >Emitted(23, 2) Source(15, 2) + SourceIndex(0) +3 >Emitted(23, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(23, 6) Source(15, 2) + SourceIndex(0) --- >>>var D = (function (_super) { 1-> @@ -231,15 +232,15 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 1-> > > -1->Emitted(23, 1) Source(17, 1) + SourceIndex(0) +1->Emitted(24, 1) Source(17, 1) + SourceIndex(0) --- >>> __extends(D, _super); 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^ 1->class D extends 2 > C -1->Emitted(24, 5) Source(17, 17) + SourceIndex(0) -2 >Emitted(24, 26) Source(17, 18) + SourceIndex(0) +1->Emitted(25, 5) Source(17, 17) + SourceIndex(0) +2 >Emitted(25, 26) Source(17, 18) + SourceIndex(0) --- >>> function D(a) { 1 >^^^^ @@ -252,9 +253,9 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts > 2 > constructor( 3 > a = 100 -1 >Emitted(25, 5) Source(20, 5) + SourceIndex(0) -2 >Emitted(25, 16) Source(20, 17) + SourceIndex(0) -3 >Emitted(25, 17) Source(20, 24) + SourceIndex(0) +1 >Emitted(26, 5) Source(20, 5) + SourceIndex(0) +2 >Emitted(26, 16) Source(20, 17) + SourceIndex(0) +3 >Emitted(26, 17) Source(20, 24) + SourceIndex(0) --- >>> if (a === void 0) { a = 100; } 1->^^^^^^^^ @@ -266,10 +267,10 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 2 > 3 > 4 > a = 100 -1->Emitted(26, 9) Source(20, 17) + SourceIndex(0) -2 >Emitted(26, 27) Source(20, 17) + SourceIndex(0) -3 >Emitted(26, 29) Source(20, 17) + SourceIndex(0) -4 >Emitted(26, 36) Source(20, 24) + SourceIndex(0) +1->Emitted(27, 9) Source(20, 17) + SourceIndex(0) +2 >Emitted(27, 27) Source(20, 17) + SourceIndex(0) +3 >Emitted(27, 29) Source(20, 17) + SourceIndex(0) +4 >Emitted(27, 36) Source(20, 24) + SourceIndex(0) --- >>> var _this = _super.call(this, a) || this; 1->^^^^^^^^ @@ -298,12 +299,12 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts > else > return null; > } -1->Emitted(27, 9) Source(20, 5) + SourceIndex(0) -2 >Emitted(27, 21) Source(21, 9) + SourceIndex(0) -3 >Emitted(27, 39) Source(21, 15) + SourceIndex(0) -4 >Emitted(27, 40) Source(21, 16) + SourceIndex(0) -5 >Emitted(27, 41) Source(21, 17) + SourceIndex(0) -6 >Emitted(27, 50) Source(33, 6) + SourceIndex(0) +1->Emitted(28, 9) Source(20, 5) + SourceIndex(0) +2 >Emitted(28, 21) Source(21, 9) + SourceIndex(0) +3 >Emitted(28, 39) Source(21, 15) + SourceIndex(0) +4 >Emitted(28, 40) Source(21, 16) + SourceIndex(0) +5 >Emitted(28, 41) Source(21, 17) + SourceIndex(0) +6 >Emitted(28, 50) Source(33, 6) + SourceIndex(0) --- >>> _this.dProp = function () { return _this; }; 1->^^^^^^^^ @@ -324,15 +325,15 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 7 > 8 > this 9 > ; -1->Emitted(28, 9) Source(18, 5) + SourceIndex(0) -2 >Emitted(28, 20) Source(18, 10) + SourceIndex(0) -3 >Emitted(28, 23) Source(18, 13) + SourceIndex(0) -4 >Emitted(28, 37) Source(18, 19) + SourceIndex(0) -5 >Emitted(28, 44) Source(18, 19) + SourceIndex(0) -6 >Emitted(28, 49) Source(18, 23) + SourceIndex(0) -7 >Emitted(28, 51) Source(18, 19) + SourceIndex(0) -8 >Emitted(28, 52) Source(18, 23) + SourceIndex(0) -9 >Emitted(28, 53) Source(18, 24) + SourceIndex(0) +1->Emitted(29, 9) Source(18, 5) + SourceIndex(0) +2 >Emitted(29, 20) Source(18, 10) + SourceIndex(0) +3 >Emitted(29, 23) Source(18, 13) + SourceIndex(0) +4 >Emitted(29, 37) Source(18, 19) + SourceIndex(0) +5 >Emitted(29, 44) Source(18, 19) + SourceIndex(0) +6 >Emitted(29, 49) Source(18, 23) + SourceIndex(0) +7 >Emitted(29, 51) Source(18, 19) + SourceIndex(0) +8 >Emitted(29, 52) Source(18, 23) + SourceIndex(0) +9 >Emitted(29, 53) Source(18, 24) + SourceIndex(0) --- >>> if (Math.random() < 0.5) { 1 >^^^^^^^^ @@ -366,19 +367,19 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 11> ) 12> 13> { -1 >Emitted(29, 9) Source(23, 9) + SourceIndex(0) -2 >Emitted(29, 11) Source(23, 11) + SourceIndex(0) -3 >Emitted(29, 12) Source(23, 12) + SourceIndex(0) -4 >Emitted(29, 13) Source(23, 13) + SourceIndex(0) -5 >Emitted(29, 17) Source(23, 17) + SourceIndex(0) -6 >Emitted(29, 18) Source(23, 18) + SourceIndex(0) -7 >Emitted(29, 24) Source(23, 24) + SourceIndex(0) -8 >Emitted(29, 26) Source(23, 26) + SourceIndex(0) -9 >Emitted(29, 29) Source(23, 29) + SourceIndex(0) -10>Emitted(29, 32) Source(23, 32) + SourceIndex(0) -11>Emitted(29, 33) Source(23, 33) + SourceIndex(0) -12>Emitted(29, 34) Source(23, 34) + SourceIndex(0) -13>Emitted(29, 35) Source(23, 35) + SourceIndex(0) +1 >Emitted(30, 9) Source(23, 9) + SourceIndex(0) +2 >Emitted(30, 11) Source(23, 11) + SourceIndex(0) +3 >Emitted(30, 12) Source(23, 12) + SourceIndex(0) +4 >Emitted(30, 13) Source(23, 13) + SourceIndex(0) +5 >Emitted(30, 17) Source(23, 17) + SourceIndex(0) +6 >Emitted(30, 18) Source(23, 18) + SourceIndex(0) +7 >Emitted(30, 24) Source(23, 24) + SourceIndex(0) +8 >Emitted(30, 26) Source(23, 26) + SourceIndex(0) +9 >Emitted(30, 29) Source(23, 29) + SourceIndex(0) +10>Emitted(30, 32) Source(23, 32) + SourceIndex(0) +11>Emitted(30, 33) Source(23, 33) + SourceIndex(0) +12>Emitted(30, 34) Source(23, 34) + SourceIndex(0) +13>Emitted(30, 35) Source(23, 35) + SourceIndex(0) --- >>> "You win!"; 1 >^^^^^^^^^^^^ @@ -388,9 +389,9 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts > 2 > "You win!" 3 > -1 >Emitted(30, 13) Source(24, 13) + SourceIndex(0) -2 >Emitted(30, 23) Source(24, 23) + SourceIndex(0) -3 >Emitted(30, 24) Source(24, 23) + SourceIndex(0) +1 >Emitted(31, 13) Source(24, 13) + SourceIndex(0) +2 >Emitted(31, 23) Source(24, 23) + SourceIndex(0) +3 >Emitted(31, 24) Source(24, 23) + SourceIndex(0) --- >>> return { 1 >^^^^^^^^^^^^ @@ -401,9 +402,9 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts > 2 > return 3 > -1 >Emitted(31, 13) Source(25, 13) + SourceIndex(0) -2 >Emitted(31, 19) Source(25, 19) + SourceIndex(0) -3 >Emitted(31, 20) Source(25, 20) + SourceIndex(0) +1 >Emitted(32, 13) Source(25, 13) + SourceIndex(0) +2 >Emitted(32, 19) Source(25, 19) + SourceIndex(0) +3 >Emitted(32, 20) Source(25, 20) + SourceIndex(0) --- >>> cProp: 1, 1->^^^^^^^^^^^^^^^^ @@ -416,10 +417,10 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 2 > cProp 3 > : 4 > 1 -1->Emitted(32, 17) Source(26, 17) + SourceIndex(0) -2 >Emitted(32, 22) Source(26, 22) + SourceIndex(0) -3 >Emitted(32, 24) Source(26, 24) + SourceIndex(0) -4 >Emitted(32, 25) Source(26, 25) + SourceIndex(0) +1->Emitted(33, 17) Source(26, 17) + SourceIndex(0) +2 >Emitted(33, 22) Source(26, 22) + SourceIndex(0) +3 >Emitted(33, 24) Source(26, 24) + SourceIndex(0) +4 >Emitted(33, 25) Source(26, 25) + SourceIndex(0) --- >>> dProp: function () { return _this; }, 1->^^^^^^^^^^^^^^^^ @@ -440,14 +441,14 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 6 > this 7 > 8 > this -1->Emitted(33, 17) Source(27, 17) + SourceIndex(0) -2 >Emitted(33, 22) Source(27, 22) + SourceIndex(0) -3 >Emitted(33, 24) Source(27, 24) + SourceIndex(0) -4 >Emitted(33, 38) Source(27, 30) + SourceIndex(0) -5 >Emitted(33, 45) Source(27, 30) + SourceIndex(0) -6 >Emitted(33, 50) Source(27, 34) + SourceIndex(0) -7 >Emitted(33, 52) Source(27, 30) + SourceIndex(0) -8 >Emitted(33, 53) Source(27, 34) + SourceIndex(0) +1->Emitted(34, 17) Source(27, 17) + SourceIndex(0) +2 >Emitted(34, 22) Source(27, 22) + SourceIndex(0) +3 >Emitted(34, 24) Source(27, 24) + SourceIndex(0) +4 >Emitted(34, 38) Source(27, 30) + SourceIndex(0) +5 >Emitted(34, 45) Source(27, 30) + SourceIndex(0) +6 >Emitted(34, 50) Source(27, 34) + SourceIndex(0) +7 >Emitted(34, 52) Source(27, 30) + SourceIndex(0) +8 >Emitted(34, 53) Source(27, 34) + SourceIndex(0) --- >>> foo: function () { return "You win!!!!!"; } 1->^^^^^^^^^^^^^^^^ @@ -469,15 +470,15 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 7 > 8 > 9 > } -1->Emitted(34, 17) Source(28, 17) + SourceIndex(0) -2 >Emitted(34, 20) Source(28, 20) + SourceIndex(0) -3 >Emitted(34, 36) Source(28, 25) + SourceIndex(0) -4 >Emitted(34, 42) Source(28, 31) + SourceIndex(0) -5 >Emitted(34, 43) Source(28, 32) + SourceIndex(0) -6 >Emitted(34, 57) Source(28, 46) + SourceIndex(0) -7 >Emitted(34, 58) Source(28, 46) + SourceIndex(0) -8 >Emitted(34, 59) Source(28, 47) + SourceIndex(0) -9 >Emitted(34, 60) Source(28, 48) + SourceIndex(0) +1->Emitted(35, 17) Source(28, 17) + SourceIndex(0) +2 >Emitted(35, 20) Source(28, 20) + SourceIndex(0) +3 >Emitted(35, 36) Source(28, 25) + SourceIndex(0) +4 >Emitted(35, 42) Source(28, 31) + SourceIndex(0) +5 >Emitted(35, 43) Source(28, 32) + SourceIndex(0) +6 >Emitted(35, 57) Source(28, 46) + SourceIndex(0) +7 >Emitted(35, 58) Source(28, 46) + SourceIndex(0) +8 >Emitted(35, 59) Source(28, 47) + SourceIndex(0) +9 >Emitted(35, 60) Source(28, 48) + SourceIndex(0) --- >>> }; 1 >^^^^^^^^^^^^^ @@ -485,8 +486,8 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 1 > > } 2 > ; -1 >Emitted(35, 14) Source(29, 14) + SourceIndex(0) -2 >Emitted(35, 15) Source(29, 15) + SourceIndex(0) +1 >Emitted(36, 14) Source(29, 14) + SourceIndex(0) +2 >Emitted(36, 15) Source(29, 15) + SourceIndex(0) --- >>> } 1 >^^^^^^^^ @@ -495,8 +496,8 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 1 > > 2 > } -1 >Emitted(36, 9) Source(30, 9) + SourceIndex(0) -2 >Emitted(36, 10) Source(30, 10) + SourceIndex(0) +1 >Emitted(37, 9) Source(30, 9) + SourceIndex(0) +2 >Emitted(37, 10) Source(30, 10) + SourceIndex(0) --- >>> else 1->^^^^^^^^ @@ -505,8 +506,8 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 1-> > 2 > else -1->Emitted(37, 9) Source(31, 9) + SourceIndex(0) -2 >Emitted(37, 13) Source(31, 13) + SourceIndex(0) +1->Emitted(38, 9) Source(31, 9) + SourceIndex(0) +2 >Emitted(38, 13) Source(31, 13) + SourceIndex(0) --- >>> return null; 1->^^^^^^^^^^^^ @@ -520,11 +521,11 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 3 > 4 > null 5 > ; -1->Emitted(38, 13) Source(32, 13) + SourceIndex(0) -2 >Emitted(38, 19) Source(32, 19) + SourceIndex(0) -3 >Emitted(38, 20) Source(32, 20) + SourceIndex(0) -4 >Emitted(38, 24) Source(32, 24) + SourceIndex(0) -5 >Emitted(38, 25) Source(32, 25) + SourceIndex(0) +1->Emitted(39, 13) Source(32, 13) + SourceIndex(0) +2 >Emitted(39, 19) Source(32, 19) + SourceIndex(0) +3 >Emitted(39, 20) Source(32, 20) + SourceIndex(0) +4 >Emitted(39, 24) Source(32, 24) + SourceIndex(0) +5 >Emitted(39, 25) Source(32, 25) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -533,8 +534,8 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 1 > > 2 > } -1 >Emitted(39, 5) Source(33, 5) + SourceIndex(0) -2 >Emitted(39, 6) Source(33, 6) + SourceIndex(0) +1 >Emitted(40, 5) Source(33, 5) + SourceIndex(0) +2 >Emitted(40, 6) Source(33, 6) + SourceIndex(0) --- >>> return D; 1->^^^^ @@ -542,8 +543,8 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts 1-> > 2 > } -1->Emitted(40, 5) Source(34, 1) + SourceIndex(0) -2 >Emitted(40, 13) Source(34, 2) + SourceIndex(0) +1->Emitted(41, 5) Source(34, 1) + SourceIndex(0) +2 >Emitted(41, 13) Source(34, 2) + SourceIndex(0) --- >>>}(C)); 1 > @@ -576,11 +577,11 @@ sourceFile:derivedClassConstructorWithExplicitReturns01.ts > return null; > } > } -1 >Emitted(41, 1) Source(34, 1) + SourceIndex(0) -2 >Emitted(41, 2) Source(34, 2) + SourceIndex(0) -3 >Emitted(41, 2) Source(17, 1) + SourceIndex(0) -4 >Emitted(41, 3) Source(17, 17) + SourceIndex(0) -5 >Emitted(41, 4) Source(17, 18) + SourceIndex(0) -6 >Emitted(41, 7) Source(34, 2) + SourceIndex(0) +1 >Emitted(42, 1) Source(34, 1) + SourceIndex(0) +2 >Emitted(42, 2) Source(34, 2) + SourceIndex(0) +3 >Emitted(42, 2) Source(17, 1) + SourceIndex(0) +4 >Emitted(42, 3) Source(17, 17) + SourceIndex(0) +5 >Emitted(42, 4) Source(17, 18) + SourceIndex(0) +6 >Emitted(42, 7) Source(34, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=derivedClassConstructorWithExplicitReturns01.js.map \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js b/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js index f92b9ab7c99..9c295b584ad 100644 --- a/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js +++ b/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js @@ -34,15 +34,16 @@ class Derived4 extends Base2 { //// [derivedClassConstructorWithoutSuperCall.js] // derived class constructors must contain a super call -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.js b/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.js index 2fa9323295a..bb9fcbc1952 100644 --- a/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.js +++ b/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.js @@ -15,15 +15,16 @@ class Derived extends Base { } //// [derivedClassFunctionOverridesBaseClassAccessor.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/derivedClassIncludesInheritedMembers.js b/tests/baselines/reference/derivedClassIncludesInheritedMembers.js index 3fe81a587af..10cad78a322 100644 --- a/tests/baselines/reference/derivedClassIncludesInheritedMembers.js +++ b/tests/baselines/reference/derivedClassIncludesInheritedMembers.js @@ -41,15 +41,16 @@ var r8 = d2[1]; //// [derivedClassIncludesInheritedMembers.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base(x) { } diff --git a/tests/baselines/reference/derivedClassOverridesIndexersWithAssignmentCompatibility.js b/tests/baselines/reference/derivedClassOverridesIndexersWithAssignmentCompatibility.js index da2abf23166..875270b57f3 100644 --- a/tests/baselines/reference/derivedClassOverridesIndexersWithAssignmentCompatibility.js +++ b/tests/baselines/reference/derivedClassOverridesIndexersWithAssignmentCompatibility.js @@ -18,15 +18,16 @@ class Derived2 extends Base2 { } //// [derivedClassOverridesIndexersWithAssignmentCompatibility.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/derivedClassOverridesPrivateFunction1.js b/tests/baselines/reference/derivedClassOverridesPrivateFunction1.js index 14549e8d9c4..cd04b7ede37 100644 --- a/tests/baselines/reference/derivedClassOverridesPrivateFunction1.js +++ b/tests/baselines/reference/derivedClassOverridesPrivateFunction1.js @@ -16,15 +16,16 @@ class DerivedClass extends BaseClass { new DerivedClass(); //// [derivedClassOverridesPrivateFunction1.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var BaseClass = (function () { function BaseClass() { this._init(); diff --git a/tests/baselines/reference/derivedClassOverridesPrivates.js b/tests/baselines/reference/derivedClassOverridesPrivates.js index b88ce8d37ee..9dc81e9b5ad 100644 --- a/tests/baselines/reference/derivedClassOverridesPrivates.js +++ b/tests/baselines/reference/derivedClassOverridesPrivates.js @@ -16,15 +16,16 @@ class Derived2 extends Base2 { } //// [derivedClassOverridesPrivates.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers.js index d44fc6a483d..2ae532f0c84 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers.js @@ -37,15 +37,16 @@ class Derived extends Base { //// [derivedClassOverridesProtectedMembers.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var x; var y; var Base = (function () { diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js index 8f8e913c82b..0f321c18241 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js @@ -64,15 +64,16 @@ var r8 = d2[1]; //// [derivedClassOverridesProtectedMembers2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var x; var y; var Base = (function () { diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js index 2825524d224..014cea9753e 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js @@ -72,15 +72,16 @@ class Derived10 extends Base { } //// [derivedClassOverridesProtectedMembers3.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var x; var y; var Base = (function () { diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers4.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers4.js index 9d4c76a8384..5e4804b5bac 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers4.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers4.js @@ -15,15 +15,16 @@ class Derived2 extends Derived1 { } //// [derivedClassOverridesProtectedMembers4.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var x; var y; var Base = (function () { diff --git a/tests/baselines/reference/derivedClassOverridesPublicMembers.js b/tests/baselines/reference/derivedClassOverridesPublicMembers.js index 6390636e09f..73d620ce2f5 100644 --- a/tests/baselines/reference/derivedClassOverridesPublicMembers.js +++ b/tests/baselines/reference/derivedClassOverridesPublicMembers.js @@ -63,15 +63,16 @@ var r8 = d2[1]; //// [derivedClassOverridesPublicMembers.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var x; var y; var Base = (function () { diff --git a/tests/baselines/reference/derivedClassOverridesWithoutSubtype.js b/tests/baselines/reference/derivedClassOverridesWithoutSubtype.js index 3ce6c5d1966..81fda59ae78 100644 --- a/tests/baselines/reference/derivedClassOverridesWithoutSubtype.js +++ b/tests/baselines/reference/derivedClassOverridesWithoutSubtype.js @@ -24,15 +24,16 @@ class Derived2 extends Base2 { } //// [derivedClassOverridesWithoutSubtype.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/derivedClassParameterProperties.js b/tests/baselines/reference/derivedClassParameterProperties.js index 340aa0f5709..26bf27bd023 100644 --- a/tests/baselines/reference/derivedClassParameterProperties.js +++ b/tests/baselines/reference/derivedClassParameterProperties.js @@ -96,15 +96,16 @@ class Derived10 extends Base2 { //// [derivedClassParameterProperties.js] // ordering of super calls in derived constructors matters depending on other class contents -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js b/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js index 7238b7d1af3..5c29ea9ed89 100644 --- a/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js +++ b/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js @@ -33,15 +33,16 @@ class Derived extends Base { //// [derivedClassSuperCallsInNonConstructorMembers.js] // error to use super calls outside a constructor -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js b/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js index 6a79fd2d2a2..bce8697a7e8 100644 --- a/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js +++ b/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js @@ -29,15 +29,16 @@ class Derived4 extends Base { } //// [derivedClassSuperCallsWithThisArg.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base(a) { } diff --git a/tests/baselines/reference/derivedClassTransitivity.js b/tests/baselines/reference/derivedClassTransitivity.js index b6cd5a284e4..997d25693a6 100644 --- a/tests/baselines/reference/derivedClassTransitivity.js +++ b/tests/baselines/reference/derivedClassTransitivity.js @@ -22,15 +22,16 @@ var r2 = e.foo(''); //// [derivedClassTransitivity.js] // subclassing is not transitive when you can remove required parameters and add optional parameters -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/derivedClassTransitivity2.js b/tests/baselines/reference/derivedClassTransitivity2.js index 05648a00507..c1304ad5242 100644 --- a/tests/baselines/reference/derivedClassTransitivity2.js +++ b/tests/baselines/reference/derivedClassTransitivity2.js @@ -22,15 +22,16 @@ var r2 = e.foo(1, ''); //// [derivedClassTransitivity2.js] // subclassing is not transitive when you can remove required parameters and add optional parameters -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/derivedClassTransitivity3.js b/tests/baselines/reference/derivedClassTransitivity3.js index a280316b639..264616cea7f 100644 --- a/tests/baselines/reference/derivedClassTransitivity3.js +++ b/tests/baselines/reference/derivedClassTransitivity3.js @@ -22,15 +22,16 @@ var r2 = e.foo('', 1); //// [derivedClassTransitivity3.js] // subclassing is not transitive when you can remove required parameters and add optional parameters -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/derivedClassTransitivity4.js b/tests/baselines/reference/derivedClassTransitivity4.js index 2d32ece1375..63a78e3d3b6 100644 --- a/tests/baselines/reference/derivedClassTransitivity4.js +++ b/tests/baselines/reference/derivedClassTransitivity4.js @@ -22,15 +22,16 @@ var r2 = e.foo(''); //// [derivedClassTransitivity4.js] // subclassing is not transitive when you can remove required parameters and add optional parameters on protected members -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/derivedClassWithAny.js b/tests/baselines/reference/derivedClassWithAny.js index 64b6a1c995a..01d7c130f94 100644 --- a/tests/baselines/reference/derivedClassWithAny.js +++ b/tests/baselines/reference/derivedClassWithAny.js @@ -60,15 +60,16 @@ var r = c.foo(); // e.foo would return string //// [derivedClassWithAny.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js index 6c9ff2f36e7..1b8cca7a0a8 100644 --- a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js +++ b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js @@ -23,15 +23,16 @@ class Derived extends Base { //// [derivedClassWithPrivateInstanceShadowingProtectedInstance.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js index 924526923f8..e2ecad8be4b 100644 --- a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js +++ b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js @@ -33,15 +33,16 @@ var r6 = Derived.a; // error Derived.a = 2; // error //// [derivedClassWithPrivateInstanceShadowingPublicInstance.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js index 9705b1e8d03..26095ed6628 100644 --- a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js +++ b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js @@ -22,15 +22,16 @@ class Derived extends Base { } //// [derivedClassWithPrivateStaticShadowingProtectedStatic.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js index dd15ec7e66d..f01edcc8a3a 100644 --- a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js +++ b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js @@ -34,15 +34,16 @@ var r6 = Derived.a; // error Derived.a = 2; // error //// [derivedClassWithPrivateStaticShadowingPublicStatic.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js b/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js index 7a145b763c0..d3ce1f3cdbf 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js @@ -26,15 +26,16 @@ var d = new D(); // error var d2 = new D(new Date()); // ok //// [derivedClassWithoutExplicitConstructor.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base(x) { this.a = 1; diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js b/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js index 29cb878de46..c15ac71c573 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js @@ -34,15 +34,16 @@ var d3 = new D(new Date(), new Date()); var d4 = new D(new Date(), new Date(), new Date()); //// [derivedClassWithoutExplicitConstructor2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base(x) { this.a = 1; diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js b/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js index 79d26767df6..fe02d135c24 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js @@ -48,15 +48,16 @@ var d3 = new D2(new Date(), new Date()); // ok //// [derivedClassWithoutExplicitConstructor3.js] // automatic constructors with a class hieararchy of depth > 2 -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base(x) { this.a = 1; diff --git a/tests/baselines/reference/derivedClasses.js b/tests/baselines/reference/derivedClasses.js index 38af357d6c3..f310c0e5fd2 100644 --- a/tests/baselines/reference/derivedClasses.js +++ b/tests/baselines/reference/derivedClasses.js @@ -31,15 +31,16 @@ b.hue(); //// [derivedClasses.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Red = (function (_super) { __extends(Red, _super); function Red() { diff --git a/tests/baselines/reference/derivedGenericClassWithAny.js b/tests/baselines/reference/derivedGenericClassWithAny.js index 6644fefcac4..abd8954fe22 100644 --- a/tests/baselines/reference/derivedGenericClassWithAny.js +++ b/tests/baselines/reference/derivedGenericClassWithAny.js @@ -43,15 +43,16 @@ c = e; var r = c.foo(); // e.foo would return string //// [derivedGenericClassWithAny.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js b/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js index 91224f98a5d..b32d0a79d6b 100644 --- a/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js +++ b/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js @@ -18,15 +18,16 @@ class Derived extends Base { } //// [derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js b/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js index 926ca09274d..b5ef2f81099 100644 --- a/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js +++ b/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js @@ -21,15 +21,16 @@ b = d2; var r: Base[] = [d1, d2]; //// [derivedTypeDoesNotRequireExtendsClause.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/destructuringParameterDeclaration5.js b/tests/baselines/reference/destructuringParameterDeclaration5.js index 831cf209995..a00fc248939 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration5.js +++ b/tests/baselines/reference/destructuringParameterDeclaration5.js @@ -52,15 +52,16 @@ d3({ y: "world" }); //// [destructuringParameterDeclaration5.js] // Parameter Declaration with generic -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Class = (function () { function Class() { } diff --git a/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js b/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js index 79babde83e2..325a15007c8 100644 --- a/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js +++ b/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js @@ -14,15 +14,16 @@ class B extends A { //// [emitSuperCallBeforeEmitParameterPropertyDeclaration1.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { this.blub = 6; diff --git a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js index d7988562315..2d97d0a9865 100644 --- a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js +++ b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js @@ -16,15 +16,16 @@ class B extends A { } //// [emitSuperCallBeforeEmitPropertyDeclaration1.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { this.blub = 6; diff --git a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js index fdec4c4e7be..63de121ed4d 100644 --- a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js +++ b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js @@ -14,15 +14,16 @@ class B extends A { } //// [emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { this.blub = 6; diff --git a/tests/baselines/reference/emitThisInSuperMethodCall.js b/tests/baselines/reference/emitThisInSuperMethodCall.js index c87ad7d4189..5488e3aa005 100644 --- a/tests/baselines/reference/emitThisInSuperMethodCall.js +++ b/tests/baselines/reference/emitThisInSuperMethodCall.js @@ -28,15 +28,16 @@ class RegisteredUser extends User { //// [emitThisInSuperMethodCall.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var User = (function () { function User() { } diff --git a/tests/baselines/reference/emptyModuleName.js b/tests/baselines/reference/emptyModuleName.js index e4ad120250f..16493baae98 100644 --- a/tests/baselines/reference/emptyModuleName.js +++ b/tests/baselines/reference/emptyModuleName.js @@ -5,15 +5,16 @@ class B extends A { //// [emptyModuleName.js] "use strict"; -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = require(""); var B = (function (_super) { __extends(B, _super); diff --git a/tests/baselines/reference/errorForwardReferenceForwadingConstructor.js b/tests/baselines/reference/errorForwardReferenceForwadingConstructor.js index 851a97663de..98eb91ce417 100644 --- a/tests/baselines/reference/errorForwardReferenceForwadingConstructor.js +++ b/tests/baselines/reference/errorForwardReferenceForwadingConstructor.js @@ -12,15 +12,16 @@ class derived extends base { } //// [errorForwardReferenceForwadingConstructor.js] // Error forward referencing derived class with forwarding constructor -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); function f() { var d1 = new derived(); var d2 = new derived(4); diff --git a/tests/baselines/reference/errorSuperCalls.js b/tests/baselines/reference/errorSuperCalls.js index 43d89076ade..6c7a1441b05 100644 --- a/tests/baselines/reference/errorSuperCalls.js +++ b/tests/baselines/reference/errorSuperCalls.js @@ -75,15 +75,16 @@ class OtherDerived extends OtherBase { //// [errorSuperCalls.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); //super call in class constructor with no base type var NoBase = (function () { function NoBase() { diff --git a/tests/baselines/reference/errorSuperPropertyAccess.js b/tests/baselines/reference/errorSuperPropertyAccess.js index 42a2acf4317..70d777644c6 100644 --- a/tests/baselines/reference/errorSuperPropertyAccess.js +++ b/tests/baselines/reference/errorSuperPropertyAccess.js @@ -129,15 +129,16 @@ var obj = { n: super.wat, p: super.foo() }; //// [errorSuperPropertyAccess.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); //super property access in constructor of class with no base type //super property access in instance member function of class with no base type //super property access in instance member accessor(get and set) of class with no base type diff --git a/tests/baselines/reference/errorsInGenericTypeReference.js b/tests/baselines/reference/errorsInGenericTypeReference.js index 64227abe6b2..d7797d7e350 100644 --- a/tests/baselines/reference/errorsInGenericTypeReference.js +++ b/tests/baselines/reference/errorsInGenericTypeReference.js @@ -73,15 +73,16 @@ interface testInterface2 { //// [errorsInGenericTypeReference.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Foo = (function () { function Foo() { } diff --git a/tests/baselines/reference/es6ClassSuperCodegenBug.js b/tests/baselines/reference/es6ClassSuperCodegenBug.js index 68fa43fd64b..c958470d077 100644 --- a/tests/baselines/reference/es6ClassSuperCodegenBug.js +++ b/tests/baselines/reference/es6ClassSuperCodegenBug.js @@ -15,15 +15,16 @@ class B extends A { //// [es6ClassSuperCodegenBug.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A(str1, str2) { } diff --git a/tests/baselines/reference/es6ClassTest.js b/tests/baselines/reference/es6ClassTest.js index e433f19ece3..6834e6139aa 100644 --- a/tests/baselines/reference/es6ClassTest.js +++ b/tests/baselines/reference/es6ClassTest.js @@ -85,15 +85,16 @@ declare module AmbientMod { //// [es6ClassTest.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Bar = (function () { function Bar(n) { } diff --git a/tests/baselines/reference/es6ClassTest2.js b/tests/baselines/reference/es6ClassTest2.js index 491bec40e74..c456f270d6e 100644 --- a/tests/baselines/reference/es6ClassTest2.js +++ b/tests/baselines/reference/es6ClassTest2.js @@ -159,15 +159,16 @@ var ccwc = new ChildClassWithoutConstructor(1, "s"); //// [es6ClassTest2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var BasicMonster = (function () { function BasicMonster(name, health) { this.name = name; diff --git a/tests/baselines/reference/es6ClassTest7.js b/tests/baselines/reference/es6ClassTest7.js index d8f7f688ec0..899ac4100eb 100644 --- a/tests/baselines/reference/es6ClassTest7.js +++ b/tests/baselines/reference/es6ClassTest7.js @@ -9,15 +9,16 @@ class Bar extends M.Foo { //// [es6ClassTest7.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Bar = (function (_super) { __extends(Bar, _super); function Bar() { diff --git a/tests/baselines/reference/exportAssignmentOfGenericType1.js b/tests/baselines/reference/exportAssignmentOfGenericType1.js index 76485e8d91e..4be64d67745 100644 --- a/tests/baselines/reference/exportAssignmentOfGenericType1.js +++ b/tests/baselines/reference/exportAssignmentOfGenericType1.js @@ -24,15 +24,16 @@ define(["require", "exports"], function (require, exports) { return T; }); //// [exportAssignmentOfGenericType1_1.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); define(["require", "exports", "exportAssignmentOfGenericType1_0"], function (require, exports, q) { "use strict"; var M = (function (_super) { diff --git a/tests/baselines/reference/exportDeclarationInInternalModule.js b/tests/baselines/reference/exportDeclarationInInternalModule.js index e83c10b59fd..c9c59360621 100644 --- a/tests/baselines/reference/exportDeclarationInInternalModule.js +++ b/tests/baselines/reference/exportDeclarationInInternalModule.js @@ -19,15 +19,16 @@ var a: Bbb.SomeType; //// [exportDeclarationInInternalModule.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Bbb = (function () { function Bbb() { } diff --git a/tests/baselines/reference/extBaseClass1.js b/tests/baselines/reference/extBaseClass1.js index f144fbdbca8..c05c43c1d27 100644 --- a/tests/baselines/reference/extBaseClass1.js +++ b/tests/baselines/reference/extBaseClass1.js @@ -20,15 +20,16 @@ module N { //// [extBaseClass1.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var M; (function (M) { var B = (function () { diff --git a/tests/baselines/reference/extBaseClass2.js b/tests/baselines/reference/extBaseClass2.js index f453255379b..d55b201a728 100644 --- a/tests/baselines/reference/extBaseClass2.js +++ b/tests/baselines/reference/extBaseClass2.js @@ -11,15 +11,16 @@ module M { //// [extBaseClass2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var N; (function (N) { var C4 = (function (_super) { diff --git a/tests/baselines/reference/extendAndImplementTheSameBaseType.js b/tests/baselines/reference/extendAndImplementTheSameBaseType.js index 5242430513a..1a690094925 100644 --- a/tests/baselines/reference/extendAndImplementTheSameBaseType.js +++ b/tests/baselines/reference/extendAndImplementTheSameBaseType.js @@ -14,15 +14,16 @@ d.baz(); d.foo; //// [extendAndImplementTheSameBaseType.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/extendAndImplementTheSameBaseType2.js b/tests/baselines/reference/extendAndImplementTheSameBaseType2.js index d670758f324..d262bcae95f 100644 --- a/tests/baselines/reference/extendAndImplementTheSameBaseType2.js +++ b/tests/baselines/reference/extendAndImplementTheSameBaseType2.js @@ -17,15 +17,16 @@ var r3: string = d.bar(); var r4: number = d.bar(); //// [extendAndImplementTheSameBaseType2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/extendBaseClassBeforeItsDeclared.js b/tests/baselines/reference/extendBaseClassBeforeItsDeclared.js index a2e55deaa26..25be2160ecb 100644 --- a/tests/baselines/reference/extendBaseClassBeforeItsDeclared.js +++ b/tests/baselines/reference/extendBaseClassBeforeItsDeclared.js @@ -4,15 +4,16 @@ class derived extends base { } class base { constructor (public n: number) { } } //// [extendBaseClassBeforeItsDeclared.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var derived = (function (_super) { __extends(derived, _super); function derived() { diff --git a/tests/baselines/reference/extendClassExpressionFromModule.js b/tests/baselines/reference/extendClassExpressionFromModule.js index 08ad33d619b..746379cc73c 100644 --- a/tests/baselines/reference/extendClassExpressionFromModule.js +++ b/tests/baselines/reference/extendClassExpressionFromModule.js @@ -21,15 +21,16 @@ var x = (function () { module.exports = x; //// [foo2.js] "use strict"; -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var foo1 = require("./foo1"); var x = foo1; var y = (function (_super) { diff --git a/tests/baselines/reference/extendConstructSignatureInInterface.js b/tests/baselines/reference/extendConstructSignatureInInterface.js index dc721dc343a..d8562243c66 100644 --- a/tests/baselines/reference/extendConstructSignatureInInterface.js +++ b/tests/baselines/reference/extendConstructSignatureInInterface.js @@ -11,15 +11,16 @@ var e: E = new E(1); //// [extendConstructSignatureInInterface.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var CStatic; var E = (function (_super) { __extends(E, _super); diff --git a/tests/baselines/reference/extendNonClassSymbol1.js b/tests/baselines/reference/extendNonClassSymbol1.js index f52b0382827..ac2f6c7ff93 100644 --- a/tests/baselines/reference/extendNonClassSymbol1.js +++ b/tests/baselines/reference/extendNonClassSymbol1.js @@ -4,15 +4,16 @@ var x = A; class C extends x { } // error, could not find symbol xs //// [extendNonClassSymbol1.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/extendNonClassSymbol2.js b/tests/baselines/reference/extendNonClassSymbol2.js index 57695fb5fcf..5b8800a553d 100644 --- a/tests/baselines/reference/extendNonClassSymbol2.js +++ b/tests/baselines/reference/extendNonClassSymbol2.js @@ -6,15 +6,16 @@ var x = new Foo(); // legal, considered a constructor function class C extends Foo {} // error, could not find symbol Foo //// [extendNonClassSymbol2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); function Foo() { this.x = 1; } diff --git a/tests/baselines/reference/extendPrivateConstructorClass.js b/tests/baselines/reference/extendPrivateConstructorClass.js index 6578c4c9ce3..96b1bf98538 100644 --- a/tests/baselines/reference/extendPrivateConstructorClass.js +++ b/tests/baselines/reference/extendPrivateConstructorClass.js @@ -10,15 +10,16 @@ class C extends abc.XYZ { //// [extendPrivateConstructorClass.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function (_super) { __extends(C, _super); function C() { diff --git a/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js b/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js index f979a820f63..5e5f09622ee 100644 --- a/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js +++ b/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js @@ -42,15 +42,16 @@ var Model = (function () { exports.Model = Model; //// [extendingClassFromAliasAndUsageInIndexer_moduleA.js] "use strict"; -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Backbone = require("./extendingClassFromAliasAndUsageInIndexer_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); @@ -62,15 +63,16 @@ var VisualizationModel = (function (_super) { exports.VisualizationModel = VisualizationModel; //// [extendingClassFromAliasAndUsageInIndexer_moduleB.js] "use strict"; -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Backbone = require("./extendingClassFromAliasAndUsageInIndexer_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); diff --git a/tests/baselines/reference/extendsClauseAlreadySeen.js b/tests/baselines/reference/extendsClauseAlreadySeen.js index 1e9681a0d3c..cf06895cb86 100644 --- a/tests/baselines/reference/extendsClauseAlreadySeen.js +++ b/tests/baselines/reference/extendsClauseAlreadySeen.js @@ -7,15 +7,16 @@ class D extends C extends C { } //// [extendsClauseAlreadySeen.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/extendsClauseAlreadySeen2.js b/tests/baselines/reference/extendsClauseAlreadySeen2.js index 502618d78ce..3dd977b657a 100644 --- a/tests/baselines/reference/extendsClauseAlreadySeen2.js +++ b/tests/baselines/reference/extendsClauseAlreadySeen2.js @@ -7,15 +7,16 @@ class D extends C extends C { } //// [extendsClauseAlreadySeen2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/fluentClasses.js b/tests/baselines/reference/fluentClasses.js index 887cb9c1feb..34e8b10d70c 100644 --- a/tests/baselines/reference/fluentClasses.js +++ b/tests/baselines/reference/fluentClasses.js @@ -19,15 +19,16 @@ var z = c.foo().bar().baz(); // Fluent pattern //// [fluentClasses.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/for-inStatements.js b/tests/baselines/reference/for-inStatements.js index d03972b9f17..b57d6383d96 100644 --- a/tests/baselines/reference/for-inStatements.js +++ b/tests/baselines/reference/for-inStatements.js @@ -81,15 +81,16 @@ for (var x in Color.Blue) { } //// [for-inStatements.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var aString; for (aString in {}) { } var anAny; diff --git a/tests/baselines/reference/for-inStatementsInvalid.js b/tests/baselines/reference/for-inStatementsInvalid.js index 938ab4daf87..4670bf17807 100644 --- a/tests/baselines/reference/for-inStatementsInvalid.js +++ b/tests/baselines/reference/for-inStatementsInvalid.js @@ -64,15 +64,16 @@ for (var x in i[42]) { } //// [for-inStatementsInvalid.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var aNumber; for (aNumber in {}) { } var aBoolean; diff --git a/tests/baselines/reference/forStatementsMultipleInvalidDecl.js b/tests/baselines/reference/forStatementsMultipleInvalidDecl.js index 5bb0709c13c..5f400591741 100644 --- a/tests/baselines/reference/forStatementsMultipleInvalidDecl.js +++ b/tests/baselines/reference/forStatementsMultipleInvalidDecl.js @@ -55,15 +55,16 @@ for(var m: typeof M;;){} for( var m = M.A;;){} //// [forStatementsMultipleInvalidDecl.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/functionImplementationErrors.js b/tests/baselines/reference/functionImplementationErrors.js index 94335364ec8..67f13db465e 100644 --- a/tests/baselines/reference/functionImplementationErrors.js +++ b/tests/baselines/reference/functionImplementationErrors.js @@ -75,15 +75,16 @@ var f13 = () => { //// [functionImplementationErrors.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); // FunctionExpression with no return type annotation with multiple return statements with unrelated types var f1 = function () { return ''; diff --git a/tests/baselines/reference/functionImplementations.js b/tests/baselines/reference/functionImplementations.js index 2a19b4b841f..9fd603f16d3 100644 --- a/tests/baselines/reference/functionImplementations.js +++ b/tests/baselines/reference/functionImplementations.js @@ -158,15 +158,16 @@ var f12: (x: number) => any = x => { // should be (x: number) => Base | AnotherC } //// [functionImplementations.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); // FunctionExpression with no return type annotation and no return statement returns void var v = function () { }(); // FunctionExpression f with no return type annotation and directly references f in its body returns any diff --git a/tests/baselines/reference/functionSubtypingOfVarArgs.js b/tests/baselines/reference/functionSubtypingOfVarArgs.js index 01a6a130823..f7365781a2c 100644 --- a/tests/baselines/reference/functionSubtypingOfVarArgs.js +++ b/tests/baselines/reference/functionSubtypingOfVarArgs.js @@ -15,15 +15,16 @@ class StringEvent extends EventBase { // should work //// [functionSubtypingOfVarArgs.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var EventBase = (function () { function EventBase() { this._listeners = []; diff --git a/tests/baselines/reference/functionSubtypingOfVarArgs2.js b/tests/baselines/reference/functionSubtypingOfVarArgs2.js index a1aaf35748a..6f534e64e88 100644 --- a/tests/baselines/reference/functionSubtypingOfVarArgs2.js +++ b/tests/baselines/reference/functionSubtypingOfVarArgs2.js @@ -15,15 +15,16 @@ class StringEvent extends EventBase { //// [functionSubtypingOfVarArgs2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var EventBase = (function () { function EventBase() { this._listeners = []; diff --git a/tests/baselines/reference/generatedContextualTyping.js b/tests/baselines/reference/generatedContextualTyping.js index 1551b671b62..43aa5dd6e9a 100644 --- a/tests/baselines/reference/generatedContextualTyping.js +++ b/tests/baselines/reference/generatedContextualTyping.js @@ -356,15 +356,16 @@ var x355 = function(n: (s: Base[]) => any) { }; x355(n => { var n: Base[]; retur var x356 = function(n: Genric) { }; x356({ func: n => { return [d1, d2]; } }); //// [generatedContextualTyping.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/genericBaseClassLiteralProperty.js b/tests/baselines/reference/genericBaseClassLiteralProperty.js index c0ef8541ad7..73f5cb87bed 100644 --- a/tests/baselines/reference/genericBaseClassLiteralProperty.js +++ b/tests/baselines/reference/genericBaseClassLiteralProperty.js @@ -13,15 +13,16 @@ class SubClass extends BaseClass { } //// [genericBaseClassLiteralProperty.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var BaseClass = (function () { function BaseClass() { } diff --git a/tests/baselines/reference/genericBaseClassLiteralProperty2.js b/tests/baselines/reference/genericBaseClassLiteralProperty2.js index 53fb2472d05..fb4f51749cd 100644 --- a/tests/baselines/reference/genericBaseClassLiteralProperty2.js +++ b/tests/baselines/reference/genericBaseClassLiteralProperty2.js @@ -16,15 +16,16 @@ class DataView2 extends BaseCollection2 { //// [genericBaseClassLiteralProperty2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var CollectionItem2 = (function () { function CollectionItem2() { } diff --git a/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.js b/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.js index 318f5aa1494..d625797ea53 100644 --- a/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.js +++ b/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.js @@ -109,15 +109,16 @@ var r11 = i.foo8(); // Base //// [genericCallWithConstraintsTypeArgumentInference.js] // Basic type inference with generic calls and constraints, no errors expected -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgs2.js b/tests/baselines/reference/genericCallWithObjectTypeArgs2.js index dc5bf22658d..ae844d043e6 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgs2.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgs2.js @@ -33,15 +33,16 @@ var i: I; var r4 = f2(i); // Base => Derived //// [genericCallWithObjectTypeArgs2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js index ce39f51d49c..e3d80ebd572 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js @@ -41,15 +41,16 @@ var r7 = f3(null, x => x); // any //// [genericCallWithObjectTypeArgsAndConstraints2.js] // Generic call with constraints infering type parameter from object member properties // No errors expected -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js index 76d0f0854ea..387c4526764 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js @@ -39,15 +39,16 @@ var r6 = f3(x => x, null); //// [genericCallWithObjectTypeArgsAndConstraints3.js] // Generic call with constraints infering type parameter from object member properties -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/genericCallbacksAndClassHierarchy.js b/tests/baselines/reference/genericCallbacksAndClassHierarchy.js index 645929e2c14..d4d86fe5793 100644 --- a/tests/baselines/reference/genericCallbacksAndClassHierarchy.js +++ b/tests/baselines/reference/genericCallbacksAndClassHierarchy.js @@ -24,15 +24,16 @@ module M { } //// [genericCallbacksAndClassHierarchy.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var M; (function (M) { var C1 = (function () { diff --git a/tests/baselines/reference/genericClassExpressionInFunction.js b/tests/baselines/reference/genericClassExpressionInFunction.js index 8d7098ba4f2..152237d458d 100644 --- a/tests/baselines/reference/genericClassExpressionInFunction.js +++ b/tests/baselines/reference/genericClassExpressionInFunction.js @@ -32,15 +32,16 @@ s.genericVar = 12; //// [genericClassExpressionInFunction.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/genericClassInheritsConstructorFromNonGenericClass.js b/tests/baselines/reference/genericClassInheritsConstructorFromNonGenericClass.js index 8219bf91c38..aa3e06cf57e 100644 --- a/tests/baselines/reference/genericClassInheritsConstructorFromNonGenericClass.js +++ b/tests/baselines/reference/genericClassInheritsConstructorFromNonGenericClass.js @@ -6,15 +6,16 @@ class C { } //// [genericClassInheritsConstructorFromNonGenericClass.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function (_super) { __extends(A, _super); function A() { diff --git a/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js b/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js index 8563581f953..4efb95cdeba 100644 --- a/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js +++ b/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js @@ -76,15 +76,16 @@ class ViewModel implements Contract { //// [genericClassPropertyInheritanceSpecialization.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Portal; (function (Portal) { var Controls; diff --git a/tests/baselines/reference/genericClassStaticMethod.js b/tests/baselines/reference/genericClassStaticMethod.js index 85b09999c6a..32b29319c12 100644 --- a/tests/baselines/reference/genericClassStaticMethod.js +++ b/tests/baselines/reference/genericClassStaticMethod.js @@ -11,15 +11,16 @@ class Bar extends Foo { //// [genericClassStaticMethod.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Foo = (function () { function Foo() { } diff --git a/tests/baselines/reference/genericClasses3.js b/tests/baselines/reference/genericClasses3.js index 0097132b1e4..a8a3db2f3a0 100644 --- a/tests/baselines/reference/genericClasses3.js +++ b/tests/baselines/reference/genericClasses3.js @@ -18,15 +18,16 @@ var z = v2.b; //// [genericClasses3.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var B = (function () { function B() { } diff --git a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js index a956f444aec..97bc5d27ee0 100644 --- a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js +++ b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js @@ -27,15 +27,16 @@ module EndGate.Tweening { } //// [genericConstraintOnExtendedBuiltinTypes.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var EndGate; (function (EndGate) { var Tweening; diff --git a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js index b51acfd80b4..66df4074441 100644 --- a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js +++ b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js @@ -26,15 +26,16 @@ module EndGate.Tweening { } //// [genericConstraintOnExtendedBuiltinTypes2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var EndGate; (function (EndGate) { var Tweening; diff --git a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.js b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.js index d17f3992c46..edd74ea92e4 100644 --- a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.js +++ b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.js @@ -13,15 +13,16 @@ x = y; // error //// [genericDerivedTypeWithSpecializedBase.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.js b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.js index 3387beda5c4..9fb286b1c40 100644 --- a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.js +++ b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.js @@ -13,15 +13,16 @@ x = y; // error //// [genericDerivedTypeWithSpecializedBase2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/genericInheritedDefaultConstructors.js b/tests/baselines/reference/genericInheritedDefaultConstructors.js index f9d4979fb2a..7ed0c8179dd 100644 --- a/tests/baselines/reference/genericInheritedDefaultConstructors.js +++ b/tests/baselines/reference/genericInheritedDefaultConstructors.js @@ -11,15 +11,16 @@ var c:Constructor> = B; // shouldn't error here //// [genericInheritedDefaultConstructors.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/genericPrototypeProperty2.js b/tests/baselines/reference/genericPrototypeProperty2.js index f07c1f30594..73a64a65763 100644 --- a/tests/baselines/reference/genericPrototypeProperty2.js +++ b/tests/baselines/reference/genericPrototypeProperty2.js @@ -16,15 +16,16 @@ class MyEventWrapper extends BaseEventWrapper { } //// [genericPrototypeProperty2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var BaseEvent = (function () { function BaseEvent() { } diff --git a/tests/baselines/reference/genericPrototypeProperty3.js b/tests/baselines/reference/genericPrototypeProperty3.js index a594644df6a..48e8b367486 100644 --- a/tests/baselines/reference/genericPrototypeProperty3.js +++ b/tests/baselines/reference/genericPrototypeProperty3.js @@ -15,15 +15,16 @@ class MyEventWrapper extends BaseEventWrapper { } //// [genericPrototypeProperty3.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var BaseEvent = (function () { function BaseEvent() { } diff --git a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js index d60d4c960bd..a9ea14337f4 100644 --- a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js +++ b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js @@ -27,15 +27,16 @@ module TypeScript2 { //// [genericRecursiveImplicitConstructorErrors2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var TypeScript2; (function (TypeScript2) { ; diff --git a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js index 6ecbdcf8dae..60d214a1914 100644 --- a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js +++ b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js @@ -31,15 +31,16 @@ module TypeScript { //// [genericRecursiveImplicitConstructorErrors3.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var TypeScript; (function (TypeScript) { var MemberName = (function () { diff --git a/tests/baselines/reference/genericTypeAssertions2.js b/tests/baselines/reference/genericTypeAssertions2.js index df70516ad34..416317ea9f6 100644 --- a/tests/baselines/reference/genericTypeAssertions2.js +++ b/tests/baselines/reference/genericTypeAssertions2.js @@ -14,15 +14,16 @@ var r4: A = >new A(); var r5: A = >[]; // error //// [genericTypeAssertions2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/genericTypeAssertions4.js b/tests/baselines/reference/genericTypeAssertions4.js index f65447822c9..a857ae3ef8d 100644 --- a/tests/baselines/reference/genericTypeAssertions4.js +++ b/tests/baselines/reference/genericTypeAssertions4.js @@ -26,15 +26,16 @@ function foo2(x: T) { } //// [genericTypeAssertions4.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/genericTypeAssertions6.js b/tests/baselines/reference/genericTypeAssertions6.js index 36262513319..8e69ccdbbc3 100644 --- a/tests/baselines/reference/genericTypeAssertions6.js +++ b/tests/baselines/reference/genericTypeAssertions6.js @@ -25,15 +25,16 @@ var b: B; var c: A = >b; //// [genericTypeAssertions6.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A(x) { var y = x; diff --git a/tests/baselines/reference/genericTypeConstraints.js b/tests/baselines/reference/genericTypeConstraints.js index fae7f381616..48baec0e6f6 100644 --- a/tests/baselines/reference/genericTypeConstraints.js +++ b/tests/baselines/reference/genericTypeConstraints.js @@ -14,15 +14,16 @@ class BarExtended extends Bar { } //// [genericTypeConstraints.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Foo = (function () { function Foo() { } diff --git a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js index 3d0e940eaa9..d123ce1bd2e 100644 --- a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js +++ b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js @@ -40,15 +40,16 @@ var k = null; //// [genericTypeReferenceWithoutTypeArgument.js] // it is an error to use a generic type without type arguments // all of these are errors -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js index 552edc1f134..e03295d5086 100644 --- a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js +++ b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js @@ -40,15 +40,16 @@ var k = null; //// [genericTypeReferenceWithoutTypeArgument2.js] // it is an error to use a generic type without type arguments // all of these are errors -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var c; var a; var b; diff --git a/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js b/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js index c12bec69ba6..25f443c9bf4 100644 --- a/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js +++ b/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js @@ -15,15 +15,16 @@ export class ListItem extends CollectionItem { //// [genericWithIndexerOfTypeParameterType2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); define(["require", "exports"], function (require, exports) { "use strict"; var Collection = (function () { diff --git a/tests/baselines/reference/heterogeneousArrayLiterals.js b/tests/baselines/reference/heterogeneousArrayLiterals.js index afb3477111f..828a2894ed0 100644 --- a/tests/baselines/reference/heterogeneousArrayLiterals.js +++ b/tests/baselines/reference/heterogeneousArrayLiterals.js @@ -133,15 +133,16 @@ function foo4(t: T, u: U) { //// [heterogeneousArrayLiterals.js] // type of an array is the best common type of its elements (plus its contextual type if it exists) -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = [1, '']; // {}[] var b = [1, null]; // number[] var c = [1, '', null]; // {}[] diff --git a/tests/baselines/reference/ifDoWhileStatements.js b/tests/baselines/reference/ifDoWhileStatements.js index 909b52ad0d6..527e241c35c 100644 --- a/tests/baselines/reference/ifDoWhileStatements.js +++ b/tests/baselines/reference/ifDoWhileStatements.js @@ -164,15 +164,16 @@ do { }while(fn) //// [ifDoWhileStatements.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/illegalSuperCallsInConstructor.js b/tests/baselines/reference/illegalSuperCallsInConstructor.js index 1ddb27788d8..37fa76388f0 100644 --- a/tests/baselines/reference/illegalSuperCallsInConstructor.js +++ b/tests/baselines/reference/illegalSuperCallsInConstructor.js @@ -21,15 +21,16 @@ class Derived extends Base { } //// [illegalSuperCallsInConstructor.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/implementClausePrecedingExtends.js b/tests/baselines/reference/implementClausePrecedingExtends.js index 6aa751d7b54..916bbaebf7a 100644 --- a/tests/baselines/reference/implementClausePrecedingExtends.js +++ b/tests/baselines/reference/implementClausePrecedingExtends.js @@ -3,15 +3,16 @@ class C { foo: number } class D implements C extends C { } //// [implementClausePrecedingExtends.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.js b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.js index 4ab1c3add23..e6831db5f9c 100644 --- a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.js +++ b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.js @@ -86,15 +86,16 @@ module M2 { } //// [implementingAnInterfaceExtendingClassWithPrivates2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Foo = (function () { function Foo() { } diff --git a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.js b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.js index 21e99dfa07b..4e2dc2514d2 100644 --- a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.js +++ b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.js @@ -42,15 +42,16 @@ class Bar8 extends Foo implements I { //// [implementingAnInterfaceExtendingClassWithProtecteds.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Foo = (function () { function Foo() { } diff --git a/tests/baselines/reference/importAsBaseClass.js b/tests/baselines/reference/importAsBaseClass.js index 0f95c2d3dbb..9f2461ebd42 100644 --- a/tests/baselines/reference/importAsBaseClass.js +++ b/tests/baselines/reference/importAsBaseClass.js @@ -21,15 +21,16 @@ var Greeter = (function () { exports.Greeter = Greeter; //// [importAsBaseClass_1.js] "use strict"; -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Greeter = require("./importAsBaseClass_0"); var Hello = (function (_super) { __extends(Hello, _super); diff --git a/tests/baselines/reference/importHelpers.js b/tests/baselines/reference/importHelpers.js index 06360b221b6..7a28d808710 100644 --- a/tests/baselines/reference/importHelpers.js +++ b/tests/baselines/reference/importHelpers.js @@ -68,15 +68,16 @@ C = tslib_1.__decorate([ tslib_1.__metadata("design:paramtypes", []) ], C); //// [script.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); diff --git a/tests/baselines/reference/importHelpersNoHelpers.js b/tests/baselines/reference/importHelpersNoHelpers.js index e48e51de44b..7fc3f22e1e2 100644 --- a/tests/baselines/reference/importHelpersNoHelpers.js +++ b/tests/baselines/reference/importHelpersNoHelpers.js @@ -70,15 +70,16 @@ var o = { a: 1 }; var y = tslib_1.__assign({}, o); var x = tslib_1.__rest(y, []); //// [script.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); diff --git a/tests/baselines/reference/importHelpersNoModule.js b/tests/baselines/reference/importHelpersNoModule.js index 9d655f401c7..820913a0f94 100644 --- a/tests/baselines/reference/importHelpersNoModule.js +++ b/tests/baselines/reference/importHelpersNoModule.js @@ -60,15 +60,16 @@ C = tslib_1.__decorate([ tslib_1.__metadata("design:paramtypes", []) ], C); //// [script.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); diff --git a/tests/baselines/reference/importShadowsGlobalName.js b/tests/baselines/reference/importShadowsGlobalName.js index 61f715a2194..0c6a299ee5a 100644 --- a/tests/baselines/reference/importShadowsGlobalName.js +++ b/tests/baselines/reference/importShadowsGlobalName.js @@ -21,15 +21,16 @@ define(["require", "exports"], function (require, exports) { return Foo; }); //// [Bar.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); define(["require", "exports", "Foo"], function (require, exports, Error) { "use strict"; var Bar = (function (_super) { diff --git a/tests/baselines/reference/importUsedInExtendsList1.js b/tests/baselines/reference/importUsedInExtendsList1.js index b4bc18ddb7f..25c82b8cb7b 100644 --- a/tests/baselines/reference/importUsedInExtendsList1.js +++ b/tests/baselines/reference/importUsedInExtendsList1.js @@ -21,15 +21,16 @@ var Super = (function () { exports.Super = Super; //// [importUsedInExtendsList1_1.js] "use strict"; -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); /// var foo = require("./importUsedInExtendsList1_require"); var Sub = (function (_super) { diff --git a/tests/baselines/reference/indexerConstraints2.js b/tests/baselines/reference/indexerConstraints2.js index 2fdfe55d22d..8a9b10c34c7 100644 --- a/tests/baselines/reference/indexerConstraints2.js +++ b/tests/baselines/reference/indexerConstraints2.js @@ -29,15 +29,16 @@ class K extends J { } //// [indexerConstraints2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/indirectSelfReference.js b/tests/baselines/reference/indirectSelfReference.js index 9a3c5e3cfeb..dbf484907e7 100644 --- a/tests/baselines/reference/indirectSelfReference.js +++ b/tests/baselines/reference/indirectSelfReference.js @@ -3,15 +3,16 @@ class a extends b{ } class b extends a{ } //// [indirectSelfReference.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = (function (_super) { __extends(a, _super); function a() { diff --git a/tests/baselines/reference/indirectSelfReferenceGeneric.js b/tests/baselines/reference/indirectSelfReferenceGeneric.js index f9ba7ccc940..6c73f2fa095 100644 --- a/tests/baselines/reference/indirectSelfReferenceGeneric.js +++ b/tests/baselines/reference/indirectSelfReferenceGeneric.js @@ -3,15 +3,16 @@ class a extends b { } class b extends a { } //// [indirectSelfReferenceGeneric.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = (function (_super) { __extends(a, _super); function a() { diff --git a/tests/baselines/reference/infinitelyExpandingTypesNonGenericBase.js b/tests/baselines/reference/infinitelyExpandingTypesNonGenericBase.js index bbcedbfa6b8..7fb9d286791 100644 --- a/tests/baselines/reference/infinitelyExpandingTypesNonGenericBase.js +++ b/tests/baselines/reference/infinitelyExpandingTypesNonGenericBase.js @@ -25,15 +25,16 @@ o(A); //// [infinitelyExpandingTypesNonGenericBase.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Functionality = (function () { function Functionality() { } diff --git a/tests/baselines/reference/inheritFromGenericTypeParameter.js b/tests/baselines/reference/inheritFromGenericTypeParameter.js index b8ffd010380..aadf2edb314 100644 --- a/tests/baselines/reference/inheritFromGenericTypeParameter.js +++ b/tests/baselines/reference/inheritFromGenericTypeParameter.js @@ -3,15 +3,16 @@ class C extends T { } interface I extends T { } //// [inheritFromGenericTypeParameter.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function (_super) { __extends(C, _super); function C() { diff --git a/tests/baselines/reference/inheritSameNamePrivatePropertiesFromSameOrigin.js b/tests/baselines/reference/inheritSameNamePrivatePropertiesFromSameOrigin.js index b63252a4449..81717bfec05 100644 --- a/tests/baselines/reference/inheritSameNamePrivatePropertiesFromSameOrigin.js +++ b/tests/baselines/reference/inheritSameNamePrivatePropertiesFromSameOrigin.js @@ -11,15 +11,16 @@ interface A extends C, C2 { // ok } //// [inheritSameNamePrivatePropertiesFromSameOrigin.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var B = (function () { function B() { } diff --git a/tests/baselines/reference/inheritance.js b/tests/baselines/reference/inheritance.js index 7cb4b76c740..b6195423128 100644 --- a/tests/baselines/reference/inheritance.js +++ b/tests/baselines/reference/inheritance.js @@ -35,15 +35,16 @@ class Baad extends Good { //// [inheritance.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var B1 = (function () { function B1() { } diff --git a/tests/baselines/reference/inheritance1.js b/tests/baselines/reference/inheritance1.js index 4ad5c55dc62..6f1e76e8925 100644 --- a/tests/baselines/reference/inheritance1.js +++ b/tests/baselines/reference/inheritance1.js @@ -62,15 +62,16 @@ l1 = sc; l1 = c; //// [inheritance1.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Control = (function () { function Control() { } diff --git a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js index 2fd7aa913d0..3a79d28b51e 100644 --- a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js +++ b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js @@ -11,15 +11,16 @@ class C extends B { //// [inheritanceGrandParentPrivateMemberCollision.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js index 8f436ffd353..6b49c0fb9b5 100644 --- a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js +++ b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js @@ -11,15 +11,16 @@ class C extends B { //// [inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js b/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js index e13c592eccb..f801c6cdd0d 100644 --- a/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js +++ b/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js @@ -11,15 +11,16 @@ class C extends B { //// [inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js b/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js index b593654036b..b85a1f7d99e 100644 --- a/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js @@ -18,15 +18,16 @@ class b extends a { } //// [inheritanceMemberAccessorOverridingAccessor.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = (function () { function a() { } diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.js b/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.js index 84c1f0d3a4c..ac0b0376749 100644 --- a/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.js +++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.js @@ -15,15 +15,16 @@ class b extends a { } //// [inheritanceMemberAccessorOverridingMethod.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = (function () { function a() { } diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js b/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js index b8cec2486d7..eaae0a3c126 100644 --- a/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js +++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js @@ -13,15 +13,16 @@ class b extends a { } //// [inheritanceMemberAccessorOverridingProperty.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = (function () { function a() { } diff --git a/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js b/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js index 158c89d092e..8ed9f07dbb6 100644 --- a/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js @@ -15,15 +15,16 @@ class b extends a { } //// [inheritanceMemberFuncOverridingAccessor.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = (function () { function a() { } diff --git a/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.js b/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.js index a2c8a6b690e..a05acd4752f 100644 --- a/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.js +++ b/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.js @@ -12,15 +12,16 @@ class b extends a { } //// [inheritanceMemberFuncOverridingMethod.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = (function () { function a() { } diff --git a/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.js b/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.js index bd0a9e55ba1..1b27447d3dc 100644 --- a/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.js +++ b/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.js @@ -10,15 +10,16 @@ class b extends a { } //// [inheritanceMemberFuncOverridingProperty.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = (function () { function a() { } diff --git a/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js b/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js index 2c7ae4fb6b6..c18e12d38cb 100644 --- a/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js @@ -14,15 +14,16 @@ class b extends a { } //// [inheritanceMemberPropertyOverridingAccessor.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = (function () { function a() { } diff --git a/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.js b/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.js index 0b604adae2a..e9b333ddee1 100644 --- a/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.js +++ b/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.js @@ -10,15 +10,16 @@ class b extends a { } //// [inheritanceMemberPropertyOverridingMethod.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = (function () { function a() { } diff --git a/tests/baselines/reference/inheritanceMemberPropertyOverridingProperty.js b/tests/baselines/reference/inheritanceMemberPropertyOverridingProperty.js index 71a9731e828..0ccfa544a7c 100644 --- a/tests/baselines/reference/inheritanceMemberPropertyOverridingProperty.js +++ b/tests/baselines/reference/inheritanceMemberPropertyOverridingProperty.js @@ -8,15 +8,16 @@ class b extends a { } //// [inheritanceMemberPropertyOverridingProperty.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = (function () { function a() { } diff --git a/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js b/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js index 4c243028296..c150ef6434d 100644 --- a/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js +++ b/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js @@ -8,15 +8,16 @@ var b3 = new B(); // error, could not select overload for 'new' expression //// [inheritanceOfGenericConstructorMethod1.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js b/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js index 1bf2fd4eed7..8753fbe9b46 100644 --- a/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js +++ b/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js @@ -15,15 +15,16 @@ var n3 = new N.D2(); // no error, D2 //// [inheritanceOfGenericConstructorMethod2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var M; (function (M) { var C1 = (function () { diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js b/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js index e35b3f24a5d..3abc4b6d453 100644 --- a/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js @@ -18,15 +18,16 @@ class b extends a { } //// [inheritanceStaticAccessorOverridingAccessor.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = (function () { function a() { } diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js b/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js index d1035ae3d48..8215f4fdf0e 100644 --- a/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js +++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js @@ -15,15 +15,16 @@ class b extends a { } //// [inheritanceStaticAccessorOverridingMethod.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = (function () { function a() { } diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js b/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js index c51f321020d..3375597f114 100644 --- a/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js +++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js @@ -13,15 +13,16 @@ class b extends a { } //// [inheritanceStaticAccessorOverridingProperty.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = (function () { function a() { } diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js index 778e7987f27..7f27718a1fb 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js @@ -15,15 +15,16 @@ class b extends a { } //// [inheritanceStaticFuncOverridingAccessor.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = (function () { function a() { } diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js index a6afadefb3a..03de6f62af4 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js @@ -12,15 +12,16 @@ class b extends a { } //// [inheritanceStaticFuncOverridingAccessorOfFuncType.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = (function () { function a() { } diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.js b/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.js index 37b3113b855..a1380343bee 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.js @@ -12,15 +12,16 @@ class b extends a { } //// [inheritanceStaticFuncOverridingMethod.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = (function () { function a() { } diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.js b/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.js index 0d328df7c53..e28d0a026dd 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.js @@ -10,15 +10,16 @@ class b extends a { } //// [inheritanceStaticFuncOverridingProperty.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = (function () { function a() { } diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.js b/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.js index 541cda8e1b2..d8155525444 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.js @@ -10,15 +10,16 @@ class b extends a { } //// [inheritanceStaticFuncOverridingPropertyOfFuncType.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = (function () { function a() { } diff --git a/tests/baselines/reference/inheritanceStaticFunctionOverridingInstanceProperty.js b/tests/baselines/reference/inheritanceStaticFunctionOverridingInstanceProperty.js index 4ec01a1dc36..9b696526a44 100644 --- a/tests/baselines/reference/inheritanceStaticFunctionOverridingInstanceProperty.js +++ b/tests/baselines/reference/inheritanceStaticFunctionOverridingInstanceProperty.js @@ -10,15 +10,16 @@ class b extends a { } //// [inheritanceStaticFunctionOverridingInstanceProperty.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = (function () { function a() { } diff --git a/tests/baselines/reference/inheritanceStaticMembersCompatible.js b/tests/baselines/reference/inheritanceStaticMembersCompatible.js index 74a86c64f8c..59dc7e5fff1 100644 --- a/tests/baselines/reference/inheritanceStaticMembersCompatible.js +++ b/tests/baselines/reference/inheritanceStaticMembersCompatible.js @@ -8,15 +8,16 @@ class b extends a { } //// [inheritanceStaticMembersCompatible.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = (function () { function a() { } diff --git a/tests/baselines/reference/inheritanceStaticMembersIncompatible.js b/tests/baselines/reference/inheritanceStaticMembersIncompatible.js index e1ac5204119..e6e2edf0d5b 100644 --- a/tests/baselines/reference/inheritanceStaticMembersIncompatible.js +++ b/tests/baselines/reference/inheritanceStaticMembersIncompatible.js @@ -8,15 +8,16 @@ class b extends a { } //// [inheritanceStaticMembersIncompatible.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = (function () { function a() { } diff --git a/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js b/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js index 48cb36812a2..7872f35ae90 100644 --- a/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js @@ -13,15 +13,16 @@ class b extends a { } //// [inheritanceStaticPropertyOverridingAccessor.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = (function () { function a() { } diff --git a/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.js b/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.js index f5130abe8bd..24a6135b30c 100644 --- a/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.js +++ b/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.js @@ -10,15 +10,16 @@ class b extends a { } //// [inheritanceStaticPropertyOverridingMethod.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = (function () { function a() { } diff --git a/tests/baselines/reference/inheritanceStaticPropertyOverridingProperty.js b/tests/baselines/reference/inheritanceStaticPropertyOverridingProperty.js index e60108ca25b..182fb27a970 100644 --- a/tests/baselines/reference/inheritanceStaticPropertyOverridingProperty.js +++ b/tests/baselines/reference/inheritanceStaticPropertyOverridingProperty.js @@ -8,15 +8,16 @@ class b extends a { } //// [inheritanceStaticPropertyOverridingProperty.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = (function () { function a() { } diff --git a/tests/baselines/reference/inheritedConstructorWithRestParams.js b/tests/baselines/reference/inheritedConstructorWithRestParams.js index 9abc3a38497..a2538cf999d 100644 --- a/tests/baselines/reference/inheritedConstructorWithRestParams.js +++ b/tests/baselines/reference/inheritedConstructorWithRestParams.js @@ -15,15 +15,16 @@ new Derived("", 3); new Derived(3); //// [inheritedConstructorWithRestParams.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { var a = []; diff --git a/tests/baselines/reference/inheritedConstructorWithRestParams2.js b/tests/baselines/reference/inheritedConstructorWithRestParams2.js index 925f5124753..17cca41912d 100644 --- a/tests/baselines/reference/inheritedConstructorWithRestParams2.js +++ b/tests/baselines/reference/inheritedConstructorWithRestParams2.js @@ -35,15 +35,16 @@ new Derived("", 3, "", 3); new Derived("", 3, "", ""); //// [inheritedConstructorWithRestParams2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var IBaseBase = (function () { function IBaseBase(x) { } diff --git a/tests/baselines/reference/inheritedModuleMembersForClodule.js b/tests/baselines/reference/inheritedModuleMembersForClodule.js index f919c354e5e..5e7f49be559 100644 --- a/tests/baselines/reference/inheritedModuleMembersForClodule.js +++ b/tests/baselines/reference/inheritedModuleMembersForClodule.js @@ -22,15 +22,16 @@ class E extends D { //// [inheritedModuleMembersForClodule.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/instanceOfAssignability.js b/tests/baselines/reference/instanceOfAssignability.js index d6581fbfd09..c85caf07e53 100644 --- a/tests/baselines/reference/instanceOfAssignability.js +++ b/tests/baselines/reference/instanceOfAssignability.js @@ -90,15 +90,16 @@ function fn8(x: Alpha|Beta|Gamma) { //// [instanceOfAssignability.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); // Derived1 is assignable to, but not a subtype of, Base var Derived1 = (function () { function Derived1() { diff --git a/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js b/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js index bf304bc0aab..8eb7e3321f9 100644 --- a/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js +++ b/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js @@ -43,15 +43,16 @@ module Generic { } //// [instancePropertiesInheritedIntoClassType.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var NonGeneric; (function (NonGeneric) { var C = (function () { diff --git a/tests/baselines/reference/instanceSubtypeCheck2.js b/tests/baselines/reference/instanceSubtypeCheck2.js index 791e72a6b4e..58192144612 100644 --- a/tests/baselines/reference/instanceSubtypeCheck2.js +++ b/tests/baselines/reference/instanceSubtypeCheck2.js @@ -8,15 +8,16 @@ class C2 extends C1 { } //// [instanceSubtypeCheck2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C1 = (function () { function C1() { } diff --git a/tests/baselines/reference/instanceofWithStructurallyIdenticalTypes.js b/tests/baselines/reference/instanceofWithStructurallyIdenticalTypes.js index 938bf26dc44..8eefac93223 100644 --- a/tests/baselines/reference/instanceofWithStructurallyIdenticalTypes.js +++ b/tests/baselines/reference/instanceofWithStructurallyIdenticalTypes.js @@ -72,15 +72,16 @@ function goo(x: A) { //// [instanceofWithStructurallyIdenticalTypes.js] // Repro from #7271 -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C1 = (function () { function C1() { } diff --git a/tests/baselines/reference/instantiatedReturnTypeContravariance.js b/tests/baselines/reference/instantiatedReturnTypeContravariance.js index 62de511b4c8..01b8da419c4 100644 --- a/tests/baselines/reference/instantiatedReturnTypeContravariance.js +++ b/tests/baselines/reference/instantiatedReturnTypeContravariance.js @@ -31,15 +31,16 @@ return null; //// [instantiatedReturnTypeContravariance.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var c = (function () { function c() { } diff --git a/tests/baselines/reference/interfaceClassMerging.js b/tests/baselines/reference/interfaceClassMerging.js index d3d7b257465..9b75b9e4d10 100644 --- a/tests/baselines/reference/interfaceClassMerging.js +++ b/tests/baselines/reference/interfaceClassMerging.js @@ -41,15 +41,16 @@ obj = bar; //// [interfaceClassMerging.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Foo = (function () { function Foo() { } diff --git a/tests/baselines/reference/interfaceClassMerging2.js b/tests/baselines/reference/interfaceClassMerging2.js index 9f7037048bd..93c05759367 100644 --- a/tests/baselines/reference/interfaceClassMerging2.js +++ b/tests/baselines/reference/interfaceClassMerging2.js @@ -37,15 +37,16 @@ foo = bar; //// [interfaceClassMerging2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Foo = (function () { function Foo() { } diff --git a/tests/baselines/reference/interfaceExtendsClass1.js b/tests/baselines/reference/interfaceExtendsClass1.js index 7b0865b0018..5e8d36136a8 100644 --- a/tests/baselines/reference/interfaceExtendsClass1.js +++ b/tests/baselines/reference/interfaceExtendsClass1.js @@ -19,15 +19,16 @@ class Location { //// [interfaceExtendsClass1.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Control = (function () { function Control() { } diff --git a/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js b/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js index a560df25986..d567d5661d9 100644 --- a/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js +++ b/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js @@ -28,15 +28,16 @@ c = d; d = c; // error //// [interfaceExtendsClassWithPrivate1.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { this.x = 1; diff --git a/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js b/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js index 3aa5f800d9c..b7e2fe715cb 100644 --- a/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js +++ b/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js @@ -24,15 +24,16 @@ class D2 extends C implements I { // error } //// [interfaceExtendsClassWithPrivate2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { this.x = 1; diff --git a/tests/baselines/reference/interfaceImplementation8.js b/tests/baselines/reference/interfaceImplementation8.js index c8a739a3a1f..f90d58edd4f 100644 --- a/tests/baselines/reference/interfaceImplementation8.js +++ b/tests/baselines/reference/interfaceImplementation8.js @@ -41,15 +41,16 @@ class C8 extends C7 implements i2{ //// [interfaceImplementation8.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C1 = (function () { function C1() { } diff --git a/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.js b/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.js index 9ed7be8e0f2..4b88d58fd18 100644 --- a/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.js +++ b/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.js @@ -80,15 +80,16 @@ module YYY4 { //// [invalidModuleWithStatementsOfEveryKind.js] // All of these should be an error -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Y; (function (Y) { var A = (function () { diff --git a/tests/baselines/reference/invalidMultipleVariableDeclarations.js b/tests/baselines/reference/invalidMultipleVariableDeclarations.js index 788b91f13c5..4e473a95bf5 100644 --- a/tests/baselines/reference/invalidMultipleVariableDeclarations.js +++ b/tests/baselines/reference/invalidMultipleVariableDeclarations.js @@ -54,15 +54,16 @@ var m: typeof M; var m = M.A; //// [invalidMultipleVariableDeclarations.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/invalidReturnStatements.js b/tests/baselines/reference/invalidReturnStatements.js index ca25cdc9870..7dc01b18b5b 100644 --- a/tests/baselines/reference/invalidReturnStatements.js +++ b/tests/baselines/reference/invalidReturnStatements.js @@ -21,15 +21,16 @@ function fn11(): D { return new C(); } //// [invalidReturnStatements.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); // all the following should be error function fn1() { } function fn2() { } diff --git a/tests/baselines/reference/isolatedModulesImportExportElision.js b/tests/baselines/reference/isolatedModulesImportExportElision.js index dddc8d56339..e430e1eda1b 100644 --- a/tests/baselines/reference/isolatedModulesImportExportElision.js +++ b/tests/baselines/reference/isolatedModulesImportExportElision.js @@ -15,15 +15,16 @@ export var z = x; //// [file1.js] "use strict"; -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var module_1 = require("module"); var module_2 = require("module"); var ns = require("module"); diff --git a/tests/baselines/reference/jsxViaImport.js b/tests/baselines/reference/jsxViaImport.js index 110cbba1ef6..7955a6e65b9 100644 --- a/tests/baselines/reference/jsxViaImport.js +++ b/tests/baselines/reference/jsxViaImport.js @@ -25,15 +25,16 @@ class TestComponent extends React.Component { //// [consumer.jsx] "use strict"; -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); /// var BaseComponent = require("BaseComponent"); var TestComponent = (function (_super) { diff --git a/tests/baselines/reference/keyofAndIndexedAccess.js b/tests/baselines/reference/keyofAndIndexedAccess.js index 6c3591344e3..e9d76ee4d7f 100644 --- a/tests/baselines/reference/keyofAndIndexedAccess.js +++ b/tests/baselines/reference/keyofAndIndexedAccess.js @@ -367,15 +367,16 @@ function f(p: K) { } //// [keyofAndIndexedAccess.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Shape = (function () { function Shape() { } diff --git a/tests/baselines/reference/lambdaArgCrash.js b/tests/baselines/reference/lambdaArgCrash.js index 8fbe9a40728..cdc03b555ef 100644 --- a/tests/baselines/reference/lambdaArgCrash.js +++ b/tests/baselines/reference/lambdaArgCrash.js @@ -35,15 +35,16 @@ class ItemSetEvent extends Event { //// [lambdaArgCrash.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Event = (function () { function Event() { // TODO: remove diff --git a/tests/baselines/reference/lift.js b/tests/baselines/reference/lift.js index a9f3b4b17ac..d2f2ed8dc0d 100644 --- a/tests/baselines/reference/lift.js +++ b/tests/baselines/reference/lift.js @@ -18,15 +18,16 @@ class C extends B { //// [lift.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var B = (function () { function B(y) { this.y = y; diff --git a/tests/baselines/reference/localTypes1.js b/tests/baselines/reference/localTypes1.js index 503a34c528c..27045613c81 100644 --- a/tests/baselines/reference/localTypes1.js +++ b/tests/baselines/reference/localTypes1.js @@ -142,15 +142,16 @@ function f6() { //// [localTypes1.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); function f1() { var E; (function (E) { diff --git a/tests/baselines/reference/m7Bugs.js b/tests/baselines/reference/m7Bugs.js index b48fb3bbb3e..86504bdf8f9 100644 --- a/tests/baselines/reference/m7Bugs.js +++ b/tests/baselines/reference/m7Bugs.js @@ -27,15 +27,16 @@ var y3: C1 = {}; //// [m7Bugs.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var s = ({}); var x = {}; var C1 = (function () { diff --git a/tests/baselines/reference/mergedDeclarations5.js b/tests/baselines/reference/mergedDeclarations5.js index e3273fd8115..886afebe358 100644 --- a/tests/baselines/reference/mergedDeclarations5.js +++ b/tests/baselines/reference/mergedDeclarations5.js @@ -19,15 +19,16 @@ var A = (function () { return A; }()); //// [b.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var B = (function (_super) { __extends(B, _super); function B() { diff --git a/tests/baselines/reference/mergedDeclarations6.js b/tests/baselines/reference/mergedDeclarations6.js index d4f013e4ecc..445fbac34b7 100644 --- a/tests/baselines/reference/mergedDeclarations6.js +++ b/tests/baselines/reference/mergedDeclarations6.js @@ -37,15 +37,16 @@ define(["require", "exports"], function (require, exports) { exports.A = A; }); //// [b.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); define(["require", "exports", "./a"], function (require, exports, a_1) { "use strict"; var B = (function (_super) { diff --git a/tests/baselines/reference/mergedInheritedClassInterface.js b/tests/baselines/reference/mergedInheritedClassInterface.js index 4b6457fe1dd..1772d6139d8 100644 --- a/tests/baselines/reference/mergedInheritedClassInterface.js +++ b/tests/baselines/reference/mergedInheritedClassInterface.js @@ -47,15 +47,16 @@ grandchild.method2(); //// [mergedInheritedClassInterface.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var BaseClass = (function () { function BaseClass() { } diff --git a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.js b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.js index 3207ae8f8c5..65477941c0a 100644 --- a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.js +++ b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.js @@ -32,15 +32,16 @@ var r = a.x; // error var r2 = a.w; // error //// [mergedInterfacesWithInheritedPrivates2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.js b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.js index 6a01a6cdd78..c3d2cc0ea57 100644 --- a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.js +++ b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.js @@ -39,15 +39,16 @@ module M { } //// [mergedInterfacesWithInheritedPrivates3.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/missingPropertiesOfClassExpression.js b/tests/baselines/reference/missingPropertiesOfClassExpression.js index 54016af34af..a2d38f47c62 100644 --- a/tests/baselines/reference/missingPropertiesOfClassExpression.js +++ b/tests/baselines/reference/missingPropertiesOfClassExpression.js @@ -7,15 +7,16 @@ class George extends class { reset() { return this.y; } } { //// [missingPropertiesOfClassExpression.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var George = (function (_super) { __extends(George, _super); function George() { diff --git a/tests/baselines/reference/moduleAsBaseType.js b/tests/baselines/reference/moduleAsBaseType.js index 5a421d7d3f4..99553e04108 100644 --- a/tests/baselines/reference/moduleAsBaseType.js +++ b/tests/baselines/reference/moduleAsBaseType.js @@ -5,15 +5,16 @@ interface I extends M { } class C2 implements M { } //// [moduleAsBaseType.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function (_super) { __extends(C, _super); function C() { diff --git a/tests/baselines/reference/moduleImportedForTypeArgumentPosition.js b/tests/baselines/reference/moduleImportedForTypeArgumentPosition.js index c57f7af6579..6471abaf13d 100644 --- a/tests/baselines/reference/moduleImportedForTypeArgumentPosition.js +++ b/tests/baselines/reference/moduleImportedForTypeArgumentPosition.js @@ -16,15 +16,16 @@ define(["require", "exports"], function (require, exports) { "use strict"; }); //// [moduleImportedForTypeArgumentPosition_1.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); define(["require", "exports"], function (require, exports) { "use strict"; var C1 = (function () { diff --git a/tests/baselines/reference/moduleWithStatementsOfEveryKind.js b/tests/baselines/reference/moduleWithStatementsOfEveryKind.js index 6fda8588f43..f7532442020 100644 --- a/tests/baselines/reference/moduleWithStatementsOfEveryKind.js +++ b/tests/baselines/reference/moduleWithStatementsOfEveryKind.js @@ -59,15 +59,16 @@ module Y { //// [moduleWithStatementsOfEveryKind.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A; (function (A_1) { var A = (function () { diff --git a/tests/baselines/reference/multipleInheritance.js b/tests/baselines/reference/multipleInheritance.js index 2036f81bf92..f0074664ad1 100644 --- a/tests/baselines/reference/multipleInheritance.js +++ b/tests/baselines/reference/multipleInheritance.js @@ -39,15 +39,16 @@ class Baad extends Good { //// [multipleInheritance.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var B1 = (function () { function B1() { } diff --git a/tests/baselines/reference/mutuallyRecursiveGenericBaseTypes2.js b/tests/baselines/reference/mutuallyRecursiveGenericBaseTypes2.js index 0f86ca802a6..90ffbf5148f 100644 --- a/tests/baselines/reference/mutuallyRecursiveGenericBaseTypes2.js +++ b/tests/baselines/reference/mutuallyRecursiveGenericBaseTypes2.js @@ -11,15 +11,16 @@ var test = new foo(); //// [mutuallyRecursiveGenericBaseTypes2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var foo = (function () { function foo() { } diff --git a/tests/baselines/reference/noImplicitAnyMissingGetAccessor.js b/tests/baselines/reference/noImplicitAnyMissingGetAccessor.js index 1253860daa6..25815641e95 100644 --- a/tests/baselines/reference/noImplicitAnyMissingGetAccessor.js +++ b/tests/baselines/reference/noImplicitAnyMissingGetAccessor.js @@ -13,15 +13,16 @@ class Child extends Parent { } //// [noImplicitAnyMissingGetAccessor.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Parent = (function () { function Parent() { } diff --git a/tests/baselines/reference/noImplicitAnyMissingSetAccessor.js b/tests/baselines/reference/noImplicitAnyMissingSetAccessor.js index 76011cee442..cb37fafd9f9 100644 --- a/tests/baselines/reference/noImplicitAnyMissingSetAccessor.js +++ b/tests/baselines/reference/noImplicitAnyMissingSetAccessor.js @@ -12,15 +12,16 @@ class Child extends Parent { } //// [noImplicitAnyMissingSetAccessor.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Parent = (function () { function Parent() { } diff --git a/tests/baselines/reference/nonGenericClassExtendingGenericClassWithAny.js b/tests/baselines/reference/nonGenericClassExtendingGenericClassWithAny.js index 1dab2ae6fb8..49a3a7e05eb 100644 --- a/tests/baselines/reference/nonGenericClassExtendingGenericClassWithAny.js +++ b/tests/baselines/reference/nonGenericClassExtendingGenericClassWithAny.js @@ -6,15 +6,16 @@ class Foo { class Bar extends Foo { } // Valid //// [nonGenericClassExtendingGenericClassWithAny.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Foo = (function () { function Foo() { } diff --git a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js index b571573c18f..9c44df83757 100644 --- a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js +++ b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js @@ -47,15 +47,16 @@ var b: { [x: number]: A } = { //// [numericIndexerConstrainsPropertyDeclarations2.js] // String indexer providing a constraint of a user defined type -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/numericIndexerConstraint3.js b/tests/baselines/reference/numericIndexerConstraint3.js index 0dbcc5308c8..4a8c3caf12b 100644 --- a/tests/baselines/reference/numericIndexerConstraint3.js +++ b/tests/baselines/reference/numericIndexerConstraint3.js @@ -13,15 +13,16 @@ class C { } //// [numericIndexerConstraint3.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/numericIndexerConstraint4.js b/tests/baselines/reference/numericIndexerConstraint4.js index 0b4f1be5361..4fe10b54ee4 100644 --- a/tests/baselines/reference/numericIndexerConstraint4.js +++ b/tests/baselines/reference/numericIndexerConstraint4.js @@ -13,15 +13,16 @@ var x: { //// [numericIndexerConstraint4.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/numericIndexerTyping2.js b/tests/baselines/reference/numericIndexerTyping2.js index d4e12eddd27..e6fce38d818 100644 --- a/tests/baselines/reference/numericIndexerTyping2.js +++ b/tests/baselines/reference/numericIndexerTyping2.js @@ -13,15 +13,16 @@ var i2: I2; var r2: string = i2[1]; // error: numeric indexer returns the type of the string indexere //// [numericIndexerTyping2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var I = (function () { function I() { } diff --git a/tests/baselines/reference/objectCreationOfElementAccessExpression.js b/tests/baselines/reference/objectCreationOfElementAccessExpression.js index 0d6589f09e3..7d192f7ee9a 100644 --- a/tests/baselines/reference/objectCreationOfElementAccessExpression.js +++ b/tests/baselines/reference/objectCreationOfElementAccessExpression.js @@ -56,15 +56,16 @@ var foods2: MonsterFood[] = new PetFood[new IceCream('Mint chocolate chip') , Co //// [objectCreationOfElementAccessExpression.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Food = (function () { function Food(name) { this.name = name; diff --git a/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js b/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js index 8f9acd3615c..84caecad63a 100644 --- a/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js +++ b/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js @@ -55,15 +55,16 @@ var b: { var r4: void = b.valueOf(); //// [objectTypeHidingMembersOfExtendedObject.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js index e995999e04b..a00f33b2a97 100644 --- a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js +++ b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js @@ -124,15 +124,16 @@ function foo16(x: any) { } //// [objectTypesIdentityWithNumericIndexers1.js] // object types are identical structurally -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js index 81521fccedf..fa176f483d7 100644 --- a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js +++ b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js @@ -127,15 +127,16 @@ function foo16(x: any) { } //// [objectTypesIdentityWithNumericIndexers2.js] // object types are identical structurally -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js index c66084b049f..a09e844b6c4 100644 --- a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js +++ b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js @@ -124,15 +124,16 @@ function foo16(x: any) { } //// [objectTypesIdentityWithNumericIndexers3.js] // object types are identical structurally -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/objectTypesIdentityWithPrivates.js b/tests/baselines/reference/objectTypesIdentityWithPrivates.js index e0cfd4b3be1..a187c353056 100644 --- a/tests/baselines/reference/objectTypesIdentityWithPrivates.js +++ b/tests/baselines/reference/objectTypesIdentityWithPrivates.js @@ -122,15 +122,16 @@ function foo16(x: any) { } //// [objectTypesIdentityWithPrivates.js] // object types are identical structurally -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/objectTypesIdentityWithPrivates2.js b/tests/baselines/reference/objectTypesIdentityWithPrivates2.js index 97f8179bfb1..5d130734c7b 100644 --- a/tests/baselines/reference/objectTypesIdentityWithPrivates2.js +++ b/tests/baselines/reference/objectTypesIdentityWithPrivates2.js @@ -40,15 +40,16 @@ function foo6(x: any): any { } //// [objectTypesIdentityWithPrivates2.js] // object types are identical structurally -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/objectTypesIdentityWithPrivates3.js b/tests/baselines/reference/objectTypesIdentityWithPrivates3.js index 740c9af666b..f28147ba50d 100644 --- a/tests/baselines/reference/objectTypesIdentityWithPrivates3.js +++ b/tests/baselines/reference/objectTypesIdentityWithPrivates3.js @@ -26,15 +26,16 @@ var c3: C3; c3; // Should fail (private x originates in the same declaration, but different types) //// [objectTypesIdentityWithPrivates3.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C1 = (function () { function C1() { } diff --git a/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js b/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js index fe72b6d409a..a561df31753 100644 --- a/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js +++ b/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js @@ -124,15 +124,16 @@ function foo16(x: any) { } //// [objectTypesIdentityWithStringIndexers.js] // object types are identical structurally -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js b/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js index 9cd95ea9629..282ec34ea5f 100644 --- a/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js +++ b/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js @@ -127,15 +127,16 @@ function foo16(x: any) { } //// [objectTypesIdentityWithStringIndexers2.js] // object types are identical structurally -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/optionalConstructorArgInSuper.js b/tests/baselines/reference/optionalConstructorArgInSuper.js index 927fbd25854..5033f9d1581 100644 --- a/tests/baselines/reference/optionalConstructorArgInSuper.js +++ b/tests/baselines/reference/optionalConstructorArgInSuper.js @@ -11,15 +11,16 @@ d2.foo(); //// [optionalConstructorArgInSuper.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base(opt) { } diff --git a/tests/baselines/reference/optionalMethods.js b/tests/baselines/reference/optionalMethods.js index 4d89325803d..3af46d7e41a 100644 --- a/tests/baselines/reference/optionalMethods.js +++ b/tests/baselines/reference/optionalMethods.js @@ -58,15 +58,16 @@ class Derived extends Base { //// [optionalMethods.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); function test1(x) { x.a; x.b; diff --git a/tests/baselines/reference/optionalParamArgsTest.js b/tests/baselines/reference/optionalParamArgsTest.js index 7f606887baa..2bcfbd44da5 100644 --- a/tests/baselines/reference/optionalParamArgsTest.js +++ b/tests/baselines/reference/optionalParamArgsTest.js @@ -125,15 +125,16 @@ fnOpt2(1, [2, 3], [1], true); //// [optionalParamArgsTest.js] // Optional parameter and default argument tests -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); // test basic configurations var C1 = (function () { function C1(v, p) { diff --git a/tests/baselines/reference/optionalParamInOverride.js b/tests/baselines/reference/optionalParamInOverride.js index cfa9364bb68..52fa0a38517 100644 --- a/tests/baselines/reference/optionalParamInOverride.js +++ b/tests/baselines/reference/optionalParamInOverride.js @@ -8,15 +8,16 @@ class Y extends Z { //// [optionalParamInOverride.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Z = (function () { function Z() { } diff --git a/tests/baselines/reference/optionalParameterProperty.js b/tests/baselines/reference/optionalParameterProperty.js index 5a7bb5441dd..ed1b910241d 100644 --- a/tests/baselines/reference/optionalParameterProperty.js +++ b/tests/baselines/reference/optionalParameterProperty.js @@ -12,15 +12,16 @@ class D extends C { //// [optionalParameterProperty.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/outModuleConcatAmd.js b/tests/baselines/reference/outModuleConcatAmd.js index 867360fc49e..398978793c1 100644 --- a/tests/baselines/reference/outModuleConcatAmd.js +++ b/tests/baselines/reference/outModuleConcatAmd.js @@ -9,15 +9,16 @@ import {A} from "./ref/a"; export class B extends A { } //// [all.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); define("ref/a", ["require", "exports"], function (require, exports) { "use strict"; var A = (function () { diff --git a/tests/baselines/reference/outModuleConcatAmd.js.map b/tests/baselines/reference/outModuleConcatAmd.js.map index 937bec93969..a95ca740a61 100644 --- a/tests/baselines/reference/outModuleConcatAmd.js.map +++ b/tests/baselines/reference/outModuleConcatAmd.js.map @@ -1,2 +1,2 @@ //// [all.js.map] -{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":";;;;;;;;;;;IACA;QAAA;QAAiB,CAAC;QAAD,QAAC;IAAD,CAAC,AAAlB,IAAkB;IAAL,cAAC;;;;ICAd;QAAuB,qBAAC;QAAxB;;QAA2B,CAAC;QAAD,QAAC;IAAD,CAAC,AAA5B,CAAuB,KAAC,GAAI;IAAf,cAAC"} \ No newline at end of file +{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":";;;;;;;;;;;;IACA;QAAA;QAAiB,CAAC;QAAD,QAAC;IAAD,CAAC,AAAlB,IAAkB;IAAL,cAAC;;;;ICAd;QAAuB,qBAAC;QAAxB;;QAA2B,CAAC;QAAD,QAAC;IAAD,CAAC,AAA5B,CAAuB,KAAC,GAAI;IAAf,cAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt b/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt index ef5e9e9dcab..f220eb3e0ed 100644 --- a/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt +++ b/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt @@ -8,15 +8,16 @@ sources: tests/cases/compiler/ref/a.ts,tests/cases/compiler/b.ts emittedFile:all.js sourceFile:tests/cases/compiler/ref/a.ts ------------------------------------------------------------------- ->>>var __extendStatics = (this && this.__extendStatics) || ->>> Object.setPrototypeOf || ->>> ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || ->>> function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; ->>>var __extends = (this && this.__extends) || function (d, b) { ->>> __extendStatics(d, b); ->>> function __() { this.constructor = d; } ->>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); ->>>}; +>>>var __extends = (this && this.__extends) || (function () { +>>> var __extendStatics = Object.setPrototypeOf || +>>> ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +>>> function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; +>>> return function (d, b) { +>>> __extendStatics(d, b); +>>> function __() { this.constructor = d; } +>>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +>>> }; +>>>})(); >>>define("ref/a", ["require", "exports"], function (require, exports) { >>> "use strict"; >>> var A = (function () { @@ -24,13 +25,13 @@ sourceFile:tests/cases/compiler/ref/a.ts 2 > ^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(12, 5) Source(2, 1) + SourceIndex(0) +1 >Emitted(13, 5) Source(2, 1) + SourceIndex(0) --- >>> function A() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(13, 9) Source(2, 1) + SourceIndex(0) +1->Emitted(14, 9) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^ @@ -38,16 +39,16 @@ sourceFile:tests/cases/compiler/ref/a.ts 3 > ^^^^^^^^^-> 1->export class A { 2 > } -1->Emitted(14, 9) Source(2, 18) + SourceIndex(0) -2 >Emitted(14, 10) Source(2, 19) + SourceIndex(0) +1->Emitted(15, 9) Source(2, 18) + SourceIndex(0) +2 >Emitted(15, 10) Source(2, 19) + SourceIndex(0) --- >>> return A; 1->^^^^^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(15, 9) Source(2, 18) + SourceIndex(0) -2 >Emitted(15, 17) Source(2, 19) + SourceIndex(0) +1->Emitted(16, 9) Source(2, 18) + SourceIndex(0) +2 >Emitted(16, 17) Source(2, 19) + SourceIndex(0) --- >>> }()); 1 >^^^^ @@ -59,18 +60,18 @@ sourceFile:tests/cases/compiler/ref/a.ts 2 > } 3 > 4 > export class A { } -1 >Emitted(16, 5) Source(2, 18) + SourceIndex(0) -2 >Emitted(16, 6) Source(2, 19) + SourceIndex(0) -3 >Emitted(16, 6) Source(2, 1) + SourceIndex(0) -4 >Emitted(16, 10) Source(2, 19) + SourceIndex(0) +1 >Emitted(17, 5) Source(2, 18) + SourceIndex(0) +2 >Emitted(17, 6) Source(2, 19) + SourceIndex(0) +3 >Emitted(17, 6) Source(2, 1) + SourceIndex(0) +4 >Emitted(17, 10) Source(2, 19) + SourceIndex(0) --- >>> exports.A = A; 1->^^^^ 2 > ^^^^^^^^^^^^^^ 1-> 2 > A -1->Emitted(17, 5) Source(2, 14) + SourceIndex(0) -2 >Emitted(17, 19) Source(2, 15) + SourceIndex(0) +1->Emitted(18, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(18, 19) Source(2, 15) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:all.js @@ -84,21 +85,21 @@ sourceFile:tests/cases/compiler/b.ts 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >import {A} from "./ref/a"; > -1 >Emitted(21, 5) Source(2, 1) + SourceIndex(1) +1 >Emitted(22, 5) Source(2, 1) + SourceIndex(1) --- >>> __extends(B, _super); 1->^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^ 1->export class B extends 2 > A -1->Emitted(22, 9) Source(2, 24) + SourceIndex(1) -2 >Emitted(22, 30) Source(2, 25) + SourceIndex(1) +1->Emitted(23, 9) Source(2, 24) + SourceIndex(1) +2 >Emitted(23, 30) Source(2, 25) + SourceIndex(1) --- >>> function B() { 1 >^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > -1 >Emitted(23, 9) Source(2, 1) + SourceIndex(1) +1 >Emitted(24, 9) Source(2, 1) + SourceIndex(1) --- >>> return _super.apply(this, arguments) || this; >>> } @@ -107,16 +108,16 @@ sourceFile:tests/cases/compiler/b.ts 3 > ^^^^^^^^^-> 1->export class B extends A { 2 > } -1->Emitted(25, 9) Source(2, 28) + SourceIndex(1) -2 >Emitted(25, 10) Source(2, 29) + SourceIndex(1) +1->Emitted(26, 9) Source(2, 28) + SourceIndex(1) +2 >Emitted(26, 10) Source(2, 29) + SourceIndex(1) --- >>> return B; 1->^^^^^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(26, 9) Source(2, 28) + SourceIndex(1) -2 >Emitted(26, 17) Source(2, 29) + SourceIndex(1) +1->Emitted(27, 9) Source(2, 28) + SourceIndex(1) +2 >Emitted(27, 17) Source(2, 29) + SourceIndex(1) --- >>> }(a_1.A)); 1 >^^^^ @@ -132,20 +133,20 @@ sourceFile:tests/cases/compiler/b.ts 4 > export class B extends 5 > A 6 > { } -1 >Emitted(27, 5) Source(2, 28) + SourceIndex(1) -2 >Emitted(27, 6) Source(2, 29) + SourceIndex(1) -3 >Emitted(27, 6) Source(2, 1) + SourceIndex(1) -4 >Emitted(27, 7) Source(2, 24) + SourceIndex(1) -5 >Emitted(27, 12) Source(2, 25) + SourceIndex(1) -6 >Emitted(27, 15) Source(2, 29) + SourceIndex(1) +1 >Emitted(28, 5) Source(2, 28) + SourceIndex(1) +2 >Emitted(28, 6) Source(2, 29) + SourceIndex(1) +3 >Emitted(28, 6) Source(2, 1) + SourceIndex(1) +4 >Emitted(28, 7) Source(2, 24) + SourceIndex(1) +5 >Emitted(28, 12) Source(2, 25) + SourceIndex(1) +6 >Emitted(28, 15) Source(2, 29) + SourceIndex(1) --- >>> exports.B = B; 1->^^^^ 2 > ^^^^^^^^^^^^^^ 1-> 2 > B -1->Emitted(28, 5) Source(2, 14) + SourceIndex(1) -2 >Emitted(28, 19) Source(2, 15) + SourceIndex(1) +1->Emitted(29, 5) Source(2, 14) + SourceIndex(1) +2 >Emitted(29, 19) Source(2, 15) + SourceIndex(1) --- >>>}); >>>//# sourceMappingURL=all.js.map \ No newline at end of file diff --git a/tests/baselines/reference/outModuleConcatSystem.js b/tests/baselines/reference/outModuleConcatSystem.js index db9191cedf7..e5a1bd65cad 100644 --- a/tests/baselines/reference/outModuleConcatSystem.js +++ b/tests/baselines/reference/outModuleConcatSystem.js @@ -9,15 +9,16 @@ import {A} from "./ref/a"; export class B extends A { } //// [all.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); System.register("ref/a", [], function (exports_1, context_1) { "use strict"; var __moduleName = context_1 && context_1.id; diff --git a/tests/baselines/reference/outModuleConcatSystem.js.map b/tests/baselines/reference/outModuleConcatSystem.js.map index 275b47b1363..25b706844e2 100644 --- a/tests/baselines/reference/outModuleConcatSystem.js.map +++ b/tests/baselines/reference/outModuleConcatSystem.js.map @@ -1,2 +1,2 @@ //// [all.js.map] -{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;YACA;gBAAA;gBAAiB,CAAC;gBAAD,QAAC;YAAD,CAAC,AAAlB,IAAkB;;QAClB,CAAC;;;;;;;;;;;;;;YCDD;gBAAuB,qBAAC;gBAAxB;;gBAA2B,CAAC;gBAAD,QAAC;YAAD,CAAC,AAA5B,CAAuB,KAAC,GAAI;;QAAA,CAAC"} \ No newline at end of file +{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;YACA;gBAAA;gBAAiB,CAAC;gBAAD,QAAC;YAAD,CAAC,AAAlB,IAAkB;;QAClB,CAAC;;;;;;;;;;;;;;YCDD;gBAAuB,qBAAC;gBAAxB;;gBAA2B,CAAC;gBAAD,QAAC;YAAD,CAAC,AAA5B,CAAuB,KAAC,GAAI;;QAAA,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt b/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt index fa08e14d135..72b6bf09dd1 100644 --- a/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt +++ b/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt @@ -8,15 +8,16 @@ sources: tests/cases/compiler/ref/a.ts,tests/cases/compiler/b.ts emittedFile:all.js sourceFile:tests/cases/compiler/ref/a.ts ------------------------------------------------------------------- ->>>var __extendStatics = (this && this.__extendStatics) || ->>> Object.setPrototypeOf || ->>> ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || ->>> function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; ->>>var __extends = (this && this.__extends) || function (d, b) { ->>> __extendStatics(d, b); ->>> function __() { this.constructor = d; } ->>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); ->>>}; +>>>var __extends = (this && this.__extends) || (function () { +>>> var __extendStatics = Object.setPrototypeOf || +>>> ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +>>> function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; +>>> return function (d, b) { +>>> __extendStatics(d, b); +>>> function __() { this.constructor = d; } +>>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +>>> }; +>>>})(); >>>System.register("ref/a", [], function (exports_1, context_1) { >>> "use strict"; >>> var __moduleName = context_1 && context_1.id; @@ -29,13 +30,13 @@ sourceFile:tests/cases/compiler/ref/a.ts 2 > ^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(17, 13) Source(2, 1) + SourceIndex(0) +1 >Emitted(18, 13) Source(2, 1) + SourceIndex(0) --- >>> function A() { 1->^^^^^^^^^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(18, 17) Source(2, 1) + SourceIndex(0) +1->Emitted(19, 17) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^^^^^^^^^^^^^ @@ -43,16 +44,16 @@ sourceFile:tests/cases/compiler/ref/a.ts 3 > ^^^^^^^^^-> 1->export class A { 2 > } -1->Emitted(19, 17) Source(2, 18) + SourceIndex(0) -2 >Emitted(19, 18) Source(2, 19) + SourceIndex(0) +1->Emitted(20, 17) Source(2, 18) + SourceIndex(0) +2 >Emitted(20, 18) Source(2, 19) + SourceIndex(0) --- >>> return A; 1->^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(20, 17) Source(2, 18) + SourceIndex(0) -2 >Emitted(20, 25) Source(2, 19) + SourceIndex(0) +1->Emitted(21, 17) Source(2, 18) + SourceIndex(0) +2 >Emitted(21, 25) Source(2, 19) + SourceIndex(0) --- >>> }()); 1 >^^^^^^^^^^^^ @@ -64,10 +65,10 @@ sourceFile:tests/cases/compiler/ref/a.ts 2 > } 3 > 4 > export class A { } -1 >Emitted(21, 13) Source(2, 18) + SourceIndex(0) -2 >Emitted(21, 14) Source(2, 19) + SourceIndex(0) -3 >Emitted(21, 14) Source(2, 1) + SourceIndex(0) -4 >Emitted(21, 18) Source(2, 19) + SourceIndex(0) +1 >Emitted(22, 13) Source(2, 18) + SourceIndex(0) +2 >Emitted(22, 14) Source(2, 19) + SourceIndex(0) +3 >Emitted(22, 14) Source(2, 1) + SourceIndex(0) +4 >Emitted(22, 18) Source(2, 19) + SourceIndex(0) --- >>> exports_1("A", A); >>> } @@ -76,8 +77,8 @@ sourceFile:tests/cases/compiler/ref/a.ts 1-> > 2 > -1->Emitted(23, 9) Source(3, 1) + SourceIndex(0) -2 >Emitted(23, 10) Source(3, 2) + SourceIndex(0) +1->Emitted(24, 9) Source(3, 1) + SourceIndex(0) +2 >Emitted(24, 10) Source(3, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:all.js @@ -101,21 +102,21 @@ sourceFile:tests/cases/compiler/b.ts 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >import {A} from "./ref/a"; > -1 >Emitted(37, 13) Source(2, 1) + SourceIndex(1) +1 >Emitted(38, 13) Source(2, 1) + SourceIndex(1) --- >>> __extends(B, _super); 1->^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^ 1->export class B extends 2 > A -1->Emitted(38, 17) Source(2, 24) + SourceIndex(1) -2 >Emitted(38, 38) Source(2, 25) + SourceIndex(1) +1->Emitted(39, 17) Source(2, 24) + SourceIndex(1) +2 >Emitted(39, 38) Source(2, 25) + SourceIndex(1) --- >>> function B() { 1 >^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > -1 >Emitted(39, 17) Source(2, 1) + SourceIndex(1) +1 >Emitted(40, 17) Source(2, 1) + SourceIndex(1) --- >>> return _super.apply(this, arguments) || this; >>> } @@ -124,16 +125,16 @@ sourceFile:tests/cases/compiler/b.ts 3 > ^^^^^^^^^-> 1->export class B extends A { 2 > } -1->Emitted(41, 17) Source(2, 28) + SourceIndex(1) -2 >Emitted(41, 18) Source(2, 29) + SourceIndex(1) +1->Emitted(42, 17) Source(2, 28) + SourceIndex(1) +2 >Emitted(42, 18) Source(2, 29) + SourceIndex(1) --- >>> return B; 1->^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(42, 17) Source(2, 28) + SourceIndex(1) -2 >Emitted(42, 25) Source(2, 29) + SourceIndex(1) +1->Emitted(43, 17) Source(2, 28) + SourceIndex(1) +2 >Emitted(43, 25) Source(2, 29) + SourceIndex(1) --- >>> }(a_1.A)); 1 >^^^^^^^^^^^^ @@ -149,12 +150,12 @@ sourceFile:tests/cases/compiler/b.ts 4 > export class B extends 5 > A 6 > { } -1 >Emitted(43, 13) Source(2, 28) + SourceIndex(1) -2 >Emitted(43, 14) Source(2, 29) + SourceIndex(1) -3 >Emitted(43, 14) Source(2, 1) + SourceIndex(1) -4 >Emitted(43, 15) Source(2, 24) + SourceIndex(1) -5 >Emitted(43, 20) Source(2, 25) + SourceIndex(1) -6 >Emitted(43, 23) Source(2, 29) + SourceIndex(1) +1 >Emitted(44, 13) Source(2, 28) + SourceIndex(1) +2 >Emitted(44, 14) Source(2, 29) + SourceIndex(1) +3 >Emitted(44, 14) Source(2, 1) + SourceIndex(1) +4 >Emitted(44, 15) Source(2, 24) + SourceIndex(1) +5 >Emitted(44, 20) Source(2, 25) + SourceIndex(1) +6 >Emitted(44, 23) Source(2, 29) + SourceIndex(1) --- >>> exports_2("B", B); >>> } @@ -162,8 +163,8 @@ sourceFile:tests/cases/compiler/b.ts 2 > ^ 1-> 2 > -1->Emitted(45, 9) Source(2, 29) + SourceIndex(1) -2 >Emitted(45, 10) Source(2, 30) + SourceIndex(1) +1->Emitted(46, 9) Source(2, 29) + SourceIndex(1) +2 >Emitted(46, 10) Source(2, 30) + SourceIndex(1) --- >>> }; >>>}); diff --git a/tests/baselines/reference/outModuleTripleSlashRefs.js b/tests/baselines/reference/outModuleTripleSlashRefs.js index d8b543ef727..8308f58cc99 100644 --- a/tests/baselines/reference/outModuleTripleSlashRefs.js +++ b/tests/baselines/reference/outModuleTripleSlashRefs.js @@ -31,15 +31,16 @@ export class B extends A { } //// [all.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); /// var Foo = (function () { function Foo() { diff --git a/tests/baselines/reference/outModuleTripleSlashRefs.js.map b/tests/baselines/reference/outModuleTripleSlashRefs.js.map index cb10515edd2..e91088c249c 100644 --- a/tests/baselines/reference/outModuleTripleSlashRefs.js.map +++ b/tests/baselines/reference/outModuleTripleSlashRefs.js.map @@ -1,2 +1,2 @@ //// [all.js.map] -{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/b.ts","tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":";;;;;;;;;AAAA,iCAAiC;AACjC;IAAA;IAEA,CAAC;IAAD,UAAC;AAAD,CAAC,AAFD,IAEC;;;ICFD,+BAA+B;IAC/B;QAAA;QAEA,CAAC;QAAD,QAAC;IAAD,CAAC,AAFD,IAEC;IAFY,cAAC;;;;ICDd;QAAuB,qBAAC;QAAxB;;QAA2B,CAAC;QAAD,QAAC;IAAD,CAAC,AAA5B,CAAuB,KAAC,GAAI;IAAf,cAAC"} \ No newline at end of file +{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/b.ts","tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,iCAAiC;AACjC;IAAA;IAEA,CAAC;IAAD,UAAC;AAAD,CAAC,AAFD,IAEC;;;ICFD,+BAA+B;IAC/B;QAAA;QAEA,CAAC;QAAD,QAAC;IAAD,CAAC,AAFD,IAEC;IAFY,cAAC;;;;ICDd;QAAuB,qBAAC;QAAxB;;QAA2B,CAAC;QAAD,QAAC;IAAD,CAAC,AAA5B,CAAuB,KAAC,GAAI;IAAf,cAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt b/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt index f035719a690..102664ea71a 100644 --- a/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt +++ b/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt @@ -8,35 +8,36 @@ sources: tests/cases/compiler/ref/b.ts,tests/cases/compiler/ref/a.ts,tests/cases emittedFile:all.js sourceFile:tests/cases/compiler/ref/b.ts ------------------------------------------------------------------- ->>>var __extendStatics = (this && this.__extendStatics) || ->>> Object.setPrototypeOf || ->>> ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || ->>> function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; ->>>var __extends = (this && this.__extends) || function (d, b) { ->>> __extendStatics(d, b); ->>> function __() { this.constructor = d; } ->>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); ->>>}; +>>>var __extends = (this && this.__extends) || (function () { +>>> var __extendStatics = Object.setPrototypeOf || +>>> ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +>>> function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; +>>> return function (d, b) { +>>> __extendStatics(d, b); +>>> function __() { this.constructor = d; } +>>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +>>> }; +>>>})(); >>>/// 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1 > 2 >/// -1 >Emitted(10, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(10, 34) Source(1, 34) + SourceIndex(0) +1 >Emitted(11, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(11, 34) Source(1, 34) + SourceIndex(0) --- >>>var Foo = (function () { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(11, 1) Source(2, 1) + SourceIndex(0) +1 >Emitted(12, 1) Source(2, 1) + SourceIndex(0) --- >>> function Foo() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(12, 5) Source(2, 1) + SourceIndex(0) +1->Emitted(13, 5) Source(2, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -46,16 +47,16 @@ sourceFile:tests/cases/compiler/ref/b.ts > member: Bar; > 2 > } -1->Emitted(13, 5) Source(4, 1) + SourceIndex(0) -2 >Emitted(13, 6) Source(4, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(14, 6) Source(4, 2) + SourceIndex(0) --- >>> return Foo; 1->^^^^ 2 > ^^^^^^^^^^ 1-> 2 > } -1->Emitted(14, 5) Source(4, 1) + SourceIndex(0) -2 >Emitted(14, 15) Source(4, 2) + SourceIndex(0) +1->Emitted(15, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(15, 15) Source(4, 2) + SourceIndex(0) --- >>>}()); 1 > @@ -69,10 +70,10 @@ sourceFile:tests/cases/compiler/ref/b.ts 4 > class Foo { > member: Bar; > } -1 >Emitted(15, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(15, 2) Source(4, 2) + SourceIndex(0) -3 >Emitted(15, 2) Source(2, 1) + SourceIndex(0) -4 >Emitted(15, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(16, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(16, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(16, 2) Source(2, 1) + SourceIndex(0) +4 >Emitted(16, 6) Source(4, 2) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:all.js @@ -86,21 +87,21 @@ sourceFile:tests/cases/compiler/ref/a.ts 1-> > 2 > /// -1->Emitted(18, 5) Source(2, 1) + SourceIndex(1) -2 >Emitted(18, 36) Source(2, 32) + SourceIndex(1) +1->Emitted(19, 5) Source(2, 1) + SourceIndex(1) +2 >Emitted(19, 36) Source(2, 32) + SourceIndex(1) --- >>> var A = (function () { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(19, 5) Source(3, 1) + SourceIndex(1) +1 >Emitted(20, 5) Source(3, 1) + SourceIndex(1) --- >>> function A() { 1->^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(20, 9) Source(3, 1) + SourceIndex(1) +1->Emitted(21, 9) Source(3, 1) + SourceIndex(1) --- >>> } 1->^^^^^^^^ @@ -110,16 +111,16 @@ sourceFile:tests/cases/compiler/ref/a.ts > member: typeof GlobalFoo; > 2 > } -1->Emitted(21, 9) Source(5, 1) + SourceIndex(1) -2 >Emitted(21, 10) Source(5, 2) + SourceIndex(1) +1->Emitted(22, 9) Source(5, 1) + SourceIndex(1) +2 >Emitted(22, 10) Source(5, 2) + SourceIndex(1) --- >>> return A; 1->^^^^^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(22, 9) Source(5, 1) + SourceIndex(1) -2 >Emitted(22, 17) Source(5, 2) + SourceIndex(1) +1->Emitted(23, 9) Source(5, 1) + SourceIndex(1) +2 >Emitted(23, 17) Source(5, 2) + SourceIndex(1) --- >>> }()); 1 >^^^^ @@ -133,18 +134,18 @@ sourceFile:tests/cases/compiler/ref/a.ts 4 > export class A { > member: typeof GlobalFoo; > } -1 >Emitted(23, 5) Source(5, 1) + SourceIndex(1) -2 >Emitted(23, 6) Source(5, 2) + SourceIndex(1) -3 >Emitted(23, 6) Source(3, 1) + SourceIndex(1) -4 >Emitted(23, 10) Source(5, 2) + SourceIndex(1) +1 >Emitted(24, 5) Source(5, 1) + SourceIndex(1) +2 >Emitted(24, 6) Source(5, 2) + SourceIndex(1) +3 >Emitted(24, 6) Source(3, 1) + SourceIndex(1) +4 >Emitted(24, 10) Source(5, 2) + SourceIndex(1) --- >>> exports.A = A; 1->^^^^ 2 > ^^^^^^^^^^^^^^ 1-> 2 > A -1->Emitted(24, 5) Source(3, 14) + SourceIndex(1) -2 >Emitted(24, 19) Source(3, 15) + SourceIndex(1) +1->Emitted(25, 5) Source(3, 14) + SourceIndex(1) +2 >Emitted(25, 19) Source(3, 15) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:all.js @@ -158,21 +159,21 @@ sourceFile:tests/cases/compiler/b.ts 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >import {A} from "./ref/a"; > -1 >Emitted(28, 5) Source(2, 1) + SourceIndex(2) +1 >Emitted(29, 5) Source(2, 1) + SourceIndex(2) --- >>> __extends(B, _super); 1->^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^ 1->export class B extends 2 > A -1->Emitted(29, 9) Source(2, 24) + SourceIndex(2) -2 >Emitted(29, 30) Source(2, 25) + SourceIndex(2) +1->Emitted(30, 9) Source(2, 24) + SourceIndex(2) +2 >Emitted(30, 30) Source(2, 25) + SourceIndex(2) --- >>> function B() { 1 >^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > -1 >Emitted(30, 9) Source(2, 1) + SourceIndex(2) +1 >Emitted(31, 9) Source(2, 1) + SourceIndex(2) --- >>> return _super.apply(this, arguments) || this; >>> } @@ -181,16 +182,16 @@ sourceFile:tests/cases/compiler/b.ts 3 > ^^^^^^^^^-> 1->export class B extends A { 2 > } -1->Emitted(32, 9) Source(2, 28) + SourceIndex(2) -2 >Emitted(32, 10) Source(2, 29) + SourceIndex(2) +1->Emitted(33, 9) Source(2, 28) + SourceIndex(2) +2 >Emitted(33, 10) Source(2, 29) + SourceIndex(2) --- >>> return B; 1->^^^^^^^^ 2 > ^^^^^^^^ 1-> 2 > } -1->Emitted(33, 9) Source(2, 28) + SourceIndex(2) -2 >Emitted(33, 17) Source(2, 29) + SourceIndex(2) +1->Emitted(34, 9) Source(2, 28) + SourceIndex(2) +2 >Emitted(34, 17) Source(2, 29) + SourceIndex(2) --- >>> }(a_1.A)); 1 >^^^^ @@ -206,20 +207,20 @@ sourceFile:tests/cases/compiler/b.ts 4 > export class B extends 5 > A 6 > { } -1 >Emitted(34, 5) Source(2, 28) + SourceIndex(2) -2 >Emitted(34, 6) Source(2, 29) + SourceIndex(2) -3 >Emitted(34, 6) Source(2, 1) + SourceIndex(2) -4 >Emitted(34, 7) Source(2, 24) + SourceIndex(2) -5 >Emitted(34, 12) Source(2, 25) + SourceIndex(2) -6 >Emitted(34, 15) Source(2, 29) + SourceIndex(2) +1 >Emitted(35, 5) Source(2, 28) + SourceIndex(2) +2 >Emitted(35, 6) Source(2, 29) + SourceIndex(2) +3 >Emitted(35, 6) Source(2, 1) + SourceIndex(2) +4 >Emitted(35, 7) Source(2, 24) + SourceIndex(2) +5 >Emitted(35, 12) Source(2, 25) + SourceIndex(2) +6 >Emitted(35, 15) Source(2, 29) + SourceIndex(2) --- >>> exports.B = B; 1->^^^^ 2 > ^^^^^^^^^^^^^^ 1-> 2 > B -1->Emitted(35, 5) Source(2, 14) + SourceIndex(2) -2 >Emitted(35, 19) Source(2, 15) + SourceIndex(2) +1->Emitted(36, 5) Source(2, 14) + SourceIndex(2) +2 >Emitted(36, 19) Source(2, 15) + SourceIndex(2) --- >>>}); >>>//# sourceMappingURL=all.js.map \ No newline at end of file diff --git a/tests/baselines/reference/overload1.js b/tests/baselines/reference/overload1.js index c4f19ef0ed7..e73c84abb14 100644 --- a/tests/baselines/reference/overload1.js +++ b/tests/baselines/reference/overload1.js @@ -40,15 +40,16 @@ var v=x.g; //// [overload1.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var O; (function (O) { var A = (function () { diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks1.js b/tests/baselines/reference/overloadOnConstConstraintChecks1.js index 0888083df42..18d16ef9913 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks1.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks1.js @@ -23,15 +23,16 @@ class D implements MyDoc { } //// [overloadOnConstConstraintChecks1.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks2.js b/tests/baselines/reference/overloadOnConstConstraintChecks2.js index ab91c99f6ff..f78ed9a7d50 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks2.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks2.js @@ -12,15 +12,16 @@ function foo(name: any): A { } //// [overloadOnConstConstraintChecks2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks3.js b/tests/baselines/reference/overloadOnConstConstraintChecks3.js index d6d4ce137e6..b26d1067f55 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks3.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks3.js @@ -13,15 +13,16 @@ function foo(name: any): A { //// [overloadOnConstConstraintChecks3.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { this.x = 1; diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks4.js b/tests/baselines/reference/overloadOnConstConstraintChecks4.js index 53b6b904997..db2d6e9adba 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks4.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks4.js @@ -14,15 +14,16 @@ function foo(name: any): Z { //// [overloadOnConstConstraintChecks4.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Z = (function () { function Z() { } diff --git a/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js b/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js index 0400ee2bb88..438c41fa8bd 100644 --- a/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js +++ b/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js @@ -12,15 +12,16 @@ function foo(name: "DIV"): Derived2 { foo("HI"); //// [overloadOnConstantsInvalidOverload1.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/overloadResolution.js b/tests/baselines/reference/overloadResolution.js index 4b026d8c062..24de1599796 100644 --- a/tests/baselines/reference/overloadResolution.js +++ b/tests/baselines/reference/overloadResolution.js @@ -95,15 +95,16 @@ var s = fn5((n) => n.substr(0)); //// [overloadResolution.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var SomeBase = (function () { function SomeBase() { } diff --git a/tests/baselines/reference/overloadResolutionClassConstructors.js b/tests/baselines/reference/overloadResolutionClassConstructors.js index dcacbc4f9ec..5f81c47c9ff 100644 --- a/tests/baselines/reference/overloadResolutionClassConstructors.js +++ b/tests/baselines/reference/overloadResolutionClassConstructors.js @@ -102,15 +102,16 @@ new fn5((n) => n.blah); // Error //// [overloadResolutionClassConstructors.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var SomeBase = (function () { function SomeBase() { } diff --git a/tests/baselines/reference/overloadResolutionConstructors.js b/tests/baselines/reference/overloadResolutionConstructors.js index 89953cb378a..02cc668c64d 100644 --- a/tests/baselines/reference/overloadResolutionConstructors.js +++ b/tests/baselines/reference/overloadResolutionConstructors.js @@ -103,15 +103,16 @@ var s = new fn5((n) => n.substr(0)); //// [overloadResolutionConstructors.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var SomeBase = (function () { function SomeBase() { } diff --git a/tests/baselines/reference/overloadingOnConstants1.js b/tests/baselines/reference/overloadingOnConstants1.js index 981ad6358a0..606d4aa674c 100644 --- a/tests/baselines/reference/overloadingOnConstants1.js +++ b/tests/baselines/reference/overloadingOnConstants1.js @@ -26,15 +26,16 @@ var htmlDivElement2: Derived1 = d2.createElement("div"); var htmlSpanElement2: Derived1 = d2.createElement("span"); //// [overloadingOnConstants1.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/overloadingOnConstants2.js b/tests/baselines/reference/overloadingOnConstants2.js index 4afdf483f2a..7beb3662ff1 100644 --- a/tests/baselines/reference/overloadingOnConstants2.js +++ b/tests/baselines/reference/overloadingOnConstants2.js @@ -28,15 +28,16 @@ var e: E = bar("bye", []); // E var f: C = bar("um", []); // C //// [overloadingOnConstants2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { this.x = 1; diff --git a/tests/baselines/reference/overridingPrivateStaticMembers.js b/tests/baselines/reference/overridingPrivateStaticMembers.js index 8372f54c40c..b5bfa6ac627 100644 --- a/tests/baselines/reference/overridingPrivateStaticMembers.js +++ b/tests/baselines/reference/overridingPrivateStaticMembers.js @@ -8,15 +8,16 @@ class Derived2 extends Base2 { } //// [overridingPrivateStaticMembers.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base2 = (function () { function Base2() { } diff --git a/tests/baselines/reference/parseErrorInHeritageClause1.js b/tests/baselines/reference/parseErrorInHeritageClause1.js index 7a29c55629a..293309025fe 100644 --- a/tests/baselines/reference/parseErrorInHeritageClause1.js +++ b/tests/baselines/reference/parseErrorInHeritageClause1.js @@ -3,15 +3,16 @@ class C extends A # { } //// [parseErrorInHeritageClause1.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function (_super) { __extends(C, _super); function C() { diff --git a/tests/baselines/reference/parser509630.js b/tests/baselines/reference/parser509630.js index d95819d1e45..482a078f3d1 100644 --- a/tests/baselines/reference/parser509630.js +++ b/tests/baselines/reference/parser509630.js @@ -7,15 +7,16 @@ class Any extends Type { //// [parser509630.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Type = (function () { function Type() { this.examples = []; // typing here diff --git a/tests/baselines/reference/parserAstSpans1.js b/tests/baselines/reference/parserAstSpans1.js index de26b5b2b3b..fd9c5822dd8 100644 --- a/tests/baselines/reference/parserAstSpans1.js +++ b/tests/baselines/reference/parserAstSpans1.js @@ -220,15 +220,16 @@ class c6 extends c5 { } //// [parserAstSpans1.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var c1 = (function () { function c1() { } diff --git a/tests/baselines/reference/parserClassDeclaration1.js b/tests/baselines/reference/parserClassDeclaration1.js index 47c15c9f6bf..5b8ea6c183a 100644 --- a/tests/baselines/reference/parserClassDeclaration1.js +++ b/tests/baselines/reference/parserClassDeclaration1.js @@ -3,15 +3,16 @@ class C extends A extends B { } //// [parserClassDeclaration1.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function (_super) { __extends(C, _super); function C() { diff --git a/tests/baselines/reference/parserClassDeclaration3.js b/tests/baselines/reference/parserClassDeclaration3.js index 4dd54e974cb..a419598461f 100644 --- a/tests/baselines/reference/parserClassDeclaration3.js +++ b/tests/baselines/reference/parserClassDeclaration3.js @@ -3,15 +3,16 @@ class C implements A extends B { } //// [parserClassDeclaration3.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function (_super) { __extends(C, _super); function C() { diff --git a/tests/baselines/reference/parserClassDeclaration4.js b/tests/baselines/reference/parserClassDeclaration4.js index 4e3c3e84243..6ed902beed0 100644 --- a/tests/baselines/reference/parserClassDeclaration4.js +++ b/tests/baselines/reference/parserClassDeclaration4.js @@ -3,15 +3,16 @@ class C extends A implements B extends C { } //// [parserClassDeclaration4.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function (_super) { __extends(C, _super); function C() { diff --git a/tests/baselines/reference/parserClassDeclaration5.js b/tests/baselines/reference/parserClassDeclaration5.js index e5ae42ec1eb..a8e54191fee 100644 --- a/tests/baselines/reference/parserClassDeclaration5.js +++ b/tests/baselines/reference/parserClassDeclaration5.js @@ -3,15 +3,16 @@ class C extends A implements B implements C { } //// [parserClassDeclaration5.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function (_super) { __extends(C, _super); function C() { diff --git a/tests/baselines/reference/parserClassDeclaration6.js b/tests/baselines/reference/parserClassDeclaration6.js index eb698fd236f..648213d1516 100644 --- a/tests/baselines/reference/parserClassDeclaration6.js +++ b/tests/baselines/reference/parserClassDeclaration6.js @@ -3,15 +3,16 @@ class C extends A, B { } //// [parserClassDeclaration6.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function (_super) { __extends(C, _super); function C() { diff --git a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause2.js b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause2.js index d45ef8894b0..5cd993caf70 100644 --- a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause2.js +++ b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause2.js @@ -3,15 +3,16 @@ class C extends A, { } //// [parserErrorRecovery_ExtendsOrImplementsClause2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function (_super) { __extends(C, _super); function C() { diff --git a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause4.js b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause4.js index f69ce2ad600..9d5b0393218 100644 --- a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause4.js +++ b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause4.js @@ -3,15 +3,16 @@ class C extends A implements { } //// [parserErrorRecovery_ExtendsOrImplementsClause4.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function (_super) { __extends(C, _super); function C() { diff --git a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause5.js b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause5.js index ec6a0479169..010eace1920 100644 --- a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause5.js +++ b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause5.js @@ -3,15 +3,16 @@ class C extends A, implements B, { } //// [parserErrorRecovery_ExtendsOrImplementsClause5.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function (_super) { __extends(C, _super); function C() { diff --git a/tests/baselines/reference/parserGenericsInTypeContexts1.js b/tests/baselines/reference/parserGenericsInTypeContexts1.js index 69e53b2974d..f85f5b6fd1a 100644 --- a/tests/baselines/reference/parserGenericsInTypeContexts1.js +++ b/tests/baselines/reference/parserGenericsInTypeContexts1.js @@ -18,15 +18,16 @@ function f2(): F { //// [parserGenericsInTypeContexts1.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function (_super) { __extends(C, _super); function C() { diff --git a/tests/baselines/reference/parserGenericsInTypeContexts2.js b/tests/baselines/reference/parserGenericsInTypeContexts2.js index ac24d025b84..1491fd37b5f 100644 --- a/tests/baselines/reference/parserGenericsInTypeContexts2.js +++ b/tests/baselines/reference/parserGenericsInTypeContexts2.js @@ -18,15 +18,16 @@ function f2(): F, Y>> { //// [parserGenericsInTypeContexts2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function (_super) { __extends(C, _super); function C() { diff --git a/tests/baselines/reference/parserRealSource10.js b/tests/baselines/reference/parserRealSource10.js index ea095e52c69..d2e8c5ff1f7 100644 --- a/tests/baselines/reference/parserRealSource10.js +++ b/tests/baselines/reference/parserRealSource10.js @@ -458,15 +458,16 @@ module TypeScript { //// [parserRealSource10.js] // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. // See LICENSE.txt in the project root for complete license information. -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); /// var TypeScript; (function (TypeScript) { diff --git a/tests/baselines/reference/parserRealSource11.js b/tests/baselines/reference/parserRealSource11.js index 9f4f4fc2f70..0e39573238c 100644 --- a/tests/baselines/reference/parserRealSource11.js +++ b/tests/baselines/reference/parserRealSource11.js @@ -2367,15 +2367,16 @@ module TypeScript { //// [parserRealSource11.js] // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. // See LICENSE.txt in the project root for complete license information. -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); /// var TypeScript; (function (TypeScript) { diff --git a/tests/baselines/reference/parserharness.js b/tests/baselines/reference/parserharness.js index 16fe9508c2a..f173052a112 100644 --- a/tests/baselines/reference/parserharness.js +++ b/tests/baselines/reference/parserharness.js @@ -2096,15 +2096,16 @@ module Harness { // See the License for the specific language governing permissions and // limitations under the License. // -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); /// /// /// diff --git a/tests/baselines/reference/partiallyAnnotatedFunctionInferenceError.js b/tests/baselines/reference/partiallyAnnotatedFunctionInferenceError.js index 1c666d92c9d..0d1097b4773 100644 --- a/tests/baselines/reference/partiallyAnnotatedFunctionInferenceError.js +++ b/tests/baselines/reference/partiallyAnnotatedFunctionInferenceError.js @@ -16,15 +16,16 @@ testError((t1, t2, t3: D) => {}) //// [partiallyAnnotatedFunctionInferenceError.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/partiallyAnnotatedFunctionInferenceWithTypeParameter.js b/tests/baselines/reference/partiallyAnnotatedFunctionInferenceWithTypeParameter.js index b43a5a5a2c9..c55721cb647 100644 --- a/tests/baselines/reference/partiallyAnnotatedFunctionInferenceWithTypeParameter.js +++ b/tests/baselines/reference/partiallyAnnotatedFunctionInferenceWithTypeParameter.js @@ -35,15 +35,16 @@ testRest((t2, ...t3: D[]) => {}) //// [partiallyAnnotatedFunctionInferenceWithTypeParameter.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/primitiveMembers.js b/tests/baselines/reference/primitiveMembers.js index 4c00a4fb3ea..6ef048203ae 100644 --- a/tests/baselines/reference/primitiveMembers.js +++ b/tests/baselines/reference/primitiveMembers.js @@ -32,15 +32,16 @@ class foo extends baz { public bar(){ return undefined}; } //// [primitiveMembers.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var x = 5; var r = /yo/; r.source; diff --git a/tests/baselines/reference/privacyClass.js b/tests/baselines/reference/privacyClass.js index be90775cf0b..07ea7691ac2 100644 --- a/tests/baselines/reference/privacyClass.js +++ b/tests/baselines/reference/privacyClass.js @@ -129,15 +129,16 @@ export class glo_C12_public extends glo_c_private implements glo_i_private, glo //// [privacyClass.js] "use strict"; -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var m1; (function (m1) { var m1_c_public = (function () { diff --git a/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js b/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js index 1802f61717c..c1b219a3eaf 100644 --- a/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js +++ b/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js @@ -99,15 +99,16 @@ class publicClassExtendingPublicClassInGlobal extends publicClassInGlobal { //// [privacyClassExtendsClauseDeclFile_externalModule.js] "use strict"; -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var publicModule; (function (publicModule) { var publicClassInPublicModule = (function () { @@ -289,15 +290,16 @@ var publicClassExtendingFromPrivateModuleClass = (function (_super) { }(privateModule.publicClassInPrivateModule)); exports.publicClassExtendingFromPrivateModuleClass = publicClassExtendingFromPrivateModuleClass; //// [privacyClassExtendsClauseDeclFile_GlobalFile.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var publicModuleInGlobal; (function (publicModuleInGlobal) { var publicClassInPublicModule = (function () { diff --git a/tests/baselines/reference/privacyGloClass.js b/tests/baselines/reference/privacyGloClass.js index d74a59d5ac2..9698b1a0977 100644 --- a/tests/baselines/reference/privacyGloClass.js +++ b/tests/baselines/reference/privacyGloClass.js @@ -61,15 +61,16 @@ class glo_C11_public extends glo_c_public implements glo_i_public { //// [privacyGloClass.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var m1; (function (m1) { var m1_c_public = (function () { diff --git a/tests/baselines/reference/privateAccessInSubclass1.js b/tests/baselines/reference/privateAccessInSubclass1.js index bbdcd5a4338..0f02de4ad4d 100644 --- a/tests/baselines/reference/privateAccessInSubclass1.js +++ b/tests/baselines/reference/privateAccessInSubclass1.js @@ -10,15 +10,16 @@ class D extends Base { } //// [privateAccessInSubclass1.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/privateInstanceMemberAccessibility.js b/tests/baselines/reference/privateInstanceMemberAccessibility.js index d1efc894fc3..5f9a857269e 100644 --- a/tests/baselines/reference/privateInstanceMemberAccessibility.js +++ b/tests/baselines/reference/privateInstanceMemberAccessibility.js @@ -14,15 +14,16 @@ class Derived extends Base { } //// [privateInstanceMemberAccessibility.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/privateProtectedMembersAreNotAccessibleDestructuring.js b/tests/baselines/reference/privateProtectedMembersAreNotAccessibleDestructuring.js index 6f9b717888d..f9d4fe56c39 100644 --- a/tests/baselines/reference/privateProtectedMembersAreNotAccessibleDestructuring.js +++ b/tests/baselines/reference/privateProtectedMembersAreNotAccessibleDestructuring.js @@ -22,15 +22,16 @@ let { priv: a, prot: b, privateMethod: f } = k; // error //// [privateProtectedMembersAreNotAccessibleDestructuring.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var K = (function () { function K() { } diff --git a/tests/baselines/reference/privateStaticMemberAccessibility.js b/tests/baselines/reference/privateStaticMemberAccessibility.js index 319f4fac001..548b08b9b92 100644 --- a/tests/baselines/reference/privateStaticMemberAccessibility.js +++ b/tests/baselines/reference/privateStaticMemberAccessibility.js @@ -9,15 +9,16 @@ class Derived extends Base { } //// [privateStaticMemberAccessibility.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/privateStaticNotAccessibleInClodule2.js b/tests/baselines/reference/privateStaticNotAccessibleInClodule2.js index 974dcb477f5..a4171441430 100644 --- a/tests/baselines/reference/privateStaticNotAccessibleInClodule2.js +++ b/tests/baselines/reference/privateStaticNotAccessibleInClodule2.js @@ -16,15 +16,16 @@ module D { //// [privateStaticNotAccessibleInClodule2.js] // Any attempt to access a private property member outside the class body that contains its declaration results in a compile-time error. -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/amd/testGlo.js b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/amd/testGlo.js index 3ab7685aec4..26700d01d59 100644 --- a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/amd/testGlo.js +++ b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/amd/testGlo.js @@ -1,12 +1,13 @@ -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var m2; (function (m2) { m2.c1 = new m2.mExported.me.class1; diff --git a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/node/testGlo.js b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/node/testGlo.js index 3ab7685aec4..26700d01d59 100644 --- a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/node/testGlo.js +++ b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/node/testGlo.js @@ -1,12 +1,13 @@ -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var m2; (function (m2) { m2.c1 = new m2.mExported.me.class1; diff --git a/tests/baselines/reference/project/prologueEmit/amd/out.js b/tests/baselines/reference/project/prologueEmit/amd/out.js index 08697664279..5d13ff191f0 100644 --- a/tests/baselines/reference/project/prologueEmit/amd/out.js +++ b/tests/baselines/reference/project/prologueEmit/amd/out.js @@ -1,12 +1,13 @@ -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var _this = this; // Add a lambda to ensure global 'this' capture is triggered (function () { return _this.window; }); diff --git a/tests/baselines/reference/project/prologueEmit/node/out.js b/tests/baselines/reference/project/prologueEmit/node/out.js index 08697664279..5d13ff191f0 100644 --- a/tests/baselines/reference/project/prologueEmit/node/out.js +++ b/tests/baselines/reference/project/prologueEmit/node/out.js @@ -1,12 +1,13 @@ -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var _this = this; // Add a lambda to ensure global 'this' capture is triggered (function () { return _this.window; }); diff --git a/tests/baselines/reference/project/quotesInFileAndDirectoryNames/amd/m'ain.js b/tests/baselines/reference/project/quotesInFileAndDirectoryNames/amd/m'ain.js index dd192c40863..859117be880 100644 --- a/tests/baselines/reference/project/quotesInFileAndDirectoryNames/amd/m'ain.js +++ b/tests/baselines/reference/project/quotesInFileAndDirectoryNames/amd/m'ain.js @@ -1,13 +1,14 @@ /// -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var ClassC = (function (_super) { __extends(ClassC, _super); function ClassC() { diff --git a/tests/baselines/reference/project/quotesInFileAndDirectoryNames/node/m'ain.js b/tests/baselines/reference/project/quotesInFileAndDirectoryNames/node/m'ain.js index dd192c40863..859117be880 100644 --- a/tests/baselines/reference/project/quotesInFileAndDirectoryNames/node/m'ain.js +++ b/tests/baselines/reference/project/quotesInFileAndDirectoryNames/node/m'ain.js @@ -1,13 +1,14 @@ /// -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var ClassC = (function (_super) { __extends(ClassC, _super); function ClassC() { diff --git a/tests/baselines/reference/propertiesAndIndexers.js b/tests/baselines/reference/propertiesAndIndexers.js index 87f12dd7242..9ea39c60dfb 100644 --- a/tests/baselines/reference/propertiesAndIndexers.js +++ b/tests/baselines/reference/propertiesAndIndexers.js @@ -52,15 +52,16 @@ var c: { }; //// [propertiesAndIndexers.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var P = (function () { function P() { } diff --git a/tests/baselines/reference/propertyAccess.js b/tests/baselines/reference/propertyAccess.js index 89c6ed0efe9..4a3910e8594 100644 --- a/tests/baselines/reference/propertyAccess.js +++ b/tests/baselines/reference/propertyAccess.js @@ -151,15 +151,16 @@ var x3: A; //// [propertyAccess.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js index 346024cf470..665550081b3 100644 --- a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js @@ -83,15 +83,16 @@ var r4 = b.foo(aB, aB); // no inferences for T so constraint isn't satisfied, er //// [propertyAccessOnTypeParameterWithConstraints2.js] // generic types should behave as if they have properties of their constraint type -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js index c4d0a8e8ac4..a79ba9ed75c 100644 --- a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js @@ -58,15 +58,16 @@ var r4 = b.foo(new B()); // valid call to an invalid function //// [propertyAccessOnTypeParameterWithConstraints3.js] // generic types should behave as if they have properties of their constraint type -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js index 4d677b85396..41de2d8c0e0 100644 --- a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js @@ -45,15 +45,16 @@ var b = { var r4 = b.foo(new B()); // error after constraints above made illegal, doesn't matter //// [propertyAccessOnTypeParameterWithConstraints5.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass.js index e0a051b3096..a94af12901d 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass.js @@ -39,15 +39,16 @@ class E extends C { } //// [protectedClassPropertyAccessibleWithinNestedSubclass.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var B = (function () { function B() { } diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass1.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass1.js index 26d42b7b658..d26f70b75bd 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass1.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass1.js @@ -115,15 +115,16 @@ d3.x; // Error, neither within their declaring class nor class d4.x; // Error, neither within their declaring class nor classes derived from their declaring class //// [protectedClassPropertyAccessibleWithinNestedSubclass1.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js index af3440f9fb8..330f73bca19 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js @@ -21,15 +21,16 @@ class C extends B { //// [protectedClassPropertyAccessibleWithinSubclass.js] // no errors -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var B = (function () { function B() { } diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass2.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass2.js index ba4c9f079f8..cbde651add9 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass2.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass2.js @@ -95,15 +95,16 @@ d3.x; // Error, neither within their declaring class nor class d4.x; // Error, neither within their declaring class nor classes derived from their declaring class //// [protectedClassPropertyAccessibleWithinSubclass2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass3.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass3.js index 8b45c46ec83..a2cb66b2997 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass3.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass3.js @@ -14,15 +14,16 @@ class Derived extends Base { } //// [protectedClassPropertyAccessibleWithinSubclass3.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/protectedInstanceMemberAccessibility.js b/tests/baselines/reference/protectedInstanceMemberAccessibility.js index 682ff897e52..abe608b1ed4 100644 --- a/tests/baselines/reference/protectedInstanceMemberAccessibility.js +++ b/tests/baselines/reference/protectedInstanceMemberAccessibility.js @@ -45,15 +45,16 @@ class C extends A { //// [protectedInstanceMemberAccessibility.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/protectedMembers.js b/tests/baselines/reference/protectedMembers.js index f0553d72184..689d11be3c3 100644 --- a/tests/baselines/reference/protectedMembers.js +++ b/tests/baselines/reference/protectedMembers.js @@ -116,15 +116,16 @@ class B3 extends A3 { //// [protectedMembers.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); // Class with protected members var C1 = (function () { function C1() { diff --git a/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass.js b/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass.js index 76bb5d10455..f681073d629 100644 --- a/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass.js +++ b/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass.js @@ -44,15 +44,16 @@ Derived2.x; // Error, neither within their declaring class nor classes deriv Derived3.x; // Error, neither within their declaring class nor classes derived from their declaring class //// [protectedStaticClassPropertyAccessibleWithinSubclass.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass2.js b/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass2.js index f694c9f301d..3096ea6aa3c 100644 --- a/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass2.js +++ b/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass2.js @@ -22,15 +22,16 @@ class Derived2 extends Derived1 { } //// [protectedStaticClassPropertyAccessibleWithinSubclass2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/qualifiedName_entity-name-resolution-does-not-affect-class-heritage.js b/tests/baselines/reference/qualifiedName_entity-name-resolution-does-not-affect-class-heritage.js index 11c49dbb28d..96df9d1d85b 100644 --- a/tests/baselines/reference/qualifiedName_entity-name-resolution-does-not-affect-class-heritage.js +++ b/tests/baselines/reference/qualifiedName_entity-name-resolution-does-not-affect-class-heritage.js @@ -7,15 +7,16 @@ class Beta extends Alpha.x { } //// [qualifiedName_entity-name-resolution-does-not-affect-class-heritage.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Alpha; (function (Alpha) { Alpha.x = 100; diff --git a/tests/baselines/reference/readonlyConstructorAssignment.js b/tests/baselines/reference/readonlyConstructorAssignment.js index eb268d9aafe..42f88abcf54 100644 --- a/tests/baselines/reference/readonlyConstructorAssignment.js +++ b/tests/baselines/reference/readonlyConstructorAssignment.js @@ -41,15 +41,16 @@ class E extends D { //// [readonlyConstructorAssignment.js] // Tests that readonly parameter properties behave like regular readonly properties -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A(x) { this.x = x; diff --git a/tests/baselines/reference/recursiveBaseCheck3.js b/tests/baselines/reference/recursiveBaseCheck3.js index 435f87a6b1a..3e2cbcee520 100644 --- a/tests/baselines/reference/recursiveBaseCheck3.js +++ b/tests/baselines/reference/recursiveBaseCheck3.js @@ -5,15 +5,16 @@ class C extends A { } (new C).blah; //// [recursiveBaseCheck3.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function (_super) { __extends(A, _super); function A() { diff --git a/tests/baselines/reference/recursiveBaseCheck4.js b/tests/baselines/reference/recursiveBaseCheck4.js index 5790cabf7d8..5bcf5bb63a7 100644 --- a/tests/baselines/reference/recursiveBaseCheck4.js +++ b/tests/baselines/reference/recursiveBaseCheck4.js @@ -3,15 +3,16 @@ class M extends M { } (new M).blah; //// [recursiveBaseCheck4.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var M = (function (_super) { __extends(M, _super); function M() { diff --git a/tests/baselines/reference/recursiveBaseCheck6.js b/tests/baselines/reference/recursiveBaseCheck6.js index c9a7d685322..7c5134c397c 100644 --- a/tests/baselines/reference/recursiveBaseCheck6.js +++ b/tests/baselines/reference/recursiveBaseCheck6.js @@ -3,15 +3,16 @@ class S18 extends S18<{ S19: A; }>{ } (new S18()).blah; //// [recursiveBaseCheck6.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var S18 = (function (_super) { __extends(S18, _super); function S18() { diff --git a/tests/baselines/reference/recursiveBaseConstructorCreation1.js b/tests/baselines/reference/recursiveBaseConstructorCreation1.js index b62f9f6622f..0caeb0b3b67 100644 --- a/tests/baselines/reference/recursiveBaseConstructorCreation1.js +++ b/tests/baselines/reference/recursiveBaseConstructorCreation1.js @@ -7,15 +7,16 @@ var x = new C2(); // Valid //// [recursiveBaseConstructorCreation1.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C1 = (function () { function C1() { } diff --git a/tests/baselines/reference/recursiveClassInstantiationsWithDefaultConstructors.js b/tests/baselines/reference/recursiveClassInstantiationsWithDefaultConstructors.js index 5c5d01c453d..2b0c30072dc 100644 --- a/tests/baselines/reference/recursiveClassInstantiationsWithDefaultConstructors.js +++ b/tests/baselines/reference/recursiveClassInstantiationsWithDefaultConstructors.js @@ -10,15 +10,16 @@ export class MemberNameArray extends MemberName { //// [recursiveClassInstantiationsWithDefaultConstructors.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var a = new TypeScript2.MemberNameArray(); var TypeScript2; (function (TypeScript2) { diff --git a/tests/baselines/reference/recursiveClassReferenceTest.js b/tests/baselines/reference/recursiveClassReferenceTest.js index e03965b23ea..8469935d13b 100644 --- a/tests/baselines/reference/recursiveClassReferenceTest.js +++ b/tests/baselines/reference/recursiveClassReferenceTest.js @@ -105,15 +105,16 @@ module Sample.Thing.Languages.PlainText { //// [recursiveClassReferenceTest.js] // Scenario 1: Test reqursive function call with "this" parameter // Scenario 2: Test recursive function call with cast and "this" parameter -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Sample; (function (Sample) { var Actions; diff --git a/tests/baselines/reference/recursiveClassReferenceTest.js.map b/tests/baselines/reference/recursiveClassReferenceTest.js.map index f322d6f0510..b27f18ddffa 100644 --- a/tests/baselines/reference/recursiveClassReferenceTest.js.map +++ b/tests/baselines/reference/recursiveClassReferenceTest.js.map @@ -1,2 +1,2 @@ //// [recursiveClassReferenceTest.js.map] -{"version":3,"file":"recursiveClassReferenceTest.js","sourceRoot":"","sources":["recursiveClassReferenceTest.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,0EAA0E;;;;;;;;;;AA8B1E,IAAO,MAAM,CAUZ;AAVD,WAAO,MAAM;IAAC,IAAA,OAAO,CAUpB;IAVa,WAAA,OAAO;QAAC,IAAA,KAAK,CAU1B;QAVqB,WAAA,OAAK;YAAC,IAAA,IAAI,CAU/B;YAV2B,WAAA,IAAI;gBAC/B;oBAAA;oBAQA,CAAC;oBANO,+BAAK,GAAZ,cAAiB,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;oBAExB,6BAAG,GAAV,UAAW,KAA6B;wBAEvC,MAAM,CAAC,IAAI,CAAC;oBACb,CAAC;oBACF,sBAAC;gBAAD,CAAC,AARD,IAQC;gBARY,oBAAe,kBAQ3B,CAAA;YACF,CAAC,EAV2B,IAAI,GAAJ,YAAI,KAAJ,YAAI,QAU/B;QAAD,CAAC,EAVqB,KAAK,GAAL,aAAK,KAAL,aAAK,QAU1B;IAAD,CAAC,EAVa,OAAO,GAAP,cAAO,KAAP,cAAO,QAUpB;AAAD,CAAC,EAVM,MAAM,KAAN,MAAM,QAUZ;AAED,WAAO,MAAM;IAAC,IAAA,KAAK,CAoBlB;IApBa,WAAA,KAAK;QAAC,IAAA,OAAO,CAoB1B;QApBmB,WAAA,OAAO;YAC1B;gBAKC,oBAAoB,SAAkC;oBAAlC,cAAS,GAAT,SAAS,CAAyB;oBAD9C,YAAO,GAAO,IAAI,CAAC;oBAEvB,aAAa;oBACb,SAAS,CAAC,SAAS,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;gBAC3C,CAAC;gBANM,wBAAG,GAAV,UAAW,MAAyC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;oBAAA,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;gBAAA,CAAC,CAAA,CAAC;gBAQlF,+BAAU,GAAjB;oBACC,MAAM,CAAC,OAAO,CAAC;gBAChB,CAAC;gBAEM,4BAAO,GAAd;gBAEA,CAAC;gBAEF,iBAAC;YAAD,CAAC,AAlBD,IAkBC;YAlBY,kBAAU,aAkBtB,CAAA;QACF,CAAC,EApBmB,OAAO,GAAP,aAAO,KAAP,aAAO,QAoB1B;IAAD,CAAC,EApBa,KAAK,GAAL,YAAK,KAAL,YAAK,QAoBlB;AAAD,CAAC,EApBM,MAAM,KAAN,MAAM,QAoBZ;AAGD;IAAA;IAAuF,CAAC;IAA3C,sCAAe,GAAtB,cAAmC,MAAM,CAAC,IAAI,CAAC,CAAA,CAAC;IAAC,mBAAC;AAAD,CAAC,AAAxF,IAAwF;AASxF,WAAO,MAAM;IAAC,IAAA,KAAK,CAwBlB;IAxBa,WAAA,KAAK;QAAC,IAAA,SAAS,CAwB5B;QAxBmB,WAAA,SAAS;YAAC,IAAA,SAAS,CAwBtC;YAxB6B,WAAA,SAAS;gBAEtC;oBACO,eAAoB,IAAW;wBAAX,SAAI,GAAJ,IAAI,CAAO;oBAAI,CAAC;oBACnC,qBAAK,GAAZ;wBACC,MAAM,CAAC,IAAI,CAAC;oBACb,CAAC;oBAEM,sBAAM,GAAb,UAAc,KAAY;wBACzB,MAAM,CAAC,IAAI,KAAK,KAAK,CAAC;oBACvB,CAAC;oBAEM,uBAAO,GAAd,cAA0B,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;oBACzC,YAAC;gBAAD,CAAC,AAXD,IAWC;gBAXY,eAAK,QAWjB,CAAA;gBAED;oBAA0B,wBAAY;oBAAtC;;oBAQA,CAAC;oBANA,aAAa;oBACN,8BAAe,GAAtB;wBACC,MAAM,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC;oBACxB,CAAC;oBAGF,WAAC;gBAAD,CAAC,AARD,CAA0B,YAAY,GAQrC;gBARY,cAAI,OAQhB,CAAA;YACF,CAAC,EAxB6B,SAAS,GAAT,mBAAS,KAAT,mBAAS,QAwBtC;QAAD,CAAC,EAxBmB,SAAS,GAAT,eAAS,KAAT,eAAS,QAwB5B;IAAD,CAAC,EAxBa,KAAK,GAAL,YAAK,KAAL,YAAK,QAwBlB;AAAD,CAAC,EAxBM,MAAM,KAAN,MAAM,QAwBZ"} \ No newline at end of file +{"version":3,"file":"recursiveClassReferenceTest.js","sourceRoot":"","sources":["recursiveClassReferenceTest.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,0EAA0E;;;;;;;;;;;AA8B1E,IAAO,MAAM,CAUZ;AAVD,WAAO,MAAM;IAAC,IAAA,OAAO,CAUpB;IAVa,WAAA,OAAO;QAAC,IAAA,KAAK,CAU1B;QAVqB,WAAA,OAAK;YAAC,IAAA,IAAI,CAU/B;YAV2B,WAAA,IAAI;gBAC/B;oBAAA;oBAQA,CAAC;oBANO,+BAAK,GAAZ,cAAiB,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;oBAExB,6BAAG,GAAV,UAAW,KAA6B;wBAEvC,MAAM,CAAC,IAAI,CAAC;oBACb,CAAC;oBACF,sBAAC;gBAAD,CAAC,AARD,IAQC;gBARY,oBAAe,kBAQ3B,CAAA;YACF,CAAC,EAV2B,IAAI,GAAJ,YAAI,KAAJ,YAAI,QAU/B;QAAD,CAAC,EAVqB,KAAK,GAAL,aAAK,KAAL,aAAK,QAU1B;IAAD,CAAC,EAVa,OAAO,GAAP,cAAO,KAAP,cAAO,QAUpB;AAAD,CAAC,EAVM,MAAM,KAAN,MAAM,QAUZ;AAED,WAAO,MAAM;IAAC,IAAA,KAAK,CAoBlB;IApBa,WAAA,KAAK;QAAC,IAAA,OAAO,CAoB1B;QApBmB,WAAA,OAAO;YAC1B;gBAKC,oBAAoB,SAAkC;oBAAlC,cAAS,GAAT,SAAS,CAAyB;oBAD9C,YAAO,GAAO,IAAI,CAAC;oBAEvB,aAAa;oBACb,SAAS,CAAC,SAAS,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;gBAC3C,CAAC;gBANM,wBAAG,GAAV,UAAW,MAAyC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;oBAAA,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;gBAAA,CAAC,CAAA,CAAC;gBAQlF,+BAAU,GAAjB;oBACC,MAAM,CAAC,OAAO,CAAC;gBAChB,CAAC;gBAEM,4BAAO,GAAd;gBAEA,CAAC;gBAEF,iBAAC;YAAD,CAAC,AAlBD,IAkBC;YAlBY,kBAAU,aAkBtB,CAAA;QACF,CAAC,EApBmB,OAAO,GAAP,aAAO,KAAP,aAAO,QAoB1B;IAAD,CAAC,EApBa,KAAK,GAAL,YAAK,KAAL,YAAK,QAoBlB;AAAD,CAAC,EApBM,MAAM,KAAN,MAAM,QAoBZ;AAGD;IAAA;IAAuF,CAAC;IAA3C,sCAAe,GAAtB,cAAmC,MAAM,CAAC,IAAI,CAAC,CAAA,CAAC;IAAC,mBAAC;AAAD,CAAC,AAAxF,IAAwF;AASxF,WAAO,MAAM;IAAC,IAAA,KAAK,CAwBlB;IAxBa,WAAA,KAAK;QAAC,IAAA,SAAS,CAwB5B;QAxBmB,WAAA,SAAS;YAAC,IAAA,SAAS,CAwBtC;YAxB6B,WAAA,SAAS;gBAEtC;oBACO,eAAoB,IAAW;wBAAX,SAAI,GAAJ,IAAI,CAAO;oBAAI,CAAC;oBACnC,qBAAK,GAAZ;wBACC,MAAM,CAAC,IAAI,CAAC;oBACb,CAAC;oBAEM,sBAAM,GAAb,UAAc,KAAY;wBACzB,MAAM,CAAC,IAAI,KAAK,KAAK,CAAC;oBACvB,CAAC;oBAEM,uBAAO,GAAd,cAA0B,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;oBACzC,YAAC;gBAAD,CAAC,AAXD,IAWC;gBAXY,eAAK,QAWjB,CAAA;gBAED;oBAA0B,wBAAY;oBAAtC;;oBAQA,CAAC;oBANA,aAAa;oBACN,8BAAe,GAAtB;wBACC,MAAM,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC;oBACxB,CAAC;oBAGF,WAAC;gBAAD,CAAC,AARD,CAA0B,YAAY,GAQrC;gBARY,cAAI,OAQhB,CAAA;YACF,CAAC,EAxB6B,SAAS,GAAT,mBAAS,KAAT,mBAAS,QAwBtC;QAAD,CAAC,EAxBmB,SAAS,GAAT,eAAS,KAAT,eAAS,QAwB5B;IAAD,CAAC,EAxBa,KAAK,GAAL,YAAK,KAAL,YAAK,QAwBlB;AAAD,CAAC,EAxBM,MAAM,KAAN,MAAM,QAwBZ"} \ No newline at end of file diff --git a/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt b/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt index d8a6d74f0a8..c1c48650241 100644 --- a/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt +++ b/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt @@ -26,15 +26,16 @@ sourceFile:recursiveClassReferenceTest.ts 1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) 2 >Emitted(2, 75) Source(2, 75) + SourceIndex(0) --- ->>>var __extendStatics = (this && this.__extendStatics) || ->>> Object.setPrototypeOf || ->>> ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || ->>> function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; ->>>var __extends = (this && this.__extends) || function (d, b) { ->>> __extendStatics(d, b); ->>> function __() { this.constructor = d; } ->>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); ->>>}; +>>>var __extends = (this && this.__extends) || (function () { +>>> var __extendStatics = Object.setPrototypeOf || +>>> ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +>>> function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; +>>> return function (d, b) { +>>> __extendStatics(d, b); +>>> function __() { this.constructor = d; } +>>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +>>> }; +>>>})(); >>>var Sample; 1 > 2 >^^^^ @@ -85,10 +86,10 @@ sourceFile:recursiveClassReferenceTest.ts > } > } > } -1 >Emitted(12, 1) Source(32, 1) + SourceIndex(0) -2 >Emitted(12, 5) Source(32, 8) + SourceIndex(0) -3 >Emitted(12, 11) Source(32, 14) + SourceIndex(0) -4 >Emitted(12, 12) Source(42, 2) + SourceIndex(0) +1 >Emitted(13, 1) Source(32, 1) + SourceIndex(0) +2 >Emitted(13, 5) Source(32, 8) + SourceIndex(0) +3 >Emitted(13, 11) Source(32, 14) + SourceIndex(0) +4 >Emitted(13, 12) Source(42, 2) + SourceIndex(0) --- >>>(function (Sample) { 1-> @@ -97,9 +98,9 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 >module 3 > Sample -1->Emitted(13, 1) Source(32, 1) + SourceIndex(0) -2 >Emitted(13, 12) Source(32, 8) + SourceIndex(0) -3 >Emitted(13, 18) Source(32, 14) + SourceIndex(0) +1->Emitted(14, 1) Source(32, 1) + SourceIndex(0) +2 >Emitted(14, 12) Source(32, 8) + SourceIndex(0) +3 >Emitted(14, 18) Source(32, 14) + SourceIndex(0) --- >>> var Actions; 1 >^^^^ @@ -121,10 +122,10 @@ sourceFile:recursiveClassReferenceTest.ts > } > } > } -1 >Emitted(14, 5) Source(32, 15) + SourceIndex(0) -2 >Emitted(14, 9) Source(32, 15) + SourceIndex(0) -3 >Emitted(14, 16) Source(32, 22) + SourceIndex(0) -4 >Emitted(14, 17) Source(42, 2) + SourceIndex(0) +1 >Emitted(15, 5) Source(32, 15) + SourceIndex(0) +2 >Emitted(15, 9) Source(32, 15) + SourceIndex(0) +3 >Emitted(15, 16) Source(32, 22) + SourceIndex(0) +4 >Emitted(15, 17) Source(42, 2) + SourceIndex(0) --- >>> (function (Actions) { 1->^^^^ @@ -133,9 +134,9 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 > 3 > Actions -1->Emitted(15, 5) Source(32, 15) + SourceIndex(0) -2 >Emitted(15, 16) Source(32, 15) + SourceIndex(0) -3 >Emitted(15, 23) Source(32, 22) + SourceIndex(0) +1->Emitted(16, 5) Source(32, 15) + SourceIndex(0) +2 >Emitted(16, 16) Source(32, 15) + SourceIndex(0) +3 >Emitted(16, 23) Source(32, 22) + SourceIndex(0) --- >>> var Thing; 1 >^^^^^^^^ @@ -157,10 +158,10 @@ sourceFile:recursiveClassReferenceTest.ts > } > } > } -1 >Emitted(16, 9) Source(32, 23) + SourceIndex(0) -2 >Emitted(16, 13) Source(32, 23) + SourceIndex(0) -3 >Emitted(16, 18) Source(32, 28) + SourceIndex(0) -4 >Emitted(16, 19) Source(42, 2) + SourceIndex(0) +1 >Emitted(17, 9) Source(32, 23) + SourceIndex(0) +2 >Emitted(17, 13) Source(32, 23) + SourceIndex(0) +3 >Emitted(17, 18) Source(32, 28) + SourceIndex(0) +4 >Emitted(17, 19) Source(42, 2) + SourceIndex(0) --- >>> (function (Thing_1) { 1->^^^^^^^^ @@ -169,9 +170,9 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 > 3 > Thing -1->Emitted(17, 9) Source(32, 23) + SourceIndex(0) -2 >Emitted(17, 20) Source(32, 23) + SourceIndex(0) -3 >Emitted(17, 27) Source(32, 28) + SourceIndex(0) +1->Emitted(18, 9) Source(32, 23) + SourceIndex(0) +2 >Emitted(18, 20) Source(32, 23) + SourceIndex(0) +3 >Emitted(18, 27) Source(32, 28) + SourceIndex(0) --- >>> var Find; 1 >^^^^^^^^^^^^ @@ -193,10 +194,10 @@ sourceFile:recursiveClassReferenceTest.ts > } > } > } -1 >Emitted(18, 13) Source(32, 29) + SourceIndex(0) -2 >Emitted(18, 17) Source(32, 29) + SourceIndex(0) -3 >Emitted(18, 21) Source(32, 33) + SourceIndex(0) -4 >Emitted(18, 22) Source(42, 2) + SourceIndex(0) +1 >Emitted(19, 13) Source(32, 29) + SourceIndex(0) +2 >Emitted(19, 17) Source(32, 29) + SourceIndex(0) +3 >Emitted(19, 21) Source(32, 33) + SourceIndex(0) +4 >Emitted(19, 22) Source(42, 2) + SourceIndex(0) --- >>> (function (Find) { 1->^^^^^^^^^^^^ @@ -206,22 +207,22 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 > 3 > Find -1->Emitted(19, 13) Source(32, 29) + SourceIndex(0) -2 >Emitted(19, 24) Source(32, 29) + SourceIndex(0) -3 >Emitted(19, 28) Source(32, 33) + SourceIndex(0) +1->Emitted(20, 13) Source(32, 29) + SourceIndex(0) +2 >Emitted(20, 24) Source(32, 29) + SourceIndex(0) +3 >Emitted(20, 28) Source(32, 33) + SourceIndex(0) --- >>> var StartFindAction = (function () { 1->^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> { > -1->Emitted(20, 17) Source(33, 2) + SourceIndex(0) +1->Emitted(21, 17) Source(33, 2) + SourceIndex(0) --- >>> function StartFindAction() { 1->^^^^^^^^^^^^^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(21, 21) Source(33, 2) + SourceIndex(0) +1->Emitted(22, 21) Source(33, 2) + SourceIndex(0) --- >>> } 1->^^^^^^^^^^^^^^^^^^^^ @@ -237,8 +238,8 @@ sourceFile:recursiveClassReferenceTest.ts > } > 2 > } -1->Emitted(22, 21) Source(41, 2) + SourceIndex(0) -2 >Emitted(22, 22) Source(41, 3) + SourceIndex(0) +1->Emitted(23, 21) Source(41, 2) + SourceIndex(0) +2 >Emitted(23, 22) Source(41, 3) + SourceIndex(0) --- >>> StartFindAction.prototype.getId = function () { return "yo"; }; 1->^^^^^^^^^^^^^^^^^^^^ @@ -261,16 +262,16 @@ sourceFile:recursiveClassReferenceTest.ts 8 > ; 9 > 10> } -1->Emitted(23, 21) Source(35, 10) + SourceIndex(0) -2 >Emitted(23, 52) Source(35, 15) + SourceIndex(0) -3 >Emitted(23, 55) Source(35, 3) + SourceIndex(0) -4 >Emitted(23, 69) Source(35, 20) + SourceIndex(0) -5 >Emitted(23, 75) Source(35, 26) + SourceIndex(0) -6 >Emitted(23, 76) Source(35, 27) + SourceIndex(0) -7 >Emitted(23, 80) Source(35, 31) + SourceIndex(0) -8 >Emitted(23, 81) Source(35, 32) + SourceIndex(0) -9 >Emitted(23, 82) Source(35, 33) + SourceIndex(0) -10>Emitted(23, 83) Source(35, 34) + SourceIndex(0) +1->Emitted(24, 21) Source(35, 10) + SourceIndex(0) +2 >Emitted(24, 52) Source(35, 15) + SourceIndex(0) +3 >Emitted(24, 55) Source(35, 3) + SourceIndex(0) +4 >Emitted(24, 69) Source(35, 20) + SourceIndex(0) +5 >Emitted(24, 75) Source(35, 26) + SourceIndex(0) +6 >Emitted(24, 76) Source(35, 27) + SourceIndex(0) +7 >Emitted(24, 80) Source(35, 31) + SourceIndex(0) +8 >Emitted(24, 81) Source(35, 32) + SourceIndex(0) +9 >Emitted(24, 82) Source(35, 33) + SourceIndex(0) +10>Emitted(24, 83) Source(35, 34) + SourceIndex(0) --- >>> StartFindAction.prototype.run = function (Thing) { 1 >^^^^^^^^^^^^^^^^^^^^ @@ -285,11 +286,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > 4 > public run( 5 > Thing:Sample.Thing.ICodeThing -1 >Emitted(24, 21) Source(37, 10) + SourceIndex(0) -2 >Emitted(24, 50) Source(37, 13) + SourceIndex(0) -3 >Emitted(24, 53) Source(37, 3) + SourceIndex(0) -4 >Emitted(24, 63) Source(37, 14) + SourceIndex(0) -5 >Emitted(24, 68) Source(37, 43) + SourceIndex(0) +1 >Emitted(25, 21) Source(37, 10) + SourceIndex(0) +2 >Emitted(25, 50) Source(37, 13) + SourceIndex(0) +3 >Emitted(25, 53) Source(37, 3) + SourceIndex(0) +4 >Emitted(25, 63) Source(37, 14) + SourceIndex(0) +5 >Emitted(25, 68) Source(37, 43) + SourceIndex(0) --- >>> return true; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -304,11 +305,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > 4 > true 5 > ; -1 >Emitted(25, 25) Source(39, 4) + SourceIndex(0) -2 >Emitted(25, 31) Source(39, 10) + SourceIndex(0) -3 >Emitted(25, 32) Source(39, 11) + SourceIndex(0) -4 >Emitted(25, 36) Source(39, 15) + SourceIndex(0) -5 >Emitted(25, 37) Source(39, 16) + SourceIndex(0) +1 >Emitted(26, 25) Source(39, 4) + SourceIndex(0) +2 >Emitted(26, 31) Source(39, 10) + SourceIndex(0) +3 >Emitted(26, 32) Source(39, 11) + SourceIndex(0) +4 >Emitted(26, 36) Source(39, 15) + SourceIndex(0) +5 >Emitted(26, 37) Source(39, 16) + SourceIndex(0) --- >>> }; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -317,8 +318,8 @@ sourceFile:recursiveClassReferenceTest.ts 1 > > 2 > } -1 >Emitted(26, 21) Source(40, 3) + SourceIndex(0) -2 >Emitted(26, 22) Source(40, 4) + SourceIndex(0) +1 >Emitted(27, 21) Source(40, 3) + SourceIndex(0) +2 >Emitted(27, 22) Source(40, 4) + SourceIndex(0) --- >>> return StartFindAction; 1->^^^^^^^^^^^^^^^^^^^^ @@ -326,8 +327,8 @@ sourceFile:recursiveClassReferenceTest.ts 1-> > 2 > } -1->Emitted(27, 21) Source(41, 2) + SourceIndex(0) -2 >Emitted(27, 43) Source(41, 3) + SourceIndex(0) +1->Emitted(28, 21) Source(41, 2) + SourceIndex(0) +2 >Emitted(28, 43) Source(41, 3) + SourceIndex(0) --- >>> }()); 1 >^^^^^^^^^^^^^^^^ @@ -347,10 +348,10 @@ sourceFile:recursiveClassReferenceTest.ts > return true; > } > } -1 >Emitted(28, 17) Source(41, 2) + SourceIndex(0) -2 >Emitted(28, 18) Source(41, 3) + SourceIndex(0) -3 >Emitted(28, 18) Source(33, 2) + SourceIndex(0) -4 >Emitted(28, 22) Source(41, 3) + SourceIndex(0) +1 >Emitted(29, 17) Source(41, 2) + SourceIndex(0) +2 >Emitted(29, 18) Source(41, 3) + SourceIndex(0) +3 >Emitted(29, 18) Source(33, 2) + SourceIndex(0) +4 >Emitted(29, 22) Source(41, 3) + SourceIndex(0) --- >>> Find.StartFindAction = StartFindAction; 1->^^^^^^^^^^^^^^^^ @@ -370,10 +371,10 @@ sourceFile:recursiveClassReferenceTest.ts > } > } 4 > -1->Emitted(29, 17) Source(33, 15) + SourceIndex(0) -2 >Emitted(29, 37) Source(33, 30) + SourceIndex(0) -3 >Emitted(29, 55) Source(41, 3) + SourceIndex(0) -4 >Emitted(29, 56) Source(41, 3) + SourceIndex(0) +1->Emitted(30, 17) Source(33, 15) + SourceIndex(0) +2 >Emitted(30, 37) Source(33, 30) + SourceIndex(0) +3 >Emitted(30, 55) Source(41, 3) + SourceIndex(0) +4 >Emitted(30, 56) Source(41, 3) + SourceIndex(0) --- >>> })(Find = Thing_1.Find || (Thing_1.Find = {})); 1->^^^^^^^^^^^^ @@ -405,15 +406,15 @@ sourceFile:recursiveClassReferenceTest.ts > } > } > } -1->Emitted(30, 13) Source(42, 1) + SourceIndex(0) -2 >Emitted(30, 14) Source(42, 2) + SourceIndex(0) -3 >Emitted(30, 16) Source(32, 29) + SourceIndex(0) -4 >Emitted(30, 20) Source(32, 33) + SourceIndex(0) -5 >Emitted(30, 23) Source(32, 29) + SourceIndex(0) -6 >Emitted(30, 35) Source(32, 33) + SourceIndex(0) -7 >Emitted(30, 40) Source(32, 29) + SourceIndex(0) -8 >Emitted(30, 52) Source(32, 33) + SourceIndex(0) -9 >Emitted(30, 60) Source(42, 2) + SourceIndex(0) +1->Emitted(31, 13) Source(42, 1) + SourceIndex(0) +2 >Emitted(31, 14) Source(42, 2) + SourceIndex(0) +3 >Emitted(31, 16) Source(32, 29) + SourceIndex(0) +4 >Emitted(31, 20) Source(32, 33) + SourceIndex(0) +5 >Emitted(31, 23) Source(32, 29) + SourceIndex(0) +6 >Emitted(31, 35) Source(32, 33) + SourceIndex(0) +7 >Emitted(31, 40) Source(32, 29) + SourceIndex(0) +8 >Emitted(31, 52) Source(32, 33) + SourceIndex(0) +9 >Emitted(31, 60) Source(42, 2) + SourceIndex(0) --- >>> })(Thing = Actions.Thing || (Actions.Thing = {})); 1 >^^^^^^^^ @@ -445,15 +446,15 @@ sourceFile:recursiveClassReferenceTest.ts > } > } > } -1 >Emitted(31, 9) Source(42, 1) + SourceIndex(0) -2 >Emitted(31, 10) Source(42, 2) + SourceIndex(0) -3 >Emitted(31, 12) Source(32, 23) + SourceIndex(0) -4 >Emitted(31, 17) Source(32, 28) + SourceIndex(0) -5 >Emitted(31, 20) Source(32, 23) + SourceIndex(0) -6 >Emitted(31, 33) Source(32, 28) + SourceIndex(0) -7 >Emitted(31, 38) Source(32, 23) + SourceIndex(0) -8 >Emitted(31, 51) Source(32, 28) + SourceIndex(0) -9 >Emitted(31, 59) Source(42, 2) + SourceIndex(0) +1 >Emitted(32, 9) Source(42, 1) + SourceIndex(0) +2 >Emitted(32, 10) Source(42, 2) + SourceIndex(0) +3 >Emitted(32, 12) Source(32, 23) + SourceIndex(0) +4 >Emitted(32, 17) Source(32, 28) + SourceIndex(0) +5 >Emitted(32, 20) Source(32, 23) + SourceIndex(0) +6 >Emitted(32, 33) Source(32, 28) + SourceIndex(0) +7 >Emitted(32, 38) Source(32, 23) + SourceIndex(0) +8 >Emitted(32, 51) Source(32, 28) + SourceIndex(0) +9 >Emitted(32, 59) Source(42, 2) + SourceIndex(0) --- >>> })(Actions = Sample.Actions || (Sample.Actions = {})); 1->^^^^ @@ -484,15 +485,15 @@ sourceFile:recursiveClassReferenceTest.ts > } > } > } -1->Emitted(32, 5) Source(42, 1) + SourceIndex(0) -2 >Emitted(32, 6) Source(42, 2) + SourceIndex(0) -3 >Emitted(32, 8) Source(32, 15) + SourceIndex(0) -4 >Emitted(32, 15) Source(32, 22) + SourceIndex(0) -5 >Emitted(32, 18) Source(32, 15) + SourceIndex(0) -6 >Emitted(32, 32) Source(32, 22) + SourceIndex(0) -7 >Emitted(32, 37) Source(32, 15) + SourceIndex(0) -8 >Emitted(32, 51) Source(32, 22) + SourceIndex(0) -9 >Emitted(32, 59) Source(42, 2) + SourceIndex(0) +1->Emitted(33, 5) Source(42, 1) + SourceIndex(0) +2 >Emitted(33, 6) Source(42, 2) + SourceIndex(0) +3 >Emitted(33, 8) Source(32, 15) + SourceIndex(0) +4 >Emitted(33, 15) Source(32, 22) + SourceIndex(0) +5 >Emitted(33, 18) Source(32, 15) + SourceIndex(0) +6 >Emitted(33, 32) Source(32, 22) + SourceIndex(0) +7 >Emitted(33, 37) Source(32, 15) + SourceIndex(0) +8 >Emitted(33, 51) Source(32, 22) + SourceIndex(0) +9 >Emitted(33, 59) Source(42, 2) + SourceIndex(0) --- >>>})(Sample || (Sample = {})); 1 > @@ -519,13 +520,13 @@ sourceFile:recursiveClassReferenceTest.ts > } > } > } -1 >Emitted(33, 1) Source(42, 1) + SourceIndex(0) -2 >Emitted(33, 2) Source(42, 2) + SourceIndex(0) -3 >Emitted(33, 4) Source(32, 8) + SourceIndex(0) -4 >Emitted(33, 10) Source(32, 14) + SourceIndex(0) -5 >Emitted(33, 15) Source(32, 8) + SourceIndex(0) -6 >Emitted(33, 21) Source(32, 14) + SourceIndex(0) -7 >Emitted(33, 29) Source(42, 2) + SourceIndex(0) +1 >Emitted(34, 1) Source(42, 1) + SourceIndex(0) +2 >Emitted(34, 2) Source(42, 2) + SourceIndex(0) +3 >Emitted(34, 4) Source(32, 8) + SourceIndex(0) +4 >Emitted(34, 10) Source(32, 14) + SourceIndex(0) +5 >Emitted(34, 15) Source(32, 8) + SourceIndex(0) +6 >Emitted(34, 21) Source(32, 14) + SourceIndex(0) +7 >Emitted(34, 29) Source(42, 2) + SourceIndex(0) --- >>>(function (Sample) { 1 > @@ -536,9 +537,9 @@ sourceFile:recursiveClassReferenceTest.ts > 2 >module 3 > Sample -1 >Emitted(34, 1) Source(44, 1) + SourceIndex(0) -2 >Emitted(34, 12) Source(44, 8) + SourceIndex(0) -3 >Emitted(34, 18) Source(44, 14) + SourceIndex(0) +1 >Emitted(35, 1) Source(44, 1) + SourceIndex(0) +2 >Emitted(35, 12) Source(44, 8) + SourceIndex(0) +3 >Emitted(35, 18) Source(44, 14) + SourceIndex(0) --- >>> var Thing; 1 >^^^^ @@ -570,10 +571,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(35, 5) Source(44, 15) + SourceIndex(0) -2 >Emitted(35, 9) Source(44, 15) + SourceIndex(0) -3 >Emitted(35, 14) Source(44, 20) + SourceIndex(0) -4 >Emitted(35, 15) Source(64, 2) + SourceIndex(0) +1 >Emitted(36, 5) Source(44, 15) + SourceIndex(0) +2 >Emitted(36, 9) Source(44, 15) + SourceIndex(0) +3 >Emitted(36, 14) Source(44, 20) + SourceIndex(0) +4 >Emitted(36, 15) Source(64, 2) + SourceIndex(0) --- >>> (function (Thing) { 1->^^^^ @@ -583,9 +584,9 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 > 3 > Thing -1->Emitted(36, 5) Source(44, 15) + SourceIndex(0) -2 >Emitted(36, 16) Source(44, 15) + SourceIndex(0) -3 >Emitted(36, 21) Source(44, 20) + SourceIndex(0) +1->Emitted(37, 5) Source(44, 15) + SourceIndex(0) +2 >Emitted(37, 16) Source(44, 15) + SourceIndex(0) +3 >Emitted(37, 21) Source(44, 20) + SourceIndex(0) --- >>> var Widgets; 1->^^^^^^^^ @@ -617,10 +618,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1->Emitted(37, 9) Source(44, 21) + SourceIndex(0) -2 >Emitted(37, 13) Source(44, 21) + SourceIndex(0) -3 >Emitted(37, 20) Source(44, 28) + SourceIndex(0) -4 >Emitted(37, 21) Source(64, 2) + SourceIndex(0) +1->Emitted(38, 9) Source(44, 21) + SourceIndex(0) +2 >Emitted(38, 13) Source(44, 21) + SourceIndex(0) +3 >Emitted(38, 20) Source(44, 28) + SourceIndex(0) +4 >Emitted(38, 21) Source(64, 2) + SourceIndex(0) --- >>> (function (Widgets) { 1->^^^^^^^^ @@ -630,16 +631,16 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 > 3 > Widgets -1->Emitted(38, 9) Source(44, 21) + SourceIndex(0) -2 >Emitted(38, 20) Source(44, 21) + SourceIndex(0) -3 >Emitted(38, 27) Source(44, 28) + SourceIndex(0) +1->Emitted(39, 9) Source(44, 21) + SourceIndex(0) +2 >Emitted(39, 20) Source(44, 21) + SourceIndex(0) +3 >Emitted(39, 27) Source(44, 28) + SourceIndex(0) --- >>> var FindWidget = (function () { 1->^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> { > -1->Emitted(39, 13) Source(45, 2) + SourceIndex(0) +1->Emitted(40, 13) Source(45, 2) + SourceIndex(0) --- >>> function FindWidget(codeThing) { 1->^^^^^^^^^^^^^^^^ @@ -654,9 +655,9 @@ sourceFile:recursiveClassReferenceTest.ts > 2 > constructor(private 3 > codeThing: Sample.Thing.ICodeThing -1->Emitted(40, 17) Source(50, 3) + SourceIndex(0) -2 >Emitted(40, 37) Source(50, 23) + SourceIndex(0) -3 >Emitted(40, 46) Source(50, 57) + SourceIndex(0) +1->Emitted(41, 17) Source(50, 3) + SourceIndex(0) +2 >Emitted(41, 37) Source(50, 23) + SourceIndex(0) +3 >Emitted(41, 46) Source(50, 57) + SourceIndex(0) --- >>> this.codeThing = codeThing; 1->^^^^^^^^^^^^^^^^^^^^ @@ -669,11 +670,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > 4 > codeThing 5 > : Sample.Thing.ICodeThing -1->Emitted(41, 21) Source(50, 23) + SourceIndex(0) -2 >Emitted(41, 35) Source(50, 32) + SourceIndex(0) -3 >Emitted(41, 38) Source(50, 23) + SourceIndex(0) -4 >Emitted(41, 47) Source(50, 32) + SourceIndex(0) -5 >Emitted(41, 48) Source(50, 57) + SourceIndex(0) +1->Emitted(42, 21) Source(50, 23) + SourceIndex(0) +2 >Emitted(42, 35) Source(50, 32) + SourceIndex(0) +3 >Emitted(42, 38) Source(50, 23) + SourceIndex(0) +4 >Emitted(42, 47) Source(50, 32) + SourceIndex(0) +5 >Emitted(42, 48) Source(50, 57) + SourceIndex(0) --- >>> this.domNode = null; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -686,11 +687,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > :any = 4 > null 5 > ; -1 >Emitted(42, 21) Source(49, 11) + SourceIndex(0) -2 >Emitted(42, 33) Source(49, 18) + SourceIndex(0) -3 >Emitted(42, 36) Source(49, 25) + SourceIndex(0) -4 >Emitted(42, 40) Source(49, 29) + SourceIndex(0) -5 >Emitted(42, 41) Source(49, 30) + SourceIndex(0) +1 >Emitted(43, 21) Source(49, 11) + SourceIndex(0) +2 >Emitted(43, 33) Source(49, 18) + SourceIndex(0) +3 >Emitted(43, 36) Source(49, 25) + SourceIndex(0) +4 >Emitted(43, 40) Source(49, 29) + SourceIndex(0) +5 >Emitted(43, 41) Source(49, 30) + SourceIndex(0) --- >>> // scenario 1 1 >^^^^^^^^^^^^^^^^^^^^ @@ -700,8 +701,8 @@ sourceFile:recursiveClassReferenceTest.ts > constructor(private codeThing: Sample.Thing.ICodeThing) { > 2 > // scenario 1 -1 >Emitted(43, 21) Source(51, 7) + SourceIndex(0) -2 >Emitted(43, 34) Source(51, 20) + SourceIndex(0) +1 >Emitted(44, 21) Source(51, 7) + SourceIndex(0) +2 >Emitted(44, 34) Source(51, 20) + SourceIndex(0) --- >>> codeThing.addWidget("addWidget", this); 1->^^^^^^^^^^^^^^^^^^^^ @@ -725,16 +726,16 @@ sourceFile:recursiveClassReferenceTest.ts 8 > this 9 > ) 10> ; -1->Emitted(44, 21) Source(52, 7) + SourceIndex(0) -2 >Emitted(44, 30) Source(52, 16) + SourceIndex(0) -3 >Emitted(44, 31) Source(52, 17) + SourceIndex(0) -4 >Emitted(44, 40) Source(52, 26) + SourceIndex(0) -5 >Emitted(44, 41) Source(52, 27) + SourceIndex(0) -6 >Emitted(44, 52) Source(52, 38) + SourceIndex(0) -7 >Emitted(44, 54) Source(52, 40) + SourceIndex(0) -8 >Emitted(44, 58) Source(52, 44) + SourceIndex(0) -9 >Emitted(44, 59) Source(52, 45) + SourceIndex(0) -10>Emitted(44, 60) Source(52, 46) + SourceIndex(0) +1->Emitted(45, 21) Source(52, 7) + SourceIndex(0) +2 >Emitted(45, 30) Source(52, 16) + SourceIndex(0) +3 >Emitted(45, 31) Source(52, 17) + SourceIndex(0) +4 >Emitted(45, 40) Source(52, 26) + SourceIndex(0) +5 >Emitted(45, 41) Source(52, 27) + SourceIndex(0) +6 >Emitted(45, 52) Source(52, 38) + SourceIndex(0) +7 >Emitted(45, 54) Source(52, 40) + SourceIndex(0) +8 >Emitted(45, 58) Source(52, 44) + SourceIndex(0) +9 >Emitted(45, 59) Source(52, 45) + SourceIndex(0) +10>Emitted(45, 60) Source(52, 46) + SourceIndex(0) --- >>> } 1 >^^^^^^^^^^^^^^^^ @@ -743,8 +744,8 @@ sourceFile:recursiveClassReferenceTest.ts 1 > > 2 > } -1 >Emitted(45, 17) Source(53, 3) + SourceIndex(0) -2 >Emitted(45, 18) Source(53, 4) + SourceIndex(0) +1 >Emitted(46, 17) Source(53, 3) + SourceIndex(0) +2 >Emitted(46, 18) Source(53, 4) + SourceIndex(0) --- >>> FindWidget.prototype.gar = function (runner) { if (true) { 1->^^^^^^^^^^^^^^^^ @@ -773,19 +774,19 @@ sourceFile:recursiveClassReferenceTest.ts 11> ) 12> 13> { -1->Emitted(46, 17) Source(47, 10) + SourceIndex(0) -2 >Emitted(46, 41) Source(47, 13) + SourceIndex(0) -3 >Emitted(46, 44) Source(47, 3) + SourceIndex(0) -4 >Emitted(46, 54) Source(47, 14) + SourceIndex(0) -5 >Emitted(46, 60) Source(47, 55) + SourceIndex(0) -6 >Emitted(46, 64) Source(47, 59) + SourceIndex(0) -7 >Emitted(46, 66) Source(47, 61) + SourceIndex(0) -8 >Emitted(46, 67) Source(47, 62) + SourceIndex(0) -9 >Emitted(46, 68) Source(47, 63) + SourceIndex(0) -10>Emitted(46, 72) Source(47, 67) + SourceIndex(0) -11>Emitted(46, 73) Source(47, 68) + SourceIndex(0) -12>Emitted(46, 74) Source(47, 69) + SourceIndex(0) -13>Emitted(46, 75) Source(47, 70) + SourceIndex(0) +1->Emitted(47, 17) Source(47, 10) + SourceIndex(0) +2 >Emitted(47, 41) Source(47, 13) + SourceIndex(0) +3 >Emitted(47, 44) Source(47, 3) + SourceIndex(0) +4 >Emitted(47, 54) Source(47, 14) + SourceIndex(0) +5 >Emitted(47, 60) Source(47, 55) + SourceIndex(0) +6 >Emitted(47, 64) Source(47, 59) + SourceIndex(0) +7 >Emitted(47, 66) Source(47, 61) + SourceIndex(0) +8 >Emitted(47, 67) Source(47, 62) + SourceIndex(0) +9 >Emitted(47, 68) Source(47, 63) + SourceIndex(0) +10>Emitted(47, 72) Source(47, 67) + SourceIndex(0) +11>Emitted(47, 73) Source(47, 68) + SourceIndex(0) +12>Emitted(47, 74) Source(47, 69) + SourceIndex(0) +13>Emitted(47, 75) Source(47, 70) + SourceIndex(0) --- >>> return runner(this); 1 >^^^^^^^^^^^^^^^^^^^^ @@ -804,14 +805,14 @@ sourceFile:recursiveClassReferenceTest.ts 6 > this 7 > ) 8 > ; -1 >Emitted(47, 21) Source(47, 70) + SourceIndex(0) -2 >Emitted(47, 27) Source(47, 76) + SourceIndex(0) -3 >Emitted(47, 28) Source(47, 77) + SourceIndex(0) -4 >Emitted(47, 34) Source(47, 83) + SourceIndex(0) -5 >Emitted(47, 35) Source(47, 84) + SourceIndex(0) -6 >Emitted(47, 39) Source(47, 88) + SourceIndex(0) -7 >Emitted(47, 40) Source(47, 89) + SourceIndex(0) -8 >Emitted(47, 41) Source(47, 90) + SourceIndex(0) +1 >Emitted(48, 21) Source(47, 70) + SourceIndex(0) +2 >Emitted(48, 27) Source(47, 76) + SourceIndex(0) +3 >Emitted(48, 28) Source(47, 77) + SourceIndex(0) +4 >Emitted(48, 34) Source(47, 83) + SourceIndex(0) +5 >Emitted(48, 35) Source(47, 84) + SourceIndex(0) +6 >Emitted(48, 39) Source(47, 88) + SourceIndex(0) +7 >Emitted(48, 40) Source(47, 89) + SourceIndex(0) +8 >Emitted(48, 41) Source(47, 90) + SourceIndex(0) --- >>> } }; 1 >^^^^^^^^^^^^^^^^ @@ -823,10 +824,10 @@ sourceFile:recursiveClassReferenceTest.ts 2 > } 3 > 4 > } -1 >Emitted(48, 17) Source(47, 90) + SourceIndex(0) -2 >Emitted(48, 18) Source(47, 91) + SourceIndex(0) -3 >Emitted(48, 19) Source(47, 91) + SourceIndex(0) -4 >Emitted(48, 20) Source(47, 92) + SourceIndex(0) +1 >Emitted(49, 17) Source(47, 90) + SourceIndex(0) +2 >Emitted(49, 18) Source(47, 91) + SourceIndex(0) +3 >Emitted(49, 19) Source(47, 91) + SourceIndex(0) +4 >Emitted(49, 20) Source(47, 92) + SourceIndex(0) --- >>> FindWidget.prototype.getDomNode = function () { 1->^^^^^^^^^^^^^^^^ @@ -843,9 +844,9 @@ sourceFile:recursiveClassReferenceTest.ts > public 2 > getDomNode 3 > -1->Emitted(49, 17) Source(55, 10) + SourceIndex(0) -2 >Emitted(49, 48) Source(55, 20) + SourceIndex(0) -3 >Emitted(49, 51) Source(55, 3) + SourceIndex(0) +1->Emitted(50, 17) Source(55, 10) + SourceIndex(0) +2 >Emitted(50, 48) Source(55, 20) + SourceIndex(0) +3 >Emitted(50, 51) Source(55, 3) + SourceIndex(0) --- >>> return domNode; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -859,11 +860,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > 4 > domNode 5 > ; -1 >Emitted(50, 21) Source(56, 4) + SourceIndex(0) -2 >Emitted(50, 27) Source(56, 10) + SourceIndex(0) -3 >Emitted(50, 28) Source(56, 11) + SourceIndex(0) -4 >Emitted(50, 35) Source(56, 18) + SourceIndex(0) -5 >Emitted(50, 36) Source(56, 19) + SourceIndex(0) +1 >Emitted(51, 21) Source(56, 4) + SourceIndex(0) +2 >Emitted(51, 27) Source(56, 10) + SourceIndex(0) +3 >Emitted(51, 28) Source(56, 11) + SourceIndex(0) +4 >Emitted(51, 35) Source(56, 18) + SourceIndex(0) +5 >Emitted(51, 36) Source(56, 19) + SourceIndex(0) --- >>> }; 1 >^^^^^^^^^^^^^^^^ @@ -872,8 +873,8 @@ sourceFile:recursiveClassReferenceTest.ts 1 > > 2 > } -1 >Emitted(51, 17) Source(57, 3) + SourceIndex(0) -2 >Emitted(51, 18) Source(57, 4) + SourceIndex(0) +1 >Emitted(52, 17) Source(57, 3) + SourceIndex(0) +2 >Emitted(52, 18) Source(57, 4) + SourceIndex(0) --- >>> FindWidget.prototype.destroy = function () { 1->^^^^^^^^^^^^^^^^ @@ -884,9 +885,9 @@ sourceFile:recursiveClassReferenceTest.ts > public 2 > destroy 3 > -1->Emitted(52, 17) Source(59, 10) + SourceIndex(0) -2 >Emitted(52, 45) Source(59, 17) + SourceIndex(0) -3 >Emitted(52, 48) Source(59, 3) + SourceIndex(0) +1->Emitted(53, 17) Source(59, 10) + SourceIndex(0) +2 >Emitted(53, 45) Source(59, 17) + SourceIndex(0) +3 >Emitted(53, 48) Source(59, 3) + SourceIndex(0) --- >>> }; 1 >^^^^^^^^^^^^^^^^ @@ -896,8 +897,8 @@ sourceFile:recursiveClassReferenceTest.ts > > 2 > } -1 >Emitted(53, 17) Source(61, 3) + SourceIndex(0) -2 >Emitted(53, 18) Source(61, 4) + SourceIndex(0) +1 >Emitted(54, 17) Source(61, 3) + SourceIndex(0) +2 >Emitted(54, 18) Source(61, 4) + SourceIndex(0) --- >>> return FindWidget; 1->^^^^^^^^^^^^^^^^ @@ -906,8 +907,8 @@ sourceFile:recursiveClassReferenceTest.ts > > 2 > } -1->Emitted(54, 17) Source(63, 2) + SourceIndex(0) -2 >Emitted(54, 34) Source(63, 3) + SourceIndex(0) +1->Emitted(55, 17) Source(63, 2) + SourceIndex(0) +2 >Emitted(55, 34) Source(63, 3) + SourceIndex(0) --- >>> }()); 1 >^^^^^^^^^^^^ @@ -937,10 +938,10 @@ sourceFile:recursiveClassReferenceTest.ts > } > > } -1 >Emitted(55, 13) Source(63, 2) + SourceIndex(0) -2 >Emitted(55, 14) Source(63, 3) + SourceIndex(0) -3 >Emitted(55, 14) Source(45, 2) + SourceIndex(0) -4 >Emitted(55, 18) Source(63, 3) + SourceIndex(0) +1 >Emitted(56, 13) Source(63, 2) + SourceIndex(0) +2 >Emitted(56, 14) Source(63, 3) + SourceIndex(0) +3 >Emitted(56, 14) Source(45, 2) + SourceIndex(0) +4 >Emitted(56, 18) Source(63, 3) + SourceIndex(0) --- >>> Widgets.FindWidget = FindWidget; 1->^^^^^^^^^^^^ @@ -970,10 +971,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } 4 > -1->Emitted(56, 13) Source(45, 15) + SourceIndex(0) -2 >Emitted(56, 31) Source(45, 25) + SourceIndex(0) -3 >Emitted(56, 44) Source(63, 3) + SourceIndex(0) -4 >Emitted(56, 45) Source(63, 3) + SourceIndex(0) +1->Emitted(57, 13) Source(45, 15) + SourceIndex(0) +2 >Emitted(57, 31) Source(45, 25) + SourceIndex(0) +3 >Emitted(57, 44) Source(63, 3) + SourceIndex(0) +4 >Emitted(57, 45) Source(63, 3) + SourceIndex(0) --- >>> })(Widgets = Thing.Widgets || (Thing.Widgets = {})); 1->^^^^^^^^ @@ -1015,15 +1016,15 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1->Emitted(57, 9) Source(64, 1) + SourceIndex(0) -2 >Emitted(57, 10) Source(64, 2) + SourceIndex(0) -3 >Emitted(57, 12) Source(44, 21) + SourceIndex(0) -4 >Emitted(57, 19) Source(44, 28) + SourceIndex(0) -5 >Emitted(57, 22) Source(44, 21) + SourceIndex(0) -6 >Emitted(57, 35) Source(44, 28) + SourceIndex(0) -7 >Emitted(57, 40) Source(44, 21) + SourceIndex(0) -8 >Emitted(57, 53) Source(44, 28) + SourceIndex(0) -9 >Emitted(57, 61) Source(64, 2) + SourceIndex(0) +1->Emitted(58, 9) Source(64, 1) + SourceIndex(0) +2 >Emitted(58, 10) Source(64, 2) + SourceIndex(0) +3 >Emitted(58, 12) Source(44, 21) + SourceIndex(0) +4 >Emitted(58, 19) Source(44, 28) + SourceIndex(0) +5 >Emitted(58, 22) Source(44, 21) + SourceIndex(0) +6 >Emitted(58, 35) Source(44, 28) + SourceIndex(0) +7 >Emitted(58, 40) Source(44, 21) + SourceIndex(0) +8 >Emitted(58, 53) Source(44, 28) + SourceIndex(0) +9 >Emitted(58, 61) Source(64, 2) + SourceIndex(0) --- >>> })(Thing = Sample.Thing || (Sample.Thing = {})); 1 >^^^^ @@ -1064,15 +1065,15 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(58, 5) Source(64, 1) + SourceIndex(0) -2 >Emitted(58, 6) Source(64, 2) + SourceIndex(0) -3 >Emitted(58, 8) Source(44, 15) + SourceIndex(0) -4 >Emitted(58, 13) Source(44, 20) + SourceIndex(0) -5 >Emitted(58, 16) Source(44, 15) + SourceIndex(0) -6 >Emitted(58, 28) Source(44, 20) + SourceIndex(0) -7 >Emitted(58, 33) Source(44, 15) + SourceIndex(0) -8 >Emitted(58, 45) Source(44, 20) + SourceIndex(0) -9 >Emitted(58, 53) Source(64, 2) + SourceIndex(0) +1 >Emitted(59, 5) Source(64, 1) + SourceIndex(0) +2 >Emitted(59, 6) Source(64, 2) + SourceIndex(0) +3 >Emitted(59, 8) Source(44, 15) + SourceIndex(0) +4 >Emitted(59, 13) Source(44, 20) + SourceIndex(0) +5 >Emitted(59, 16) Source(44, 15) + SourceIndex(0) +6 >Emitted(59, 28) Source(44, 20) + SourceIndex(0) +7 >Emitted(59, 33) Source(44, 15) + SourceIndex(0) +8 >Emitted(59, 45) Source(44, 20) + SourceIndex(0) +9 >Emitted(59, 53) Source(64, 2) + SourceIndex(0) --- >>>})(Sample || (Sample = {})); 1 > @@ -1110,13 +1111,13 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(59, 1) Source(64, 1) + SourceIndex(0) -2 >Emitted(59, 2) Source(64, 2) + SourceIndex(0) -3 >Emitted(59, 4) Source(44, 8) + SourceIndex(0) -4 >Emitted(59, 10) Source(44, 14) + SourceIndex(0) -5 >Emitted(59, 15) Source(44, 8) + SourceIndex(0) -6 >Emitted(59, 21) Source(44, 14) + SourceIndex(0) -7 >Emitted(59, 29) Source(64, 2) + SourceIndex(0) +1 >Emitted(60, 1) Source(64, 1) + SourceIndex(0) +2 >Emitted(60, 2) Source(64, 2) + SourceIndex(0) +3 >Emitted(60, 4) Source(44, 8) + SourceIndex(0) +4 >Emitted(60, 10) Source(44, 14) + SourceIndex(0) +5 >Emitted(60, 15) Source(44, 8) + SourceIndex(0) +6 >Emitted(60, 21) Source(44, 14) + SourceIndex(0) +7 >Emitted(60, 29) Source(64, 2) + SourceIndex(0) --- >>>var AbstractMode = (function () { 1-> @@ -1125,13 +1126,13 @@ sourceFile:recursiveClassReferenceTest.ts > >interface IMode { getInitialState(): IState;} > -1->Emitted(60, 1) Source(67, 1) + SourceIndex(0) +1->Emitted(61, 1) Source(67, 1) + SourceIndex(0) --- >>> function AbstractMode() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(61, 5) Source(67, 1) + SourceIndex(0) +1->Emitted(62, 5) Source(67, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -1139,8 +1140,8 @@ sourceFile:recursiveClassReferenceTest.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1->class AbstractMode implements IMode { public getInitialState(): IState { return null;} 2 > } -1->Emitted(62, 5) Source(67, 88) + SourceIndex(0) -2 >Emitted(62, 6) Source(67, 89) + SourceIndex(0) +1->Emitted(63, 5) Source(67, 88) + SourceIndex(0) +2 >Emitted(63, 6) Source(67, 89) + SourceIndex(0) --- >>> AbstractMode.prototype.getInitialState = function () { return null; }; 1->^^^^ @@ -1163,24 +1164,24 @@ sourceFile:recursiveClassReferenceTest.ts 8 > ; 9 > 10> } -1->Emitted(63, 5) Source(67, 46) + SourceIndex(0) -2 >Emitted(63, 43) Source(67, 61) + SourceIndex(0) -3 >Emitted(63, 46) Source(67, 39) + SourceIndex(0) -4 >Emitted(63, 60) Source(67, 74) + SourceIndex(0) -5 >Emitted(63, 66) Source(67, 80) + SourceIndex(0) -6 >Emitted(63, 67) Source(67, 81) + SourceIndex(0) -7 >Emitted(63, 71) Source(67, 85) + SourceIndex(0) -8 >Emitted(63, 72) Source(67, 86) + SourceIndex(0) -9 >Emitted(63, 73) Source(67, 86) + SourceIndex(0) -10>Emitted(63, 74) Source(67, 87) + SourceIndex(0) +1->Emitted(64, 5) Source(67, 46) + SourceIndex(0) +2 >Emitted(64, 43) Source(67, 61) + SourceIndex(0) +3 >Emitted(64, 46) Source(67, 39) + SourceIndex(0) +4 >Emitted(64, 60) Source(67, 74) + SourceIndex(0) +5 >Emitted(64, 66) Source(67, 80) + SourceIndex(0) +6 >Emitted(64, 67) Source(67, 81) + SourceIndex(0) +7 >Emitted(64, 71) Source(67, 85) + SourceIndex(0) +8 >Emitted(64, 72) Source(67, 86) + SourceIndex(0) +9 >Emitted(64, 73) Source(67, 86) + SourceIndex(0) +10>Emitted(64, 74) Source(67, 87) + SourceIndex(0) --- >>> return AbstractMode; 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^ 1 > 2 > } -1 >Emitted(64, 5) Source(67, 88) + SourceIndex(0) -2 >Emitted(64, 24) Source(67, 89) + SourceIndex(0) +1 >Emitted(65, 5) Source(67, 88) + SourceIndex(0) +2 >Emitted(65, 24) Source(67, 89) + SourceIndex(0) --- >>>}()); 1 > @@ -1192,10 +1193,10 @@ sourceFile:recursiveClassReferenceTest.ts 2 >} 3 > 4 > class AbstractMode implements IMode { public getInitialState(): IState { return null;} } -1 >Emitted(65, 1) Source(67, 88) + SourceIndex(0) -2 >Emitted(65, 2) Source(67, 89) + SourceIndex(0) -3 >Emitted(65, 2) Source(67, 1) + SourceIndex(0) -4 >Emitted(65, 6) Source(67, 89) + SourceIndex(0) +1 >Emitted(66, 1) Source(67, 88) + SourceIndex(0) +2 >Emitted(66, 2) Source(67, 89) + SourceIndex(0) +3 >Emitted(66, 2) Source(67, 1) + SourceIndex(0) +4 >Emitted(66, 6) Source(67, 89) + SourceIndex(0) --- >>>(function (Sample) { 1-> @@ -1213,9 +1214,9 @@ sourceFile:recursiveClassReferenceTest.ts > 2 >module 3 > Sample -1->Emitted(66, 1) Source(76, 1) + SourceIndex(0) -2 >Emitted(66, 12) Source(76, 8) + SourceIndex(0) -3 >Emitted(66, 18) Source(76, 14) + SourceIndex(0) +1->Emitted(67, 1) Source(76, 1) + SourceIndex(0) +2 >Emitted(67, 12) Source(76, 8) + SourceIndex(0) +3 >Emitted(67, 18) Source(76, 14) + SourceIndex(0) --- >>> var Thing; 1 >^^^^ @@ -1251,10 +1252,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(67, 5) Source(76, 15) + SourceIndex(0) -2 >Emitted(67, 9) Source(76, 15) + SourceIndex(0) -3 >Emitted(67, 14) Source(76, 20) + SourceIndex(0) -4 >Emitted(67, 15) Source(100, 2) + SourceIndex(0) +1 >Emitted(68, 5) Source(76, 15) + SourceIndex(0) +2 >Emitted(68, 9) Source(76, 15) + SourceIndex(0) +3 >Emitted(68, 14) Source(76, 20) + SourceIndex(0) +4 >Emitted(68, 15) Source(100, 2) + SourceIndex(0) --- >>> (function (Thing) { 1->^^^^ @@ -1264,9 +1265,9 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 > 3 > Thing -1->Emitted(68, 5) Source(76, 15) + SourceIndex(0) -2 >Emitted(68, 16) Source(76, 15) + SourceIndex(0) -3 >Emitted(68, 21) Source(76, 20) + SourceIndex(0) +1->Emitted(69, 5) Source(76, 15) + SourceIndex(0) +2 >Emitted(69, 16) Source(76, 15) + SourceIndex(0) +3 >Emitted(69, 21) Source(76, 20) + SourceIndex(0) --- >>> var Languages; 1->^^^^^^^^ @@ -1302,10 +1303,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1->Emitted(69, 9) Source(76, 21) + SourceIndex(0) -2 >Emitted(69, 13) Source(76, 21) + SourceIndex(0) -3 >Emitted(69, 22) Source(76, 30) + SourceIndex(0) -4 >Emitted(69, 23) Source(100, 2) + SourceIndex(0) +1->Emitted(70, 9) Source(76, 21) + SourceIndex(0) +2 >Emitted(70, 13) Source(76, 21) + SourceIndex(0) +3 >Emitted(70, 22) Source(76, 30) + SourceIndex(0) +4 >Emitted(70, 23) Source(100, 2) + SourceIndex(0) --- >>> (function (Languages) { 1->^^^^^^^^ @@ -1314,9 +1315,9 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 > 3 > Languages -1->Emitted(70, 9) Source(76, 21) + SourceIndex(0) -2 >Emitted(70, 20) Source(76, 21) + SourceIndex(0) -3 >Emitted(70, 29) Source(76, 30) + SourceIndex(0) +1->Emitted(71, 9) Source(76, 21) + SourceIndex(0) +2 >Emitted(71, 20) Source(76, 21) + SourceIndex(0) +3 >Emitted(71, 29) Source(76, 30) + SourceIndex(0) --- >>> var PlainText; 1 >^^^^^^^^^^^^ @@ -1352,10 +1353,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(71, 13) Source(76, 31) + SourceIndex(0) -2 >Emitted(71, 17) Source(76, 31) + SourceIndex(0) -3 >Emitted(71, 26) Source(76, 40) + SourceIndex(0) -4 >Emitted(71, 27) Source(100, 2) + SourceIndex(0) +1 >Emitted(72, 13) Source(76, 31) + SourceIndex(0) +2 >Emitted(72, 17) Source(76, 31) + SourceIndex(0) +3 >Emitted(72, 26) Source(76, 40) + SourceIndex(0) +4 >Emitted(72, 27) Source(100, 2) + SourceIndex(0) --- >>> (function (PlainText) { 1->^^^^^^^^^^^^ @@ -1365,9 +1366,9 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 > 3 > PlainText -1->Emitted(72, 13) Source(76, 31) + SourceIndex(0) -2 >Emitted(72, 24) Source(76, 31) + SourceIndex(0) -3 >Emitted(72, 33) Source(76, 40) + SourceIndex(0) +1->Emitted(73, 13) Source(76, 31) + SourceIndex(0) +2 >Emitted(73, 24) Source(76, 31) + SourceIndex(0) +3 >Emitted(73, 33) Source(76, 40) + SourceIndex(0) --- >>> var State = (function () { 1->^^^^^^^^^^^^^^^^ @@ -1375,7 +1376,7 @@ sourceFile:recursiveClassReferenceTest.ts 1-> { > > -1->Emitted(73, 17) Source(78, 2) + SourceIndex(0) +1->Emitted(74, 17) Source(78, 2) + SourceIndex(0) --- >>> function State(mode) { 1->^^^^^^^^^^^^^^^^^^^^ @@ -1386,9 +1387,9 @@ sourceFile:recursiveClassReferenceTest.ts > 2 > constructor(private 3 > mode: IMode -1->Emitted(74, 21) Source(79, 9) + SourceIndex(0) -2 >Emitted(74, 36) Source(79, 29) + SourceIndex(0) -3 >Emitted(74, 40) Source(79, 40) + SourceIndex(0) +1->Emitted(75, 21) Source(79, 9) + SourceIndex(0) +2 >Emitted(75, 36) Source(79, 29) + SourceIndex(0) +3 >Emitted(75, 40) Source(79, 40) + SourceIndex(0) --- >>> this.mode = mode; 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1401,11 +1402,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > 4 > mode 5 > : IMode -1->Emitted(75, 25) Source(79, 29) + SourceIndex(0) -2 >Emitted(75, 34) Source(79, 33) + SourceIndex(0) -3 >Emitted(75, 37) Source(79, 29) + SourceIndex(0) -4 >Emitted(75, 41) Source(79, 33) + SourceIndex(0) -5 >Emitted(75, 42) Source(79, 40) + SourceIndex(0) +1->Emitted(76, 25) Source(79, 29) + SourceIndex(0) +2 >Emitted(76, 34) Source(79, 33) + SourceIndex(0) +3 >Emitted(76, 37) Source(79, 29) + SourceIndex(0) +4 >Emitted(76, 41) Source(79, 33) + SourceIndex(0) +5 >Emitted(76, 42) Source(79, 40) + SourceIndex(0) --- >>> } 1 >^^^^^^^^^^^^^^^^^^^^ @@ -1413,8 +1414,8 @@ sourceFile:recursiveClassReferenceTest.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >) { 2 > } -1 >Emitted(76, 21) Source(79, 44) + SourceIndex(0) -2 >Emitted(76, 22) Source(79, 45) + SourceIndex(0) +1 >Emitted(77, 21) Source(79, 44) + SourceIndex(0) +2 >Emitted(77, 22) Source(79, 45) + SourceIndex(0) --- >>> State.prototype.clone = function () { 1->^^^^^^^^^^^^^^^^^^^^ @@ -1424,9 +1425,9 @@ sourceFile:recursiveClassReferenceTest.ts > public 2 > clone 3 > -1->Emitted(77, 21) Source(80, 10) + SourceIndex(0) -2 >Emitted(77, 42) Source(80, 15) + SourceIndex(0) -3 >Emitted(77, 45) Source(80, 3) + SourceIndex(0) +1->Emitted(78, 21) Source(80, 10) + SourceIndex(0) +2 >Emitted(78, 42) Source(80, 15) + SourceIndex(0) +3 >Emitted(78, 45) Source(80, 3) + SourceIndex(0) --- >>> return this; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1440,11 +1441,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > 4 > this 5 > ; -1 >Emitted(78, 25) Source(81, 4) + SourceIndex(0) -2 >Emitted(78, 31) Source(81, 10) + SourceIndex(0) -3 >Emitted(78, 32) Source(81, 11) + SourceIndex(0) -4 >Emitted(78, 36) Source(81, 15) + SourceIndex(0) -5 >Emitted(78, 37) Source(81, 16) + SourceIndex(0) +1 >Emitted(79, 25) Source(81, 4) + SourceIndex(0) +2 >Emitted(79, 31) Source(81, 10) + SourceIndex(0) +3 >Emitted(79, 32) Source(81, 11) + SourceIndex(0) +4 >Emitted(79, 36) Source(81, 15) + SourceIndex(0) +5 >Emitted(79, 37) Source(81, 16) + SourceIndex(0) --- >>> }; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -1453,8 +1454,8 @@ sourceFile:recursiveClassReferenceTest.ts 1 > > 2 > } -1 >Emitted(79, 21) Source(82, 3) + SourceIndex(0) -2 >Emitted(79, 22) Source(82, 4) + SourceIndex(0) +1 >Emitted(80, 21) Source(82, 3) + SourceIndex(0) +2 >Emitted(80, 22) Source(82, 4) + SourceIndex(0) --- >>> State.prototype.equals = function (other) { 1->^^^^^^^^^^^^^^^^^^^^ @@ -1469,11 +1470,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > 4 > public equals( 5 > other:IState -1->Emitted(80, 21) Source(84, 10) + SourceIndex(0) -2 >Emitted(80, 43) Source(84, 16) + SourceIndex(0) -3 >Emitted(80, 46) Source(84, 3) + SourceIndex(0) -4 >Emitted(80, 56) Source(84, 17) + SourceIndex(0) -5 >Emitted(80, 61) Source(84, 29) + SourceIndex(0) +1->Emitted(81, 21) Source(84, 10) + SourceIndex(0) +2 >Emitted(81, 43) Source(84, 16) + SourceIndex(0) +3 >Emitted(81, 46) Source(84, 3) + SourceIndex(0) +4 >Emitted(81, 56) Source(84, 17) + SourceIndex(0) +5 >Emitted(81, 61) Source(84, 29) + SourceIndex(0) --- >>> return this === other; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1491,13 +1492,13 @@ sourceFile:recursiveClassReferenceTest.ts 5 > === 6 > other 7 > ; -1 >Emitted(81, 25) Source(85, 4) + SourceIndex(0) -2 >Emitted(81, 31) Source(85, 10) + SourceIndex(0) -3 >Emitted(81, 32) Source(85, 11) + SourceIndex(0) -4 >Emitted(81, 36) Source(85, 15) + SourceIndex(0) -5 >Emitted(81, 41) Source(85, 20) + SourceIndex(0) -6 >Emitted(81, 46) Source(85, 25) + SourceIndex(0) -7 >Emitted(81, 47) Source(85, 26) + SourceIndex(0) +1 >Emitted(82, 25) Source(85, 4) + SourceIndex(0) +2 >Emitted(82, 31) Source(85, 10) + SourceIndex(0) +3 >Emitted(82, 32) Source(85, 11) + SourceIndex(0) +4 >Emitted(82, 36) Source(85, 15) + SourceIndex(0) +5 >Emitted(82, 41) Source(85, 20) + SourceIndex(0) +6 >Emitted(82, 46) Source(85, 25) + SourceIndex(0) +7 >Emitted(82, 47) Source(85, 26) + SourceIndex(0) --- >>> }; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -1506,8 +1507,8 @@ sourceFile:recursiveClassReferenceTest.ts 1 > > 2 > } -1 >Emitted(82, 21) Source(86, 3) + SourceIndex(0) -2 >Emitted(82, 22) Source(86, 4) + SourceIndex(0) +1 >Emitted(83, 21) Source(86, 3) + SourceIndex(0) +2 >Emitted(83, 22) Source(86, 4) + SourceIndex(0) --- >>> State.prototype.getMode = function () { return mode; }; 1->^^^^^^^^^^^^^^^^^^^^ @@ -1532,16 +1533,16 @@ sourceFile:recursiveClassReferenceTest.ts 8 > ; 9 > 10> } -1->Emitted(83, 21) Source(88, 10) + SourceIndex(0) -2 >Emitted(83, 44) Source(88, 17) + SourceIndex(0) -3 >Emitted(83, 47) Source(88, 3) + SourceIndex(0) -4 >Emitted(83, 61) Source(88, 29) + SourceIndex(0) -5 >Emitted(83, 67) Source(88, 35) + SourceIndex(0) -6 >Emitted(83, 68) Source(88, 36) + SourceIndex(0) -7 >Emitted(83, 72) Source(88, 40) + SourceIndex(0) -8 >Emitted(83, 73) Source(88, 41) + SourceIndex(0) -9 >Emitted(83, 74) Source(88, 42) + SourceIndex(0) -10>Emitted(83, 75) Source(88, 43) + SourceIndex(0) +1->Emitted(84, 21) Source(88, 10) + SourceIndex(0) +2 >Emitted(84, 44) Source(88, 17) + SourceIndex(0) +3 >Emitted(84, 47) Source(88, 3) + SourceIndex(0) +4 >Emitted(84, 61) Source(88, 29) + SourceIndex(0) +5 >Emitted(84, 67) Source(88, 35) + SourceIndex(0) +6 >Emitted(84, 68) Source(88, 36) + SourceIndex(0) +7 >Emitted(84, 72) Source(88, 40) + SourceIndex(0) +8 >Emitted(84, 73) Source(88, 41) + SourceIndex(0) +9 >Emitted(84, 74) Source(88, 42) + SourceIndex(0) +10>Emitted(84, 75) Source(88, 43) + SourceIndex(0) --- >>> return State; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -1549,8 +1550,8 @@ sourceFile:recursiveClassReferenceTest.ts 1 > > 2 > } -1 >Emitted(84, 21) Source(89, 2) + SourceIndex(0) -2 >Emitted(84, 33) Source(89, 3) + SourceIndex(0) +1 >Emitted(85, 21) Source(89, 2) + SourceIndex(0) +2 >Emitted(85, 33) Source(89, 3) + SourceIndex(0) --- >>> }()); 1 >^^^^^^^^^^^^^^^^ @@ -1573,10 +1574,10 @@ sourceFile:recursiveClassReferenceTest.ts > > public getMode(): IMode { return mode; } > } -1 >Emitted(85, 17) Source(89, 2) + SourceIndex(0) -2 >Emitted(85, 18) Source(89, 3) + SourceIndex(0) -3 >Emitted(85, 18) Source(78, 2) + SourceIndex(0) -4 >Emitted(85, 22) Source(89, 3) + SourceIndex(0) +1 >Emitted(86, 17) Source(89, 2) + SourceIndex(0) +2 >Emitted(86, 18) Source(89, 3) + SourceIndex(0) +3 >Emitted(86, 18) Source(78, 2) + SourceIndex(0) +4 >Emitted(86, 22) Source(89, 3) + SourceIndex(0) --- >>> PlainText.State = State; 1->^^^^^^^^^^^^^^^^ @@ -1599,10 +1600,10 @@ sourceFile:recursiveClassReferenceTest.ts > public getMode(): IMode { return mode; } > } 4 > -1->Emitted(86, 17) Source(78, 15) + SourceIndex(0) -2 >Emitted(86, 32) Source(78, 20) + SourceIndex(0) -3 >Emitted(86, 40) Source(89, 3) + SourceIndex(0) -4 >Emitted(86, 41) Source(89, 3) + SourceIndex(0) +1->Emitted(87, 17) Source(78, 15) + SourceIndex(0) +2 >Emitted(87, 32) Source(78, 20) + SourceIndex(0) +3 >Emitted(87, 40) Source(89, 3) + SourceIndex(0) +4 >Emitted(87, 41) Source(89, 3) + SourceIndex(0) --- >>> var Mode = (function (_super) { 1->^^^^^^^^^^^^^^^^ @@ -1610,21 +1611,21 @@ sourceFile:recursiveClassReferenceTest.ts 1-> > > -1->Emitted(87, 17) Source(91, 2) + SourceIndex(0) +1->Emitted(88, 17) Source(91, 2) + SourceIndex(0) --- >>> __extends(Mode, _super); 1->^^^^^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^ 1->export class Mode extends 2 > AbstractMode -1->Emitted(88, 21) Source(91, 28) + SourceIndex(0) -2 >Emitted(88, 45) Source(91, 40) + SourceIndex(0) +1->Emitted(89, 21) Source(91, 28) + SourceIndex(0) +2 >Emitted(89, 45) Source(91, 40) + SourceIndex(0) --- >>> function Mode() { 1 >^^^^^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > -1 >Emitted(89, 21) Source(91, 2) + SourceIndex(0) +1 >Emitted(90, 21) Source(91, 2) + SourceIndex(0) --- >>> return _super.apply(this, arguments) || this; >>> } @@ -1641,8 +1642,8 @@ sourceFile:recursiveClassReferenceTest.ts > > 2 > } -1->Emitted(91, 21) Source(99, 2) + SourceIndex(0) -2 >Emitted(91, 22) Source(99, 3) + SourceIndex(0) +1->Emitted(92, 21) Source(99, 2) + SourceIndex(0) +2 >Emitted(92, 22) Source(99, 3) + SourceIndex(0) --- >>> // scenario 2 1->^^^^^^^^^^^^^^^^^^^^ @@ -1650,8 +1651,8 @@ sourceFile:recursiveClassReferenceTest.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 > // scenario 2 -1->Emitted(92, 21) Source(93, 3) + SourceIndex(0) -2 >Emitted(92, 34) Source(93, 16) + SourceIndex(0) +1->Emitted(93, 21) Source(93, 3) + SourceIndex(0) +2 >Emitted(93, 34) Source(93, 16) + SourceIndex(0) --- >>> Mode.prototype.getInitialState = function () { 1->^^^^^^^^^^^^^^^^^^^^ @@ -1661,9 +1662,9 @@ sourceFile:recursiveClassReferenceTest.ts > public 2 > getInitialState 3 > -1->Emitted(93, 21) Source(94, 10) + SourceIndex(0) -2 >Emitted(93, 51) Source(94, 25) + SourceIndex(0) -3 >Emitted(93, 54) Source(94, 3) + SourceIndex(0) +1->Emitted(94, 21) Source(94, 10) + SourceIndex(0) +2 >Emitted(94, 51) Source(94, 25) + SourceIndex(0) +3 >Emitted(94, 54) Source(94, 3) + SourceIndex(0) --- >>> return new State(self); 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1685,15 +1686,15 @@ sourceFile:recursiveClassReferenceTest.ts 7 > self 8 > ) 9 > ; -1 >Emitted(94, 25) Source(95, 4) + SourceIndex(0) -2 >Emitted(94, 31) Source(95, 10) + SourceIndex(0) -3 >Emitted(94, 32) Source(95, 11) + SourceIndex(0) -4 >Emitted(94, 36) Source(95, 15) + SourceIndex(0) -5 >Emitted(94, 41) Source(95, 20) + SourceIndex(0) -6 >Emitted(94, 42) Source(95, 21) + SourceIndex(0) -7 >Emitted(94, 46) Source(95, 25) + SourceIndex(0) -8 >Emitted(94, 47) Source(95, 26) + SourceIndex(0) -9 >Emitted(94, 48) Source(95, 27) + SourceIndex(0) +1 >Emitted(95, 25) Source(95, 4) + SourceIndex(0) +2 >Emitted(95, 31) Source(95, 10) + SourceIndex(0) +3 >Emitted(95, 32) Source(95, 11) + SourceIndex(0) +4 >Emitted(95, 36) Source(95, 15) + SourceIndex(0) +5 >Emitted(95, 41) Source(95, 20) + SourceIndex(0) +6 >Emitted(95, 42) Source(95, 21) + SourceIndex(0) +7 >Emitted(95, 46) Source(95, 25) + SourceIndex(0) +8 >Emitted(95, 47) Source(95, 26) + SourceIndex(0) +9 >Emitted(95, 48) Source(95, 27) + SourceIndex(0) --- >>> }; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -1702,8 +1703,8 @@ sourceFile:recursiveClassReferenceTest.ts 1 > > 2 > } -1 >Emitted(95, 21) Source(96, 3) + SourceIndex(0) -2 >Emitted(95, 22) Source(96, 4) + SourceIndex(0) +1 >Emitted(96, 21) Source(96, 3) + SourceIndex(0) +2 >Emitted(96, 22) Source(96, 4) + SourceIndex(0) --- >>> return Mode; 1->^^^^^^^^^^^^^^^^^^^^ @@ -1714,8 +1715,8 @@ sourceFile:recursiveClassReferenceTest.ts > > 2 > } -1->Emitted(96, 21) Source(99, 2) + SourceIndex(0) -2 >Emitted(96, 32) Source(99, 3) + SourceIndex(0) +1->Emitted(97, 21) Source(99, 2) + SourceIndex(0) +2 >Emitted(97, 32) Source(99, 3) + SourceIndex(0) --- >>> }(AbstractMode)); 1->^^^^^^^^^^^^^^^^ @@ -1739,12 +1740,12 @@ sourceFile:recursiveClassReferenceTest.ts > > > } -1->Emitted(97, 17) Source(99, 2) + SourceIndex(0) -2 >Emitted(97, 18) Source(99, 3) + SourceIndex(0) -3 >Emitted(97, 18) Source(91, 2) + SourceIndex(0) -4 >Emitted(97, 19) Source(91, 28) + SourceIndex(0) -5 >Emitted(97, 31) Source(91, 40) + SourceIndex(0) -6 >Emitted(97, 34) Source(99, 3) + SourceIndex(0) +1->Emitted(98, 17) Source(99, 2) + SourceIndex(0) +2 >Emitted(98, 18) Source(99, 3) + SourceIndex(0) +3 >Emitted(98, 18) Source(91, 2) + SourceIndex(0) +4 >Emitted(98, 19) Source(91, 28) + SourceIndex(0) +5 >Emitted(98, 31) Source(91, 40) + SourceIndex(0) +6 >Emitted(98, 34) Source(99, 3) + SourceIndex(0) --- >>> PlainText.Mode = Mode; 1->^^^^^^^^^^^^^^^^ @@ -1764,10 +1765,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } 4 > -1->Emitted(98, 17) Source(91, 15) + SourceIndex(0) -2 >Emitted(98, 31) Source(91, 19) + SourceIndex(0) -3 >Emitted(98, 38) Source(99, 3) + SourceIndex(0) -4 >Emitted(98, 39) Source(99, 3) + SourceIndex(0) +1->Emitted(99, 17) Source(91, 15) + SourceIndex(0) +2 >Emitted(99, 31) Source(91, 19) + SourceIndex(0) +3 >Emitted(99, 38) Source(99, 3) + SourceIndex(0) +4 >Emitted(99, 39) Source(99, 3) + SourceIndex(0) --- >>> })(PlainText = Languages.PlainText || (Languages.PlainText = {})); 1->^^^^^^^^^^^^ @@ -1813,15 +1814,15 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1->Emitted(99, 13) Source(100, 1) + SourceIndex(0) -2 >Emitted(99, 14) Source(100, 2) + SourceIndex(0) -3 >Emitted(99, 16) Source(76, 31) + SourceIndex(0) -4 >Emitted(99, 25) Source(76, 40) + SourceIndex(0) -5 >Emitted(99, 28) Source(76, 31) + SourceIndex(0) -6 >Emitted(99, 47) Source(76, 40) + SourceIndex(0) -7 >Emitted(99, 52) Source(76, 31) + SourceIndex(0) -8 >Emitted(99, 71) Source(76, 40) + SourceIndex(0) -9 >Emitted(99, 79) Source(100, 2) + SourceIndex(0) +1->Emitted(100, 13) Source(100, 1) + SourceIndex(0) +2 >Emitted(100, 14) Source(100, 2) + SourceIndex(0) +3 >Emitted(100, 16) Source(76, 31) + SourceIndex(0) +4 >Emitted(100, 25) Source(76, 40) + SourceIndex(0) +5 >Emitted(100, 28) Source(76, 31) + SourceIndex(0) +6 >Emitted(100, 47) Source(76, 40) + SourceIndex(0) +7 >Emitted(100, 52) Source(76, 31) + SourceIndex(0) +8 >Emitted(100, 71) Source(76, 40) + SourceIndex(0) +9 >Emitted(100, 79) Source(100, 2) + SourceIndex(0) --- >>> })(Languages = Thing.Languages || (Thing.Languages = {})); 1 >^^^^^^^^ @@ -1866,15 +1867,15 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(100, 9) Source(100, 1) + SourceIndex(0) -2 >Emitted(100, 10) Source(100, 2) + SourceIndex(0) -3 >Emitted(100, 12) Source(76, 21) + SourceIndex(0) -4 >Emitted(100, 21) Source(76, 30) + SourceIndex(0) -5 >Emitted(100, 24) Source(76, 21) + SourceIndex(0) -6 >Emitted(100, 39) Source(76, 30) + SourceIndex(0) -7 >Emitted(100, 44) Source(76, 21) + SourceIndex(0) -8 >Emitted(100, 59) Source(76, 30) + SourceIndex(0) -9 >Emitted(100, 67) Source(100, 2) + SourceIndex(0) +1 >Emitted(101, 9) Source(100, 1) + SourceIndex(0) +2 >Emitted(101, 10) Source(100, 2) + SourceIndex(0) +3 >Emitted(101, 12) Source(76, 21) + SourceIndex(0) +4 >Emitted(101, 21) Source(76, 30) + SourceIndex(0) +5 >Emitted(101, 24) Source(76, 21) + SourceIndex(0) +6 >Emitted(101, 39) Source(76, 30) + SourceIndex(0) +7 >Emitted(101, 44) Source(76, 21) + SourceIndex(0) +8 >Emitted(101, 59) Source(76, 30) + SourceIndex(0) +9 >Emitted(101, 67) Source(100, 2) + SourceIndex(0) --- >>> })(Thing = Sample.Thing || (Sample.Thing = {})); 1 >^^^^ @@ -1919,15 +1920,15 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(101, 5) Source(100, 1) + SourceIndex(0) -2 >Emitted(101, 6) Source(100, 2) + SourceIndex(0) -3 >Emitted(101, 8) Source(76, 15) + SourceIndex(0) -4 >Emitted(101, 13) Source(76, 20) + SourceIndex(0) -5 >Emitted(101, 16) Source(76, 15) + SourceIndex(0) -6 >Emitted(101, 28) Source(76, 20) + SourceIndex(0) -7 >Emitted(101, 33) Source(76, 15) + SourceIndex(0) -8 >Emitted(101, 45) Source(76, 20) + SourceIndex(0) -9 >Emitted(101, 53) Source(100, 2) + SourceIndex(0) +1 >Emitted(102, 5) Source(100, 1) + SourceIndex(0) +2 >Emitted(102, 6) Source(100, 2) + SourceIndex(0) +3 >Emitted(102, 8) Source(76, 15) + SourceIndex(0) +4 >Emitted(102, 13) Source(76, 20) + SourceIndex(0) +5 >Emitted(102, 16) Source(76, 15) + SourceIndex(0) +6 >Emitted(102, 28) Source(76, 20) + SourceIndex(0) +7 >Emitted(102, 33) Source(76, 15) + SourceIndex(0) +8 >Emitted(102, 45) Source(76, 20) + SourceIndex(0) +9 >Emitted(102, 53) Source(100, 2) + SourceIndex(0) --- >>>})(Sample || (Sample = {})); 1 > @@ -1969,12 +1970,12 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(102, 1) Source(100, 1) + SourceIndex(0) -2 >Emitted(102, 2) Source(100, 2) + SourceIndex(0) -3 >Emitted(102, 4) Source(76, 8) + SourceIndex(0) -4 >Emitted(102, 10) Source(76, 14) + SourceIndex(0) -5 >Emitted(102, 15) Source(76, 8) + SourceIndex(0) -6 >Emitted(102, 21) Source(76, 14) + SourceIndex(0) -7 >Emitted(102, 29) Source(100, 2) + SourceIndex(0) +1 >Emitted(103, 1) Source(100, 1) + SourceIndex(0) +2 >Emitted(103, 2) Source(100, 2) + SourceIndex(0) +3 >Emitted(103, 4) Source(76, 8) + SourceIndex(0) +4 >Emitted(103, 10) Source(76, 14) + SourceIndex(0) +5 >Emitted(103, 15) Source(76, 8) + SourceIndex(0) +6 >Emitted(103, 21) Source(76, 14) + SourceIndex(0) +7 >Emitted(103, 29) Source(100, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=recursiveClassReferenceTest.js.map \ No newline at end of file diff --git a/tests/baselines/reference/recursiveComplicatedClasses.js b/tests/baselines/reference/recursiveComplicatedClasses.js index 9544c60b9f5..f1f34e272f1 100644 --- a/tests/baselines/reference/recursiveComplicatedClasses.js +++ b/tests/baselines/reference/recursiveComplicatedClasses.js @@ -25,15 +25,16 @@ class TypeSymbol extends InferenceSymbol { } //// [recursiveComplicatedClasses.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Signature = (function () { function Signature() { this.parameters = null; diff --git a/tests/baselines/reference/recursivelySpecializedConstructorDeclaration.js b/tests/baselines/reference/recursivelySpecializedConstructorDeclaration.js index e7c3ce7a3ce..e2a2e8dccff 100644 --- a/tests/baselines/reference/recursivelySpecializedConstructorDeclaration.js +++ b/tests/baselines/reference/recursivelySpecializedConstructorDeclaration.js @@ -30,15 +30,16 @@ declare module MsPortal.Controls.Base.ItemList { */ //// [recursivelySpecializedConstructorDeclaration.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var MsPortal; (function (MsPortal) { var Controls; diff --git a/tests/baselines/reference/reexportClassDefinition.js b/tests/baselines/reference/reexportClassDefinition.js index db5486b1af7..bbaf78a0283 100644 --- a/tests/baselines/reference/reexportClassDefinition.js +++ b/tests/baselines/reference/reexportClassDefinition.js @@ -33,15 +33,16 @@ module.exports = { }; //// [foo3.js] "use strict"; -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var foo2 = require("./foo2"); var x = (function (_super) { __extends(x, _super); diff --git a/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js b/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js index bdea9b287bb..cf9592ab4b2 100644 --- a/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js +++ b/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js @@ -1020,15 +1020,16 @@ module caurinus { //// [resolvingClassDeclarationWhenInBaseTypeResolution.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var rionegrensis; (function (rionegrensis) { var caniventer = (function (_super) { diff --git a/tests/baselines/reference/returnInConstructor1.js b/tests/baselines/reference/returnInConstructor1.js index 625028055b4..0a71ab129a8 100644 --- a/tests/baselines/reference/returnInConstructor1.js +++ b/tests/baselines/reference/returnInConstructor1.js @@ -67,15 +67,16 @@ class I extends G { //// [returnInConstructor1.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { return; diff --git a/tests/baselines/reference/returnStatements.js b/tests/baselines/reference/returnStatements.js index b62ef87dadc..999d12f15f8 100644 --- a/tests/baselines/reference/returnStatements.js +++ b/tests/baselines/reference/returnStatements.js @@ -25,15 +25,16 @@ function fn13(): C { return null; } //// [returnStatements.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); // all the following should be valid function fn1() { return 1; } function fn2() { return ''; } diff --git a/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.js b/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.js index 3fdc1795c32..33723f36d6a 100644 --- a/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.js +++ b/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.js @@ -9,15 +9,16 @@ class D extends C { } //// [scopeCheckExtendedClassInsidePublicMethod2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.js b/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.js index 237faa00fe3..bac44a57ac0 100644 --- a/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.js +++ b/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.js @@ -9,15 +9,16 @@ class D extends C { } //// [scopeCheckExtendedClassInsideStaticMethod1.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/scopeTests.js b/tests/baselines/reference/scopeTests.js index 6090536a099..0086a0b08ce 100644 --- a/tests/baselines/reference/scopeTests.js +++ b/tests/baselines/reference/scopeTests.js @@ -12,15 +12,16 @@ class D extends C { } //// [scopeTests.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/shadowPrivateMembers.js b/tests/baselines/reference/shadowPrivateMembers.js index d842185b47c..2c56c8ddada 100644 --- a/tests/baselines/reference/shadowPrivateMembers.js +++ b/tests/baselines/reference/shadowPrivateMembers.js @@ -4,15 +4,16 @@ class derived extends base { private n() {} } //// [shadowPrivateMembers.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var base = (function () { function base() { } diff --git a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js index b5216c1c168..b07cc2e8d8e 100644 --- a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js +++ b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js @@ -8,15 +8,16 @@ class Greeter extends AbstractGreeter { } //// [sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var AbstractGreeter = (function () { function AbstractGreeter() { } diff --git a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js.map b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js.map index 27577a7e338..6de0ba822fa 100644 --- a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js.map +++ b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js.map] -{"version":3,"file":"sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js","sourceRoot":"","sources":["sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts"],"names":[],"mappings":";;;;;;;;;AAAA;IAAA;IACA,CAAC;IAAD,sBAAC;AAAD,CAAC,AADD,IACC;AAED;IAAsB,2BAAe;IAArC;QAAA,kDAGC;QAFU,OAAC,GAAG,EAAE,CAAC;QACP,WAAK,GAAG,KAAK,CAAC;;IACzB,CAAC;IAAD,cAAC;AAAD,CAAC,AAHD,CAAsB,eAAe,GAGpC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js","sourceRoot":"","sources":["sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts"],"names":[],"mappings":";;;;;;;;;;AAAA;IAAA;IACA,CAAC;IAAD,sBAAC;AAAD,CAAC,AADD,IACC;AAED;IAAsB,2BAAe;IAArC;QAAA,kDAGC;QAFU,OAAC,GAAG,EAAE,CAAC;QACP,WAAK,GAAG,KAAK,CAAC;;IACzB,CAAC;IAAD,cAAC;AAAD,CAAC,AAHD,CAAsB,eAAe,GAGpC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt index 2ca29e33e91..00e15a91e19 100644 --- a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt @@ -8,26 +8,27 @@ sources: sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts emittedFile:tests/cases/compiler/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts ------------------------------------------------------------------- ->>>var __extendStatics = (this && this.__extendStatics) || ->>> Object.setPrototypeOf || ->>> ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || ->>> function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; ->>>var __extends = (this && this.__extends) || function (d, b) { ->>> __extendStatics(d, b); ->>> function __() { this.constructor = d; } ->>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); ->>>}; +>>>var __extends = (this && this.__extends) || (function () { +>>> var __extendStatics = Object.setPrototypeOf || +>>> ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +>>> function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; +>>> return function (d, b) { +>>> __extendStatics(d, b); +>>> function __() { this.constructor = d; } +>>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +>>> }; +>>>})(); >>>var AbstractGreeter = (function () { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > -1 >Emitted(10, 1) Source(1, 1) + SourceIndex(0) +1 >Emitted(11, 1) Source(1, 1) + SourceIndex(0) --- >>> function AbstractGreeter() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(11, 5) Source(1, 1) + SourceIndex(0) +1->Emitted(12, 5) Source(1, 1) + SourceIndex(0) --- >>> } 1->^^^^ @@ -36,16 +37,16 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts 1->class AbstractGreeter { > 2 > } -1->Emitted(12, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(12, 6) Source(2, 2) + SourceIndex(0) +1->Emitted(13, 5) Source(2, 1) + SourceIndex(0) +2 >Emitted(13, 6) Source(2, 2) + SourceIndex(0) --- >>> return AbstractGreeter; 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(13, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(13, 27) Source(2, 2) + SourceIndex(0) +1->Emitted(14, 5) Source(2, 1) + SourceIndex(0) +2 >Emitted(14, 27) Source(2, 2) + SourceIndex(0) --- >>>}()); 1 > @@ -58,10 +59,10 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts 3 > 4 > class AbstractGreeter { > } -1 >Emitted(14, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(14, 2) Source(2, 2) + SourceIndex(0) -3 >Emitted(14, 2) Source(1, 1) + SourceIndex(0) -4 >Emitted(14, 6) Source(2, 2) + SourceIndex(0) +1 >Emitted(15, 1) Source(2, 1) + SourceIndex(0) +2 >Emitted(15, 2) Source(2, 2) + SourceIndex(0) +3 >Emitted(15, 2) Source(1, 1) + SourceIndex(0) +4 >Emitted(15, 6) Source(2, 2) + SourceIndex(0) --- >>>var Greeter = (function (_super) { 1-> @@ -69,21 +70,21 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts 1-> > > -1->Emitted(15, 1) Source(4, 1) + SourceIndex(0) +1->Emitted(16, 1) Source(4, 1) + SourceIndex(0) --- >>> __extends(Greeter, _super); 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1->class Greeter extends 2 > AbstractGreeter -1->Emitted(16, 5) Source(4, 23) + SourceIndex(0) -2 >Emitted(16, 32) Source(4, 38) + SourceIndex(0) +1->Emitted(17, 5) Source(4, 23) + SourceIndex(0) +2 >Emitted(17, 32) Source(4, 38) + SourceIndex(0) --- >>> function Greeter() { 1 >^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > -1 >Emitted(17, 5) Source(4, 1) + SourceIndex(0) +1 >Emitted(18, 5) Source(4, 1) + SourceIndex(0) --- >>> var _this = _super.apply(this, arguments) || this; 1->^^^^^^^^ @@ -93,8 +94,8 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts > public a = 10; > public nameA = "Ten"; > } -1->Emitted(18, 9) Source(4, 1) + SourceIndex(0) -2 >Emitted(18, 59) Source(7, 2) + SourceIndex(0) +1->Emitted(19, 9) Source(4, 1) + SourceIndex(0) +2 >Emitted(19, 59) Source(7, 2) + SourceIndex(0) --- >>> _this.a = 10; 1 >^^^^^^^^ @@ -108,11 +109,11 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts 3 > = 4 > 10 5 > ; -1 >Emitted(19, 9) Source(5, 12) + SourceIndex(0) -2 >Emitted(19, 16) Source(5, 13) + SourceIndex(0) -3 >Emitted(19, 19) Source(5, 16) + SourceIndex(0) -4 >Emitted(19, 21) Source(5, 18) + SourceIndex(0) -5 >Emitted(19, 22) Source(5, 19) + SourceIndex(0) +1 >Emitted(20, 9) Source(5, 12) + SourceIndex(0) +2 >Emitted(20, 16) Source(5, 13) + SourceIndex(0) +3 >Emitted(20, 19) Source(5, 16) + SourceIndex(0) +4 >Emitted(20, 21) Source(5, 18) + SourceIndex(0) +5 >Emitted(20, 22) Source(5, 19) + SourceIndex(0) --- >>> _this.nameA = "Ten"; 1->^^^^^^^^ @@ -126,11 +127,11 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts 3 > = 4 > "Ten" 5 > ; -1->Emitted(20, 9) Source(6, 12) + SourceIndex(0) -2 >Emitted(20, 20) Source(6, 17) + SourceIndex(0) -3 >Emitted(20, 23) Source(6, 20) + SourceIndex(0) -4 >Emitted(20, 28) Source(6, 25) + SourceIndex(0) -5 >Emitted(20, 29) Source(6, 26) + SourceIndex(0) +1->Emitted(21, 9) Source(6, 12) + SourceIndex(0) +2 >Emitted(21, 20) Source(6, 17) + SourceIndex(0) +3 >Emitted(21, 23) Source(6, 20) + SourceIndex(0) +4 >Emitted(21, 28) Source(6, 25) + SourceIndex(0) +5 >Emitted(21, 29) Source(6, 26) + SourceIndex(0) --- >>> return _this; >>> } @@ -140,8 +141,8 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts 1 > > 2 > } -1 >Emitted(22, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(22, 6) Source(7, 2) + SourceIndex(0) +1 >Emitted(23, 5) Source(7, 1) + SourceIndex(0) +2 >Emitted(23, 6) Source(7, 2) + SourceIndex(0) --- >>> return Greeter; 1->^^^^ @@ -149,8 +150,8 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts 3 > ^^^-> 1-> 2 > } -1->Emitted(23, 5) Source(7, 1) + SourceIndex(0) -2 >Emitted(23, 19) Source(7, 2) + SourceIndex(0) +1->Emitted(24, 5) Source(7, 1) + SourceIndex(0) +2 >Emitted(24, 19) Source(7, 2) + SourceIndex(0) --- >>>}(AbstractGreeter)); 1-> @@ -169,11 +170,11 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts > public a = 10; > public nameA = "Ten"; > } -1->Emitted(24, 1) Source(7, 1) + SourceIndex(0) -2 >Emitted(24, 2) Source(7, 2) + SourceIndex(0) -3 >Emitted(24, 2) Source(4, 1) + SourceIndex(0) -4 >Emitted(24, 3) Source(4, 23) + SourceIndex(0) -5 >Emitted(24, 18) Source(4, 38) + SourceIndex(0) -6 >Emitted(24, 21) Source(7, 2) + SourceIndex(0) +1->Emitted(25, 1) Source(7, 1) + SourceIndex(0) +2 >Emitted(25, 2) Source(7, 2) + SourceIndex(0) +3 >Emitted(25, 2) Source(4, 1) + SourceIndex(0) +4 >Emitted(25, 3) Source(4, 23) + SourceIndex(0) +5 >Emitted(25, 18) Source(4, 38) + SourceIndex(0) +6 >Emitted(25, 21) Source(7, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js.map \ No newline at end of file diff --git a/tests/baselines/reference/specializedInheritedConstructors1.js b/tests/baselines/reference/specializedInheritedConstructors1.js index 76d6da2d5d2..3904422842f 100644 --- a/tests/baselines/reference/specializedInheritedConstructors1.js +++ b/tests/baselines/reference/specializedInheritedConstructors1.js @@ -18,15 +18,16 @@ var myView = new MyView(m); // was error //// [specializedInheritedConstructors1.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var View = (function () { function View(options) { } diff --git a/tests/baselines/reference/specializedOverloadWithRestParameters.js b/tests/baselines/reference/specializedOverloadWithRestParameters.js index d1bf0a0d636..a40be7711c1 100644 --- a/tests/baselines/reference/specializedOverloadWithRestParameters.js +++ b/tests/baselines/reference/specializedOverloadWithRestParameters.js @@ -13,15 +13,16 @@ function g(tagName: any): Base { } //// [specializedOverloadWithRestParameters.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/staticFactory1.js b/tests/baselines/reference/staticFactory1.js index 63ea3a01253..77ce4a3d8bc 100644 --- a/tests/baselines/reference/staticFactory1.js +++ b/tests/baselines/reference/staticFactory1.js @@ -14,15 +14,16 @@ var d = Derived.create(); d.foo(); //// [staticFactory1.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/staticInheritance.js b/tests/baselines/reference/staticInheritance.js index 91fa33abd51..a603fc607b9 100644 --- a/tests/baselines/reference/staticInheritance.js +++ b/tests/baselines/reference/staticInheritance.js @@ -12,15 +12,16 @@ doThing(B); //OK //// [staticInheritance.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); function doThing(x) { } var A = (function () { function A() { diff --git a/tests/baselines/reference/staticMemberAccessOffDerivedType1.js b/tests/baselines/reference/staticMemberAccessOffDerivedType1.js index ee1f12df69e..f07c4e9ae0f 100644 --- a/tests/baselines/reference/staticMemberAccessOffDerivedType1.js +++ b/tests/baselines/reference/staticMemberAccessOffDerivedType1.js @@ -10,15 +10,16 @@ class P extends SomeBase { //// [staticMemberAccessOffDerivedType1.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var SomeBase = (function () { function SomeBase() { } diff --git a/tests/baselines/reference/staticPropSuper.js b/tests/baselines/reference/staticPropSuper.js index 241ebc529fb..dd36b0928f0 100644 --- a/tests/baselines/reference/staticPropSuper.js +++ b/tests/baselines/reference/staticPropSuper.js @@ -36,15 +36,16 @@ class E extends A { } //// [staticPropSuper.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/strictModeInConstructor.js b/tests/baselines/reference/strictModeInConstructor.js index 71165d41360..9c289a209b5 100644 --- a/tests/baselines/reference/strictModeInConstructor.js +++ b/tests/baselines/reference/strictModeInConstructor.js @@ -61,15 +61,16 @@ class Ds extends A { } //// [strictModeInConstructor.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/strictModeReservedWord.js b/tests/baselines/reference/strictModeReservedWord.js index ec075461129..614f20eafd6 100644 --- a/tests/baselines/reference/strictModeReservedWord.js +++ b/tests/baselines/reference/strictModeReservedWord.js @@ -28,15 +28,16 @@ function foo() { //// [strictModeReservedWord.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var let = 10; function foo() { "use strict"; diff --git a/tests/baselines/reference/strictModeReservedWordInClassDeclaration.js b/tests/baselines/reference/strictModeReservedWordInClassDeclaration.js index fdf72090f2f..344f4edb83d 100644 --- a/tests/baselines/reference/strictModeReservedWordInClassDeclaration.js +++ b/tests/baselines/reference/strictModeReservedWordInClassDeclaration.js @@ -29,15 +29,16 @@ class G extends package { } class H extends package.A { } //// [strictModeReservedWordInClassDeclaration.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Foo = (function () { function Foo(private, public, static) { private = public = static; diff --git a/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js b/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js index dd9341b4a42..5fdc2444791 100644 --- a/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js +++ b/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js @@ -41,15 +41,16 @@ var b: { [x: string]: A } = { //// [stringIndexerConstrainsPropertyDeclarations2.js] // String indexer providing a constraint of a user defined type -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/subtypesOfTypeParameter.js b/tests/baselines/reference/subtypesOfTypeParameter.js index 8abd40b7eb5..d5d790c4d4f 100644 --- a/tests/baselines/reference/subtypesOfTypeParameter.js +++ b/tests/baselines/reference/subtypesOfTypeParameter.js @@ -107,15 +107,16 @@ function f2(x: T, y: U) { //// [subtypesOfTypeParameter.js] // checking whether other types are subtypes of type parameters -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C3 = (function () { function C3() { } diff --git a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints.js b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints.js index 034b55ee1fc..20685aaf52c 100644 --- a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints.js +++ b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints.js @@ -169,15 +169,16 @@ class D29 extends C3 { //// [subtypesOfTypeParameterWithConstraints.js] // checking whether other types are subtypes of type parameters with constraints -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C3 = (function () { function C3() { } diff --git a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints4.js b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints4.js index b2f4f3eca49..dbcdd47ba6d 100644 --- a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints4.js +++ b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints4.js @@ -80,15 +80,16 @@ class D9 extends B1 { //// [subtypesOfTypeParameterWithConstraints4.js] // checking whether other types are subtypes of type parameters with constraints -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Foo = (function () { function Foo() { } diff --git a/tests/baselines/reference/subtypesOfTypeParameterWithRecursiveConstraints.js b/tests/baselines/reference/subtypesOfTypeParameterWithRecursiveConstraints.js index 413f915a618..7b1a7738d99 100644 --- a/tests/baselines/reference/subtypesOfTypeParameterWithRecursiveConstraints.js +++ b/tests/baselines/reference/subtypesOfTypeParameterWithRecursiveConstraints.js @@ -159,15 +159,16 @@ module M2 { //// [subtypesOfTypeParameterWithRecursiveConstraints.js] // checking whether other types are subtypes of type parameters with constraints -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Foo = (function () { function Foo() { } diff --git a/tests/baselines/reference/subtypingTransitivity.js b/tests/baselines/reference/subtypingTransitivity.js index 23c51619c80..82a814c9c41 100644 --- a/tests/baselines/reference/subtypingTransitivity.js +++ b/tests/baselines/reference/subtypingTransitivity.js @@ -20,15 +20,16 @@ b.x = 1; // assigned number to string //// [subtypingTransitivity.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var B = (function () { function B() { } diff --git a/tests/baselines/reference/subtypingWithCallSignatures2.js b/tests/baselines/reference/subtypingWithCallSignatures2.js index 0e16d43f216..9e080909067 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures2.js +++ b/tests/baselines/reference/subtypingWithCallSignatures2.js @@ -174,15 +174,16 @@ var r18 = foo18(r18arg1); //// [subtypingWithCallSignatures2.js] // checking subtype relations for function types as it relates to contextual signature instantiation -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/subtypingWithCallSignatures3.js b/tests/baselines/reference/subtypingWithCallSignatures3.js index f17007cba42..64b182872f6 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures3.js +++ b/tests/baselines/reference/subtypingWithCallSignatures3.js @@ -121,15 +121,16 @@ module WithGenericSignaturesInBaseType { //// [subtypingWithCallSignatures3.js] // checking subtype relations for function types as it relates to contextual signature instantiation // error cases, so function calls will all result in 'any' -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Errors; (function (Errors) { var Base = (function () { diff --git a/tests/baselines/reference/subtypingWithCallSignatures4.js b/tests/baselines/reference/subtypingWithCallSignatures4.js index e6030bdb12d..e5770b58dfc 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures4.js +++ b/tests/baselines/reference/subtypingWithCallSignatures4.js @@ -113,15 +113,16 @@ var r18 = foo18(r18arg); //// [subtypingWithCallSignatures4.js] // checking subtype relations for function types as it relates to contextual signature instantiation -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/subtypingWithConstructSignatures2.js b/tests/baselines/reference/subtypingWithConstructSignatures2.js index 24914baf2ed..5961a930dca 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures2.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures2.js @@ -174,15 +174,16 @@ var r18 = foo18(r18arg1); //// [subtypingWithConstructSignatures2.js] // checking subtype relations for function types as it relates to contextual signature instantiation -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/subtypingWithConstructSignatures3.js b/tests/baselines/reference/subtypingWithConstructSignatures3.js index f1153675c91..62c46d8add9 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures3.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures3.js @@ -123,15 +123,16 @@ module WithGenericSignaturesInBaseType { //// [subtypingWithConstructSignatures3.js] // checking subtype relations for function types as it relates to contextual signature instantiation // error cases, so function calls will all result in 'any' -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Errors; (function (Errors) { var Base = (function () { diff --git a/tests/baselines/reference/subtypingWithConstructSignatures4.js b/tests/baselines/reference/subtypingWithConstructSignatures4.js index 10246582f12..93415f6d2e6 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures4.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures4.js @@ -113,15 +113,16 @@ var r18 = foo18(r18arg); //// [subtypingWithConstructSignatures4.js] // checking subtype relations for function types as it relates to contextual signature instantiation -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/subtypingWithConstructSignatures5.js b/tests/baselines/reference/subtypingWithConstructSignatures5.js index 7d3f9516c29..64e9965cb85 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures5.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures5.js @@ -51,15 +51,16 @@ interface I extends B { //// [subtypingWithConstructSignatures5.js] // checking subtype relations for function types as it relates to contextual signature instantiation // same as subtypingWithConstructSignatures2 just with an extra level of indirection in the inheritance chain -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/subtypingWithConstructSignatures6.js b/tests/baselines/reference/subtypingWithConstructSignatures6.js index 39f4e91f011..247fcbbd1bc 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures6.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures6.js @@ -54,15 +54,16 @@ interface I9 extends A { // checking subtype relations for function types as it relates to contextual signature instantiation // same as subtypingWithConstructSignatures4 but using class type parameters instead of generic signatures // all are errors -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/subtypingWithNumericIndexer.js b/tests/baselines/reference/subtypingWithNumericIndexer.js index 994c5597569..835f82c72b9 100644 --- a/tests/baselines/reference/subtypingWithNumericIndexer.js +++ b/tests/baselines/reference/subtypingWithNumericIndexer.js @@ -41,15 +41,16 @@ module Generics { //// [subtypingWithNumericIndexer.js] // Derived type indexer must be subtype of base type indexer -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/subtypingWithNumericIndexer3.js b/tests/baselines/reference/subtypingWithNumericIndexer3.js index 25963e70449..761739f547f 100644 --- a/tests/baselines/reference/subtypingWithNumericIndexer3.js +++ b/tests/baselines/reference/subtypingWithNumericIndexer3.js @@ -45,15 +45,16 @@ module Generics { //// [subtypingWithNumericIndexer3.js] // Derived type indexer must be subtype of base type indexer -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/subtypingWithNumericIndexer4.js b/tests/baselines/reference/subtypingWithNumericIndexer4.js index 304dbee9e61..3d8bac24a79 100644 --- a/tests/baselines/reference/subtypingWithNumericIndexer4.js +++ b/tests/baselines/reference/subtypingWithNumericIndexer4.js @@ -29,15 +29,16 @@ module Generics { //// [subtypingWithNumericIndexer4.js] // Derived type indexer must be subtype of base type indexer -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/subtypingWithObjectMembers.js b/tests/baselines/reference/subtypingWithObjectMembers.js index 0733679a120..7526548f24e 100644 --- a/tests/baselines/reference/subtypingWithObjectMembers.js +++ b/tests/baselines/reference/subtypingWithObjectMembers.js @@ -68,15 +68,16 @@ module TwoLevels { } //// [subtypingWithObjectMembers.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/subtypingWithObjectMembers4.js b/tests/baselines/reference/subtypingWithObjectMembers4.js index 4b41ee1aaa7..ae620141587 100644 --- a/tests/baselines/reference/subtypingWithObjectMembers4.js +++ b/tests/baselines/reference/subtypingWithObjectMembers4.js @@ -35,15 +35,16 @@ class B3 extends A3 { //// [subtypingWithObjectMembers4.js] // subtyping when property names do not match -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/subtypingWithObjectMembersAccessibility.js b/tests/baselines/reference/subtypingWithObjectMembersAccessibility.js index 976a7e1b8cd..54995020573 100644 --- a/tests/baselines/reference/subtypingWithObjectMembersAccessibility.js +++ b/tests/baselines/reference/subtypingWithObjectMembersAccessibility.js @@ -35,15 +35,16 @@ class B3 extends A3 { //// [subtypingWithObjectMembersAccessibility.js] // Derived member is private, base member is not causes errors -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.js b/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.js index 9c2e2257112..a2aca0d13bd 100644 --- a/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.js +++ b/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.js @@ -63,15 +63,16 @@ module ImplicitPublic { //// [subtypingWithObjectMembersAccessibility2.js] // Derived member is private, base member is not causes errors -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/subtypingWithStringIndexer.js b/tests/baselines/reference/subtypingWithStringIndexer.js index 042684e0c04..7418e3dcb40 100644 --- a/tests/baselines/reference/subtypingWithStringIndexer.js +++ b/tests/baselines/reference/subtypingWithStringIndexer.js @@ -42,15 +42,16 @@ module Generics { //// [subtypingWithStringIndexer.js] // Derived type indexer must be subtype of base type indexer -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/subtypingWithStringIndexer3.js b/tests/baselines/reference/subtypingWithStringIndexer3.js index 23e7dbe37b6..081219774e5 100644 --- a/tests/baselines/reference/subtypingWithStringIndexer3.js +++ b/tests/baselines/reference/subtypingWithStringIndexer3.js @@ -45,15 +45,16 @@ module Generics { //// [subtypingWithStringIndexer3.js] // Derived type indexer must be subtype of base type indexer -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/subtypingWithStringIndexer4.js b/tests/baselines/reference/subtypingWithStringIndexer4.js index e17f0308609..b0c55cf6398 100644 --- a/tests/baselines/reference/subtypingWithStringIndexer4.js +++ b/tests/baselines/reference/subtypingWithStringIndexer4.js @@ -29,15 +29,16 @@ module Generics { //// [subtypingWithStringIndexer4.js] // Derived type indexer must be subtype of base type indexer -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/super.js b/tests/baselines/reference/super.js index a801d126895..8984c5860ea 100644 --- a/tests/baselines/reference/super.js +++ b/tests/baselines/reference/super.js @@ -38,15 +38,16 @@ s.foo() + ss.foo(); //// [super.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { var x; diff --git a/tests/baselines/reference/super1.js b/tests/baselines/reference/super1.js index bc1160411ae..49a057a7f49 100644 --- a/tests/baselines/reference/super1.js +++ b/tests/baselines/reference/super1.js @@ -67,15 +67,16 @@ module Base4 { //// [super1.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); // Case 1 var Base1 = (function () { function Base1() { diff --git a/tests/baselines/reference/super2.js b/tests/baselines/reference/super2.js index cac924a6b69..451c569c907 100644 --- a/tests/baselines/reference/super2.js +++ b/tests/baselines/reference/super2.js @@ -51,15 +51,16 @@ results1.x() + results1.y() + results2.y(); //// [super2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); // Case 5 var Base5 = (function () { function Base5() { diff --git a/tests/baselines/reference/superAccess.js b/tests/baselines/reference/superAccess.js index 1c37353813c..a218ba0968a 100644 --- a/tests/baselines/reference/superAccess.js +++ b/tests/baselines/reference/superAccess.js @@ -14,15 +14,16 @@ class MyDerived extends MyBase { } //// [superAccess.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var MyBase = (function () { function MyBase() { this.S2 = "test"; diff --git a/tests/baselines/reference/superAccess2.js b/tests/baselines/reference/superAccess2.js index b1476e5c8e6..d678ff22480 100644 --- a/tests/baselines/reference/superAccess2.js +++ b/tests/baselines/reference/superAccess2.js @@ -25,15 +25,16 @@ class Q extends P { } //// [superAccess2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var P = (function () { function P() { } diff --git a/tests/baselines/reference/superAccessInFatArrow1.js b/tests/baselines/reference/superAccessInFatArrow1.js index c9208194e37..a58b119c67f 100644 --- a/tests/baselines/reference/superAccessInFatArrow1.js +++ b/tests/baselines/reference/superAccessInFatArrow1.js @@ -16,15 +16,16 @@ module test { } //// [superAccessInFatArrow1.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var test; (function (test) { var A = (function () { diff --git a/tests/baselines/reference/superCallArgsMustMatch.js b/tests/baselines/reference/superCallArgsMustMatch.js index a37a07439be..d488506e019 100644 --- a/tests/baselines/reference/superCallArgsMustMatch.js +++ b/tests/baselines/reference/superCallArgsMustMatch.js @@ -26,15 +26,16 @@ class T6 extends T5{ //// [superCallArgsMustMatch.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var T5 = (function () { function T5(bar) { this.bar = bar; diff --git a/tests/baselines/reference/superCallAssignResult.js b/tests/baselines/reference/superCallAssignResult.js index 6fa77382691..50e1c20b6bc 100644 --- a/tests/baselines/reference/superCallAssignResult.js +++ b/tests/baselines/reference/superCallAssignResult.js @@ -11,15 +11,16 @@ class H extends E { } //// [superCallAssignResult.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var E = (function () { function E(arg) { } diff --git a/tests/baselines/reference/superCallBeforeThisAccessing1.js b/tests/baselines/reference/superCallBeforeThisAccessing1.js index 9990b5e7e1a..71c9e05e7cb 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing1.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing1.js @@ -17,15 +17,16 @@ class D extends Base { //// [superCallBeforeThisAccessing1.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base(c) { } diff --git a/tests/baselines/reference/superCallBeforeThisAccessing2.js b/tests/baselines/reference/superCallBeforeThisAccessing2.js index a7ef99d67cc..a18505f8203 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing2.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing2.js @@ -11,15 +11,16 @@ class D extends Base { //// [superCallBeforeThisAccessing2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base(c) { } diff --git a/tests/baselines/reference/superCallBeforeThisAccessing3.js b/tests/baselines/reference/superCallBeforeThisAccessing3.js index 90156d199d5..61ed4fe5c4c 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing3.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing3.js @@ -14,15 +14,16 @@ class D extends Base { //// [superCallBeforeThisAccessing3.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base(c) { } diff --git a/tests/baselines/reference/superCallBeforeThisAccessing4.js b/tests/baselines/reference/superCallBeforeThisAccessing4.js index e42decf54e8..cf5e9e89eba 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing4.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing4.js @@ -16,15 +16,16 @@ class E extends null { } //// [superCallBeforeThisAccessing4.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var D = (function (_super) { __extends(D, _super); function D() { diff --git a/tests/baselines/reference/superCallBeforeThisAccessing5.js b/tests/baselines/reference/superCallBeforeThisAccessing5.js index 8477c576c77..31087b70094 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing5.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing5.js @@ -8,15 +8,16 @@ class D extends null { //// [superCallBeforeThisAccessing5.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var D = (function (_super) { __extends(D, _super); function D() { diff --git a/tests/baselines/reference/superCallBeforeThisAccessing6.js b/tests/baselines/reference/superCallBeforeThisAccessing6.js index a5e291b9543..0c3d20c102f 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing6.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing6.js @@ -11,15 +11,16 @@ class D extends Base { //// [superCallBeforeThisAccessing6.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base(c) { } diff --git a/tests/baselines/reference/superCallBeforeThisAccessing7.js b/tests/baselines/reference/superCallBeforeThisAccessing7.js index 69a54894cc4..ba79e0b65ae 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing7.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing7.js @@ -14,15 +14,16 @@ class D extends Base { //// [superCallBeforeThisAccessing7.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base(c) { } diff --git a/tests/baselines/reference/superCallBeforeThisAccessing8.js b/tests/baselines/reference/superCallBeforeThisAccessing8.js index 51c4c727769..4f6a383aadf 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing8.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing8.js @@ -14,15 +14,16 @@ class D extends Base { //// [superCallBeforeThisAccessing8.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base(c) { } diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType1.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType1.js index 1b17766faf6..e24d0b53c1f 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType1.js @@ -12,15 +12,16 @@ class D extends B { //// [superCallFromClassThatDerivesFromGenericType1.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var D = (function (_super) { __extends(D, _super); function D() { diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType2.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType2.js index 159fa8786b3..3413bc18467 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType2.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType2.js @@ -11,15 +11,16 @@ class D extends B { //// [superCallFromClassThatDerivesFromGenericType2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var D = (function (_super) { __extends(D, _super); function D() { diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js index ccf1bf3746a..f31fd399b36 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js @@ -11,15 +11,16 @@ class B extends A { } //// [superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A(map) { this.map = map; diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js index f109d657654..4c99415f643 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js @@ -11,15 +11,16 @@ class B extends A { } //// [superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A(map) { this.map = map; diff --git a/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js b/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js index 76fd322d519..bbea46b2783 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js @@ -11,15 +11,16 @@ class B extends A { } //// [superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A(map) { this.map = map; diff --git a/tests/baselines/reference/superCallInNonStaticMethod.js b/tests/baselines/reference/superCallInNonStaticMethod.js index 737f51d9e27..54c77157590 100644 --- a/tests/baselines/reference/superCallInNonStaticMethod.js +++ b/tests/baselines/reference/superCallInNonStaticMethod.js @@ -51,15 +51,16 @@ class Other extends Doing { //// [superCallInNonStaticMethod.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Doing = (function () { function Doing() { } diff --git a/tests/baselines/reference/superCallInStaticMethod.js b/tests/baselines/reference/superCallInStaticMethod.js index cbd8398a20a..15d46bc1577 100644 --- a/tests/baselines/reference/superCallInStaticMethod.js +++ b/tests/baselines/reference/superCallInStaticMethod.js @@ -47,15 +47,16 @@ class Other extends Doing { //// [superCallInStaticMethod.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Doing = (function () { function Doing() { } diff --git a/tests/baselines/reference/superCallInsideClassDeclaration.js b/tests/baselines/reference/superCallInsideClassDeclaration.js index 71ef0041452..7f5913549cc 100644 --- a/tests/baselines/reference/superCallInsideClassDeclaration.js +++ b/tests/baselines/reference/superCallInsideClassDeclaration.js @@ -17,15 +17,16 @@ class B extends A { } //// [superCallInsideClassDeclaration.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/superCallInsideClassExpression.js b/tests/baselines/reference/superCallInsideClassExpression.js index 1d6b849ae5e..0f1fa8dc549 100644 --- a/tests/baselines/reference/superCallInsideClassExpression.js +++ b/tests/baselines/reference/superCallInsideClassExpression.js @@ -17,15 +17,16 @@ class B extends A { } //// [superCallInsideClassExpression.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/superCallInsideObjectLiteralExpression.js b/tests/baselines/reference/superCallInsideObjectLiteralExpression.js index e479206f9c5..0130a6c2b48 100644 --- a/tests/baselines/reference/superCallInsideObjectLiteralExpression.js +++ b/tests/baselines/reference/superCallInsideObjectLiteralExpression.js @@ -13,15 +13,16 @@ class B extends A { } //// [superCallInsideObjectLiteralExpression.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/superCallOutsideConstructor.js b/tests/baselines/reference/superCallOutsideConstructor.js index 9e4b98997c9..0251b19231e 100644 --- a/tests/baselines/reference/superCallOutsideConstructor.js +++ b/tests/baselines/reference/superCallOutsideConstructor.js @@ -23,15 +23,16 @@ var d = new D(); //// [superCallOutsideConstructor.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/superCallParameterContextualTyping1.js b/tests/baselines/reference/superCallParameterContextualTyping1.js index f71add3806a..a3d5303efaa 100644 --- a/tests/baselines/reference/superCallParameterContextualTyping1.js +++ b/tests/baselines/reference/superCallParameterContextualTyping1.js @@ -13,15 +13,16 @@ class B extends A { //// [superCallParameterContextualTyping1.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A(map) { this.map = map; diff --git a/tests/baselines/reference/superCallParameterContextualTyping2.js b/tests/baselines/reference/superCallParameterContextualTyping2.js index 5363dedff60..e90755ffee8 100644 --- a/tests/baselines/reference/superCallParameterContextualTyping2.js +++ b/tests/baselines/reference/superCallParameterContextualTyping2.js @@ -12,15 +12,16 @@ class C extends A { } //// [superCallParameterContextualTyping2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A(map) { this.map = map; diff --git a/tests/baselines/reference/superCallParameterContextualTyping3.js b/tests/baselines/reference/superCallParameterContextualTyping3.js index c074252a692..fe68db83a04 100644 --- a/tests/baselines/reference/superCallParameterContextualTyping3.js +++ b/tests/baselines/reference/superCallParameterContextualTyping3.js @@ -32,15 +32,16 @@ class C extends CBase { } //// [superCallParameterContextualTyping3.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var CBase = (function () { function CBase(param) { } diff --git a/tests/baselines/reference/superCallWithCommentEmit01.js b/tests/baselines/reference/superCallWithCommentEmit01.js index 5cd354a24b4..3a2981b8466 100644 --- a/tests/baselines/reference/superCallWithCommentEmit01.js +++ b/tests/baselines/reference/superCallWithCommentEmit01.js @@ -11,15 +11,16 @@ class B extends A { } //// [superCallWithCommentEmit01.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A(text) { this.text = text; diff --git a/tests/baselines/reference/superCallWithMissingBaseClass.js b/tests/baselines/reference/superCallWithMissingBaseClass.js index 27ecd48bf68..7ae8d5b3099 100644 --- a/tests/baselines/reference/superCallWithMissingBaseClass.js +++ b/tests/baselines/reference/superCallWithMissingBaseClass.js @@ -10,15 +10,16 @@ class Foo extends Bar { } //// [superCallWithMissingBaseClass.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Foo = (function (_super) { __extends(Foo, _super); function Foo() { diff --git a/tests/baselines/reference/superCalls.js b/tests/baselines/reference/superCalls.js index e974d75176b..ac9b0878083 100644 --- a/tests/baselines/reference/superCalls.js +++ b/tests/baselines/reference/superCalls.js @@ -31,15 +31,16 @@ class OtherDerived extends OtherBase { //// [superCalls.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base(n) { this.x = 43; diff --git a/tests/baselines/reference/superCallsInConstructor.js b/tests/baselines/reference/superCallsInConstructor.js index 1b02c20b7a5..d44ae6c11ec 100644 --- a/tests/baselines/reference/superCallsInConstructor.js +++ b/tests/baselines/reference/superCallsInConstructor.js @@ -21,15 +21,16 @@ class Derived extends Base { } //// [superCallsInConstructor.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/superErrors.js b/tests/baselines/reference/superErrors.js index 86c1dae1a1c..d7078f39c16 100644 --- a/tests/baselines/reference/superErrors.js +++ b/tests/baselines/reference/superErrors.js @@ -52,15 +52,16 @@ class RegisteredUser extends User { } //// [superErrors.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); function foo() { var _this = this; // super in a non class context diff --git a/tests/baselines/reference/superInCatchBlock1.js b/tests/baselines/reference/superInCatchBlock1.js index 30d3494689a..b9d7c910977 100644 --- a/tests/baselines/reference/superInCatchBlock1.js +++ b/tests/baselines/reference/superInCatchBlock1.js @@ -14,15 +14,16 @@ class B extends A { //// [superInCatchBlock1.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/superInConstructorParam1.js b/tests/baselines/reference/superInConstructorParam1.js index a98e1fdb089..0f6ec4e386f 100644 --- a/tests/baselines/reference/superInConstructorParam1.js +++ b/tests/baselines/reference/superInConstructorParam1.js @@ -11,15 +11,16 @@ class C extends B { } //// [superInConstructorParam1.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var B = (function () { function B() { } diff --git a/tests/baselines/reference/superInLambdas.js b/tests/baselines/reference/superInLambdas.js index 384b83c7239..9eeeaa0723c 100644 --- a/tests/baselines/reference/superInLambdas.js +++ b/tests/baselines/reference/superInLambdas.js @@ -68,15 +68,16 @@ class RegisteredUser4 extends User { } //// [superInLambdas.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var User = (function () { function User() { this.name = "Bob"; diff --git a/tests/baselines/reference/superInObjectLiterals_ES5.js b/tests/baselines/reference/superInObjectLiterals_ES5.js index 32369a7fc85..cfcd7a4de2a 100644 --- a/tests/baselines/reference/superInObjectLiterals_ES5.js +++ b/tests/baselines/reference/superInObjectLiterals_ES5.js @@ -60,15 +60,16 @@ class B extends A { } //// [superInObjectLiterals_ES5.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var _this = this; var obj = { __proto__: { diff --git a/tests/baselines/reference/superNewCall1.js b/tests/baselines/reference/superNewCall1.js index eee25fd2acc..5a5a91cd8f7 100644 --- a/tests/baselines/reference/superNewCall1.js +++ b/tests/baselines/reference/superNewCall1.js @@ -13,15 +13,16 @@ class B extends A { } //// [superNewCall1.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A(map) { this.map = map; diff --git a/tests/baselines/reference/superPropertyAccess.js b/tests/baselines/reference/superPropertyAccess.js index 39e8098407c..f6c09ab9092 100644 --- a/tests/baselines/reference/superPropertyAccess.js +++ b/tests/baselines/reference/superPropertyAccess.js @@ -37,15 +37,16 @@ class MyDerived extends MyBase { } //// [superPropertyAccess.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var MyBase = (function () { function MyBase() { this.m2 = function () { }; diff --git a/tests/baselines/reference/superPropertyAccess1.js b/tests/baselines/reference/superPropertyAccess1.js index 77d6a4b1c12..3eef279e454 100644 --- a/tests/baselines/reference/superPropertyAccess1.js +++ b/tests/baselines/reference/superPropertyAccess1.js @@ -28,15 +28,16 @@ class D extends C { } //// [superPropertyAccess1.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/superPropertyAccess2.js b/tests/baselines/reference/superPropertyAccess2.js index 1b9c056d3b2..767b08dc2b9 100644 --- a/tests/baselines/reference/superPropertyAccess2.js +++ b/tests/baselines/reference/superPropertyAccess2.js @@ -28,15 +28,16 @@ class D extends C { } //// [superPropertyAccess2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/superPropertyAccessInComputedPropertiesOfNestedType_ES5.js b/tests/baselines/reference/superPropertyAccessInComputedPropertiesOfNestedType_ES5.js index 5506bedbcb6..014110485e6 100644 --- a/tests/baselines/reference/superPropertyAccessInComputedPropertiesOfNestedType_ES5.js +++ b/tests/baselines/reference/superPropertyAccessInComputedPropertiesOfNestedType_ES5.js @@ -15,15 +15,16 @@ class B extends A { } //// [superPropertyAccessInComputedPropertiesOfNestedType_ES5.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/superPropertyAccessNoError.js b/tests/baselines/reference/superPropertyAccessNoError.js index e91603f20d8..10e64d97a92 100644 --- a/tests/baselines/reference/superPropertyAccessNoError.js +++ b/tests/baselines/reference/superPropertyAccessNoError.js @@ -77,15 +77,16 @@ instance.returnThis().fn(); //super.publicInstanceMemberFunction in lambda in member function //super.publicStaticMemberFunction in static member function of derived class //super.publicStaticMemberFunction in static member accessor(get and set) of derived class -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var SomeBaseClass = (function () { function SomeBaseClass() { } diff --git a/tests/baselines/reference/superPropertyAccess_ES5.js b/tests/baselines/reference/superPropertyAccess_ES5.js index 4e67455900a..2a48bfbdba7 100644 --- a/tests/baselines/reference/superPropertyAccess_ES5.js +++ b/tests/baselines/reference/superPropertyAccess_ES5.js @@ -30,15 +30,16 @@ class B extends A { } //// [superPropertyAccess_ES5.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var MyBase = (function () { function MyBase() { } diff --git a/tests/baselines/reference/superPropertyInConstructorBeforeSuperCall.js b/tests/baselines/reference/superPropertyInConstructorBeforeSuperCall.js index 1686be4e2e9..3188e79bd7e 100644 --- a/tests/baselines/reference/superPropertyInConstructorBeforeSuperCall.js +++ b/tests/baselines/reference/superPropertyInConstructorBeforeSuperCall.js @@ -16,15 +16,16 @@ class C2 extends B { } //// [superPropertyInConstructorBeforeSuperCall.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var B = (function () { function B(x) { } diff --git a/tests/baselines/reference/superSymbolIndexedAccess5.js b/tests/baselines/reference/superSymbolIndexedAccess5.js index c933334a506..ec26d7dd67f 100644 --- a/tests/baselines/reference/superSymbolIndexedAccess5.js +++ b/tests/baselines/reference/superSymbolIndexedAccess5.js @@ -14,15 +14,16 @@ class Bar extends Foo { } //// [superSymbolIndexedAccess5.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var symbol; var Foo = (function () { function Foo() { diff --git a/tests/baselines/reference/superSymbolIndexedAccess6.js b/tests/baselines/reference/superSymbolIndexedAccess6.js index 61f98885443..09bef412516 100644 --- a/tests/baselines/reference/superSymbolIndexedAccess6.js +++ b/tests/baselines/reference/superSymbolIndexedAccess6.js @@ -14,15 +14,16 @@ class Bar extends Foo { } //// [superSymbolIndexedAccess6.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var symbol; var Foo = (function () { function Foo() { diff --git a/tests/baselines/reference/superWithGenericSpecialization.js b/tests/baselines/reference/superWithGenericSpecialization.js index 645007e5a09..afd049ed8a2 100644 --- a/tests/baselines/reference/superWithGenericSpecialization.js +++ b/tests/baselines/reference/superWithGenericSpecialization.js @@ -15,15 +15,16 @@ var r: string = d.x; var r2: number = d.y; //// [superWithGenericSpecialization.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/superWithGenerics.js b/tests/baselines/reference/superWithGenerics.js index f0e9cacf8aa..148fac45a70 100644 --- a/tests/baselines/reference/superWithGenerics.js +++ b/tests/baselines/reference/superWithGenerics.js @@ -12,15 +12,16 @@ class D extends B { //// [superWithGenerics.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var D = (function (_super) { __extends(D, _super); function D() { diff --git a/tests/baselines/reference/superWithTypeArgument.js b/tests/baselines/reference/superWithTypeArgument.js index 8b7c07a27a5..22b802ec2df 100644 --- a/tests/baselines/reference/superWithTypeArgument.js +++ b/tests/baselines/reference/superWithTypeArgument.js @@ -10,15 +10,16 @@ class D extends C { } //// [superWithTypeArgument.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/superWithTypeArgument2.js b/tests/baselines/reference/superWithTypeArgument2.js index 349ead6b381..ace1355c374 100644 --- a/tests/baselines/reference/superWithTypeArgument2.js +++ b/tests/baselines/reference/superWithTypeArgument2.js @@ -10,15 +10,16 @@ class D extends C { } //// [superWithTypeArgument2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/superWithTypeArgument3.js b/tests/baselines/reference/superWithTypeArgument3.js index 6e09952749c..318b45a9981 100644 --- a/tests/baselines/reference/superWithTypeArgument3.js +++ b/tests/baselines/reference/superWithTypeArgument3.js @@ -14,15 +14,16 @@ class D extends C { } //// [superWithTypeArgument3.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/super_inside-object-literal-getters-and-setters.js b/tests/baselines/reference/super_inside-object-literal-getters-and-setters.js index d7bab4380b4..2fca7ec7fe4 100644 --- a/tests/baselines/reference/super_inside-object-literal-getters-and-setters.js +++ b/tests/baselines/reference/super_inside-object-literal-getters-and-setters.js @@ -28,15 +28,16 @@ class SuperObjectTest extends F { //// [super_inside-object-literal-getters-and-setters.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var ObjectLiteral; (function (ObjectLiteral) { var ThisInObjectLiteral = { diff --git a/tests/baselines/reference/switchStatements.js b/tests/baselines/reference/switchStatements.js index d2754225e5b..5af42176dfc 100644 --- a/tests/baselines/reference/switchStatements.js +++ b/tests/baselines/reference/switchStatements.js @@ -56,15 +56,16 @@ switch (((x: T) => '')(1)) { } //// [switchStatements.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var M; (function (M) { function fn(x) { diff --git a/tests/baselines/reference/systemModuleWithSuperClass.js b/tests/baselines/reference/systemModuleWithSuperClass.js index c146e495c80..c9adf13f48c 100644 --- a/tests/baselines/reference/systemModuleWithSuperClass.js +++ b/tests/baselines/reference/systemModuleWithSuperClass.js @@ -32,15 +32,16 @@ System.register([], function (exports_1, context_1) { //// [bar.js] System.register(["./foo"], function (exports_1, context_1) { "use strict"; - var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; + var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })(); var __moduleName = context_1 && context_1.id; var foo_1, Bar; return { diff --git a/tests/baselines/reference/targetTypeBaseCalls.js b/tests/baselines/reference/targetTypeBaseCalls.js index a0faadf78a6..92ad5afba94 100644 --- a/tests/baselines/reference/targetTypeBaseCalls.js +++ b/tests/baselines/reference/targetTypeBaseCalls.js @@ -19,15 +19,16 @@ class Bar extends Foo { constructor() { super(function(s) { s = 5 }) } } // err //// [targetTypeBaseCalls.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); function foo(x) { } var Foo = (function () { function Foo(x) { diff --git a/tests/baselines/reference/thisInInvalidContexts.js b/tests/baselines/reference/thisInInvalidContexts.js index 1b969e26547..a2237177f84 100644 --- a/tests/baselines/reference/thisInInvalidContexts.js +++ b/tests/baselines/reference/thisInInvalidContexts.js @@ -49,15 +49,16 @@ enum SomeEnum { //// [thisInInvalidContexts.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); //'this' in static member initializer var ErrClass1 = (function () { function ErrClass1() { diff --git a/tests/baselines/reference/thisInInvalidContextsExternalModule.js b/tests/baselines/reference/thisInInvalidContextsExternalModule.js index ee517c6e36f..ccb2a71080f 100644 --- a/tests/baselines/reference/thisInInvalidContextsExternalModule.js +++ b/tests/baselines/reference/thisInInvalidContextsExternalModule.js @@ -50,15 +50,16 @@ export = this; // Should be an error //// [thisInInvalidContextsExternalModule.js] "use strict"; -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); //'this' in static member initializer var ErrClass1 = (function () { function ErrClass1() { diff --git a/tests/baselines/reference/thisInSuperCall.js b/tests/baselines/reference/thisInSuperCall.js index 80795c91e67..b537231f74b 100644 --- a/tests/baselines/reference/thisInSuperCall.js +++ b/tests/baselines/reference/thisInSuperCall.js @@ -23,15 +23,16 @@ class Foo3 extends Base { } //// [thisInSuperCall.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base(x) { } diff --git a/tests/baselines/reference/thisInSuperCall1.js b/tests/baselines/reference/thisInSuperCall1.js index f5e4e131cfc..9f40814cc5f 100644 --- a/tests/baselines/reference/thisInSuperCall1.js +++ b/tests/baselines/reference/thisInSuperCall1.js @@ -11,15 +11,16 @@ class Foo extends Base { //// [thisInSuperCall1.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base(a) { } diff --git a/tests/baselines/reference/thisInSuperCall2.js b/tests/baselines/reference/thisInSuperCall2.js index 663826999d3..ebbb974f23f 100644 --- a/tests/baselines/reference/thisInSuperCall2.js +++ b/tests/baselines/reference/thisInSuperCall2.js @@ -20,15 +20,16 @@ class Foo2 extends Base { //// [thisInSuperCall2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base(a) { } diff --git a/tests/baselines/reference/thisInSuperCall3.js b/tests/baselines/reference/thisInSuperCall3.js index abba0499608..5c9405534f4 100644 --- a/tests/baselines/reference/thisInSuperCall3.js +++ b/tests/baselines/reference/thisInSuperCall3.js @@ -13,15 +13,16 @@ class Foo extends Base { //// [thisInSuperCall3.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base(a) { } diff --git a/tests/baselines/reference/thisTypeInFunctions.js b/tests/baselines/reference/thisTypeInFunctions.js index 27aae06ccf8..21714308cb1 100644 --- a/tests/baselines/reference/thisTypeInFunctions.js +++ b/tests/baselines/reference/thisTypeInFunctions.js @@ -195,15 +195,16 @@ function missingTypeIsImplicitAny(this, a: number) { return this.anything + a; } //// [thisTypeInFunctions.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var _this = this; // body checking var B = (function () { diff --git a/tests/baselines/reference/thisTypeInFunctionsNegative.js b/tests/baselines/reference/thisTypeInFunctionsNegative.js index ca9eeb60fee..27bc47b84d2 100644 --- a/tests/baselines/reference/thisTypeInFunctionsNegative.js +++ b/tests/baselines/reference/thisTypeInFunctionsNegative.js @@ -177,15 +177,16 @@ c.explicitProperty = (this, m) => m + this.n; //// [thisTypeInFunctionsNegative.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var _this = this; var C = (function () { function C() { diff --git a/tests/baselines/reference/tsxCorrectlyParseLessThanComparison1.js b/tests/baselines/reference/tsxCorrectlyParseLessThanComparison1.js index 9c5c848b781..55d3ba54221 100644 --- a/tests/baselines/reference/tsxCorrectlyParseLessThanComparison1.js +++ b/tests/baselines/reference/tsxCorrectlyParseLessThanComparison1.js @@ -21,15 +21,16 @@ export class ShortDetails extends React.Component<{ id: number }, {}> { //// [tsxCorrectlyParseLessThanComparison1.js] "use strict"; -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var ShortDetails = (function (_super) { __extends(ShortDetails, _super); function ShortDetails() { diff --git a/tests/baselines/reference/tsxDynamicTagName5.js b/tests/baselines/reference/tsxDynamicTagName5.js index a895c2ec4dd..2b055cd5a5a 100644 --- a/tests/baselines/reference/tsxDynamicTagName5.js +++ b/tests/baselines/reference/tsxDynamicTagName5.js @@ -21,15 +21,16 @@ export class Text extends React.Component<{}, {}> { //// [app.jsx] "use strict"; -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var React = require("react"); var Text = (function (_super) { __extends(Text, _super); diff --git a/tests/baselines/reference/tsxDynamicTagName7.js b/tests/baselines/reference/tsxDynamicTagName7.js index 845eb400818..3108566db85 100644 --- a/tests/baselines/reference/tsxDynamicTagName7.js +++ b/tests/baselines/reference/tsxDynamicTagName7.js @@ -21,15 +21,16 @@ export class Text extends React.Component<{}, {}> { //// [app.jsx] "use strict"; -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var React = require("react"); var Text = (function (_super) { __extends(Text, _super); diff --git a/tests/baselines/reference/tsxDynamicTagName8.js b/tests/baselines/reference/tsxDynamicTagName8.js index 7e1511af79a..8859061b463 100644 --- a/tests/baselines/reference/tsxDynamicTagName8.js +++ b/tests/baselines/reference/tsxDynamicTagName8.js @@ -21,15 +21,16 @@ export class Text extends React.Component<{}, {}> { //// [app.jsx] "use strict"; -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var React = require("react"); var Text = (function (_super) { __extends(Text, _super); diff --git a/tests/baselines/reference/tsxDynamicTagName9.js b/tests/baselines/reference/tsxDynamicTagName9.js index 7867bea3873..818e384fdf6 100644 --- a/tests/baselines/reference/tsxDynamicTagName9.js +++ b/tests/baselines/reference/tsxDynamicTagName9.js @@ -21,15 +21,16 @@ export class Text extends React.Component<{}, {}> { //// [app.jsx] "use strict"; -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var React = require("react"); var Text = (function (_super) { __extends(Text, _super); diff --git a/tests/baselines/reference/tsxExternalModuleEmit1.js b/tests/baselines/reference/tsxExternalModuleEmit1.js index 5f594b4d1d5..559306b800b 100644 --- a/tests/baselines/reference/tsxExternalModuleEmit1.js +++ b/tests/baselines/reference/tsxExternalModuleEmit1.js @@ -33,15 +33,16 @@ export class Button extends React.Component { //// [button.jsx] "use strict"; -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var React = require("react"); var Button = (function (_super) { __extends(Button, _super); @@ -56,15 +57,16 @@ var Button = (function (_super) { exports.Button = Button; //// [app.jsx] "use strict"; -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var React = require("react"); // Should see var button_1 = require('./button') here var button_1 = require("./button"); diff --git a/tests/baselines/reference/tsxStatelessFunctionComponents2.js b/tests/baselines/reference/tsxStatelessFunctionComponents2.js index c3ed400f65c..12c2f1f9ab3 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponents2.js +++ b/tests/baselines/reference/tsxStatelessFunctionComponents2.js @@ -40,15 +40,16 @@ let i =
x.propertyNotOnHtmlDivElement} />; //// [file.jsx] "use strict"; -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var React = require("react"); function Greet(x) { return
Hello, {x}
; diff --git a/tests/baselines/reference/tsxUnionTypeComponent1.js b/tests/baselines/reference/tsxUnionTypeComponent1.js index 93b810483b6..2b1634555ef 100644 --- a/tests/baselines/reference/tsxUnionTypeComponent1.js +++ b/tests/baselines/reference/tsxUnionTypeComponent1.js @@ -26,15 +26,16 @@ class MyButtonComponent extends React.Component<{},{}> { //// [file.js] "use strict"; -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var React = require("react"); var MyComponent = (function (_super) { __extends(MyComponent, _super); diff --git a/tests/baselines/reference/typeAssertions.js b/tests/baselines/reference/typeAssertions.js index e9ab0f69449..3107a196f2a 100644 --- a/tests/baselines/reference/typeAssertions.js +++ b/tests/baselines/reference/typeAssertions.js @@ -52,15 +52,16 @@ if((numOrStr === undefined) as numOrStr is string) { // Error //// [typeAssertions.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); // Function call whose argument is a 1 arg generic function call with explicit type arguments function fn1(t) { } function fn2(t) { } diff --git a/tests/baselines/reference/typeGuardFunction.js b/tests/baselines/reference/typeGuardFunction.js index b38de5abcd2..0eb332af60e 100644 --- a/tests/baselines/reference/typeGuardFunction.js +++ b/tests/baselines/reference/typeGuardFunction.js @@ -84,15 +84,16 @@ let union2: C | B; let union3: boolean | B = isA(union2) || union2; //// [typeGuardFunction.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/typeGuardFunctionErrors.js b/tests/baselines/reference/typeGuardFunctionErrors.js index 4a1f85e3e71..21d9dfeebf1 100644 --- a/tests/baselines/reference/typeGuardFunctionErrors.js +++ b/tests/baselines/reference/typeGuardFunctionErrors.js @@ -146,15 +146,16 @@ if (hasMissingParameter()) { } //// [typeGuardFunctionErrors.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/typeGuardFunctionGenerics.js b/tests/baselines/reference/typeGuardFunctionGenerics.js index ce30137e322..0344e168c53 100644 --- a/tests/baselines/reference/typeGuardFunctionGenerics.js +++ b/tests/baselines/reference/typeGuardFunctionGenerics.js @@ -34,15 +34,16 @@ if (funD(isC, a)) { let test3: B = funE(isB, 1); //// [typeGuardFunctionGenerics.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { } diff --git a/tests/baselines/reference/typeGuardFunctionOfFormThis.js b/tests/baselines/reference/typeGuardFunctionOfFormThis.js index c3e2d851db2..54110ba24d8 100644 --- a/tests/baselines/reference/typeGuardFunctionOfFormThis.js +++ b/tests/baselines/reference/typeGuardFunctionOfFormThis.js @@ -142,15 +142,16 @@ interface MimicGuardInterface { //// [typeGuardFunctionOfFormThis.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var RoyalGuard = (function () { function RoyalGuard() { } diff --git a/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.js b/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.js index 753a41b8e42..a79efd94c8f 100644 --- a/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.js +++ b/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.js @@ -60,15 +60,16 @@ else { } //// [typeGuardFunctionOfFormThisErrors.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var RoyalGuard = (function () { function RoyalGuard() { } diff --git a/tests/baselines/reference/typeGuardOfFormInstanceOf.js b/tests/baselines/reference/typeGuardOfFormInstanceOf.js index 55d28ea2a58..fa99dbd87cf 100644 --- a/tests/baselines/reference/typeGuardOfFormInstanceOf.js +++ b/tests/baselines/reference/typeGuardOfFormInstanceOf.js @@ -73,15 +73,16 @@ else { // - when true, narrows the type of x to the type of the 'prototype' property in C provided // it is a subtype of the type of x, or // - when false, has no effect on the type of x. -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C1 = (function () { function C1() { } diff --git a/tests/baselines/reference/typeGuardOfFormIsType.js b/tests/baselines/reference/typeGuardOfFormIsType.js index f9b90888a92..f1a94c5167a 100644 --- a/tests/baselines/reference/typeGuardOfFormIsType.js +++ b/tests/baselines/reference/typeGuardOfFormIsType.js @@ -38,15 +38,16 @@ str = isD1(c2Ord1) && c2Ord1.p1; // D1 var r2: C2 | D1 = isC1(c2Ord1) && c2Ord1; // C2 | D1 //// [typeGuardOfFormIsType.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C1 = (function () { function C1() { } diff --git a/tests/baselines/reference/typeGuardOfFormThisMember.js b/tests/baselines/reference/typeGuardOfFormThisMember.js index 1e96d089f1b..b7d442711d7 100644 --- a/tests/baselines/reference/typeGuardOfFormThisMember.js +++ b/tests/baselines/reference/typeGuardOfFormThisMember.js @@ -83,15 +83,16 @@ namespace Test { //// [typeGuardOfFormThisMember.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); // There's a 'File' class in the stdlib, wrap with a namespace to avoid collision var Test; (function (Test) { diff --git a/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js b/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js index 0212d05c523..e2b8b8ec168 100644 --- a/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js +++ b/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js @@ -33,15 +33,16 @@ namespace Test { } //// [typeGuardOfFormThisMemberErrors.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); // There's a 'File' class in the stdlib, wrap with a namespace to avoid collision var Test; (function (Test) { diff --git a/tests/baselines/reference/typeMatch2.js b/tests/baselines/reference/typeMatch2.js index 9a75ed6616d..84ff8f72c5c 100644 --- a/tests/baselines/reference/typeMatch2.js +++ b/tests/baselines/reference/typeMatch2.js @@ -45,15 +45,16 @@ function f4() { //// [typeMatch2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); function f1() { var a = { x: 1, y: 2 }; a = {}; // error diff --git a/tests/baselines/reference/typeOfSuperCall.js b/tests/baselines/reference/typeOfSuperCall.js index f02a7c7de79..eca6ad1bc0a 100644 --- a/tests/baselines/reference/typeOfSuperCall.js +++ b/tests/baselines/reference/typeOfSuperCall.js @@ -9,15 +9,16 @@ class D extends C { } //// [typeOfSuperCall.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { } diff --git a/tests/baselines/reference/typeParameterAsBaseClass.js b/tests/baselines/reference/typeParameterAsBaseClass.js index 8b40f439ba2..dc579b7b62f 100644 --- a/tests/baselines/reference/typeParameterAsBaseClass.js +++ b/tests/baselines/reference/typeParameterAsBaseClass.js @@ -3,15 +3,16 @@ class C extends T {} class C2 implements T {} //// [typeParameterAsBaseClass.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function (_super) { __extends(C, _super); function C() { diff --git a/tests/baselines/reference/typeParameterAsBaseType.js b/tests/baselines/reference/typeParameterAsBaseType.js index 97627b41f10..80317823731 100644 --- a/tests/baselines/reference/typeParameterAsBaseType.js +++ b/tests/baselines/reference/typeParameterAsBaseType.js @@ -13,15 +13,16 @@ interface I2 extends U { } //// [typeParameterAsBaseType.js] // type parameters cannot be used as base types // these are all errors -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function (_super) { __extends(C, _super); function C() { diff --git a/tests/baselines/reference/typeParameterExtendingUnion1.js b/tests/baselines/reference/typeParameterExtendingUnion1.js index 6a189dc0ace..80fd91c64b8 100644 --- a/tests/baselines/reference/typeParameterExtendingUnion1.js +++ b/tests/baselines/reference/typeParameterExtendingUnion1.js @@ -13,15 +13,16 @@ function f(a: T) { } //// [typeParameterExtendingUnion1.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Animal = (function () { function Animal() { } diff --git a/tests/baselines/reference/typeParameterExtendingUnion2.js b/tests/baselines/reference/typeParameterExtendingUnion2.js index bf929f42c6a..8dc8db48ed8 100644 --- a/tests/baselines/reference/typeParameterExtendingUnion2.js +++ b/tests/baselines/reference/typeParameterExtendingUnion2.js @@ -13,15 +13,16 @@ function f(a: T) { } //// [typeParameterExtendingUnion2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Animal = (function () { function Animal() { } diff --git a/tests/baselines/reference/typeRelationships.js b/tests/baselines/reference/typeRelationships.js index 2bdb91818a2..42ff32f9ab1 100644 --- a/tests/baselines/reference/typeRelationships.js +++ b/tests/baselines/reference/typeRelationships.js @@ -41,15 +41,16 @@ class D extends C { //// [typeRelationships.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C() { this.self = this; diff --git a/tests/baselines/reference/typeValueConflict1.js b/tests/baselines/reference/typeValueConflict1.js index 467781c8c26..a84939d2e10 100644 --- a/tests/baselines/reference/typeValueConflict1.js +++ b/tests/baselines/reference/typeValueConflict1.js @@ -12,15 +12,16 @@ module M2 { //// [typeValueConflict1.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var M1; (function (M1) { var A = (function () { diff --git a/tests/baselines/reference/typeValueConflict2.js b/tests/baselines/reference/typeValueConflict2.js index 0220bda6f9b..40bdb364218 100644 --- a/tests/baselines/reference/typeValueConflict2.js +++ b/tests/baselines/reference/typeValueConflict2.js @@ -19,15 +19,16 @@ module M3 { //// [typeValueConflict2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var M1; (function (M1) { var A = (function () { diff --git a/tests/baselines/reference/typeofClass2.js b/tests/baselines/reference/typeofClass2.js index 929472aefee..d7e92bd6a8f 100644 --- a/tests/baselines/reference/typeofClass2.js +++ b/tests/baselines/reference/typeofClass2.js @@ -22,15 +22,16 @@ var r1: typeof D; var r2: typeof d; //// [typeofClass2.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var C = (function () { function C(x) { } diff --git a/tests/baselines/reference/typesWithSpecializedCallSignatures.js b/tests/baselines/reference/typesWithSpecializedCallSignatures.js index 3403dc447a6..24ea5d0ed64 100644 --- a/tests/baselines/reference/typesWithSpecializedCallSignatures.js +++ b/tests/baselines/reference/typesWithSpecializedCallSignatures.js @@ -43,15 +43,16 @@ var r3: Base = c.foo('hm'); //// [typesWithSpecializedCallSignatures.js] // basic uses of specialized signatures without errors -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/typesWithSpecializedConstructSignatures.js b/tests/baselines/reference/typesWithSpecializedConstructSignatures.js index 29c7eb186fa..396f24805eb 100644 --- a/tests/baselines/reference/typesWithSpecializedConstructSignatures.js +++ b/tests/baselines/reference/typesWithSpecializedConstructSignatures.js @@ -41,15 +41,16 @@ var r3: Base = new a('hm'); //// [typesWithSpecializedConstructSignatures.js] // basic uses of specialized signatures without errors -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/undeclaredBase.js b/tests/baselines/reference/undeclaredBase.js index 60fa6a01f63..a280e90e75c 100644 --- a/tests/baselines/reference/undeclaredBase.js +++ b/tests/baselines/reference/undeclaredBase.js @@ -4,15 +4,16 @@ module M { export class C extends M.I { } } //// [undeclaredBase.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var M; (function (M) { var C = (function (_super) { diff --git a/tests/baselines/reference/undefinedIsSubtypeOfEverything.js b/tests/baselines/reference/undefinedIsSubtypeOfEverything.js index fbfe9f3b466..56ae1ae2447 100644 --- a/tests/baselines/reference/undefinedIsSubtypeOfEverything.js +++ b/tests/baselines/reference/undefinedIsSubtypeOfEverything.js @@ -123,15 +123,16 @@ class D17 extends Base { //// [undefinedIsSubtypeOfEverything.js] // undefined is a subtype of every other types, no errors expected below -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { } diff --git a/tests/baselines/reference/underscoreMapFirst.js b/tests/baselines/reference/underscoreMapFirst.js index 760cc6a1ba7..dea8545ce6f 100644 --- a/tests/baselines/reference/underscoreMapFirst.js +++ b/tests/baselines/reference/underscoreMapFirst.js @@ -49,15 +49,16 @@ class MyView extends View { //// [underscoreMapFirst.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var MyView = (function (_super) { __extends(MyView, _super); function MyView() { diff --git a/tests/baselines/reference/underscoreThisInDerivedClass01.js b/tests/baselines/reference/underscoreThisInDerivedClass01.js index 2828c8dc287..0528b292208 100644 --- a/tests/baselines/reference/underscoreThisInDerivedClass01.js +++ b/tests/baselines/reference/underscoreThisInDerivedClass01.js @@ -25,15 +25,16 @@ class D extends C { //// [underscoreThisInDerivedClass01.js] // @target es5 -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); // Original test intent: // When arrow functions capture 'this', the lexical 'this' owner // currently captures 'this' using a variable named '_this'. diff --git a/tests/baselines/reference/underscoreThisInDerivedClass02.js b/tests/baselines/reference/underscoreThisInDerivedClass02.js index 4d7a69b60c5..5901d6e2a7c 100644 --- a/tests/baselines/reference/underscoreThisInDerivedClass02.js +++ b/tests/baselines/reference/underscoreThisInDerivedClass02.js @@ -19,15 +19,16 @@ class D extends C { //// [underscoreThisInDerivedClass02.js] // @target es5 -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); // Original test intent: // Errors on '_this' should be reported in derived constructors, // even if 'super()' is not called. diff --git a/tests/baselines/reference/unionTypeEquivalence.js b/tests/baselines/reference/unionTypeEquivalence.js index 9de5ad9d470..28401c6db6b 100644 --- a/tests/baselines/reference/unionTypeEquivalence.js +++ b/tests/baselines/reference/unionTypeEquivalence.js @@ -20,15 +20,16 @@ var z1: string | typeof BC; //// [unionTypeEquivalence.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); // A | B is equivalent to A if B is a subtype of A var C = (function () { function C() { diff --git a/tests/baselines/reference/unionTypeFromArrayLiteral.js b/tests/baselines/reference/unionTypeFromArrayLiteral.js index f6c1489ceee..bf882f163eb 100644 --- a/tests/baselines/reference/unionTypeFromArrayLiteral.js +++ b/tests/baselines/reference/unionTypeFromArrayLiteral.js @@ -28,15 +28,16 @@ var arr9 = [e, f]; // (E|F)[] // If the array literal is empty, the resulting type is an array type with the element type Undefined. // Otherwise, if the array literal is contextually typed by a type that has a property with the numeric name ‘0’, the resulting type is a tuple type constructed from the types of the element expressions. // Otherwise, the resulting type is an array type with an element type that is the union of the types of the element expressions. -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var arr1 = [1, 2]; // number[] var arr2 = ["hello", true]; // (string | number)[] var arr3Tuple = [3, "three"]; // [number, string] diff --git a/tests/baselines/reference/unionTypesAssignability.js b/tests/baselines/reference/unionTypesAssignability.js index 8fc5f1e8f71..837116d719d 100644 --- a/tests/baselines/reference/unionTypesAssignability.js +++ b/tests/baselines/reference/unionTypesAssignability.js @@ -74,15 +74,16 @@ function foo(t: T, u: U) { //// [unionTypesAssignability.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var unionNumberString; var C = (function () { function C() { diff --git a/tests/baselines/reference/unknownSymbols1.js b/tests/baselines/reference/unknownSymbols1.js index c64cc7224ba..540d8058331 100644 --- a/tests/baselines/reference/unknownSymbols1.js +++ b/tests/baselines/reference/unknownSymbols1.js @@ -33,15 +33,16 @@ class C5 { } //// [unknownSymbols1.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var x = asdf; var y; function foo(x, y) { } diff --git a/tests/baselines/reference/unspecializedConstraints.js b/tests/baselines/reference/unspecializedConstraints.js index ddc7d6e7598..2094404dd0a 100644 --- a/tests/baselines/reference/unspecializedConstraints.js +++ b/tests/baselines/reference/unspecializedConstraints.js @@ -154,15 +154,16 @@ module ts { //// [unspecializedConstraints.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var ts; (function (ts) { var Symbol = (function () { diff --git a/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js b/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js index c46afba6440..12dd53ebea9 100644 --- a/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js +++ b/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js @@ -44,15 +44,16 @@ c5(1); // error //// [untypedFunctionCallsWithTypeParameters1.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); // none of these function calls should be allowed var x = function () { return; }; var r1 = x(); diff --git a/tests/baselines/reference/unusedClassesinNamespace4.js b/tests/baselines/reference/unusedClassesinNamespace4.js index e3af0dd8567..7b97612fa61 100644 --- a/tests/baselines/reference/unusedClassesinNamespace4.js +++ b/tests/baselines/reference/unusedClassesinNamespace4.js @@ -15,15 +15,16 @@ namespace Validation { } //// [unusedClassesinNamespace4.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Validation; (function (Validation) { var c1 = (function () { diff --git a/tests/baselines/reference/unusedIdentifiersConsolidated1.js b/tests/baselines/reference/unusedIdentifiersConsolidated1.js index 37317f9fbe9..2d89558f83d 100644 --- a/tests/baselines/reference/unusedIdentifiersConsolidated1.js +++ b/tests/baselines/reference/unusedIdentifiersConsolidated1.js @@ -103,15 +103,16 @@ namespace Greeter { } //// [unusedIdentifiersConsolidated1.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); function greeter(person) { var unused = 20; } diff --git a/tests/baselines/reference/validUseOfThisInSuper.js b/tests/baselines/reference/validUseOfThisInSuper.js index a80a72f434a..ad56ae8cdd3 100644 --- a/tests/baselines/reference/validUseOfThisInSuper.js +++ b/tests/baselines/reference/validUseOfThisInSuper.js @@ -10,15 +10,16 @@ class Super extends Base { } //// [validUseOfThisInSuper.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base(b) { this.b = b; diff --git a/tests/baselines/reference/varArgsOnConstructorTypes.js b/tests/baselines/reference/varArgsOnConstructorTypes.js index 9cb0dc77811..0577bdb645a 100644 --- a/tests/baselines/reference/varArgsOnConstructorTypes.js +++ b/tests/baselines/reference/varArgsOnConstructorTypes.js @@ -25,15 +25,16 @@ reg.register(B); //// [varArgsOnConstructorTypes.js] -var __extendStatics = (this && this.__extendStatics) || - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; -var __extends = (this && this.__extends) || function (d, b) { - __extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var __extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + __extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); define(["require", "exports"], function (require, exports) { "use strict"; var A = (function () { From d22f4fb513cab8acc9c340d358f1112f098e6b8a Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Fri, 30 Dec 2016 12:14:31 -0500 Subject: [PATCH 06/15] Added a test. --- .../narrowingGenericTypeFromInstanceof01.ts | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 tests/cases/conformance/types/typeRelationships/instanceOf/narrowingGenericTypeFromInstanceof01.ts diff --git a/tests/cases/conformance/types/typeRelationships/instanceOf/narrowingGenericTypeFromInstanceof01.ts b/tests/cases/conformance/types/typeRelationships/instanceOf/narrowingGenericTypeFromInstanceof01.ts new file mode 100644 index 00000000000..0209d7d3ccf --- /dev/null +++ b/tests/cases/conformance/types/typeRelationships/instanceOf/narrowingGenericTypeFromInstanceof01.ts @@ -0,0 +1,27 @@ +class A { + constructor(private a: string) { } +} + +class B { +} + +function acceptA(a: A) { } +function acceptB(b: B) { } + +function test(x: A | B) { + if (x instanceof B) { + acceptA(x); + } + + if (x instanceof A) { + acceptA(x); + } + + if (x instanceof B) { + acceptB(x); + } + + if (x instanceof B) { + acceptB(x); + } +} \ No newline at end of file From 228f42356662ccc196ab8f3b3096cb6831de77ab Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Fri, 30 Dec 2016 12:18:40 -0500 Subject: [PATCH 07/15] Accepted baselines. --- .../narrowingGenericTypeFromInstanceof01.js | 57 +++++++++++++ ...rrowingGenericTypeFromInstanceof01.symbols | 73 +++++++++++++++++ ...narrowingGenericTypeFromInstanceof01.types | 81 +++++++++++++++++++ 3 files changed, 211 insertions(+) create mode 100644 tests/baselines/reference/narrowingGenericTypeFromInstanceof01.js create mode 100644 tests/baselines/reference/narrowingGenericTypeFromInstanceof01.symbols create mode 100644 tests/baselines/reference/narrowingGenericTypeFromInstanceof01.types diff --git a/tests/baselines/reference/narrowingGenericTypeFromInstanceof01.js b/tests/baselines/reference/narrowingGenericTypeFromInstanceof01.js new file mode 100644 index 00000000000..96fa20359ca --- /dev/null +++ b/tests/baselines/reference/narrowingGenericTypeFromInstanceof01.js @@ -0,0 +1,57 @@ +//// [narrowingGenericTypeFromInstanceof01.ts] +class A { + constructor(private a: string) { } +} + +class B { +} + +function acceptA(a: A) { } +function acceptB(b: B) { } + +function test(x: A | B) { + if (x instanceof B) { + acceptA(x); + } + + if (x instanceof A) { + acceptA(x); + } + + if (x instanceof B) { + acceptB(x); + } + + if (x instanceof B) { + acceptB(x); + } +} + +//// [narrowingGenericTypeFromInstanceof01.js] +var A = (function () { + function A(a) { + this.a = a; + } + return A; +}()); +var B = (function () { + function B() { + } + return B; +}()); +function acceptA(a) { } +function acceptB(b) { } +function test(x) { + if (x instanceof B) { + acceptA(x); + } + if (x instanceof A) { + acceptA(x); + } + if (x instanceof B) { + acceptB(x); + } + if (x instanceof B) { + acceptB(x); + } +} diff --git a/tests/baselines/reference/narrowingGenericTypeFromInstanceof01.symbols b/tests/baselines/reference/narrowingGenericTypeFromInstanceof01.symbols new file mode 100644 index 00000000000..2130d68cb24 --- /dev/null +++ b/tests/baselines/reference/narrowingGenericTypeFromInstanceof01.symbols @@ -0,0 +1,73 @@ +=== tests/cases/conformance/types/typeRelationships/instanceOf/narrowingGenericTypeFromInstanceof01.ts === +class A { +>A : Symbol(A, Decl(narrowingGenericTypeFromInstanceof01.ts, 0, 0)) +>T : Symbol(T, Decl(narrowingGenericTypeFromInstanceof01.ts, 0, 8)) + + constructor(private a: string) { } +>a : Symbol(A.a, Decl(narrowingGenericTypeFromInstanceof01.ts, 1, 16)) +} + +class B { +>B : Symbol(B, Decl(narrowingGenericTypeFromInstanceof01.ts, 2, 1)) +>T : Symbol(T, Decl(narrowingGenericTypeFromInstanceof01.ts, 4, 8)) +} + +function acceptA(a: A) { } +>acceptA : Symbol(acceptA, Decl(narrowingGenericTypeFromInstanceof01.ts, 5, 1)) +>T : Symbol(T, Decl(narrowingGenericTypeFromInstanceof01.ts, 7, 17)) +>a : Symbol(a, Decl(narrowingGenericTypeFromInstanceof01.ts, 7, 20)) +>A : Symbol(A, Decl(narrowingGenericTypeFromInstanceof01.ts, 0, 0)) +>T : Symbol(T, Decl(narrowingGenericTypeFromInstanceof01.ts, 7, 17)) + +function acceptB(b: B) { } +>acceptB : Symbol(acceptB, Decl(narrowingGenericTypeFromInstanceof01.ts, 7, 32)) +>T : Symbol(T, Decl(narrowingGenericTypeFromInstanceof01.ts, 8, 17)) +>b : Symbol(b, Decl(narrowingGenericTypeFromInstanceof01.ts, 8, 20)) +>B : Symbol(B, Decl(narrowingGenericTypeFromInstanceof01.ts, 2, 1)) +>T : Symbol(T, Decl(narrowingGenericTypeFromInstanceof01.ts, 8, 17)) + +function test(x: A | B) { +>test : Symbol(test, Decl(narrowingGenericTypeFromInstanceof01.ts, 8, 32)) +>T : Symbol(T, Decl(narrowingGenericTypeFromInstanceof01.ts, 10, 14)) +>x : Symbol(x, Decl(narrowingGenericTypeFromInstanceof01.ts, 10, 17)) +>A : Symbol(A, Decl(narrowingGenericTypeFromInstanceof01.ts, 0, 0)) +>T : Symbol(T, Decl(narrowingGenericTypeFromInstanceof01.ts, 10, 14)) +>B : Symbol(B, Decl(narrowingGenericTypeFromInstanceof01.ts, 2, 1)) +>T : Symbol(T, Decl(narrowingGenericTypeFromInstanceof01.ts, 10, 14)) + + if (x instanceof B) { +>x : Symbol(x, Decl(narrowingGenericTypeFromInstanceof01.ts, 10, 17)) +>B : Symbol(B, Decl(narrowingGenericTypeFromInstanceof01.ts, 2, 1)) + + acceptA(x); +>acceptA : Symbol(acceptA, Decl(narrowingGenericTypeFromInstanceof01.ts, 5, 1)) +>x : Symbol(x, Decl(narrowingGenericTypeFromInstanceof01.ts, 10, 17)) + } + + if (x instanceof A) { +>x : Symbol(x, Decl(narrowingGenericTypeFromInstanceof01.ts, 10, 17)) +>A : Symbol(A, Decl(narrowingGenericTypeFromInstanceof01.ts, 0, 0)) + + acceptA(x); +>acceptA : Symbol(acceptA, Decl(narrowingGenericTypeFromInstanceof01.ts, 5, 1)) +>x : Symbol(x, Decl(narrowingGenericTypeFromInstanceof01.ts, 10, 17)) + } + + if (x instanceof B) { +>x : Symbol(x, Decl(narrowingGenericTypeFromInstanceof01.ts, 10, 17)) +>B : Symbol(B, Decl(narrowingGenericTypeFromInstanceof01.ts, 2, 1)) + + acceptB(x); +>acceptB : Symbol(acceptB, Decl(narrowingGenericTypeFromInstanceof01.ts, 7, 32)) +>x : Symbol(x, Decl(narrowingGenericTypeFromInstanceof01.ts, 10, 17)) + } + + if (x instanceof B) { +>x : Symbol(x, Decl(narrowingGenericTypeFromInstanceof01.ts, 10, 17)) +>B : Symbol(B, Decl(narrowingGenericTypeFromInstanceof01.ts, 2, 1)) + + acceptB(x); +>acceptB : Symbol(acceptB, Decl(narrowingGenericTypeFromInstanceof01.ts, 7, 32)) +>x : Symbol(x, Decl(narrowingGenericTypeFromInstanceof01.ts, 10, 17)) + } +} diff --git a/tests/baselines/reference/narrowingGenericTypeFromInstanceof01.types b/tests/baselines/reference/narrowingGenericTypeFromInstanceof01.types new file mode 100644 index 00000000000..a5b7c637c6c --- /dev/null +++ b/tests/baselines/reference/narrowingGenericTypeFromInstanceof01.types @@ -0,0 +1,81 @@ +=== tests/cases/conformance/types/typeRelationships/instanceOf/narrowingGenericTypeFromInstanceof01.ts === +class A { +>A : A +>T : T + + constructor(private a: string) { } +>a : string +} + +class B { +>B : B +>T : T +} + +function acceptA(a: A) { } +>acceptA : (a: A) => void +>T : T +>a : A +>A : A +>T : T + +function acceptB(b: B) { } +>acceptB : (b: B) => void +>T : T +>b : B +>B : B +>T : T + +function test(x: A | B) { +>test : (x: A | B) => void +>T : T +>x : A | B +>A : A +>T : T +>B : B +>T : T + + if (x instanceof B) { +>x instanceof B : boolean +>x : A | B +>B : typeof B + + acceptA(x); +>acceptA(x) : void +>acceptA : (a: A) => void +>x : A + } + + if (x instanceof A) { +>x instanceof A : boolean +>x : A | B +>A : typeof A + + acceptA(x); +>acceptA(x) : void +>acceptA : (a: A) => void +>x : A + } + + if (x instanceof B) { +>x instanceof B : boolean +>x : A | B +>B : typeof B + + acceptB(x); +>acceptB(x) : void +>acceptB : (b: B) => void +>x : A + } + + if (x instanceof B) { +>x instanceof B : boolean +>x : A | B +>B : typeof B + + acceptB(x); +>acceptB(x) : void +>acceptB : (b: B) => void +>x : A + } +} From 32308044d4bd89f750da42cbd1baa955c37c4511 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Fri, 30 Dec 2016 12:29:22 -0500 Subject: [PATCH 08/15] Check if the target types are equal instead of the types themselves. --- src/compiler/checker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 22dec25324d..7b34433ab62 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -6894,7 +6894,7 @@ namespace ts { // subtype of T but not structurally identical to T. This specifically means that two distinct but // structurally identical types (such as two classes) are not considered instances of each other. function isTypeInstanceOf(source: Type, target: Type): boolean { - return source === target || isTypeSubtypeOf(source, target) && !isTypeIdenticalTo(source, target); + return getTargetType(source) === getTargetType(target) || isTypeSubtypeOf(source, target) && !isTypeIdenticalTo(source, target); } /** From e535c0c29b675f749091a05926cdff5a7ecb75f9 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Fri, 30 Dec 2016 12:29:59 -0500 Subject: [PATCH 09/15] Accepted baselines. --- ...wingGenericTypeFromInstanceof01.errors.txt | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 tests/baselines/reference/narrowingGenericTypeFromInstanceof01.errors.txt diff --git a/tests/baselines/reference/narrowingGenericTypeFromInstanceof01.errors.txt b/tests/baselines/reference/narrowingGenericTypeFromInstanceof01.errors.txt new file mode 100644 index 00000000000..c686cd7a7cf --- /dev/null +++ b/tests/baselines/reference/narrowingGenericTypeFromInstanceof01.errors.txt @@ -0,0 +1,37 @@ +tests/cases/conformance/types/typeRelationships/instanceOf/narrowingGenericTypeFromInstanceof01.ts(13,17): error TS2345: Argument of type 'A | B' is not assignable to parameter of type 'A'. + Type 'B' is not assignable to type 'A'. + Property 'a' is missing in type 'B'. + + +==== tests/cases/conformance/types/typeRelationships/instanceOf/narrowingGenericTypeFromInstanceof01.ts (1 errors) ==== + class A { + constructor(private a: string) { } + } + + class B { + } + + function acceptA(a: A) { } + function acceptB(b: B) { } + + function test(x: A | B) { + if (x instanceof B) { + acceptA(x); + ~ +!!! error TS2345: Argument of type 'A | B' is not assignable to parameter of type 'A'. +!!! error TS2345: Type 'B' is not assignable to type 'A'. +!!! error TS2345: Property 'a' is missing in type 'B'. + } + + if (x instanceof A) { + acceptA(x); + } + + if (x instanceof B) { + acceptB(x); + } + + if (x instanceof B) { + acceptB(x); + } + } \ No newline at end of file From a89bb82929afb3a58998c07ed7311225999575d8 Mon Sep 17 00:00:00 2001 From: vvakame Date: Sat, 31 Dec 2016 22:26:39 +0900 Subject: [PATCH 10/15] address feedback --- src/compiler/transformers/es2015.ts | 4 ++-- ...sClassHeritageListMemberTypeAnnotations.js | 4 ++-- ...accessibleTypeInTypeParameterConstraint.js | 4 ++-- .../reference/abstractClassInLocalScope.js | 4 ++-- .../abstractClassInLocalScopeIsAbstract.js | 4 ++-- tests/baselines/reference/abstractProperty.js | 4 ++-- .../reference/abstractPropertyNegative.js | 4 ++-- .../accessOverriddenBaseClassMember1.js | 4 ++-- .../accessors_spec_section-4.5_inference.js | 4 ++-- .../reference/aliasUsageInAccessorsOfClass.js | 4 ++-- .../baselines/reference/aliasUsageInArray.js | 4 ++-- .../aliasUsageInFunctionExpression.js | 4 ++-- .../reference/aliasUsageInGenericFunction.js | 4 ++-- .../reference/aliasUsageInIndexerOfClass.js | 4 ++-- .../reference/aliasUsageInObjectLiteral.js | 4 ++-- .../reference/aliasUsageInOrExpression.js | 4 ++-- ...aliasUsageInTypeArgumentOfExtendsClause.js | 8 +++---- .../reference/aliasUsageInVarAssignment.js | 4 ++-- .../reference/ambiguousOverloadResolution.js | 4 ++-- .../reference/apparentTypeSubtyping.js | 4 ++-- .../reference/apparentTypeSupertype.js | 4 ++-- .../reference/arrayAssignmentTest1.js | 4 ++-- .../reference/arrayAssignmentTest2.js | 4 ++-- .../reference/arrayBestCommonTypes.js | 4 ++-- .../reference/arrayLiteralTypeInference.js | 4 ++-- tests/baselines/reference/arrayLiterals.js | 4 ++-- .../arrayLiteralsWithRecursiveGenerics.js | 4 ++-- ...rayOfSubtypeIsAssignableToReadonlyArray.js | 4 ++-- .../reference/arrowFunctionContexts.js | 4 ++-- .../assignmentCompatWithCallSignatures3.js | 4 ++-- .../assignmentCompatWithCallSignatures4.js | 4 ++-- .../assignmentCompatWithCallSignatures5.js | 4 ++-- .../assignmentCompatWithCallSignatures6.js | 4 ++-- ...ssignmentCompatWithConstructSignatures3.js | 4 ++-- ...ssignmentCompatWithConstructSignatures4.js | 4 ++-- ...ssignmentCompatWithConstructSignatures5.js | 4 ++-- ...ssignmentCompatWithConstructSignatures6.js | 4 ++-- .../assignmentCompatWithNumericIndexer.js | 4 ++-- .../assignmentCompatWithNumericIndexer3.js | 4 ++-- .../assignmentCompatWithObjectMembers4.js | 4 ++-- ...nmentCompatWithObjectMembersOptionality.js | 4 ++-- ...mentCompatWithObjectMembersOptionality2.js | 4 ++-- .../assignmentCompatWithStringIndexer.js | 4 ++-- .../reference/assignmentLHSIsValue.js | 4 ++-- .../reference/asyncImportedPromise_es5.js | 4 ++-- tests/baselines/reference/autolift4.js | 4 ++-- tests/baselines/reference/baseCheck.js | 4 ++-- .../reference/baseIndexSignatureResolution.js | 4 ++-- .../reference/baseTypeOrderChecking.js | 4 ++-- .../baseTypeWrappingInstantiationChain.js | 4 ++-- tests/baselines/reference/bases.js | 4 ++-- .../bestCommonTypeOfConditionalExpressions.js | 4 ++-- ...bestCommonTypeOfConditionalExpressions2.js | 4 ++-- .../reference/bestCommonTypeOfTuple2.js | 4 ++-- ...allSignatureAssignabilityInInheritance2.js | 4 ++-- ...allSignatureAssignabilityInInheritance3.js | 4 ++-- ...allSignatureAssignabilityInInheritance4.js | 4 ++-- ...allSignatureAssignabilityInInheritance5.js | 4 ++-- ...allSignatureAssignabilityInInheritance6.js | 4 ++-- tests/baselines/reference/callWithSpread.js | 4 ++-- .../reference/captureThisInSuperCall.js | 4 ++-- tests/baselines/reference/castingTuple.js | 4 ++-- .../baselines/reference/chainedAssignment3.js | 4 ++-- ...arameterConstrainedToOtherTypeParameter.js | 4 ++-- .../reference/checkForObjectTooStrict.js | 4 ++-- .../checkSuperCallBeforeThisAccessing1.js | 4 ++-- .../checkSuperCallBeforeThisAccessing2.js | 4 ++-- .../checkSuperCallBeforeThisAccessing3.js | 4 ++-- .../checkSuperCallBeforeThisAccessing4.js | 4 ++-- .../checkSuperCallBeforeThisAccessing5.js | 4 ++-- .../checkSuperCallBeforeThisAccessing6.js | 4 ++-- .../checkSuperCallBeforeThisAccessing7.js | 4 ++-- .../checkSuperCallBeforeThisAccessing8.js | 4 ++-- .../reference/circularImportAlias.js | 4 ++-- .../circularTypeofWithFunctionModule.js | 4 ++-- .../classAbstractConstructorAssignability.js | 4 ++-- .../reference/classAbstractCrashedOnce.js | 4 ++-- .../reference/classAbstractExtends.js | 4 ++-- .../reference/classAbstractFactoryFunction.js | 4 ++-- .../reference/classAbstractGeneric.js | 4 ++-- .../reference/classAbstractInAModule.js | 4 ++-- .../reference/classAbstractInheritance.js | 4 ++-- .../reference/classAbstractInstantiations1.js | 4 ++-- .../reference/classAbstractInstantiations2.js | 4 ++-- .../classAbstractOverrideWithAbstract.js | 4 ++-- .../reference/classAbstractSuperCalls.js | 4 ++-- .../classAbstractUsingAbstractMethod1.js | 4 ++-- .../classAbstractUsingAbstractMethods2.js | 4 ++-- .../classConstructorAccessibility2.js | 4 ++-- .../classConstructorAccessibility4.js | 4 ++-- .../classConstructorAccessibility5.js | 4 ++-- ...classConstructorParametersAccessibility.js | 4 ++-- ...lassConstructorParametersAccessibility2.js | 4 ++-- ...lassConstructorParametersAccessibility3.js | 4 ++-- ...clarationMergedInModuleWithContinuation.js | 4 ++-- .../classDeclaredBeforeClassFactory.js | 4 ++-- .../classDoesNotDependOnBaseTypes.js | 4 ++-- tests/baselines/reference/classExpression2.js | 4 ++-- tests/baselines/reference/classExpression3.js | 4 ++-- .../classExpressionExtendingAbstractClass.js | 4 ++-- .../reference/classExtendingBuiltinType.js | 4 ++-- .../reference/classExtendingClass.js | 4 ++-- .../reference/classExtendingClassLikeType.js | 4 ++-- .../reference/classExtendingNonConstructor.js | 4 ++-- .../baselines/reference/classExtendingNull.js | 4 ++-- .../reference/classExtendingPrimitive.js | 4 ++-- .../reference/classExtendingPrimitive2.js | 4 ++-- .../reference/classExtendingQualifiedName.js | 4 ++-- .../reference/classExtendingQualifiedName2.js | 4 ++-- .../reference/classExtendsAcrossFiles.js | 8 +++---- ...sMergedWithModuleNotReferingConstructor.js | 4 ++-- ...tendsClauseClassNotReferringConstructor.js | 4 ++-- .../reference/classExtendsEveryObjectType.js | 4 ++-- .../reference/classExtendsEveryObjectType2.js | 4 ++-- .../reference/classExtendsInterface.js | 4 ++-- .../classExtendsInterfaceInExpression.js | 4 ++-- .../classExtendsInterfaceInModule.js | 4 ++-- .../baselines/reference/classExtendsItself.js | 4 ++-- .../reference/classExtendsItselfIndirectly.js | 4 ++-- .../classExtendsItselfIndirectly2.js | 4 ++-- .../classExtendsItselfIndirectly3.js | 24 +++++++++---------- .../classExtendsMultipleBaseClasses.js | 4 ++-- tests/baselines/reference/classExtendsNull.js | 4 ++-- ...classExtendsShadowedConstructorFunction.js | 4 ++-- .../classExtendsValidConstructorFunction.js | 4 ++-- .../classHeritageWithTrailingSeparator.js | 4 ++-- .../reference/classImplementsClass2.js | 4 ++-- .../reference/classImplementsClass3.js | 4 ++-- .../reference/classImplementsClass4.js | 4 ++-- .../reference/classImplementsClass5.js | 4 ++-- .../reference/classImplementsClass6.js | 4 ++-- tests/baselines/reference/classIndexer3.js | 4 ++-- tests/baselines/reference/classInheritence.js | 4 ++-- .../reference/classIsSubtypeOfBaseType.js | 4 ++-- tests/baselines/reference/classOrder2.js | 4 ++-- tests/baselines/reference/classOrderBug.js | 4 ++-- .../reference/classSideInheritance1.js | 4 ++-- .../reference/classSideInheritance2.js | 4 ++-- .../reference/classSideInheritance3.js | 4 ++-- tests/baselines/reference/classUpdateTests.js | 4 ++-- .../classWithBaseClassButNoConstructor.js | 4 ++-- .../reference/classWithConstructors.js | 4 ++-- .../reference/classWithProtectedProperty.js | 4 ++-- .../reference/classWithStaticMembers.js | 4 ++-- tests/baselines/reference/classdecl.js | 4 ++-- .../reference/clodulesDerivedClasses.js | 4 ++-- ...llisionSuperAndLocalFunctionInAccessors.js | 4 ++-- ...isionSuperAndLocalFunctionInConstructor.js | 4 ++-- .../collisionSuperAndLocalFunctionInMethod.js | 4 ++-- ...ollisionSuperAndLocalFunctionInProperty.js | 4 ++-- .../collisionSuperAndLocalVarInAccessors.js | 4 ++-- .../collisionSuperAndLocalVarInConstructor.js | 4 ++-- .../collisionSuperAndLocalVarInMethod.js | 4 ++-- .../collisionSuperAndLocalVarInProperty.js | 4 ++-- .../collisionSuperAndNameResolution.js | 4 ++-- .../reference/collisionSuperAndParameter.js | 4 ++-- .../reference/collisionSuperAndParameter1.js | 4 ++-- ...perAndPropertyNameAsConstuctorParameter.js | 4 ++-- ...xpressionAndLocalVarWithSuperExperssion.js | 4 ++-- .../reference/commentsInheritance.js | 4 ++-- .../comparisonOperatorWithIdenticalObjects.js | 4 ++-- ...ithNoRelationshipObjectsOnCallSignature.js | 4 ++-- ...lationshipObjectsOnConstructorSignature.js | 4 ++-- ...thNoRelationshipObjectsOnIndexSignature.js | 4 ++-- ...nshipObjectsOnInstantiatedCallSignature.js | 4 ++-- ...jectsOnInstantiatedConstructorSignature.js | 4 ++-- ...peratorWithSubtypeObjectOnCallSignature.js | 4 ++-- ...WithSubtypeObjectOnConstructorSignature.js | 4 ++-- ...eratorWithSubtypeObjectOnIndexSignature.js | 4 ++-- ...ubtypeObjectOnInstantiatedCallSignature.js | 4 ++-- ...bjectOnInstantiatedConstructorSignature.js | 4 ++-- ...isonOperatorWithSubtypeObjectOnProperty.js | 4 ++-- .../reference/complexClassRelationships.js | 4 ++-- ...catedGenericRecursiveBaseClassReference.js | 4 ++-- .../reference/compoundAssignmentLHSIsValue.js | 4 ++-- ...poundExponentiationAssignmentLHSIsValue.js | 4 ++-- .../reference/computedPropertyNames24_ES5.js | 4 ++-- .../reference/computedPropertyNames25_ES5.js | 4 ++-- .../reference/computedPropertyNames26_ES5.js | 4 ++-- .../reference/computedPropertyNames27_ES5.js | 4 ++-- .../reference/computedPropertyNames28_ES5.js | 4 ++-- .../reference/computedPropertyNames30_ES5.js | 4 ++-- .../reference/computedPropertyNames31_ES5.js | 4 ++-- .../reference/computedPropertyNames43_ES5.js | 4 ++-- .../reference/computedPropertyNames44_ES5.js | 4 ++-- .../reference/computedPropertyNames45_ES5.js | 4 ++-- .../conditionalOperatorWithIdenticalBCT.js | 4 ++-- .../conditionalOperatorWithoutIdenticalBCT.js | 4 ++-- .../reference/constantOverloadFunction.js | 4 ++-- .../constantOverloadFunctionNoSubtypeError.js | 4 ++-- ...nstraintCheckInGenericBaseTypeReference.js | 4 ++-- ...uctSignatureAssignabilityInInheritance2.js | 4 ++-- ...uctSignatureAssignabilityInInheritance3.js | 4 ++-- ...uctSignatureAssignabilityInInheritance4.js | 4 ++-- ...uctSignatureAssignabilityInInheritance5.js | 4 ++-- ...uctSignatureAssignabilityInInheritance6.js | 4 ++-- tests/baselines/reference/constructorArgs.js | 4 ++-- ...uctorFunctionTypeIsAssignableToBaseType.js | 4 ++-- ...ctorFunctionTypeIsAssignableToBaseType2.js | 4 ++-- .../constructorHasPrototypeProperty.js | 4 ++-- .../reference/constructorOverloads2.js | 4 ++-- .../reference/constructorOverloads3.js | 4 ++-- .../reference/constructorWithCapturedSuper.js | 4 ++-- ...constructorWithIncompleteTypeAnnotation.js | 4 ++-- .../contextualTypingArrayOfLambdas.js | 4 ++-- ...contextualTypingOfConditionalExpression.js | 4 ++-- ...ontextualTypingOfConditionalExpression2.js | 4 ++-- ...urcePropertyIsRelatableToTargetProperty.js | 4 ++-- .../reference/declFileClassExtendsNull.js | 4 ++-- .../declFileForFunctionTypeAsTypeParameter.js | 4 ++-- ...ileGenericClassWithGenericExtendedClass.js | 4 ++-- .../reference/declFileGenericType.js | 4 ++-- .../reference/declFileGenericType2.js | 4 ++-- ...lictingWithClassReferredByExtendsClause.js | 4 ++-- ...dsClauseThatHasItsContainerNameConflict.js | 4 ++-- .../declarationEmitExpressionInExtends.js | 4 ++-- .../declarationEmitExpressionInExtends2.js | 4 ++-- .../declarationEmitExpressionInExtends3.js | 4 ++-- .../declarationEmitExpressionInExtends4.js | 4 ++-- .../declarationEmitNameConflicts3.js | 4 ++-- .../declarationEmitProtectedMembers.js | 4 ++-- .../declarationEmitThisPredicates01.js | 4 ++-- ...tionEmitThisPredicatesWithPrivateName01.js | 4 ++-- .../reference/declareDottedExtend.js | 4 ++-- .../reference/decoratorOnClassConstructor2.js | 4 ++-- .../reference/decoratorOnClassConstructor3.js | 4 ++-- .../reference/decoratorOnClassMethod12.js | 4 ++-- ...edClassConstructorWithExplicitReturns01.js | 4 ++-- ...tructorWithExplicitReturns01.sourcemap.txt | 4 ++-- ...derivedClassConstructorWithoutSuperCall.js | 4 ++-- ...ClassFunctionOverridesBaseClassAccessor.js | 4 ++-- .../derivedClassIncludesInheritedMembers.js | 4 ++-- ...idesIndexersWithAssignmentCompatibility.js | 4 ++-- .../derivedClassOverridesPrivateFunction1.js | 4 ++-- .../derivedClassOverridesPrivates.js | 4 ++-- .../derivedClassOverridesProtectedMembers.js | 4 ++-- .../derivedClassOverridesProtectedMembers2.js | 4 ++-- .../derivedClassOverridesProtectedMembers3.js | 4 ++-- .../derivedClassOverridesProtectedMembers4.js | 4 ++-- .../derivedClassOverridesPublicMembers.js | 4 ++-- .../derivedClassOverridesWithoutSubtype.js | 4 ++-- .../derivedClassParameterProperties.js | 4 ++-- ...dClassSuperCallsInNonConstructorMembers.js | 4 ++-- .../derivedClassSuperCallsWithThisArg.js | 4 ++-- .../reference/derivedClassTransitivity.js | 4 ++-- .../reference/derivedClassTransitivity2.js | 4 ++-- .../reference/derivedClassTransitivity3.js | 4 ++-- .../reference/derivedClassTransitivity4.js | 4 ++-- .../reference/derivedClassWithAny.js | 4 ++-- ...ivateInstanceShadowingProtectedInstance.js | 4 ++-- ...hPrivateInstanceShadowingPublicInstance.js | 4 ++-- ...thPrivateStaticShadowingProtectedStatic.js | 4 ++-- ...sWithPrivateStaticShadowingPublicStatic.js | 4 ++-- .../derivedClassWithoutExplicitConstructor.js | 4 ++-- ...derivedClassWithoutExplicitConstructor2.js | 4 ++-- ...derivedClassWithoutExplicitConstructor3.js | 4 ++-- tests/baselines/reference/derivedClasses.js | 4 ++-- .../reference/derivedGenericClassWithAny.js | 4 ++-- ...sesHiddenBaseCallViaSuperPropertyAccess.js | 4 ++-- .../derivedTypeDoesNotRequireExtendsClause.js | 4 ++-- .../destructuringParameterDeclaration5.js | 4 ++-- ...BeforeEmitParameterPropertyDeclaration1.js | 4 ++-- ...SuperCallBeforeEmitPropertyDeclaration1.js | 4 ++-- ...arationAndParameterPropertyDeclaration1.js | 4 ++-- .../reference/emitThisInSuperMethodCall.js | 4 ++-- tests/baselines/reference/emptyModuleName.js | 4 ++-- ...rorForwardReferenceForwadingConstructor.js | 4 ++-- tests/baselines/reference/errorSuperCalls.js | 4 ++-- .../reference/errorSuperPropertyAccess.js | 4 ++-- .../reference/errorsInGenericTypeReference.js | 4 ++-- .../reference/es6ClassSuperCodegenBug.js | 4 ++-- tests/baselines/reference/es6ClassTest.js | 4 ++-- tests/baselines/reference/es6ClassTest2.js | 4 ++-- tests/baselines/reference/es6ClassTest7.js | 4 ++-- .../exportAssignmentOfGenericType1.js | 4 ++-- .../exportDeclarationInInternalModule.js | 4 ++-- tests/baselines/reference/extBaseClass1.js | 4 ++-- tests/baselines/reference/extBaseClass2.js | 4 ++-- .../extendAndImplementTheSameBaseType.js | 4 ++-- .../extendAndImplementTheSameBaseType2.js | 4 ++-- .../extendBaseClassBeforeItsDeclared.js | 4 ++-- .../extendClassExpressionFromModule.js | 4 ++-- .../extendConstructSignatureInInterface.js | 4 ++-- .../reference/extendNonClassSymbol1.js | 4 ++-- .../reference/extendNonClassSymbol2.js | 4 ++-- .../extendPrivateConstructorClass.js | 4 ++-- ...xtendingClassFromAliasAndUsageInIndexer.js | 8 +++---- .../reference/extendsClauseAlreadySeen.js | 4 ++-- .../reference/extendsClauseAlreadySeen2.js | 4 ++-- tests/baselines/reference/fluentClasses.js | 4 ++-- tests/baselines/reference/for-inStatements.js | 4 ++-- .../reference/for-inStatementsInvalid.js | 4 ++-- .../forStatementsMultipleInvalidDecl.js | 4 ++-- .../reference/functionImplementationErrors.js | 4 ++-- .../reference/functionImplementations.js | 4 ++-- .../reference/functionSubtypingOfVarArgs.js | 4 ++-- .../reference/functionSubtypingOfVarArgs2.js | 4 ++-- .../reference/generatedContextualTyping.js | 4 ++-- .../genericBaseClassLiteralProperty.js | 4 ++-- .../genericBaseClassLiteralProperty2.js | 4 ++-- ...allWithConstraintsTypeArgumentInference.js | 4 ++-- .../genericCallWithObjectTypeArgs2.js | 4 ++-- ...icCallWithObjectTypeArgsAndConstraints2.js | 4 ++-- ...icCallWithObjectTypeArgsAndConstraints3.js | 4 ++-- .../genericCallbacksAndClassHierarchy.js | 4 ++-- .../genericClassExpressionInFunction.js | 4 ++-- ...sInheritsConstructorFromNonGenericClass.js | 4 ++-- ...cClassPropertyInheritanceSpecialization.js | 4 ++-- .../reference/genericClassStaticMethod.js | 4 ++-- tests/baselines/reference/genericClasses3.js | 4 ++-- ...genericConstraintOnExtendedBuiltinTypes.js | 4 ++-- ...enericConstraintOnExtendedBuiltinTypes2.js | 4 ++-- .../genericDerivedTypeWithSpecializedBase.js | 4 ++-- .../genericDerivedTypeWithSpecializedBase2.js | 4 ++-- .../genericInheritedDefaultConstructors.js | 4 ++-- .../reference/genericPrototypeProperty2.js | 4 ++-- .../reference/genericPrototypeProperty3.js | 4 ++-- ...ericRecursiveImplicitConstructorErrors2.js | 4 ++-- ...ericRecursiveImplicitConstructorErrors3.js | 4 ++-- .../reference/genericTypeAssertions2.js | 4 ++-- .../reference/genericTypeAssertions4.js | 4 ++-- .../reference/genericTypeAssertions6.js | 4 ++-- .../reference/genericTypeConstraints.js | 4 ++-- ...genericTypeReferenceWithoutTypeArgument.js | 4 ++-- ...enericTypeReferenceWithoutTypeArgument2.js | 4 ++-- .../genericWithIndexerOfTypeParameterType2.js | 4 ++-- .../reference/heterogeneousArrayLiterals.js | 4 ++-- .../reference/ifDoWhileStatements.js | 4 ++-- .../illegalSuperCallsInConstructor.js | 4 ++-- .../implementClausePrecedingExtends.js | 4 ++-- ...gAnInterfaceExtendingClassWithPrivates2.js | 4 ++-- ...AnInterfaceExtendingClassWithProtecteds.js | 4 ++-- .../baselines/reference/importAsBaseClass.js | 4 ++-- tests/baselines/reference/importHelpers.js | 4 ++-- .../reference/importHelpersNoHelpers.js | 4 ++-- .../reference/importHelpersNoModule.js | 4 ++-- .../reference/importShadowsGlobalName.js | 4 ++-- .../reference/importUsedInExtendsList1.js | 4 ++-- .../reference/indexerConstraints2.js | 4 ++-- .../reference/indirectSelfReference.js | 4 ++-- .../reference/indirectSelfReferenceGeneric.js | 4 ++-- .../infinitelyExpandingTypesNonGenericBase.js | 4 ++-- .../inheritFromGenericTypeParameter.js | 4 ++-- ...SameNamePrivatePropertiesFromSameOrigin.js | 4 ++-- tests/baselines/reference/inheritance.js | 4 ++-- tests/baselines/reference/inheritance1.js | 4 ++-- ...itanceGrandParentPrivateMemberCollision.js | 4 ++-- ...tPrivateMemberCollisionWithPublicMember.js | 4 ++-- ...tPublicMemberCollisionWithPrivateMember.js | 4 ++-- ...ritanceMemberAccessorOverridingAccessor.js | 4 ++-- ...heritanceMemberAccessorOverridingMethod.js | 4 ++-- ...ritanceMemberAccessorOverridingProperty.js | 4 ++-- ...inheritanceMemberFuncOverridingAccessor.js | 4 ++-- .../inheritanceMemberFuncOverridingMethod.js | 4 ++-- ...inheritanceMemberFuncOverridingProperty.js | 4 ++-- ...ritanceMemberPropertyOverridingAccessor.js | 4 ++-- ...heritanceMemberPropertyOverridingMethod.js | 4 ++-- ...ritanceMemberPropertyOverridingProperty.js | 4 ++-- .../inheritanceOfGenericConstructorMethod1.js | 4 ++-- .../inheritanceOfGenericConstructorMethod2.js | 4 ++-- ...ritanceStaticAccessorOverridingAccessor.js | 4 ++-- ...heritanceStaticAccessorOverridingMethod.js | 4 ++-- ...ritanceStaticAccessorOverridingProperty.js | 4 ++-- ...inheritanceStaticFuncOverridingAccessor.js | 4 ++-- ...eStaticFuncOverridingAccessorOfFuncType.js | 4 ++-- .../inheritanceStaticFuncOverridingMethod.js | 4 ++-- ...inheritanceStaticFuncOverridingProperty.js | 4 ++-- ...eStaticFuncOverridingPropertyOfFuncType.js | 4 ++-- ...taticFunctionOverridingInstanceProperty.js | 4 ++-- .../inheritanceStaticMembersCompatible.js | 4 ++-- .../inheritanceStaticMembersIncompatible.js | 4 ++-- ...ritanceStaticPropertyOverridingAccessor.js | 4 ++-- ...heritanceStaticPropertyOverridingMethod.js | 4 ++-- ...ritanceStaticPropertyOverridingProperty.js | 4 ++-- .../inheritedConstructorWithRestParams.js | 4 ++-- .../inheritedConstructorWithRestParams2.js | 4 ++-- .../inheritedModuleMembersForClodule.js | 4 ++-- .../reference/instanceOfAssignability.js | 4 ++-- ...nstancePropertiesInheritedIntoClassType.js | 4 ++-- .../reference/instanceSubtypeCheck2.js | 4 ++-- ...nstanceofWithStructurallyIdenticalTypes.js | 4 ++-- .../instantiatedReturnTypeContravariance.js | 4 ++-- .../reference/interfaceClassMerging.js | 4 ++-- .../reference/interfaceClassMerging2.js | 4 ++-- .../reference/interfaceExtendsClass1.js | 4 ++-- .../interfaceExtendsClassWithPrivate1.js | 4 ++-- .../interfaceExtendsClassWithPrivate2.js | 4 ++-- .../reference/interfaceImplementation8.js | 4 ++-- .../invalidModuleWithStatementsOfEveryKind.js | 4 ++-- .../invalidMultipleVariableDeclarations.js | 4 ++-- .../reference/invalidReturnStatements.js | 4 ++-- .../isolatedModulesImportExportElision.js | 4 ++-- tests/baselines/reference/jsxViaImport.js | 4 ++-- .../reference/keyofAndIndexedAccess.js | 4 ++-- tests/baselines/reference/lambdaArgCrash.js | 4 ++-- tests/baselines/reference/lift.js | 4 ++-- tests/baselines/reference/localTypes1.js | 4 ++-- tests/baselines/reference/m7Bugs.js | 4 ++-- .../reference/mergedDeclarations5.js | 4 ++-- .../reference/mergedDeclarations6.js | 4 ++-- .../mergedInheritedClassInterface.js | 4 ++-- .../mergedInterfacesWithInheritedPrivates2.js | 4 ++-- .../mergedInterfacesWithInheritedPrivates3.js | 4 ++-- .../missingPropertiesOfClassExpression.js | 4 ++-- tests/baselines/reference/moduleAsBaseType.js | 4 ++-- .../moduleImportedForTypeArgumentPosition.js | 4 ++-- .../moduleWithStatementsOfEveryKind.js | 4 ++-- .../reference/multipleInheritance.js | 4 ++-- .../mutuallyRecursiveGenericBaseTypes2.js | 4 ++-- .../noImplicitAnyMissingGetAccessor.js | 4 ++-- .../noImplicitAnyMissingSetAccessor.js | 4 ++-- ...enericClassExtendingGenericClassWithAny.js | 4 ++-- ...cIndexerConstrainsPropertyDeclarations2.js | 4 ++-- .../reference/numericIndexerConstraint3.js | 4 ++-- .../reference/numericIndexerConstraint4.js | 4 ++-- .../reference/numericIndexerTyping2.js | 4 ++-- ...objectCreationOfElementAccessExpression.js | 4 ++-- ...objectTypeHidingMembersOfExtendedObject.js | 4 ++-- ...objectTypesIdentityWithNumericIndexers1.js | 4 ++-- ...objectTypesIdentityWithNumericIndexers2.js | 4 ++-- ...objectTypesIdentityWithNumericIndexers3.js | 4 ++-- .../objectTypesIdentityWithPrivates.js | 4 ++-- .../objectTypesIdentityWithPrivates2.js | 4 ++-- .../objectTypesIdentityWithPrivates3.js | 4 ++-- .../objectTypesIdentityWithStringIndexers.js | 4 ++-- .../objectTypesIdentityWithStringIndexers2.js | 4 ++-- .../optionalConstructorArgInSuper.js | 4 ++-- tests/baselines/reference/optionalMethods.js | 4 ++-- .../reference/optionalParamArgsTest.js | 4 ++-- .../reference/optionalParamInOverride.js | 4 ++-- .../reference/optionalParameterProperty.js | 4 ++-- .../baselines/reference/outModuleConcatAmd.js | 4 ++-- .../outModuleConcatAmd.sourcemap.txt | 4 ++-- .../reference/outModuleConcatSystem.js | 4 ++-- .../outModuleConcatSystem.sourcemap.txt | 4 ++-- .../reference/outModuleTripleSlashRefs.js | 4 ++-- .../outModuleTripleSlashRefs.sourcemap.txt | 4 ++-- tests/baselines/reference/overload1.js | 4 ++-- .../overloadOnConstConstraintChecks1.js | 4 ++-- .../overloadOnConstConstraintChecks2.js | 4 ++-- .../overloadOnConstConstraintChecks3.js | 4 ++-- .../overloadOnConstConstraintChecks4.js | 4 ++-- .../overloadOnConstantsInvalidOverload1.js | 4 ++-- .../baselines/reference/overloadResolution.js | 4 ++-- .../overloadResolutionClassConstructors.js | 4 ++-- .../overloadResolutionConstructors.js | 4 ++-- .../reference/overloadingOnConstants1.js | 4 ++-- .../reference/overloadingOnConstants2.js | 4 ++-- .../overridingPrivateStaticMembers.js | 4 ++-- .../reference/parseErrorInHeritageClause1.js | 4 ++-- tests/baselines/reference/parser509630.js | 4 ++-- tests/baselines/reference/parserAstSpans1.js | 4 ++-- .../reference/parserClassDeclaration1.js | 4 ++-- .../reference/parserClassDeclaration3.js | 4 ++-- .../reference/parserClassDeclaration4.js | 4 ++-- .../reference/parserClassDeclaration5.js | 4 ++-- .../reference/parserClassDeclaration6.js | 4 ++-- ...rrorRecovery_ExtendsOrImplementsClause2.js | 4 ++-- ...rrorRecovery_ExtendsOrImplementsClause4.js | 4 ++-- ...rrorRecovery_ExtendsOrImplementsClause5.js | 4 ++-- .../parserGenericsInTypeContexts1.js | 4 ++-- .../parserGenericsInTypeContexts2.js | 4 ++-- .../baselines/reference/parserRealSource10.js | 4 ++-- .../baselines/reference/parserRealSource11.js | 4 ++-- tests/baselines/reference/parserharness.js | 4 ++-- ...artiallyAnnotatedFunctionInferenceError.js | 4 ++-- ...tatedFunctionInferenceWithTypeParameter.js | 4 ++-- tests/baselines/reference/primitiveMembers.js | 4 ++-- tests/baselines/reference/privacyClass.js | 4 ++-- .../privacyClassExtendsClauseDeclFile.js | 8 +++---- tests/baselines/reference/privacyGloClass.js | 4 ++-- .../reference/privateAccessInSubclass1.js | 4 ++-- .../privateInstanceMemberAccessibility.js | 4 ++-- ...tedMembersAreNotAccessibleDestructuring.js | 4 ++-- .../privateStaticMemberAccessibility.js | 4 ++-- .../privateStaticNotAccessibleInClodule2.js | 4 ++-- .../amd/testGlo.js | 4 ++-- .../node/testGlo.js | 4 ++-- .../reference/project/prologueEmit/amd/out.js | 4 ++-- .../project/prologueEmit/node/out.js | 4 ++-- .../amd/m'ain.js | 4 ++-- .../node/m'ain.js | 4 ++-- .../reference/propertiesAndIndexers.js | 4 ++-- tests/baselines/reference/propertyAccess.js | 4 ++-- ...tyAccessOnTypeParameterWithConstraints2.js | 4 ++-- ...tyAccessOnTypeParameterWithConstraints3.js | 4 ++-- ...tyAccessOnTypeParameterWithConstraints5.js | 4 ++-- ...sPropertyAccessibleWithinNestedSubclass.js | 4 ++-- ...PropertyAccessibleWithinNestedSubclass1.js | 4 ++-- ...edClassPropertyAccessibleWithinSubclass.js | 4 ++-- ...dClassPropertyAccessibleWithinSubclass2.js | 4 ++-- ...dClassPropertyAccessibleWithinSubclass3.js | 4 ++-- .../protectedInstanceMemberAccessibility.js | 4 ++-- tests/baselines/reference/protectedMembers.js | 4 ++-- ...icClassPropertyAccessibleWithinSubclass.js | 4 ++-- ...cClassPropertyAccessibleWithinSubclass2.js | 4 ++-- ...solution-does-not-affect-class-heritage.js | 4 ++-- .../readonlyConstructorAssignment.js | 4 ++-- .../reference/recursiveBaseCheck3.js | 4 ++-- .../reference/recursiveBaseCheck4.js | 4 ++-- .../reference/recursiveBaseCheck6.js | 4 ++-- .../recursiveBaseConstructorCreation1.js | 4 ++-- ...ssInstantiationsWithDefaultConstructors.js | 4 ++-- .../reference/recursiveClassReferenceTest.js | 4 ++-- .../recursiveClassReferenceTest.sourcemap.txt | 4 ++-- .../reference/recursiveComplicatedClasses.js | 4 ++-- ...sivelySpecializedConstructorDeclaration.js | 4 ++-- .../reference/reexportClassDefinition.js | 4 ++-- ...lassDeclarationWhenInBaseTypeResolution.js | 4 ++-- .../reference/returnInConstructor1.js | 4 ++-- tests/baselines/reference/returnStatements.js | 4 ++-- ...peCheckExtendedClassInsidePublicMethod2.js | 4 ++-- ...peCheckExtendedClassInsideStaticMethod1.js | 4 ++-- tests/baselines/reference/scopeTests.js | 4 ++-- .../reference/shadowPrivateMembers.js | 4 ++-- ...sWithDefaultConstructorAndExtendsClause.js | 4 ++-- ...tConstructorAndExtendsClause.sourcemap.txt | 4 ++-- .../specializedInheritedConstructors1.js | 4 ++-- .../specializedOverloadWithRestParameters.js | 4 ++-- tests/baselines/reference/staticFactory1.js | 4 ++-- .../baselines/reference/staticInheritance.js | 4 ++-- .../staticMemberAccessOffDerivedType1.js | 4 ++-- tests/baselines/reference/staticPropSuper.js | 4 ++-- .../reference/strictModeInConstructor.js | 4 ++-- .../reference/strictModeReservedWord.js | 4 ++-- ...trictModeReservedWordInClassDeclaration.js | 4 ++-- ...gIndexerConstrainsPropertyDeclarations2.js | 4 ++-- .../reference/subtypesOfTypeParameter.js | 4 ++-- .../subtypesOfTypeParameterWithConstraints.js | 4 ++-- ...subtypesOfTypeParameterWithConstraints4.js | 4 ++-- ...OfTypeParameterWithRecursiveConstraints.js | 4 ++-- .../reference/subtypingTransitivity.js | 4 ++-- .../reference/subtypingWithCallSignatures2.js | 4 ++-- .../reference/subtypingWithCallSignatures3.js | 4 ++-- .../reference/subtypingWithCallSignatures4.js | 4 ++-- .../subtypingWithConstructSignatures2.js | 4 ++-- .../subtypingWithConstructSignatures3.js | 4 ++-- .../subtypingWithConstructSignatures4.js | 4 ++-- .../subtypingWithConstructSignatures5.js | 4 ++-- .../subtypingWithConstructSignatures6.js | 4 ++-- .../reference/subtypingWithNumericIndexer.js | 4 ++-- .../reference/subtypingWithNumericIndexer3.js | 4 ++-- .../reference/subtypingWithNumericIndexer4.js | 4 ++-- .../reference/subtypingWithObjectMembers.js | 4 ++-- .../reference/subtypingWithObjectMembers4.js | 4 ++-- ...subtypingWithObjectMembersAccessibility.js | 4 ++-- ...ubtypingWithObjectMembersAccessibility2.js | 4 ++-- .../reference/subtypingWithStringIndexer.js | 4 ++-- .../reference/subtypingWithStringIndexer3.js | 4 ++-- .../reference/subtypingWithStringIndexer4.js | 4 ++-- tests/baselines/reference/super.js | 4 ++-- tests/baselines/reference/super1.js | 4 ++-- tests/baselines/reference/super2.js | 4 ++-- tests/baselines/reference/superAccess.js | 4 ++-- tests/baselines/reference/superAccess2.js | 4 ++-- .../reference/superAccessInFatArrow1.js | 4 ++-- .../reference/superCallArgsMustMatch.js | 4 ++-- .../reference/superCallAssignResult.js | 4 ++-- .../superCallBeforeThisAccessing1.js | 4 ++-- .../superCallBeforeThisAccessing2.js | 4 ++-- .../superCallBeforeThisAccessing3.js | 4 ++-- .../superCallBeforeThisAccessing4.js | 4 ++-- .../superCallBeforeThisAccessing5.js | 4 ++-- .../superCallBeforeThisAccessing6.js | 4 ++-- .../superCallBeforeThisAccessing7.js | 4 ++-- .../superCallBeforeThisAccessing8.js | 4 ++-- ...allFromClassThatDerivesFromGenericType1.js | 4 ++-- ...allFromClassThatDerivesFromGenericType2.js | 4 ++-- ...eButWithIncorrectNumberOfTypeArguments1.js | 4 ++-- ...sFromGenericTypeButWithNoTypeArguments1.js | 4 ++-- ...ivesNonGenericTypeButWithTypeArguments1.js | 4 ++-- .../reference/superCallInNonStaticMethod.js | 4 ++-- .../reference/superCallInStaticMethod.js | 4 ++-- .../superCallInsideClassDeclaration.js | 4 ++-- .../superCallInsideClassExpression.js | 4 ++-- .../superCallInsideObjectLiteralExpression.js | 4 ++-- .../reference/superCallOutsideConstructor.js | 4 ++-- .../superCallParameterContextualTyping1.js | 4 ++-- .../superCallParameterContextualTyping2.js | 4 ++-- .../superCallParameterContextualTyping3.js | 4 ++-- .../reference/superCallWithCommentEmit01.js | 4 ++-- .../superCallWithMissingBaseClass.js | 4 ++-- tests/baselines/reference/superCalls.js | 4 ++-- .../reference/superCallsInConstructor.js | 4 ++-- tests/baselines/reference/superErrors.js | 4 ++-- .../baselines/reference/superInCatchBlock1.js | 4 ++-- .../reference/superInConstructorParam1.js | 4 ++-- tests/baselines/reference/superInLambdas.js | 4 ++-- .../reference/superInObjectLiterals_ES5.js | 4 ++-- tests/baselines/reference/superNewCall1.js | 4 ++-- .../reference/superPropertyAccess.js | 4 ++-- .../reference/superPropertyAccess1.js | 4 ++-- .../reference/superPropertyAccess2.js | 4 ++-- ...essInComputedPropertiesOfNestedType_ES5.js | 4 ++-- .../reference/superPropertyAccessNoError.js | 4 ++-- .../reference/superPropertyAccess_ES5.js | 4 ++-- ...perPropertyInConstructorBeforeSuperCall.js | 4 ++-- .../reference/superSymbolIndexedAccess5.js | 4 ++-- .../reference/superSymbolIndexedAccess6.js | 4 ++-- .../superWithGenericSpecialization.js | 4 ++-- .../baselines/reference/superWithGenerics.js | 4 ++-- .../reference/superWithTypeArgument.js | 4 ++-- .../reference/superWithTypeArgument2.js | 4 ++-- .../reference/superWithTypeArgument3.js | 4 ++-- ...side-object-literal-getters-and-setters.js | 4 ++-- tests/baselines/reference/switchStatements.js | 4 ++-- .../reference/systemModuleWithSuperClass.js | 4 ++-- .../reference/targetTypeBaseCalls.js | 4 ++-- .../reference/thisInInvalidContexts.js | 4 ++-- .../thisInInvalidContextsExternalModule.js | 4 ++-- tests/baselines/reference/thisInSuperCall.js | 4 ++-- tests/baselines/reference/thisInSuperCall1.js | 4 ++-- tests/baselines/reference/thisInSuperCall2.js | 4 ++-- tests/baselines/reference/thisInSuperCall3.js | 4 ++-- .../reference/thisTypeInFunctions.js | 4 ++-- .../reference/thisTypeInFunctionsNegative.js | 4 ++-- .../tsxCorrectlyParseLessThanComparison1.js | 4 ++-- .../baselines/reference/tsxDynamicTagName5.js | 4 ++-- .../baselines/reference/tsxDynamicTagName7.js | 4 ++-- .../baselines/reference/tsxDynamicTagName8.js | 4 ++-- .../baselines/reference/tsxDynamicTagName9.js | 4 ++-- .../reference/tsxExternalModuleEmit1.js | 8 +++---- .../tsxStatelessFunctionComponents2.js | 4 ++-- .../reference/tsxUnionTypeComponent1.js | 4 ++-- tests/baselines/reference/typeAssertions.js | 4 ++-- .../baselines/reference/typeGuardFunction.js | 4 ++-- .../reference/typeGuardFunctionErrors.js | 4 ++-- .../reference/typeGuardFunctionGenerics.js | 4 ++-- .../reference/typeGuardFunctionOfFormThis.js | 4 ++-- .../typeGuardFunctionOfFormThisErrors.js | 4 ++-- .../reference/typeGuardOfFormInstanceOf.js | 4 ++-- .../reference/typeGuardOfFormIsType.js | 4 ++-- .../reference/typeGuardOfFormThisMember.js | 4 ++-- .../typeGuardOfFormThisMemberErrors.js | 4 ++-- tests/baselines/reference/typeMatch2.js | 4 ++-- tests/baselines/reference/typeOfSuperCall.js | 4 ++-- .../reference/typeParameterAsBaseClass.js | 4 ++-- .../reference/typeParameterAsBaseType.js | 4 ++-- .../reference/typeParameterExtendingUnion1.js | 4 ++-- .../reference/typeParameterExtendingUnion2.js | 4 ++-- .../baselines/reference/typeRelationships.js | 4 ++-- .../baselines/reference/typeValueConflict1.js | 4 ++-- .../baselines/reference/typeValueConflict2.js | 4 ++-- tests/baselines/reference/typeofClass2.js | 4 ++-- .../typesWithSpecializedCallSignatures.js | 4 ++-- ...typesWithSpecializedConstructSignatures.js | 4 ++-- tests/baselines/reference/undeclaredBase.js | 4 ++-- .../undefinedIsSubtypeOfEverything.js | 4 ++-- .../baselines/reference/underscoreMapFirst.js | 4 ++-- .../underscoreThisInDerivedClass01.js | 4 ++-- .../underscoreThisInDerivedClass02.js | 4 ++-- .../reference/unionTypeEquivalence.js | 4 ++-- .../reference/unionTypeFromArrayLiteral.js | 4 ++-- .../reference/unionTypesAssignability.js | 4 ++-- tests/baselines/reference/unknownSymbols1.js | 4 ++-- .../reference/unspecializedConstraints.js | 4 ++-- ...untypedFunctionCallsWithTypeParameters1.js | 4 ++-- .../reference/unusedClassesinNamespace4.js | 4 ++-- .../unusedIdentifiersConsolidated1.js | 4 ++-- .../reference/validUseOfThisInSuper.js | 4 ++-- .../reference/varArgsOnConstructorTypes.js | 4 ++-- 661 files changed, 1342 insertions(+), 1342 deletions(-) diff --git a/src/compiler/transformers/es2015.ts b/src/compiler/transformers/es2015.ts index 1fb777e11f3..d97cbeb09d8 100644 --- a/src/compiler/transformers/es2015.ts +++ b/src/compiler/transformers/es2015.ts @@ -3337,11 +3337,11 @@ namespace ts { priority: 0, text: ` var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js b/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js index 13af9d45322..abdbe37f2e6 100644 --- a/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js +++ b/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js @@ -22,11 +22,11 @@ module A { //// [ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js b/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js index b3ff0c58e11..c674c23ab84 100644 --- a/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js +++ b/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js @@ -26,11 +26,11 @@ module A { //// [ExportClassWithInaccessibleTypeInTypeParameterConstraint.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/abstractClassInLocalScope.js b/tests/baselines/reference/abstractClassInLocalScope.js index 501743c1ad7..111714fcc13 100644 --- a/tests/baselines/reference/abstractClassInLocalScope.js +++ b/tests/baselines/reference/abstractClassInLocalScope.js @@ -9,11 +9,11 @@ //// [abstractClassInLocalScope.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js b/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js index c63088fcbbe..16e3e7c497d 100644 --- a/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js +++ b/tests/baselines/reference/abstractClassInLocalScopeIsAbstract.js @@ -9,11 +9,11 @@ //// [abstractClassInLocalScopeIsAbstract.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/abstractProperty.js b/tests/baselines/reference/abstractProperty.js index 87c67d18205..0cb89665b94 100644 --- a/tests/baselines/reference/abstractProperty.js +++ b/tests/baselines/reference/abstractProperty.js @@ -23,11 +23,11 @@ class C extends B { //// [abstractProperty.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/abstractPropertyNegative.js b/tests/baselines/reference/abstractPropertyNegative.js index 9728e047bf1..1b0898de8e3 100644 --- a/tests/baselines/reference/abstractPropertyNegative.js +++ b/tests/baselines/reference/abstractPropertyNegative.js @@ -45,11 +45,11 @@ abstract class AbstractAccessorMismatch { //// [abstractPropertyNegative.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/accessOverriddenBaseClassMember1.js b/tests/baselines/reference/accessOverriddenBaseClassMember1.js index 9afff0a8ff9..1fdf137a7e7 100644 --- a/tests/baselines/reference/accessOverriddenBaseClassMember1.js +++ b/tests/baselines/reference/accessOverriddenBaseClassMember1.js @@ -17,11 +17,11 @@ class ColoredPoint extends Point { //// [accessOverriddenBaseClassMember1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/accessors_spec_section-4.5_inference.js b/tests/baselines/reference/accessors_spec_section-4.5_inference.js index eec92837d95..50a498e278c 100644 --- a/tests/baselines/reference/accessors_spec_section-4.5_inference.js +++ b/tests/baselines/reference/accessors_spec_section-4.5_inference.js @@ -26,11 +26,11 @@ class LanguageSpec_section_4_5_inference { //// [accessors_spec_section-4.5_inference.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInAccessorsOfClass.js b/tests/baselines/reference/aliasUsageInAccessorsOfClass.js index 9ccd5c16666..87ce93aa104 100644 --- a/tests/baselines/reference/aliasUsageInAccessorsOfClass.js +++ b/tests/baselines/reference/aliasUsageInAccessorsOfClass.js @@ -38,11 +38,11 @@ exports.Model = Model; //// [aliasUsage1_moduleA.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInArray.js b/tests/baselines/reference/aliasUsageInArray.js index f08236bbf41..fa93daad9bc 100644 --- a/tests/baselines/reference/aliasUsageInArray.js +++ b/tests/baselines/reference/aliasUsageInArray.js @@ -32,11 +32,11 @@ exports.Model = Model; //// [aliasUsageInArray_moduleA.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInFunctionExpression.js b/tests/baselines/reference/aliasUsageInFunctionExpression.js index c0f537ac0dd..908480fb5b2 100644 --- a/tests/baselines/reference/aliasUsageInFunctionExpression.js +++ b/tests/baselines/reference/aliasUsageInFunctionExpression.js @@ -31,11 +31,11 @@ exports.Model = Model; //// [aliasUsageInFunctionExpression_moduleA.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInGenericFunction.js b/tests/baselines/reference/aliasUsageInGenericFunction.js index 222c8a78643..f0625fde40a 100644 --- a/tests/baselines/reference/aliasUsageInGenericFunction.js +++ b/tests/baselines/reference/aliasUsageInGenericFunction.js @@ -35,11 +35,11 @@ exports.Model = Model; //// [aliasUsageInGenericFunction_moduleA.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInIndexerOfClass.js b/tests/baselines/reference/aliasUsageInIndexerOfClass.js index c2ed9f345a0..11a9a969a49 100644 --- a/tests/baselines/reference/aliasUsageInIndexerOfClass.js +++ b/tests/baselines/reference/aliasUsageInIndexerOfClass.js @@ -37,11 +37,11 @@ exports.Model = Model; //// [aliasUsageInIndexerOfClass_moduleA.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInObjectLiteral.js b/tests/baselines/reference/aliasUsageInObjectLiteral.js index d5ad53a981c..e82b58bab8f 100644 --- a/tests/baselines/reference/aliasUsageInObjectLiteral.js +++ b/tests/baselines/reference/aliasUsageInObjectLiteral.js @@ -32,11 +32,11 @@ exports.Model = Model; //// [aliasUsageInObjectLiteral_moduleA.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInOrExpression.js b/tests/baselines/reference/aliasUsageInOrExpression.js index 2864b71595f..4dc10ee726b 100644 --- a/tests/baselines/reference/aliasUsageInOrExpression.js +++ b/tests/baselines/reference/aliasUsageInOrExpression.js @@ -35,11 +35,11 @@ exports.Model = Model; //// [aliasUsageInOrExpression_moduleA.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js b/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js index 8fc0815fcff..e7c42281f4f 100644 --- a/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js +++ b/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js @@ -35,11 +35,11 @@ exports.Model = Model; //// [aliasUsageInTypeArgumentOfExtendsClause_moduleA.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -56,11 +56,11 @@ exports.VisualizationModel = VisualizationModel; //// [aliasUsageInTypeArgumentOfExtendsClause_main.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/aliasUsageInVarAssignment.js b/tests/baselines/reference/aliasUsageInVarAssignment.js index 0b42447701b..1d1b1c51f2c 100644 --- a/tests/baselines/reference/aliasUsageInVarAssignment.js +++ b/tests/baselines/reference/aliasUsageInVarAssignment.js @@ -31,11 +31,11 @@ exports.Model = Model; //// [aliasUsageInVarAssignment_moduleA.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/ambiguousOverloadResolution.js b/tests/baselines/reference/ambiguousOverloadResolution.js index 7adda16b65f..1f24276e2fb 100644 --- a/tests/baselines/reference/ambiguousOverloadResolution.js +++ b/tests/baselines/reference/ambiguousOverloadResolution.js @@ -10,11 +10,11 @@ var t: number = f(x, x); // Not an error //// [ambiguousOverloadResolution.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/apparentTypeSubtyping.js b/tests/baselines/reference/apparentTypeSubtyping.js index 2c4b343c813..7bbd61d6689 100644 --- a/tests/baselines/reference/apparentTypeSubtyping.js +++ b/tests/baselines/reference/apparentTypeSubtyping.js @@ -25,11 +25,11 @@ class Derived2 extends Base2 { // error because of the prototy // subtype checks use the apparent type of the target type // S is a subtype of a type T, and T is a supertype of S, if one of the following is true, where S' denotes the apparent type (section 3.8.1) of S: var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/apparentTypeSupertype.js b/tests/baselines/reference/apparentTypeSupertype.js index 028935c28c1..2b835917fb4 100644 --- a/tests/baselines/reference/apparentTypeSupertype.js +++ b/tests/baselines/reference/apparentTypeSupertype.js @@ -15,11 +15,11 @@ class Derived extends Base { // error // subtype checks use the apparent type of the target type // S is a subtype of a type T, and T is a supertype of S, if one of the following is true, where S' denotes the apparent type (section 3.8.1) of S: var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/arrayAssignmentTest1.js b/tests/baselines/reference/arrayAssignmentTest1.js index ad1c748be75..c080b83957b 100644 --- a/tests/baselines/reference/arrayAssignmentTest1.js +++ b/tests/baselines/reference/arrayAssignmentTest1.js @@ -87,11 +87,11 @@ arr_any = i1; // should be an error - is //// [arrayAssignmentTest1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/arrayAssignmentTest2.js b/tests/baselines/reference/arrayAssignmentTest2.js index 34c5c921bd3..5e2911b13fb 100644 --- a/tests/baselines/reference/arrayAssignmentTest2.js +++ b/tests/baselines/reference/arrayAssignmentTest2.js @@ -61,11 +61,11 @@ arr_any = i1; // should be an error - is //// [arrayAssignmentTest2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/arrayBestCommonTypes.js b/tests/baselines/reference/arrayBestCommonTypes.js index f232b44ce28..bc78f629bcb 100644 --- a/tests/baselines/reference/arrayBestCommonTypes.js +++ b/tests/baselines/reference/arrayBestCommonTypes.js @@ -109,11 +109,11 @@ module NonEmptyTypes { //// [arrayBestCommonTypes.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/arrayLiteralTypeInference.js b/tests/baselines/reference/arrayLiteralTypeInference.js index 95e4d98574d..fc62da7d3a2 100644 --- a/tests/baselines/reference/arrayLiteralTypeInference.js +++ b/tests/baselines/reference/arrayLiteralTypeInference.js @@ -53,11 +53,11 @@ var z3: { id: number }[] = //// [arrayLiteralTypeInference.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/arrayLiterals.js b/tests/baselines/reference/arrayLiterals.js index 001e0ff525f..8d69ab90dcf 100644 --- a/tests/baselines/reference/arrayLiterals.js +++ b/tests/baselines/reference/arrayLiterals.js @@ -39,11 +39,11 @@ var context4: Base[] = [new Derived1(), new Derived1()]; //// [arrayLiterals.js] // Empty array literal with no contextual type has type Undefined[] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js b/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js index b092fe4da32..bd1d38de4cb 100644 --- a/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js +++ b/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js @@ -27,11 +27,11 @@ var as = [list, myDerivedList]; // List[] //// [arrayLiteralsWithRecursiveGenerics.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js b/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js index fcc3ab99d3c..3e4e6d6a148 100644 --- a/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js +++ b/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.js @@ -21,11 +21,11 @@ rrb = cra; // error: 'A' is not assignable to 'B' //// [arrayOfSubtypeIsAssignableToReadonlyArray.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/arrowFunctionContexts.js b/tests/baselines/reference/arrowFunctionContexts.js index 5b1daa5b594..8f3364bd6d5 100644 --- a/tests/baselines/reference/arrowFunctionContexts.js +++ b/tests/baselines/reference/arrowFunctionContexts.js @@ -98,11 +98,11 @@ var asserted2: any; //// [arrowFunctionContexts.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures3.js b/tests/baselines/reference/assignmentCompatWithCallSignatures3.js index a748ec873ae..f0c8557659b 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures3.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures3.js @@ -102,11 +102,11 @@ b18 = a18; // ok //// [assignmentCompatWithCallSignatures3.js] // these are all permitted with the current rules, since we do not do contextual signature instantiation var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures4.js b/tests/baselines/reference/assignmentCompatWithCallSignatures4.js index 409a7f5ceae..40c98239cbc 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures4.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures4.js @@ -101,11 +101,11 @@ module Errors { //// [assignmentCompatWithCallSignatures4.js] // These are mostly permitted with the current loose rules. All ok unless otherwise noted. var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures5.js b/tests/baselines/reference/assignmentCompatWithCallSignatures5.js index 00acd326ba8..2ac6493af4d 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures5.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures5.js @@ -68,11 +68,11 @@ b18 = a18; // ok //// [assignmentCompatWithCallSignatures5.js] // checking assignment compat for function types. No errors in this file var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures6.js b/tests/baselines/reference/assignmentCompatWithCallSignatures6.js index f8fbe3b0b84..1281cfc0f5d 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures6.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures6.js @@ -45,11 +45,11 @@ b16 = x.a16; //// [assignmentCompatWithCallSignatures6.js] // checking assignment compatibility relations for function types. All valid var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js index fb991a85f05..888a4939854 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures3.js @@ -102,11 +102,11 @@ b18 = a18; // ok //// [assignmentCompatWithConstructSignatures3.js] // checking assignment compatibility relations for function types. All of these are valid. var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js index eb406898854..32081f035e6 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.js @@ -101,11 +101,11 @@ module Errors { //// [assignmentCompatWithConstructSignatures4.js] // checking assignment compatibility relations for function types. var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js index d246aec2509..7c4e7ca53f3 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures5.js @@ -68,11 +68,11 @@ b18 = a18; // ok //// [assignmentCompatWithConstructSignatures5.js] // checking assignment compat for function types. All valid var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js index f3149664bc6..5ac28d58024 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures6.js @@ -45,11 +45,11 @@ b16 = x.a16; //// [assignmentCompatWithConstructSignatures6.js] // checking assignment compatibility relations for function types. All valid. var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer.js b/tests/baselines/reference/assignmentCompatWithNumericIndexer.js index 127f21bbfd7..59d173ebd71 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer.js +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer.js @@ -46,11 +46,11 @@ module Generics { //// [assignmentCompatWithNumericIndexer.js] // Derived type indexer must be subtype of base type indexer var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js b/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js index 704cf67ec83..afac7265036 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer3.js @@ -43,11 +43,11 @@ module Generics { //// [assignmentCompatWithNumericIndexer3.js] // Derived type indexer must be subtype of base type indexer var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers4.js b/tests/baselines/reference/assignmentCompatWithObjectMembers4.js index 88c77f2fb35..9204c87a172 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers4.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers4.js @@ -94,11 +94,11 @@ module WithBase { //// [assignmentCompatWithObjectMembers4.js] // members N and M of types S and T have the same name, same accessibility, same optionality, and N is not assignable M var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js index 328b5192d96..1e539a9713b 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js @@ -91,11 +91,11 @@ module SourceHasOptional { //// [assignmentCompatWithObjectMembersOptionality.js] // Derived member is not optional but base member is, should be ok var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js index 730fd15be7a..3387a818b6f 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js @@ -93,11 +93,11 @@ module SourceHasOptional { // M is optional and S contains no property with the same name as M // N is optional and T contains no property with the same name as N var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentCompatWithStringIndexer.js b/tests/baselines/reference/assignmentCompatWithStringIndexer.js index 7b871a20b3a..d296c256d17 100644 --- a/tests/baselines/reference/assignmentCompatWithStringIndexer.js +++ b/tests/baselines/reference/assignmentCompatWithStringIndexer.js @@ -56,11 +56,11 @@ module Generics { //// [assignmentCompatWithStringIndexer.js] // index signatures must be compatible in assignments var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/assignmentLHSIsValue.js b/tests/baselines/reference/assignmentLHSIsValue.js index 1cf7c2ac317..34e0df7cacd 100644 --- a/tests/baselines/reference/assignmentLHSIsValue.js +++ b/tests/baselines/reference/assignmentLHSIsValue.js @@ -72,11 +72,11 @@ foo() = value; //// [assignmentLHSIsValue.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/asyncImportedPromise_es5.js b/tests/baselines/reference/asyncImportedPromise_es5.js index 9a6ef70582a..0185fcaf4e2 100644 --- a/tests/baselines/reference/asyncImportedPromise_es5.js +++ b/tests/baselines/reference/asyncImportedPromise_es5.js @@ -12,11 +12,11 @@ class Test { //// [task.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/autolift4.js b/tests/baselines/reference/autolift4.js index aff1ce9986f..6d91c61d59d 100644 --- a/tests/baselines/reference/autolift4.js +++ b/tests/baselines/reference/autolift4.js @@ -25,11 +25,11 @@ class Point3D extends Point { //// [autolift4.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/baseCheck.js b/tests/baselines/reference/baseCheck.js index c8145c170b6..2b4f90d27b1 100644 --- a/tests/baselines/reference/baseCheck.js +++ b/tests/baselines/reference/baseCheck.js @@ -31,11 +31,11 @@ function f() { //// [baseCheck.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/baseIndexSignatureResolution.js b/tests/baselines/reference/baseIndexSignatureResolution.js index 7389e2afe8b..82818ecafbe 100644 --- a/tests/baselines/reference/baseIndexSignatureResolution.js +++ b/tests/baselines/reference/baseIndexSignatureResolution.js @@ -26,11 +26,11 @@ var z: Derived = b.foo(); //// [baseIndexSignatureResolution.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/baseTypeOrderChecking.js b/tests/baselines/reference/baseTypeOrderChecking.js index c2eb77a3b9e..57ee369a03c 100644 --- a/tests/baselines/reference/baseTypeOrderChecking.js +++ b/tests/baselines/reference/baseTypeOrderChecking.js @@ -38,11 +38,11 @@ class Class4 extends Class3 //// [baseTypeOrderChecking.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/baseTypeWrappingInstantiationChain.js b/tests/baselines/reference/baseTypeWrappingInstantiationChain.js index 308637b576c..d2087b3100a 100644 --- a/tests/baselines/reference/baseTypeWrappingInstantiationChain.js +++ b/tests/baselines/reference/baseTypeWrappingInstantiationChain.js @@ -29,11 +29,11 @@ class C extends CBase { //// [baseTypeWrappingInstantiationChain.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/bases.js b/tests/baselines/reference/bases.js index 201d0e7ac27..a1499143fd4 100644 --- a/tests/baselines/reference/bases.js +++ b/tests/baselines/reference/bases.js @@ -22,11 +22,11 @@ new C().y; //// [bases.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js index af0c24ca5d5..b31e773ff24 100644 --- a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js +++ b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js @@ -30,11 +30,11 @@ function foo5(t: T, u: U): Object { // conditional expressions return the best common type of the branches plus contextual type (using the first candidate if multiple BCTs exist) // no errors expected here var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js index bf3c8b830aa..31d0c03a5dc 100644 --- a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js +++ b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.js @@ -28,11 +28,11 @@ function foo3(t: T, u: U) { // conditional expressions return the best common type of the branches plus contextual type (using the first candidate if multiple BCTs exist) // these are errors var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/bestCommonTypeOfTuple2.js b/tests/baselines/reference/bestCommonTypeOfTuple2.js index 3bac937c8ae..9b0c2be7b76 100644 --- a/tests/baselines/reference/bestCommonTypeOfTuple2.js +++ b/tests/baselines/reference/bestCommonTypeOfTuple2.js @@ -24,11 +24,11 @@ var e51 = t5[2]; // {} //// [bestCommonTypeOfTuple2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js index 662bfa931fb..74b5bafad38 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance2.js @@ -72,11 +72,11 @@ interface I extends A { //// [callSignatureAssignabilityInInheritance2.js] // checking subtype relations for function types as it relates to contextual signature instantiation var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js index e27e4729cd4..84b7e2d0a52 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance3.js @@ -117,11 +117,11 @@ module Errors { // checking subtype relations for function types as it relates to contextual signature instantiation // error cases var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js index 687cc9aa0e1..04e8e2d6a2a 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance4.js @@ -52,11 +52,11 @@ interface I extends A { //// [callSignatureAssignabilityInInheritance4.js] // checking subtype relations for function types as it relates to contextual signature instantiation var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js index 16e50218cd9..9fabe405db0 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance5.js @@ -52,11 +52,11 @@ interface I extends B { // checking subtype relations for function types as it relates to contextual signature instantiation // same as subtypingWithCallSignatures2 just with an extra level of indirection in the inheritance chain var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js b/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js index 717fe64da4e..52e08ae4401 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance6.js @@ -55,11 +55,11 @@ interface I9 extends A { // same as subtypingWithCallSignatures4 but using class type parameters instead of generic signatures // all are errors var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/callWithSpread.js b/tests/baselines/reference/callWithSpread.js index 06ca3e91d02..23c1fff2d09 100644 --- a/tests/baselines/reference/callWithSpread.js +++ b/tests/baselines/reference/callWithSpread.js @@ -60,11 +60,11 @@ class D extends C { //// [callWithSpread.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/captureThisInSuperCall.js b/tests/baselines/reference/captureThisInSuperCall.js index c218c8b1687..4682a50a2e6 100644 --- a/tests/baselines/reference/captureThisInSuperCall.js +++ b/tests/baselines/reference/captureThisInSuperCall.js @@ -10,11 +10,11 @@ class B extends A { //// [captureThisInSuperCall.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/castingTuple.js b/tests/baselines/reference/castingTuple.js index 04965748c0d..4cff94b3b90 100644 --- a/tests/baselines/reference/castingTuple.js +++ b/tests/baselines/reference/castingTuple.js @@ -34,11 +34,11 @@ t4[2] = 10; //// [castingTuple.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/chainedAssignment3.js b/tests/baselines/reference/chainedAssignment3.js index 2ddd0f7577e..116fcd0f83d 100644 --- a/tests/baselines/reference/chainedAssignment3.js +++ b/tests/baselines/reference/chainedAssignment3.js @@ -24,11 +24,11 @@ a = b = new A(); //// [chainedAssignment3.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js index f820e6c39a3..fc23b30e197 100644 --- a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js +++ b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js @@ -21,11 +21,11 @@ class C extends B { //// [chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkForObjectTooStrict.js b/tests/baselines/reference/checkForObjectTooStrict.js index dbf1a34b465..6d330285f6e 100644 --- a/tests/baselines/reference/checkForObjectTooStrict.js +++ b/tests/baselines/reference/checkForObjectTooStrict.js @@ -33,11 +33,11 @@ class Baz extends Object { //// [checkForObjectTooStrict.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js index 8322bb81783..40717cb4759 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing1.js @@ -12,11 +12,11 @@ class Derived extends Based { //// [checkSuperCallBeforeThisAccessing1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js index 6d787a70b8c..8c59c4d6682 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing2.js @@ -12,11 +12,11 @@ class Derived extends Based { //// [checkSuperCallBeforeThisAccessing2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js index 41092fcd984..1699b3a0f35 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing3.js @@ -17,11 +17,11 @@ class Derived extends Based { //// [checkSuperCallBeforeThisAccessing3.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js index 9bc5cc6f82b..49dfb6e4a22 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing4.js @@ -21,11 +21,11 @@ class Derived extends Based { //// [checkSuperCallBeforeThisAccessing4.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js index c178a78e84e..49f1e81d1a1 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing5.js @@ -9,11 +9,11 @@ class Derived extends Based { //// [checkSuperCallBeforeThisAccessing5.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js index 14cbda775d5..8931b0090cf 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing6.js @@ -12,11 +12,11 @@ class Super extends Base { //// [checkSuperCallBeforeThisAccessing6.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js index ad85fa1736c..38a37e03cf3 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing7.js @@ -11,11 +11,11 @@ class Super extends Base { //// [checkSuperCallBeforeThisAccessing7.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js b/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js index 3f824a00c96..77e4a4096d0 100644 --- a/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js +++ b/tests/baselines/reference/checkSuperCallBeforeThisAccessing8.js @@ -12,11 +12,11 @@ class Super extends Base { //// [checkSuperCallBeforeThisAccessing8.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/circularImportAlias.js b/tests/baselines/reference/circularImportAlias.js index 2ca47382b32..27be18c2a28 100644 --- a/tests/baselines/reference/circularImportAlias.js +++ b/tests/baselines/reference/circularImportAlias.js @@ -22,11 +22,11 @@ var c = new B.a.C(); //// [circularImportAlias.js] // expected no error var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/circularTypeofWithFunctionModule.js b/tests/baselines/reference/circularTypeofWithFunctionModule.js index e1e3c1efe58..38bced08608 100644 --- a/tests/baselines/reference/circularTypeofWithFunctionModule.js +++ b/tests/baselines/reference/circularTypeofWithFunctionModule.js @@ -15,11 +15,11 @@ namespace maker { //// [circularTypeofWithFunctionModule.js] // Repro from #6072 var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractConstructorAssignability.js b/tests/baselines/reference/classAbstractConstructorAssignability.js index e9beaced63d..52335c203b2 100644 --- a/tests/baselines/reference/classAbstractConstructorAssignability.js +++ b/tests/baselines/reference/classAbstractConstructorAssignability.js @@ -16,11 +16,11 @@ new CC; //// [classAbstractConstructorAssignability.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractCrashedOnce.js b/tests/baselines/reference/classAbstractCrashedOnce.js index 319c6c237dc..dbad78fbd00 100644 --- a/tests/baselines/reference/classAbstractCrashedOnce.js +++ b/tests/baselines/reference/classAbstractCrashedOnce.js @@ -12,11 +12,11 @@ var x = new bar(); //// [classAbstractCrashedOnce.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractExtends.js b/tests/baselines/reference/classAbstractExtends.js index 9b4faff67c3..e0fb7ad8189 100644 --- a/tests/baselines/reference/classAbstractExtends.js +++ b/tests/baselines/reference/classAbstractExtends.js @@ -18,11 +18,11 @@ class E extends B { //// [classAbstractExtends.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractFactoryFunction.js b/tests/baselines/reference/classAbstractFactoryFunction.js index e7ddb867d28..89b77b62a9a 100644 --- a/tests/baselines/reference/classAbstractFactoryFunction.js +++ b/tests/baselines/reference/classAbstractFactoryFunction.js @@ -19,11 +19,11 @@ NewB(B); //// [classAbstractFactoryFunction.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractGeneric.js b/tests/baselines/reference/classAbstractGeneric.js index 5063d7fcdd6..df6222f6495 100644 --- a/tests/baselines/reference/classAbstractGeneric.js +++ b/tests/baselines/reference/classAbstractGeneric.js @@ -27,11 +27,11 @@ class G extends A { //// [classAbstractGeneric.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractInAModule.js b/tests/baselines/reference/classAbstractInAModule.js index 73ff32d3d5e..86e6b8e3153 100644 --- a/tests/baselines/reference/classAbstractInAModule.js +++ b/tests/baselines/reference/classAbstractInAModule.js @@ -9,11 +9,11 @@ new M.B; //// [classAbstractInAModule.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractInheritance.js b/tests/baselines/reference/classAbstractInheritance.js index 8a173bb1bf4..a26a8170f53 100644 --- a/tests/baselines/reference/classAbstractInheritance.js +++ b/tests/baselines/reference/classAbstractInheritance.js @@ -23,11 +23,11 @@ abstract class GG extends CC {} //// [classAbstractInheritance.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractInstantiations1.js b/tests/baselines/reference/classAbstractInstantiations1.js index 094bc755559..101dca316df 100644 --- a/tests/baselines/reference/classAbstractInstantiations1.js +++ b/tests/baselines/reference/classAbstractInstantiations1.js @@ -29,11 +29,11 @@ c = new B; // Calling new with (non)abstract classes. // var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractInstantiations2.js b/tests/baselines/reference/classAbstractInstantiations2.js index 01277eb034a..8449689f84a 100644 --- a/tests/baselines/reference/classAbstractInstantiations2.js +++ b/tests/baselines/reference/classAbstractInstantiations2.js @@ -53,11 +53,11 @@ class H { // error -- not declared abstract //// [classAbstractInstantiations2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractOverrideWithAbstract.js b/tests/baselines/reference/classAbstractOverrideWithAbstract.js index 8f304c709cf..345ce20ca1f 100644 --- a/tests/baselines/reference/classAbstractOverrideWithAbstract.js +++ b/tests/baselines/reference/classAbstractOverrideWithAbstract.js @@ -25,11 +25,11 @@ class DD extends BB { //// [classAbstractOverrideWithAbstract.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractSuperCalls.js b/tests/baselines/reference/classAbstractSuperCalls.js index ba9ed10795b..e569f90528e 100644 --- a/tests/baselines/reference/classAbstractSuperCalls.js +++ b/tests/baselines/reference/classAbstractSuperCalls.js @@ -29,11 +29,11 @@ abstract class BB extends AA { //// [classAbstractSuperCalls.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractUsingAbstractMethod1.js b/tests/baselines/reference/classAbstractUsingAbstractMethod1.js index 8e23906e149..61b5fd6fd13 100644 --- a/tests/baselines/reference/classAbstractUsingAbstractMethod1.js +++ b/tests/baselines/reference/classAbstractUsingAbstractMethod1.js @@ -19,11 +19,11 @@ a.foo(); //// [classAbstractUsingAbstractMethod1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classAbstractUsingAbstractMethods2.js b/tests/baselines/reference/classAbstractUsingAbstractMethods2.js index 3d09949c0ae..bd17fa96091 100644 --- a/tests/baselines/reference/classAbstractUsingAbstractMethods2.js +++ b/tests/baselines/reference/classAbstractUsingAbstractMethods2.js @@ -29,11 +29,11 @@ class DD extends AA { //// [classAbstractUsingAbstractMethods2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classConstructorAccessibility2.js b/tests/baselines/reference/classConstructorAccessibility2.js index e16a623ef43..7c77d13dffb 100644 --- a/tests/baselines/reference/classConstructorAccessibility2.js +++ b/tests/baselines/reference/classConstructorAccessibility2.js @@ -48,11 +48,11 @@ var dc = new DerivedC(1); //// [classConstructorAccessibility2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classConstructorAccessibility4.js b/tests/baselines/reference/classConstructorAccessibility4.js index 0680f590ef4..73451f5fab4 100644 --- a/tests/baselines/reference/classConstructorAccessibility4.js +++ b/tests/baselines/reference/classConstructorAccessibility4.js @@ -32,11 +32,11 @@ class D { //// [classConstructorAccessibility4.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classConstructorAccessibility5.js b/tests/baselines/reference/classConstructorAccessibility5.js index 671530694e7..a6738e229e0 100644 --- a/tests/baselines/reference/classConstructorAccessibility5.js +++ b/tests/baselines/reference/classConstructorAccessibility5.js @@ -13,11 +13,11 @@ class Unrelated { //// [classConstructorAccessibility5.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classConstructorParametersAccessibility.js b/tests/baselines/reference/classConstructorParametersAccessibility.js index 4c3d3747157..497f662a8b0 100644 --- a/tests/baselines/reference/classConstructorParametersAccessibility.js +++ b/tests/baselines/reference/classConstructorParametersAccessibility.js @@ -28,11 +28,11 @@ class Derived extends C3 { //// [classConstructorParametersAccessibility.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classConstructorParametersAccessibility2.js b/tests/baselines/reference/classConstructorParametersAccessibility2.js index 14f7a33a6b3..7a885bbd8d6 100644 --- a/tests/baselines/reference/classConstructorParametersAccessibility2.js +++ b/tests/baselines/reference/classConstructorParametersAccessibility2.js @@ -28,11 +28,11 @@ class Derived extends C3 { //// [classConstructorParametersAccessibility2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classConstructorParametersAccessibility3.js b/tests/baselines/reference/classConstructorParametersAccessibility3.js index 1f02b7a75b5..f96f0171046 100644 --- a/tests/baselines/reference/classConstructorParametersAccessibility3.js +++ b/tests/baselines/reference/classConstructorParametersAccessibility3.js @@ -15,11 +15,11 @@ d.p; // public, OK //// [classConstructorParametersAccessibility3.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js b/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js index bf15fcf8fad..a7fa44091c8 100644 --- a/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js +++ b/tests/baselines/reference/classDeclarationMergedInModuleWithContinuation.js @@ -13,11 +13,11 @@ module M { //// [classDeclarationMergedInModuleWithContinuation.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classDeclaredBeforeClassFactory.js b/tests/baselines/reference/classDeclaredBeforeClassFactory.js index 8a49c6ca138..f6cc69037c4 100644 --- a/tests/baselines/reference/classDeclaredBeforeClassFactory.js +++ b/tests/baselines/reference/classDeclaredBeforeClassFactory.js @@ -9,11 +9,11 @@ function makeBaseClass() { //// [classDeclaredBeforeClassFactory.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classDoesNotDependOnBaseTypes.js b/tests/baselines/reference/classDoesNotDependOnBaseTypes.js index 17dc3850214..9fc1aecd9b2 100644 --- a/tests/baselines/reference/classDoesNotDependOnBaseTypes.js +++ b/tests/baselines/reference/classDoesNotDependOnBaseTypes.js @@ -14,11 +14,11 @@ class StringTreeCollection extends StringTreeCollectionBase { } //// [classDoesNotDependOnBaseTypes.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExpression2.js b/tests/baselines/reference/classExpression2.js index 01685865265..6973fbec816 100644 --- a/tests/baselines/reference/classExpression2.js +++ b/tests/baselines/reference/classExpression2.js @@ -4,11 +4,11 @@ var v = class C extends D {}; //// [classExpression2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExpression3.js b/tests/baselines/reference/classExpression3.js index 3acbcef1ab8..858238d24ee 100644 --- a/tests/baselines/reference/classExpression3.js +++ b/tests/baselines/reference/classExpression3.js @@ -8,11 +8,11 @@ c.c; //// [classExpression3.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExpressionExtendingAbstractClass.js b/tests/baselines/reference/classExpressionExtendingAbstractClass.js index 1d661cafb65..1ce5078ed63 100644 --- a/tests/baselines/reference/classExpressionExtendingAbstractClass.js +++ b/tests/baselines/reference/classExpressionExtendingAbstractClass.js @@ -10,11 +10,11 @@ var C = class extends A { // no error reported! //// [classExpressionExtendingAbstractClass.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingBuiltinType.js b/tests/baselines/reference/classExtendingBuiltinType.js index 902b3327754..2ddf4c8961d 100644 --- a/tests/baselines/reference/classExtendingBuiltinType.js +++ b/tests/baselines/reference/classExtendingBuiltinType.js @@ -13,11 +13,11 @@ class C10 extends Array { } //// [classExtendingBuiltinType.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingClass.js b/tests/baselines/reference/classExtendingClass.js index f9085262904..22bb12d95ec 100644 --- a/tests/baselines/reference/classExtendingClass.js +++ b/tests/baselines/reference/classExtendingClass.js @@ -33,11 +33,11 @@ var r8 = D2.other(1); //// [classExtendingClass.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingClassLikeType.js b/tests/baselines/reference/classExtendingClassLikeType.js index d793534bd18..564fd14da51 100644 --- a/tests/baselines/reference/classExtendingClassLikeType.js +++ b/tests/baselines/reference/classExtendingClassLikeType.js @@ -60,11 +60,11 @@ class D5 extends getBadBase() { //// [classExtendingClassLikeType.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingNonConstructor.js b/tests/baselines/reference/classExtendingNonConstructor.js index 43112c4076b..2a2e0b5eebc 100644 --- a/tests/baselines/reference/classExtendingNonConstructor.js +++ b/tests/baselines/reference/classExtendingNonConstructor.js @@ -16,11 +16,11 @@ class C7 extends foo { } //// [classExtendingNonConstructor.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingNull.js b/tests/baselines/reference/classExtendingNull.js index 44fd8a51a86..4d9eaba615e 100644 --- a/tests/baselines/reference/classExtendingNull.js +++ b/tests/baselines/reference/classExtendingNull.js @@ -5,11 +5,11 @@ class C2 extends (null) { } //// [classExtendingNull.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingPrimitive.js b/tests/baselines/reference/classExtendingPrimitive.js index 15f225a6dbe..ade53d91a74 100644 --- a/tests/baselines/reference/classExtendingPrimitive.js +++ b/tests/baselines/reference/classExtendingPrimitive.js @@ -17,11 +17,11 @@ class C8 extends E { } //// [classExtendingPrimitive.js] // classes cannot extend primitives var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingPrimitive2.js b/tests/baselines/reference/classExtendingPrimitive2.js index 49fbce51aa2..4e2c314b2dd 100644 --- a/tests/baselines/reference/classExtendingPrimitive2.js +++ b/tests/baselines/reference/classExtendingPrimitive2.js @@ -7,11 +7,11 @@ class C5a extends null { } //// [classExtendingPrimitive2.js] // classes cannot extend primitives var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingQualifiedName.js b/tests/baselines/reference/classExtendingQualifiedName.js index 02346427ed3..59a84ba3e0a 100644 --- a/tests/baselines/reference/classExtendingQualifiedName.js +++ b/tests/baselines/reference/classExtendingQualifiedName.js @@ -9,11 +9,11 @@ module M { //// [classExtendingQualifiedName.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendingQualifiedName2.js b/tests/baselines/reference/classExtendingQualifiedName2.js index 8add3046013..b2b91a9aedb 100644 --- a/tests/baselines/reference/classExtendingQualifiedName2.js +++ b/tests/baselines/reference/classExtendingQualifiedName2.js @@ -9,11 +9,11 @@ module M { //// [classExtendingQualifiedName2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsAcrossFiles.js b/tests/baselines/reference/classExtendsAcrossFiles.js index 0f0fb5ba2d9..e8d4c530da1 100644 --- a/tests/baselines/reference/classExtendsAcrossFiles.js +++ b/tests/baselines/reference/classExtendsAcrossFiles.js @@ -22,11 +22,11 @@ export const b = { //// [b.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -52,11 +52,11 @@ exports.b = { //// [a.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js b/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js index 9bca40631f9..fb44ad9469a 100644 --- a/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js +++ b/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js @@ -15,11 +15,11 @@ module Foo { //// [classExtendsClauseClassMergedWithModuleNotReferingConstructor.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.js b/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.js index 3d02e381da9..d70305fe5ba 100644 --- a/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.js +++ b/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.js @@ -8,11 +8,11 @@ module Foo { //// [classExtendsClauseClassNotReferringConstructor.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsEveryObjectType.js b/tests/baselines/reference/classExtendsEveryObjectType.js index 91ccc496fcb..ef16075c727 100644 --- a/tests/baselines/reference/classExtendsEveryObjectType.js +++ b/tests/baselines/reference/classExtendsEveryObjectType.js @@ -18,11 +18,11 @@ class C6 extends []{ } // error //// [classExtendsEveryObjectType.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsEveryObjectType2.js b/tests/baselines/reference/classExtendsEveryObjectType2.js index a30b3d8c8d8..507a9bbfcf9 100644 --- a/tests/baselines/reference/classExtendsEveryObjectType2.js +++ b/tests/baselines/reference/classExtendsEveryObjectType2.js @@ -5,11 +5,11 @@ class C6 extends []{ } // error //// [classExtendsEveryObjectType2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsInterface.js b/tests/baselines/reference/classExtendsInterface.js index e5710190673..f291aedb4ec 100644 --- a/tests/baselines/reference/classExtendsInterface.js +++ b/tests/baselines/reference/classExtendsInterface.js @@ -10,11 +10,11 @@ class B2 implements Comparable2 {} //// [classExtendsInterface.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsInterfaceInExpression.js b/tests/baselines/reference/classExtendsInterfaceInExpression.js index e017ebb8e06..b37daba7f7a 100644 --- a/tests/baselines/reference/classExtendsInterfaceInExpression.js +++ b/tests/baselines/reference/classExtendsInterfaceInExpression.js @@ -10,11 +10,11 @@ class C extends factory(A) {} //// [classExtendsInterfaceInExpression.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsInterfaceInModule.js b/tests/baselines/reference/classExtendsInterfaceInModule.js index 3d100bcfb67..2299df89ab7 100644 --- a/tests/baselines/reference/classExtendsInterfaceInModule.js +++ b/tests/baselines/reference/classExtendsInterfaceInModule.js @@ -17,11 +17,11 @@ class D extends Mod.Nested.I {} //// [classExtendsInterfaceInModule.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsItself.js b/tests/baselines/reference/classExtendsItself.js index 2f32d827dcb..8f6aecec843 100644 --- a/tests/baselines/reference/classExtendsItself.js +++ b/tests/baselines/reference/classExtendsItself.js @@ -7,11 +7,11 @@ class E extends E { } // error //// [classExtendsItself.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsItselfIndirectly.js b/tests/baselines/reference/classExtendsItselfIndirectly.js index d6ca939a910..4ca9186f89c 100644 --- a/tests/baselines/reference/classExtendsItselfIndirectly.js +++ b/tests/baselines/reference/classExtendsItselfIndirectly.js @@ -13,11 +13,11 @@ class E2 extends D2 { baz: T; } //// [classExtendsItselfIndirectly.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsItselfIndirectly2.js b/tests/baselines/reference/classExtendsItselfIndirectly2.js index 6587c65a5fa..86d2cd60887 100644 --- a/tests/baselines/reference/classExtendsItselfIndirectly2.js +++ b/tests/baselines/reference/classExtendsItselfIndirectly2.js @@ -24,11 +24,11 @@ module O { //// [classExtendsItselfIndirectly2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsItselfIndirectly3.js b/tests/baselines/reference/classExtendsItselfIndirectly3.js index d36545bafd3..1c42dc28634 100644 --- a/tests/baselines/reference/classExtendsItselfIndirectly3.js +++ b/tests/baselines/reference/classExtendsItselfIndirectly3.js @@ -20,11 +20,11 @@ class E2 extends D2 { baz: T; } //// [classExtendsItselfIndirectly_file1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -38,11 +38,11 @@ var C = (function (_super) { }(E)); // error //// [classExtendsItselfIndirectly_file2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -56,11 +56,11 @@ var D = (function (_super) { }(C)); //// [classExtendsItselfIndirectly_file3.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -74,11 +74,11 @@ var E = (function (_super) { }(D)); //// [classExtendsItselfIndirectly_file4.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -92,11 +92,11 @@ var C2 = (function (_super) { }(E2)); // error //// [classExtendsItselfIndirectly_file5.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -110,11 +110,11 @@ var D2 = (function (_super) { }(C2)); //// [classExtendsItselfIndirectly_file6.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsMultipleBaseClasses.js b/tests/baselines/reference/classExtendsMultipleBaseClasses.js index 3b1fd2de5cf..a36ab4355ad 100644 --- a/tests/baselines/reference/classExtendsMultipleBaseClasses.js +++ b/tests/baselines/reference/classExtendsMultipleBaseClasses.js @@ -5,11 +5,11 @@ class C extends A,B { } //// [classExtendsMultipleBaseClasses.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsNull.js b/tests/baselines/reference/classExtendsNull.js index d8cadbbe32b..07618bead38 100644 --- a/tests/baselines/reference/classExtendsNull.js +++ b/tests/baselines/reference/classExtendsNull.js @@ -14,11 +14,11 @@ class D extends null { //// [classExtendsNull.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsShadowedConstructorFunction.js b/tests/baselines/reference/classExtendsShadowedConstructorFunction.js index 79ae0cf243f..908c91850e8 100644 --- a/tests/baselines/reference/classExtendsShadowedConstructorFunction.js +++ b/tests/baselines/reference/classExtendsShadowedConstructorFunction.js @@ -10,11 +10,11 @@ module M { //// [classExtendsShadowedConstructorFunction.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classExtendsValidConstructorFunction.js b/tests/baselines/reference/classExtendsValidConstructorFunction.js index b2a38318bab..fbbb91d29ea 100644 --- a/tests/baselines/reference/classExtendsValidConstructorFunction.js +++ b/tests/baselines/reference/classExtendsValidConstructorFunction.js @@ -7,11 +7,11 @@ class C extends foo { } // error, cannot extend it though //// [classExtendsValidConstructorFunction.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classHeritageWithTrailingSeparator.js b/tests/baselines/reference/classHeritageWithTrailingSeparator.js index bd9f925b7d6..72779e9eb97 100644 --- a/tests/baselines/reference/classHeritageWithTrailingSeparator.js +++ b/tests/baselines/reference/classHeritageWithTrailingSeparator.js @@ -5,11 +5,11 @@ class D extends C, { //// [classHeritageWithTrailingSeparator.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classImplementsClass2.js b/tests/baselines/reference/classImplementsClass2.js index e564beda164..80acbd8d204 100644 --- a/tests/baselines/reference/classImplementsClass2.js +++ b/tests/baselines/reference/classImplementsClass2.js @@ -15,11 +15,11 @@ c2 = c; //// [classImplementsClass2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classImplementsClass3.js b/tests/baselines/reference/classImplementsClass3.js index 707a9dbe6b9..4c2d096f465 100644 --- a/tests/baselines/reference/classImplementsClass3.js +++ b/tests/baselines/reference/classImplementsClass3.js @@ -16,11 +16,11 @@ c2 = c; //// [classImplementsClass3.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classImplementsClass4.js b/tests/baselines/reference/classImplementsClass4.js index 5748fbb30f5..49c43b8ef3a 100644 --- a/tests/baselines/reference/classImplementsClass4.js +++ b/tests/baselines/reference/classImplementsClass4.js @@ -18,11 +18,11 @@ c2 = c; //// [classImplementsClass4.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classImplementsClass5.js b/tests/baselines/reference/classImplementsClass5.js index 12388b65a17..a10b08fad2d 100644 --- a/tests/baselines/reference/classImplementsClass5.js +++ b/tests/baselines/reference/classImplementsClass5.js @@ -19,11 +19,11 @@ c2 = c; //// [classImplementsClass5.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classImplementsClass6.js b/tests/baselines/reference/classImplementsClass6.js index 52959ed351a..ec814464801 100644 --- a/tests/baselines/reference/classImplementsClass6.js +++ b/tests/baselines/reference/classImplementsClass6.js @@ -23,11 +23,11 @@ c2.bar(); // should error //// [classImplementsClass6.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classIndexer3.js b/tests/baselines/reference/classIndexer3.js index 29dd552da9c..f50c50e4c90 100644 --- a/tests/baselines/reference/classIndexer3.js +++ b/tests/baselines/reference/classIndexer3.js @@ -12,11 +12,11 @@ class D123 extends C123 { //// [classIndexer3.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classInheritence.js b/tests/baselines/reference/classInheritence.js index d53bdbd8214..61a2ce9f262 100644 --- a/tests/baselines/reference/classInheritence.js +++ b/tests/baselines/reference/classInheritence.js @@ -4,11 +4,11 @@ class A extends A { } //// [classInheritence.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classIsSubtypeOfBaseType.js b/tests/baselines/reference/classIsSubtypeOfBaseType.js index f8a691ead9a..ec7a1f1babf 100644 --- a/tests/baselines/reference/classIsSubtypeOfBaseType.js +++ b/tests/baselines/reference/classIsSubtypeOfBaseType.js @@ -17,11 +17,11 @@ class Derived2 extends Base<{ bar: string; }> { //// [classIsSubtypeOfBaseType.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classOrder2.js b/tests/baselines/reference/classOrder2.js index c9859337efe..e7dd6959731 100644 --- a/tests/baselines/reference/classOrder2.js +++ b/tests/baselines/reference/classOrder2.js @@ -21,11 +21,11 @@ a.foo(); //// [classOrder2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classOrderBug.js b/tests/baselines/reference/classOrderBug.js index 14ab934d77c..5631152514f 100644 --- a/tests/baselines/reference/classOrderBug.js +++ b/tests/baselines/reference/classOrderBug.js @@ -17,11 +17,11 @@ class foo extends baz {} //// [classOrderBug.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classSideInheritance1.js b/tests/baselines/reference/classSideInheritance1.js index da6e44e42fe..cb958b2e12e 100644 --- a/tests/baselines/reference/classSideInheritance1.js +++ b/tests/baselines/reference/classSideInheritance1.js @@ -17,11 +17,11 @@ C2.bar(); // valid //// [classSideInheritance1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classSideInheritance2.js b/tests/baselines/reference/classSideInheritance2.js index a75bef9fbaf..9887472615f 100644 --- a/tests/baselines/reference/classSideInheritance2.js +++ b/tests/baselines/reference/classSideInheritance2.js @@ -22,11 +22,11 @@ class TextBase implements IText { //// [classSideInheritance2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classSideInheritance3.js b/tests/baselines/reference/classSideInheritance3.js index 1538ed6e07e..9ce60d012f4 100644 --- a/tests/baselines/reference/classSideInheritance3.js +++ b/tests/baselines/reference/classSideInheritance3.js @@ -20,11 +20,11 @@ var r3: typeof A = C; // ok //// [classSideInheritance3.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classUpdateTests.js b/tests/baselines/reference/classUpdateTests.js index 5e11c448307..eb9541ab737 100644 --- a/tests/baselines/reference/classUpdateTests.js +++ b/tests/baselines/reference/classUpdateTests.js @@ -115,11 +115,11 @@ class R { //// [classUpdateTests.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classWithBaseClassButNoConstructor.js b/tests/baselines/reference/classWithBaseClassButNoConstructor.js index d6638d88cec..249fa099007 100644 --- a/tests/baselines/reference/classWithBaseClassButNoConstructor.js +++ b/tests/baselines/reference/classWithBaseClassButNoConstructor.js @@ -42,11 +42,11 @@ var d6 = new D(1); // ok //// [classWithBaseClassButNoConstructor.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classWithConstructors.js b/tests/baselines/reference/classWithConstructors.js index fde7ad2da32..07b592bf730 100644 --- a/tests/baselines/reference/classWithConstructors.js +++ b/tests/baselines/reference/classWithConstructors.js @@ -51,11 +51,11 @@ module Generics { //// [classWithConstructors.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classWithProtectedProperty.js b/tests/baselines/reference/classWithProtectedProperty.js index 0188835fdac..0a2bb39b449 100644 --- a/tests/baselines/reference/classWithProtectedProperty.js +++ b/tests/baselines/reference/classWithProtectedProperty.js @@ -30,11 +30,11 @@ class D extends C { //// [classWithProtectedProperty.js] // accessing any protected outside the class is an error var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classWithStaticMembers.js b/tests/baselines/reference/classWithStaticMembers.js index 1ed38d2fee8..0e08046f8c2 100644 --- a/tests/baselines/reference/classWithStaticMembers.js +++ b/tests/baselines/reference/classWithStaticMembers.js @@ -21,11 +21,11 @@ var r3 = r.foo; //// [classWithStaticMembers.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/classdecl.js b/tests/baselines/reference/classdecl.js index ef7490f572d..97ccd8e1410 100644 --- a/tests/baselines/reference/classdecl.js +++ b/tests/baselines/reference/classdecl.js @@ -95,11 +95,11 @@ class e { //// [classdecl.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/clodulesDerivedClasses.js b/tests/baselines/reference/clodulesDerivedClasses.js index 3fd40d61762..a622261b685 100644 --- a/tests/baselines/reference/clodulesDerivedClasses.js +++ b/tests/baselines/reference/clodulesDerivedClasses.js @@ -24,11 +24,11 @@ module Path.Utils { //// [clodulesDerivedClasses.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js index 77025b6aa0c..5f7fc0cccdf 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.js @@ -41,11 +41,11 @@ class c extends Foo { //// [collisionSuperAndLocalFunctionInAccessors.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.js index 02e88a60761..d516c06ad18 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.js +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.js @@ -26,11 +26,11 @@ class c extends Foo { //// [collisionSuperAndLocalFunctionInConstructor.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.js index 91f9f5617df..1401411ad8e 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.js +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.js @@ -30,11 +30,11 @@ class c extends Foo { //// [collisionSuperAndLocalFunctionInMethod.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js b/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js index 520367125fe..99fe7e8dcef 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.js @@ -20,11 +20,11 @@ class b extends Foo { //// [collisionSuperAndLocalFunctionInProperty.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js b/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js index e77c21c058e..3278f9bd3a8 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js +++ b/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.js @@ -34,11 +34,11 @@ class c extends Foo { //// [collisionSuperAndLocalVarInAccessors.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js b/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js index 1a2f6b35800..dcbf08024a9 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js +++ b/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.js @@ -22,11 +22,11 @@ class c extends Foo { //// [collisionSuperAndLocalVarInConstructor.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js b/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js index 028ce3ae4a9..541035dd43b 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js +++ b/tests/baselines/reference/collisionSuperAndLocalVarInMethod.js @@ -20,11 +20,11 @@ class c extends Foo { //// [collisionSuperAndLocalVarInMethod.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js b/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js index c8ed5fc9d8f..8371687ff34 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js +++ b/tests/baselines/reference/collisionSuperAndLocalVarInProperty.js @@ -19,11 +19,11 @@ class b extends Foo { //// [collisionSuperAndLocalVarInProperty.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndNameResolution.js b/tests/baselines/reference/collisionSuperAndNameResolution.js index 2c0316dc66b..165943ec132 100644 --- a/tests/baselines/reference/collisionSuperAndNameResolution.js +++ b/tests/baselines/reference/collisionSuperAndNameResolution.js @@ -13,11 +13,11 @@ class Foo extends base { //// [collisionSuperAndNameResolution.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndParameter.js b/tests/baselines/reference/collisionSuperAndParameter.js index ef86232c1f1..e2771fadf1f 100644 --- a/tests/baselines/reference/collisionSuperAndParameter.js +++ b/tests/baselines/reference/collisionSuperAndParameter.js @@ -64,11 +64,11 @@ class Foo4 extends Foo { //// [collisionSuperAndParameter.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndParameter1.js b/tests/baselines/reference/collisionSuperAndParameter1.js index d70f7da34e8..818f15b3f15 100644 --- a/tests/baselines/reference/collisionSuperAndParameter1.js +++ b/tests/baselines/reference/collisionSuperAndParameter1.js @@ -11,11 +11,11 @@ class Foo2 extends Foo { //// [collisionSuperAndParameter1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js b/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js index 919265f587e..f905e520866 100644 --- a/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js +++ b/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.js @@ -32,11 +32,11 @@ class b4 extends a { //// [collisionSuperAndPropertyNameAsConstuctorParameter.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js b/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js index f380d8dc4ba..a5e68e4eaab 100644 --- a/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js +++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js @@ -20,11 +20,11 @@ class b2 extends a { //// [collisionThisExpressionAndLocalVarWithSuperExperssion.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/commentsInheritance.js b/tests/baselines/reference/commentsInheritance.js index e7feed00b6a..26150c60d12 100644 --- a/tests/baselines/reference/commentsInheritance.js +++ b/tests/baselines/reference/commentsInheritance.js @@ -153,11 +153,11 @@ i2_i = i3_i; //// [commentsInheritance.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.js b/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.js index 15b82315972..39a53a241c9 100644 --- a/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.js +++ b/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.js @@ -196,11 +196,11 @@ var r8b7 = b6 !== a6; //// [comparisonOperatorWithIdenticalObjects.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js index 7b541b2c304..63bd4442479 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js @@ -170,11 +170,11 @@ var r8b7 = b7 !== a7; //// [comparisonOperatorWithNoRelationshipObjectsOnCallSignature.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js index 9cf6be1f116..05657e3ec5e 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js @@ -170,11 +170,11 @@ var r8b7 = b7 !== a7; //// [comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js index f0fe513de27..685fb769e99 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js @@ -113,11 +113,11 @@ var r8b4 = b4 !== a4; //// [comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js index 4b31f7403e1..48d598efe26 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js @@ -151,11 +151,11 @@ var r8b6 = b6 !== a6; //// [comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js index 06472bc1527..c5e512a735b 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js @@ -151,11 +151,11 @@ var r8b6 = b6 !== a6; //// [comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnCallSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnCallSignature.js index 91fa37507bf..e93fc8c7b50 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnCallSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnCallSignature.js @@ -261,11 +261,11 @@ var r8b11 = b11 !== a11; //// [comparisonOperatorWithSubtypeObjectOnCallSignature.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnConstructorSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnConstructorSignature.js index 2eb5c7de9e8..a0e7b1a424e 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnConstructorSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnConstructorSignature.js @@ -223,11 +223,11 @@ var r8b9 = b9 !== a9; //// [comparisonOperatorWithSubtypeObjectOnConstructorSignature.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnIndexSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnIndexSignature.js index a5287dcb0af..e8d706eb290 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnIndexSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnIndexSignature.js @@ -109,11 +109,11 @@ var r8b1 = b4 !== a4; //// [comparisonOperatorWithSubtypeObjectOnIndexSignature.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js index c34ed06252f..51e077113dd 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js @@ -166,11 +166,11 @@ var r8b6 = b6 !== a6; //// [comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js index 0056917d60d..86c6fb86be2 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js @@ -166,11 +166,11 @@ var r8b6 = b6 !== a6; //// [comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.js b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.js index 73c2b62cd3a..2cd9fc1bb29 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.js +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnProperty.js @@ -80,11 +80,11 @@ var rh4 = b2 !== a2; //// [comparisonOperatorWithSubtypeObjectOnProperty.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/complexClassRelationships.js b/tests/baselines/reference/complexClassRelationships.js index bfbbbab2bc5..8a865e2d024 100644 --- a/tests/baselines/reference/complexClassRelationships.js +++ b/tests/baselines/reference/complexClassRelationships.js @@ -49,11 +49,11 @@ class FooBase { //// [complexClassRelationships.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.js b/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.js index 187a4389261..5af6a97f781 100644 --- a/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.js +++ b/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.js @@ -7,11 +7,11 @@ class S18 extends S18 //// [complicatedGenericRecursiveBaseClassReference.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/compoundAssignmentLHSIsValue.js b/tests/baselines/reference/compoundAssignmentLHSIsValue.js index ec8610a1164..064f2157c1e 100644 --- a/tests/baselines/reference/compoundAssignmentLHSIsValue.js +++ b/tests/baselines/reference/compoundAssignmentLHSIsValue.js @@ -125,11 +125,11 @@ foo() += value; //// [compoundAssignmentLHSIsValue.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js b/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js index c7060a5120d..bd152ea11ad 100644 --- a/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js +++ b/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js @@ -87,11 +87,11 @@ foo() **= value; //// [compoundExponentiationAssignmentLHSIsValue.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames24_ES5.js b/tests/baselines/reference/computedPropertyNames24_ES5.js index 75c032d7f91..ab1d81e8fb0 100644 --- a/tests/baselines/reference/computedPropertyNames24_ES5.js +++ b/tests/baselines/reference/computedPropertyNames24_ES5.js @@ -10,11 +10,11 @@ class C extends Base { //// [computedPropertyNames24_ES5.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames25_ES5.js b/tests/baselines/reference/computedPropertyNames25_ES5.js index a300b687f53..6443c3cedb2 100644 --- a/tests/baselines/reference/computedPropertyNames25_ES5.js +++ b/tests/baselines/reference/computedPropertyNames25_ES5.js @@ -15,11 +15,11 @@ class C extends Base { //// [computedPropertyNames25_ES5.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames26_ES5.js b/tests/baselines/reference/computedPropertyNames26_ES5.js index 16566ec14e7..a34bcef3b3d 100644 --- a/tests/baselines/reference/computedPropertyNames26_ES5.js +++ b/tests/baselines/reference/computedPropertyNames26_ES5.js @@ -12,11 +12,11 @@ class C extends Base { //// [computedPropertyNames26_ES5.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames27_ES5.js b/tests/baselines/reference/computedPropertyNames27_ES5.js index a7d16a4d18e..00d9c9f0f43 100644 --- a/tests/baselines/reference/computedPropertyNames27_ES5.js +++ b/tests/baselines/reference/computedPropertyNames27_ES5.js @@ -7,11 +7,11 @@ class C extends Base { //// [computedPropertyNames27_ES5.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames28_ES5.js b/tests/baselines/reference/computedPropertyNames28_ES5.js index 5eb7b307b62..c6e2c5d7732 100644 --- a/tests/baselines/reference/computedPropertyNames28_ES5.js +++ b/tests/baselines/reference/computedPropertyNames28_ES5.js @@ -12,11 +12,11 @@ class C extends Base { //// [computedPropertyNames28_ES5.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames30_ES5.js b/tests/baselines/reference/computedPropertyNames30_ES5.js index 44b748a0af2..f029b9b8651 100644 --- a/tests/baselines/reference/computedPropertyNames30_ES5.js +++ b/tests/baselines/reference/computedPropertyNames30_ES5.js @@ -17,11 +17,11 @@ class C extends Base { //// [computedPropertyNames30_ES5.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames31_ES5.js b/tests/baselines/reference/computedPropertyNames31_ES5.js index 97f03e71923..fd0db774e71 100644 --- a/tests/baselines/reference/computedPropertyNames31_ES5.js +++ b/tests/baselines/reference/computedPropertyNames31_ES5.js @@ -17,11 +17,11 @@ class C extends Base { //// [computedPropertyNames31_ES5.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames43_ES5.js b/tests/baselines/reference/computedPropertyNames43_ES5.js index 100258284ba..e49d4426cf7 100644 --- a/tests/baselines/reference/computedPropertyNames43_ES5.js +++ b/tests/baselines/reference/computedPropertyNames43_ES5.js @@ -14,11 +14,11 @@ class D extends C { //// [computedPropertyNames43_ES5.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames44_ES5.js b/tests/baselines/reference/computedPropertyNames44_ES5.js index 6064411248d..46029ee5475 100644 --- a/tests/baselines/reference/computedPropertyNames44_ES5.js +++ b/tests/baselines/reference/computedPropertyNames44_ES5.js @@ -13,11 +13,11 @@ class D extends C { //// [computedPropertyNames44_ES5.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/computedPropertyNames45_ES5.js b/tests/baselines/reference/computedPropertyNames45_ES5.js index d3b6ccc7552..7108935ab9e 100644 --- a/tests/baselines/reference/computedPropertyNames45_ES5.js +++ b/tests/baselines/reference/computedPropertyNames45_ES5.js @@ -14,11 +14,11 @@ class D extends C { //// [computedPropertyNames45_ES5.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js b/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js index 609c81f173d..5c948261bb2 100644 --- a/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js +++ b/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js @@ -49,11 +49,11 @@ var result11: any = true ? 1 : 'string'; //// [conditionalOperatorWithIdenticalBCT.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js b/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js index df5c7aac44f..01b0fe327fa 100644 --- a/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js +++ b/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js @@ -25,11 +25,11 @@ var result61: (t: X) => number| string = true ? (m) => m.propertyX1 : (n) => n.p //// [conditionalOperatorWithoutIdenticalBCT.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constantOverloadFunction.js b/tests/baselines/reference/constantOverloadFunction.js index 70effecc498..e204db38c28 100644 --- a/tests/baselines/reference/constantOverloadFunction.js +++ b/tests/baselines/reference/constantOverloadFunction.js @@ -15,11 +15,11 @@ function foo(tagName: any): Base { //// [constantOverloadFunction.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js b/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js index 74e70d97bd9..22ca8603ffb 100644 --- a/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js +++ b/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js @@ -16,11 +16,11 @@ function foo(tagName: any): Base { //// [constantOverloadFunctionNoSubtypeError.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js b/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js index 49f93e2497e..074cfa49b47 100644 --- a/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js +++ b/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js @@ -21,11 +21,11 @@ class Container { //// [constraintCheckInGenericBaseTypeReference.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.js index e2a884c4589..53ba73b8ba9 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.js @@ -72,11 +72,11 @@ interface I extends A { //// [constructSignatureAssignabilityInInheritance2.js] // checking subtype relations for function types as it relates to contextual signature instantiation var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.js index 87392413b1b..f6629487ff5 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.js @@ -115,11 +115,11 @@ module Errors { // checking subtype relations for function types as it relates to contextual signature instantiation // error cases var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance4.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance4.js index fb09253688d..3c20e2f96b5 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance4.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance4.js @@ -62,11 +62,11 @@ interface I extends A { //// [constructSignatureAssignabilityInInheritance4.js] // checking subtype relations for function types as it relates to contextual signature instantiation var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.js index 6ad855c7d32..1d8efafc234 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.js @@ -52,11 +52,11 @@ interface I extends B { // checking subtype relations for function types as it relates to contextual signature instantiation // same as subtypingWithConstructSignatures2 just with an extra level of indirection in the inheritance chain var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.js b/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.js index 5e768b4a41b..f6436b7d3e2 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.js +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance6.js @@ -55,11 +55,11 @@ interface I9 extends A { // same as subtypingWithConstructSignatures4 but using class type parameters instead of generic signatures // all are errors var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructorArgs.js b/tests/baselines/reference/constructorArgs.js index 47c508cab06..877cef3dd0a 100644 --- a/tests/baselines/reference/constructorArgs.js +++ b/tests/baselines/reference/constructorArgs.js @@ -17,11 +17,11 @@ class Sub extends Super { //// [constructorArgs.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType.js b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType.js index 633a7a155c5..27ed085a009 100644 --- a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType.js +++ b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType.js @@ -21,11 +21,11 @@ class Derived2 extends Base { //// [constructorFunctionTypeIsAssignableToBaseType.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js index 07e11b5c681..56891defbe0 100644 --- a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js +++ b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.js @@ -35,11 +35,11 @@ class Derived2 extends Base { //// [constructorFunctionTypeIsAssignableToBaseType2.js] // the constructor function itself does not need to be a subtype of the base type constructor function var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructorHasPrototypeProperty.js b/tests/baselines/reference/constructorHasPrototypeProperty.js index f2b90a57161..dae4e0bab23 100644 --- a/tests/baselines/reference/constructorHasPrototypeProperty.js +++ b/tests/baselines/reference/constructorHasPrototypeProperty.js @@ -33,11 +33,11 @@ module Generic { //// [constructorHasPrototypeProperty.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructorOverloads2.js b/tests/baselines/reference/constructorOverloads2.js index 67df7fb4e22..291ea545733 100644 --- a/tests/baselines/reference/constructorOverloads2.js +++ b/tests/baselines/reference/constructorOverloads2.js @@ -27,11 +27,11 @@ f1.bar1(); //// [constructorOverloads2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructorOverloads3.js b/tests/baselines/reference/constructorOverloads3.js index 79b648e0cbb..8ba67658a08 100644 --- a/tests/baselines/reference/constructorOverloads3.js +++ b/tests/baselines/reference/constructorOverloads3.js @@ -24,11 +24,11 @@ f1.bar1(); //// [constructorOverloads3.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructorWithCapturedSuper.js b/tests/baselines/reference/constructorWithCapturedSuper.js index 2034ea11c4f..503742de9fe 100644 --- a/tests/baselines/reference/constructorWithCapturedSuper.js +++ b/tests/baselines/reference/constructorWithCapturedSuper.js @@ -54,11 +54,11 @@ class D extends A { //// [constructorWithCapturedSuper.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js index dbeed3de1fd..3193d69ed3c 100644 --- a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js +++ b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js @@ -282,11 +282,11 @@ TypeScriptAllInOne.Program.Main(); //// [constructorWithIncompleteTypeAnnotation.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/contextualTypingArrayOfLambdas.js b/tests/baselines/reference/contextualTypingArrayOfLambdas.js index 60cc6d99771..4fda0eca214 100644 --- a/tests/baselines/reference/contextualTypingArrayOfLambdas.js +++ b/tests/baselines/reference/contextualTypingArrayOfLambdas.js @@ -16,11 +16,11 @@ var xs = [(x: A) => { }, (x: B) => { }, (x: C) => { }]; //// [contextualTypingArrayOfLambdas.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/contextualTypingOfConditionalExpression.js b/tests/baselines/reference/contextualTypingOfConditionalExpression.js index 063ae781b6f..6e6ea60691c 100644 --- a/tests/baselines/reference/contextualTypingOfConditionalExpression.js +++ b/tests/baselines/reference/contextualTypingOfConditionalExpression.js @@ -16,11 +16,11 @@ var x2: (a: A) => void = true ? (a) => a.foo : (b) => b.foo; //// [contextualTypingOfConditionalExpression.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/contextualTypingOfConditionalExpression2.js b/tests/baselines/reference/contextualTypingOfConditionalExpression2.js index c2bf66b2973..0678ff5bf74 100644 --- a/tests/baselines/reference/contextualTypingOfConditionalExpression2.js +++ b/tests/baselines/reference/contextualTypingOfConditionalExpression2.js @@ -14,11 +14,11 @@ var x2: (a: A) => void = true ? (a: C) => a.foo : (b: number) => { }; //// [contextualTypingOfConditionalExpression2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.js b/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.js index 8c6de85ca93..b71997f21fe 100644 --- a/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.js +++ b/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.js @@ -12,11 +12,11 @@ var a: D = foo("hi", []); //// [crashInsourcePropertyIsRelatableToTargetProperty.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declFileClassExtendsNull.js b/tests/baselines/reference/declFileClassExtendsNull.js index b5d473c86ce..d46ff63f62a 100644 --- a/tests/baselines/reference/declFileClassExtendsNull.js +++ b/tests/baselines/reference/declFileClassExtendsNull.js @@ -5,11 +5,11 @@ class ExtendsNull extends null { //// [declFileClassExtendsNull.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declFileForFunctionTypeAsTypeParameter.js b/tests/baselines/reference/declFileForFunctionTypeAsTypeParameter.js index 3262454f72d..3d90e148d42 100644 --- a/tests/baselines/reference/declFileForFunctionTypeAsTypeParameter.js +++ b/tests/baselines/reference/declFileForFunctionTypeAsTypeParameter.js @@ -11,11 +11,11 @@ interface I extends X<() => number> { //// [declFileForFunctionTypeAsTypeParameter.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declFileGenericClassWithGenericExtendedClass.js b/tests/baselines/reference/declFileGenericClassWithGenericExtendedClass.js index 0333bf19d21..c2d7a1faf33 100644 --- a/tests/baselines/reference/declFileGenericClassWithGenericExtendedClass.js +++ b/tests/baselines/reference/declFileGenericClassWithGenericExtendedClass.js @@ -14,11 +14,11 @@ class Baz implements IBar { //// [declFileGenericClassWithGenericExtendedClass.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declFileGenericType.js b/tests/baselines/reference/declFileGenericType.js index 6946e840dbe..8d7f16745c0 100644 --- a/tests/baselines/reference/declFileGenericType.js +++ b/tests/baselines/reference/declFileGenericType.js @@ -42,11 +42,11 @@ export var j = C.F6; //// [declFileGenericType.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declFileGenericType2.js b/tests/baselines/reference/declFileGenericType2.js index 1b9a79e95cb..1c6f2002da2 100644 --- a/tests/baselines/reference/declFileGenericType2.js +++ b/tests/baselines/reference/declFileGenericType2.js @@ -44,11 +44,11 @@ module templa.dom.mvc.composite { //// [declFileGenericType2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js b/tests/baselines/reference/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js index 5edd9c8c19d..da5177c89df 100644 --- a/tests/baselines/reference/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js +++ b/tests/baselines/reference/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js @@ -22,11 +22,11 @@ module X.Y.base.Z { //// [declFileWithClassNameConflictingWithClassReferredByExtendsClause.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declFileWithExtendsClauseThatHasItsContainerNameConflict.js b/tests/baselines/reference/declFileWithExtendsClauseThatHasItsContainerNameConflict.js index 07809bc8dec..a396c81c27f 100644 --- a/tests/baselines/reference/declFileWithExtendsClauseThatHasItsContainerNameConflict.js +++ b/tests/baselines/reference/declFileWithExtendsClauseThatHasItsContainerNameConflict.js @@ -20,11 +20,11 @@ module A.B.C { //// [declFileWithExtendsClauseThatHasItsContainerNameConflict.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declarationEmitExpressionInExtends.js b/tests/baselines/reference/declarationEmitExpressionInExtends.js index e3ebe2d0a42..7a0fe6ed603 100644 --- a/tests/baselines/reference/declarationEmitExpressionInExtends.js +++ b/tests/baselines/reference/declarationEmitExpressionInExtends.js @@ -16,11 +16,11 @@ q.s; //// [declarationEmitExpressionInExtends.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declarationEmitExpressionInExtends2.js b/tests/baselines/reference/declarationEmitExpressionInExtends2.js index 284b0ca83ce..1df6168f09b 100644 --- a/tests/baselines/reference/declarationEmitExpressionInExtends2.js +++ b/tests/baselines/reference/declarationEmitExpressionInExtends2.js @@ -14,11 +14,11 @@ class MyClass extends getClass(2) { //// [declarationEmitExpressionInExtends2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/declarationEmitExpressionInExtends3.js b/tests/baselines/reference/declarationEmitExpressionInExtends3.js index 41383d43d9e..2a291f273dc 100644 --- a/tests/baselines/reference/declarationEmitExpressionInExtends3.js +++ b/tests/baselines/reference/declarationEmitExpressionInExtends3.js @@ -46,11 +46,11 @@ export class MyClass4 extends getExportedClass(undefined)>>var __extends = (this && this.__extends) || (function () { ->>> var __extendStatics = Object.setPrototypeOf || +>>> var extendStatics = Object.setPrototypeOf || >>> ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || >>> function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; >>> return function (d, b) { ->>> __extendStatics(d, b); +>>> extendStatics(d, b); >>> function __() { this.constructor = d; } >>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); >>> }; diff --git a/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js b/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js index 9c295b584ad..51cca070d1f 100644 --- a/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js +++ b/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js @@ -35,11 +35,11 @@ class Derived4 extends Base2 { //// [derivedClassConstructorWithoutSuperCall.js] // derived class constructors must contain a super call var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.js b/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.js index bb9fcbc1952..35dd1e197e2 100644 --- a/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.js +++ b/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.js @@ -16,11 +16,11 @@ class Derived extends Base { //// [derivedClassFunctionOverridesBaseClassAccessor.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassIncludesInheritedMembers.js b/tests/baselines/reference/derivedClassIncludesInheritedMembers.js index 10cad78a322..03310fcfc4c 100644 --- a/tests/baselines/reference/derivedClassIncludesInheritedMembers.js +++ b/tests/baselines/reference/derivedClassIncludesInheritedMembers.js @@ -42,11 +42,11 @@ var r8 = d2[1]; //// [derivedClassIncludesInheritedMembers.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesIndexersWithAssignmentCompatibility.js b/tests/baselines/reference/derivedClassOverridesIndexersWithAssignmentCompatibility.js index 875270b57f3..36ad6580c18 100644 --- a/tests/baselines/reference/derivedClassOverridesIndexersWithAssignmentCompatibility.js +++ b/tests/baselines/reference/derivedClassOverridesIndexersWithAssignmentCompatibility.js @@ -19,11 +19,11 @@ class Derived2 extends Base2 { //// [derivedClassOverridesIndexersWithAssignmentCompatibility.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesPrivateFunction1.js b/tests/baselines/reference/derivedClassOverridesPrivateFunction1.js index cd04b7ede37..a7c35a96ac3 100644 --- a/tests/baselines/reference/derivedClassOverridesPrivateFunction1.js +++ b/tests/baselines/reference/derivedClassOverridesPrivateFunction1.js @@ -17,11 +17,11 @@ new DerivedClass(); //// [derivedClassOverridesPrivateFunction1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesPrivates.js b/tests/baselines/reference/derivedClassOverridesPrivates.js index 9dc81e9b5ad..c14783c8337 100644 --- a/tests/baselines/reference/derivedClassOverridesPrivates.js +++ b/tests/baselines/reference/derivedClassOverridesPrivates.js @@ -17,11 +17,11 @@ class Derived2 extends Base2 { //// [derivedClassOverridesPrivates.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers.js index 2ae532f0c84..9230a295f5b 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers.js @@ -38,11 +38,11 @@ class Derived extends Base { //// [derivedClassOverridesProtectedMembers.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js index 0f321c18241..dc9059f956e 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js @@ -65,11 +65,11 @@ var r8 = d2[1]; //// [derivedClassOverridesProtectedMembers2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js index 014cea9753e..615bdcddcf0 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js @@ -73,11 +73,11 @@ class Derived10 extends Base { //// [derivedClassOverridesProtectedMembers3.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers4.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers4.js index 5e4804b5bac..8e90218b063 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers4.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers4.js @@ -16,11 +16,11 @@ class Derived2 extends Derived1 { //// [derivedClassOverridesProtectedMembers4.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesPublicMembers.js b/tests/baselines/reference/derivedClassOverridesPublicMembers.js index 73d620ce2f5..3bbd661c704 100644 --- a/tests/baselines/reference/derivedClassOverridesPublicMembers.js +++ b/tests/baselines/reference/derivedClassOverridesPublicMembers.js @@ -64,11 +64,11 @@ var r8 = d2[1]; //// [derivedClassOverridesPublicMembers.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassOverridesWithoutSubtype.js b/tests/baselines/reference/derivedClassOverridesWithoutSubtype.js index 81fda59ae78..b53c736b857 100644 --- a/tests/baselines/reference/derivedClassOverridesWithoutSubtype.js +++ b/tests/baselines/reference/derivedClassOverridesWithoutSubtype.js @@ -25,11 +25,11 @@ class Derived2 extends Base2 { //// [derivedClassOverridesWithoutSubtype.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassParameterProperties.js b/tests/baselines/reference/derivedClassParameterProperties.js index 26bf27bd023..c127b1993ef 100644 --- a/tests/baselines/reference/derivedClassParameterProperties.js +++ b/tests/baselines/reference/derivedClassParameterProperties.js @@ -97,11 +97,11 @@ class Derived10 extends Base2 { //// [derivedClassParameterProperties.js] // ordering of super calls in derived constructors matters depending on other class contents var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js b/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js index 5c29ea9ed89..92ef489cd4c 100644 --- a/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js +++ b/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.js @@ -34,11 +34,11 @@ class Derived extends Base { //// [derivedClassSuperCallsInNonConstructorMembers.js] // error to use super calls outside a constructor var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js b/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js index bce8697a7e8..787bdefc79c 100644 --- a/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js +++ b/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js @@ -30,11 +30,11 @@ class Derived4 extends Base { //// [derivedClassSuperCallsWithThisArg.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassTransitivity.js b/tests/baselines/reference/derivedClassTransitivity.js index 997d25693a6..2809d899351 100644 --- a/tests/baselines/reference/derivedClassTransitivity.js +++ b/tests/baselines/reference/derivedClassTransitivity.js @@ -23,11 +23,11 @@ var r2 = e.foo(''); //// [derivedClassTransitivity.js] // subclassing is not transitive when you can remove required parameters and add optional parameters var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassTransitivity2.js b/tests/baselines/reference/derivedClassTransitivity2.js index c1304ad5242..8b69ea00102 100644 --- a/tests/baselines/reference/derivedClassTransitivity2.js +++ b/tests/baselines/reference/derivedClassTransitivity2.js @@ -23,11 +23,11 @@ var r2 = e.foo(1, ''); //// [derivedClassTransitivity2.js] // subclassing is not transitive when you can remove required parameters and add optional parameters var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassTransitivity3.js b/tests/baselines/reference/derivedClassTransitivity3.js index 264616cea7f..98e4bdd4b43 100644 --- a/tests/baselines/reference/derivedClassTransitivity3.js +++ b/tests/baselines/reference/derivedClassTransitivity3.js @@ -23,11 +23,11 @@ var r2 = e.foo('', 1); //// [derivedClassTransitivity3.js] // subclassing is not transitive when you can remove required parameters and add optional parameters var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassTransitivity4.js b/tests/baselines/reference/derivedClassTransitivity4.js index 63a78e3d3b6..315d0322ed2 100644 --- a/tests/baselines/reference/derivedClassTransitivity4.js +++ b/tests/baselines/reference/derivedClassTransitivity4.js @@ -23,11 +23,11 @@ var r2 = e.foo(''); //// [derivedClassTransitivity4.js] // subclassing is not transitive when you can remove required parameters and add optional parameters on protected members var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassWithAny.js b/tests/baselines/reference/derivedClassWithAny.js index 01d7c130f94..dd89a166cc1 100644 --- a/tests/baselines/reference/derivedClassWithAny.js +++ b/tests/baselines/reference/derivedClassWithAny.js @@ -61,11 +61,11 @@ var r = c.foo(); // e.foo would return string //// [derivedClassWithAny.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js index 1b8cca7a0a8..c38b9b3bd00 100644 --- a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js +++ b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js @@ -24,11 +24,11 @@ class Derived extends Base { //// [derivedClassWithPrivateInstanceShadowingProtectedInstance.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js index e2ecad8be4b..a50008d4142 100644 --- a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js +++ b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js @@ -34,11 +34,11 @@ Derived.a = 2; // error //// [derivedClassWithPrivateInstanceShadowingPublicInstance.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js index 26095ed6628..1680b9178ff 100644 --- a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js +++ b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js @@ -23,11 +23,11 @@ class Derived extends Base { //// [derivedClassWithPrivateStaticShadowingProtectedStatic.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js index f01edcc8a3a..2b65181cea9 100644 --- a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js +++ b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js @@ -35,11 +35,11 @@ Derived.a = 2; // error //// [derivedClassWithPrivateStaticShadowingPublicStatic.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js b/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js index d3ce1f3cdbf..ca746223e1b 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor.js @@ -27,11 +27,11 @@ var d2 = new D(new Date()); // ok //// [derivedClassWithoutExplicitConstructor.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js b/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js index c15ac71c573..492682b67bc 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.js @@ -35,11 +35,11 @@ var d4 = new D(new Date(), new Date(), new Date()); //// [derivedClassWithoutExplicitConstructor2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js b/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js index fe02d135c24..cf4d5cadecc 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.js @@ -49,11 +49,11 @@ var d3 = new D2(new Date(), new Date()); // ok //// [derivedClassWithoutExplicitConstructor3.js] // automatic constructors with a class hieararchy of depth > 2 var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedClasses.js b/tests/baselines/reference/derivedClasses.js index f310c0e5fd2..3bb1f7793ef 100644 --- a/tests/baselines/reference/derivedClasses.js +++ b/tests/baselines/reference/derivedClasses.js @@ -32,11 +32,11 @@ b.hue(); //// [derivedClasses.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedGenericClassWithAny.js b/tests/baselines/reference/derivedGenericClassWithAny.js index abd8954fe22..bab2879b229 100644 --- a/tests/baselines/reference/derivedGenericClassWithAny.js +++ b/tests/baselines/reference/derivedGenericClassWithAny.js @@ -44,11 +44,11 @@ var r = c.foo(); // e.foo would return string //// [derivedGenericClassWithAny.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js b/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js index b32d0a79d6b..9d076ad63a7 100644 --- a/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js +++ b/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js @@ -19,11 +19,11 @@ class Derived extends Base { //// [derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js b/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js index b5ef2f81099..faa148c65a5 100644 --- a/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js +++ b/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js @@ -22,11 +22,11 @@ var r: Base[] = [d1, d2]; //// [derivedTypeDoesNotRequireExtendsClause.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/destructuringParameterDeclaration5.js b/tests/baselines/reference/destructuringParameterDeclaration5.js index a00fc248939..d2499528735 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration5.js +++ b/tests/baselines/reference/destructuringParameterDeclaration5.js @@ -53,11 +53,11 @@ d3({ y: "world" }); //// [destructuringParameterDeclaration5.js] // Parameter Declaration with generic var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js b/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js index 325a15007c8..3a8bbdb0c73 100644 --- a/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js +++ b/tests/baselines/reference/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js @@ -15,11 +15,11 @@ class B extends A { //// [emitSuperCallBeforeEmitParameterPropertyDeclaration1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js index 2d97d0a9865..d8145f6dc27 100644 --- a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js +++ b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclaration1.js @@ -17,11 +17,11 @@ class B extends A { //// [emitSuperCallBeforeEmitPropertyDeclaration1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js index 63de121ed4d..75c618d84db 100644 --- a/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js +++ b/tests/baselines/reference/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js @@ -15,11 +15,11 @@ class B extends A { //// [emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/emitThisInSuperMethodCall.js b/tests/baselines/reference/emitThisInSuperMethodCall.js index 5488e3aa005..16712fb82cf 100644 --- a/tests/baselines/reference/emitThisInSuperMethodCall.js +++ b/tests/baselines/reference/emitThisInSuperMethodCall.js @@ -29,11 +29,11 @@ class RegisteredUser extends User { //// [emitThisInSuperMethodCall.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/emptyModuleName.js b/tests/baselines/reference/emptyModuleName.js index 16493baae98..7a22f87cfb4 100644 --- a/tests/baselines/reference/emptyModuleName.js +++ b/tests/baselines/reference/emptyModuleName.js @@ -6,11 +6,11 @@ class B extends A { //// [emptyModuleName.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/errorForwardReferenceForwadingConstructor.js b/tests/baselines/reference/errorForwardReferenceForwadingConstructor.js index 98eb91ce417..c5403b4d685 100644 --- a/tests/baselines/reference/errorForwardReferenceForwadingConstructor.js +++ b/tests/baselines/reference/errorForwardReferenceForwadingConstructor.js @@ -13,11 +13,11 @@ class derived extends base { } //// [errorForwardReferenceForwadingConstructor.js] // Error forward referencing derived class with forwarding constructor var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/errorSuperCalls.js b/tests/baselines/reference/errorSuperCalls.js index 6c7a1441b05..17a96d335f3 100644 --- a/tests/baselines/reference/errorSuperCalls.js +++ b/tests/baselines/reference/errorSuperCalls.js @@ -76,11 +76,11 @@ class OtherDerived extends OtherBase { //// [errorSuperCalls.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/errorSuperPropertyAccess.js b/tests/baselines/reference/errorSuperPropertyAccess.js index 70d777644c6..04ce626be32 100644 --- a/tests/baselines/reference/errorSuperPropertyAccess.js +++ b/tests/baselines/reference/errorSuperPropertyAccess.js @@ -130,11 +130,11 @@ var obj = { n: super.wat, p: super.foo() }; //// [errorSuperPropertyAccess.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/errorsInGenericTypeReference.js b/tests/baselines/reference/errorsInGenericTypeReference.js index d7797d7e350..49ddbe58dac 100644 --- a/tests/baselines/reference/errorsInGenericTypeReference.js +++ b/tests/baselines/reference/errorsInGenericTypeReference.js @@ -74,11 +74,11 @@ interface testInterface2 { //// [errorsInGenericTypeReference.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/es6ClassSuperCodegenBug.js b/tests/baselines/reference/es6ClassSuperCodegenBug.js index c958470d077..c909a68ccf7 100644 --- a/tests/baselines/reference/es6ClassSuperCodegenBug.js +++ b/tests/baselines/reference/es6ClassSuperCodegenBug.js @@ -16,11 +16,11 @@ class B extends A { //// [es6ClassSuperCodegenBug.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/es6ClassTest.js b/tests/baselines/reference/es6ClassTest.js index 6834e6139aa..9d66d2d8dc8 100644 --- a/tests/baselines/reference/es6ClassTest.js +++ b/tests/baselines/reference/es6ClassTest.js @@ -86,11 +86,11 @@ declare module AmbientMod { //// [es6ClassTest.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/es6ClassTest2.js b/tests/baselines/reference/es6ClassTest2.js index c456f270d6e..5133757348b 100644 --- a/tests/baselines/reference/es6ClassTest2.js +++ b/tests/baselines/reference/es6ClassTest2.js @@ -160,11 +160,11 @@ var ccwc = new ChildClassWithoutConstructor(1, "s"); //// [es6ClassTest2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/es6ClassTest7.js b/tests/baselines/reference/es6ClassTest7.js index 899ac4100eb..48937285684 100644 --- a/tests/baselines/reference/es6ClassTest7.js +++ b/tests/baselines/reference/es6ClassTest7.js @@ -10,11 +10,11 @@ class Bar extends M.Foo { //// [es6ClassTest7.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/exportAssignmentOfGenericType1.js b/tests/baselines/reference/exportAssignmentOfGenericType1.js index 4be64d67745..f9ffa44e82c 100644 --- a/tests/baselines/reference/exportAssignmentOfGenericType1.js +++ b/tests/baselines/reference/exportAssignmentOfGenericType1.js @@ -25,11 +25,11 @@ define(["require", "exports"], function (require, exports) { }); //// [exportAssignmentOfGenericType1_1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/exportDeclarationInInternalModule.js b/tests/baselines/reference/exportDeclarationInInternalModule.js index c9c59360621..c1827d0df9e 100644 --- a/tests/baselines/reference/exportDeclarationInInternalModule.js +++ b/tests/baselines/reference/exportDeclarationInInternalModule.js @@ -20,11 +20,11 @@ var a: Bbb.SomeType; //// [exportDeclarationInInternalModule.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extBaseClass1.js b/tests/baselines/reference/extBaseClass1.js index c05c43c1d27..3424f39bd16 100644 --- a/tests/baselines/reference/extBaseClass1.js +++ b/tests/baselines/reference/extBaseClass1.js @@ -21,11 +21,11 @@ module N { //// [extBaseClass1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extBaseClass2.js b/tests/baselines/reference/extBaseClass2.js index d55b201a728..ffc3249d7bf 100644 --- a/tests/baselines/reference/extBaseClass2.js +++ b/tests/baselines/reference/extBaseClass2.js @@ -12,11 +12,11 @@ module M { //// [extBaseClass2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendAndImplementTheSameBaseType.js b/tests/baselines/reference/extendAndImplementTheSameBaseType.js index 1a690094925..ed5232d88c9 100644 --- a/tests/baselines/reference/extendAndImplementTheSameBaseType.js +++ b/tests/baselines/reference/extendAndImplementTheSameBaseType.js @@ -15,11 +15,11 @@ d.foo; //// [extendAndImplementTheSameBaseType.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendAndImplementTheSameBaseType2.js b/tests/baselines/reference/extendAndImplementTheSameBaseType2.js index d262bcae95f..e9f37d718ff 100644 --- a/tests/baselines/reference/extendAndImplementTheSameBaseType2.js +++ b/tests/baselines/reference/extendAndImplementTheSameBaseType2.js @@ -18,11 +18,11 @@ var r4: number = d.bar(); //// [extendAndImplementTheSameBaseType2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendBaseClassBeforeItsDeclared.js b/tests/baselines/reference/extendBaseClassBeforeItsDeclared.js index 25be2160ecb..3a755b0e6f6 100644 --- a/tests/baselines/reference/extendBaseClassBeforeItsDeclared.js +++ b/tests/baselines/reference/extendBaseClassBeforeItsDeclared.js @@ -5,11 +5,11 @@ class base { constructor (public n: number) { } } //// [extendBaseClassBeforeItsDeclared.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendClassExpressionFromModule.js b/tests/baselines/reference/extendClassExpressionFromModule.js index 746379cc73c..6e6943d5766 100644 --- a/tests/baselines/reference/extendClassExpressionFromModule.js +++ b/tests/baselines/reference/extendClassExpressionFromModule.js @@ -22,11 +22,11 @@ module.exports = x; //// [foo2.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendConstructSignatureInInterface.js b/tests/baselines/reference/extendConstructSignatureInInterface.js index d8562243c66..30c1151c332 100644 --- a/tests/baselines/reference/extendConstructSignatureInInterface.js +++ b/tests/baselines/reference/extendConstructSignatureInInterface.js @@ -12,11 +12,11 @@ var e: E = new E(1); //// [extendConstructSignatureInInterface.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendNonClassSymbol1.js b/tests/baselines/reference/extendNonClassSymbol1.js index ac2f6c7ff93..066d19560b6 100644 --- a/tests/baselines/reference/extendNonClassSymbol1.js +++ b/tests/baselines/reference/extendNonClassSymbol1.js @@ -5,11 +5,11 @@ class C extends x { } // error, could not find symbol xs //// [extendNonClassSymbol1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendNonClassSymbol2.js b/tests/baselines/reference/extendNonClassSymbol2.js index 5b8800a553d..b82c3e2233b 100644 --- a/tests/baselines/reference/extendNonClassSymbol2.js +++ b/tests/baselines/reference/extendNonClassSymbol2.js @@ -7,11 +7,11 @@ class C extends Foo {} // error, could not find symbol Foo //// [extendNonClassSymbol2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendPrivateConstructorClass.js b/tests/baselines/reference/extendPrivateConstructorClass.js index 96b1bf98538..21968a3c47b 100644 --- a/tests/baselines/reference/extendPrivateConstructorClass.js +++ b/tests/baselines/reference/extendPrivateConstructorClass.js @@ -11,11 +11,11 @@ class C extends abc.XYZ { //// [extendPrivateConstructorClass.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js b/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js index 5e5f09622ee..b689e9b2640 100644 --- a/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js +++ b/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js @@ -43,11 +43,11 @@ exports.Model = Model; //// [extendingClassFromAliasAndUsageInIndexer_moduleA.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -64,11 +64,11 @@ exports.VisualizationModel = VisualizationModel; //// [extendingClassFromAliasAndUsageInIndexer_moduleB.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendsClauseAlreadySeen.js b/tests/baselines/reference/extendsClauseAlreadySeen.js index cf06895cb86..ec727e6b757 100644 --- a/tests/baselines/reference/extendsClauseAlreadySeen.js +++ b/tests/baselines/reference/extendsClauseAlreadySeen.js @@ -8,11 +8,11 @@ class D extends C extends C { //// [extendsClauseAlreadySeen.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/extendsClauseAlreadySeen2.js b/tests/baselines/reference/extendsClauseAlreadySeen2.js index 3dd977b657a..7b960bb97eb 100644 --- a/tests/baselines/reference/extendsClauseAlreadySeen2.js +++ b/tests/baselines/reference/extendsClauseAlreadySeen2.js @@ -8,11 +8,11 @@ class D extends C extends C { //// [extendsClauseAlreadySeen2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/fluentClasses.js b/tests/baselines/reference/fluentClasses.js index 34e8b10d70c..ae117674a81 100644 --- a/tests/baselines/reference/fluentClasses.js +++ b/tests/baselines/reference/fluentClasses.js @@ -20,11 +20,11 @@ var z = c.foo().bar().baz(); // Fluent pattern //// [fluentClasses.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/for-inStatements.js b/tests/baselines/reference/for-inStatements.js index b57d6383d96..44e7cf24bf4 100644 --- a/tests/baselines/reference/for-inStatements.js +++ b/tests/baselines/reference/for-inStatements.js @@ -82,11 +82,11 @@ for (var x in Color.Blue) { } //// [for-inStatements.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/for-inStatementsInvalid.js b/tests/baselines/reference/for-inStatementsInvalid.js index 4670bf17807..437e3fb9aef 100644 --- a/tests/baselines/reference/for-inStatementsInvalid.js +++ b/tests/baselines/reference/for-inStatementsInvalid.js @@ -65,11 +65,11 @@ for (var x in i[42]) { } //// [for-inStatementsInvalid.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/forStatementsMultipleInvalidDecl.js b/tests/baselines/reference/forStatementsMultipleInvalidDecl.js index 5f400591741..ea3bee7b12b 100644 --- a/tests/baselines/reference/forStatementsMultipleInvalidDecl.js +++ b/tests/baselines/reference/forStatementsMultipleInvalidDecl.js @@ -56,11 +56,11 @@ for( var m = M.A;;){} //// [forStatementsMultipleInvalidDecl.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/functionImplementationErrors.js b/tests/baselines/reference/functionImplementationErrors.js index 67f13db465e..4a641451815 100644 --- a/tests/baselines/reference/functionImplementationErrors.js +++ b/tests/baselines/reference/functionImplementationErrors.js @@ -76,11 +76,11 @@ var f13 = () => { //// [functionImplementationErrors.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/functionImplementations.js b/tests/baselines/reference/functionImplementations.js index 9fd603f16d3..26468d8af80 100644 --- a/tests/baselines/reference/functionImplementations.js +++ b/tests/baselines/reference/functionImplementations.js @@ -159,11 +159,11 @@ var f12: (x: number) => any = x => { // should be (x: number) => Base | AnotherC //// [functionImplementations.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/functionSubtypingOfVarArgs.js b/tests/baselines/reference/functionSubtypingOfVarArgs.js index f7365781a2c..83b889fa22b 100644 --- a/tests/baselines/reference/functionSubtypingOfVarArgs.js +++ b/tests/baselines/reference/functionSubtypingOfVarArgs.js @@ -16,11 +16,11 @@ class StringEvent extends EventBase { // should work //// [functionSubtypingOfVarArgs.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/functionSubtypingOfVarArgs2.js b/tests/baselines/reference/functionSubtypingOfVarArgs2.js index 6f534e64e88..bc49c602acb 100644 --- a/tests/baselines/reference/functionSubtypingOfVarArgs2.js +++ b/tests/baselines/reference/functionSubtypingOfVarArgs2.js @@ -16,11 +16,11 @@ class StringEvent extends EventBase { //// [functionSubtypingOfVarArgs2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/generatedContextualTyping.js b/tests/baselines/reference/generatedContextualTyping.js index 43aa5dd6e9a..782f3e985a1 100644 --- a/tests/baselines/reference/generatedContextualTyping.js +++ b/tests/baselines/reference/generatedContextualTyping.js @@ -357,11 +357,11 @@ var x356 = function(n: Genric) { }; x356({ func: n => { return [d1, d2]; } //// [generatedContextualTyping.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericBaseClassLiteralProperty.js b/tests/baselines/reference/genericBaseClassLiteralProperty.js index 73f5cb87bed..35c31bb6677 100644 --- a/tests/baselines/reference/genericBaseClassLiteralProperty.js +++ b/tests/baselines/reference/genericBaseClassLiteralProperty.js @@ -14,11 +14,11 @@ class SubClass extends BaseClass { //// [genericBaseClassLiteralProperty.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericBaseClassLiteralProperty2.js b/tests/baselines/reference/genericBaseClassLiteralProperty2.js index fb4f51749cd..8e91f9e228d 100644 --- a/tests/baselines/reference/genericBaseClassLiteralProperty2.js +++ b/tests/baselines/reference/genericBaseClassLiteralProperty2.js @@ -17,11 +17,11 @@ class DataView2 extends BaseCollection2 { //// [genericBaseClassLiteralProperty2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.js b/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.js index d625797ea53..d7564d3e052 100644 --- a/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.js +++ b/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference.js @@ -110,11 +110,11 @@ var r11 = i.foo8(); // Base //// [genericCallWithConstraintsTypeArgumentInference.js] // Basic type inference with generic calls and constraints, no errors expected var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgs2.js b/tests/baselines/reference/genericCallWithObjectTypeArgs2.js index ae844d043e6..28c0fbcec7e 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgs2.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgs2.js @@ -34,11 +34,11 @@ var r4 = f2(i); // Base => Derived //// [genericCallWithObjectTypeArgs2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js index e3d80ebd572..32e7bc1e74c 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js @@ -42,11 +42,11 @@ var r7 = f3(null, x => x); // any // Generic call with constraints infering type parameter from object member properties // No errors expected var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js index 387c4526764..f54727317e5 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js @@ -40,11 +40,11 @@ var r6 = f3(x => x, null); //// [genericCallWithObjectTypeArgsAndConstraints3.js] // Generic call with constraints infering type parameter from object member properties var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericCallbacksAndClassHierarchy.js b/tests/baselines/reference/genericCallbacksAndClassHierarchy.js index d4d86fe5793..cba1152fb02 100644 --- a/tests/baselines/reference/genericCallbacksAndClassHierarchy.js +++ b/tests/baselines/reference/genericCallbacksAndClassHierarchy.js @@ -25,11 +25,11 @@ module M { //// [genericCallbacksAndClassHierarchy.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericClassExpressionInFunction.js b/tests/baselines/reference/genericClassExpressionInFunction.js index 152237d458d..41252322414 100644 --- a/tests/baselines/reference/genericClassExpressionInFunction.js +++ b/tests/baselines/reference/genericClassExpressionInFunction.js @@ -33,11 +33,11 @@ s.genericVar = 12; //// [genericClassExpressionInFunction.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericClassInheritsConstructorFromNonGenericClass.js b/tests/baselines/reference/genericClassInheritsConstructorFromNonGenericClass.js index aa3e06cf57e..d91a43805e3 100644 --- a/tests/baselines/reference/genericClassInheritsConstructorFromNonGenericClass.js +++ b/tests/baselines/reference/genericClassInheritsConstructorFromNonGenericClass.js @@ -7,11 +7,11 @@ class C { //// [genericClassInheritsConstructorFromNonGenericClass.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js b/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js index 4efb95cdeba..b5c8f47bfd4 100644 --- a/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js +++ b/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js @@ -77,11 +77,11 @@ class ViewModel implements Contract { //// [genericClassPropertyInheritanceSpecialization.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericClassStaticMethod.js b/tests/baselines/reference/genericClassStaticMethod.js index 32b29319c12..ea236e40203 100644 --- a/tests/baselines/reference/genericClassStaticMethod.js +++ b/tests/baselines/reference/genericClassStaticMethod.js @@ -12,11 +12,11 @@ class Bar extends Foo { //// [genericClassStaticMethod.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericClasses3.js b/tests/baselines/reference/genericClasses3.js index a8a3db2f3a0..94c22c1241f 100644 --- a/tests/baselines/reference/genericClasses3.js +++ b/tests/baselines/reference/genericClasses3.js @@ -19,11 +19,11 @@ var z = v2.b; //// [genericClasses3.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js index 97bc5d27ee0..c66279ec873 100644 --- a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js +++ b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.js @@ -28,11 +28,11 @@ module EndGate.Tweening { //// [genericConstraintOnExtendedBuiltinTypes.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js index 66df4074441..af5f46c3c57 100644 --- a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js +++ b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.js @@ -27,11 +27,11 @@ module EndGate.Tweening { //// [genericConstraintOnExtendedBuiltinTypes2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.js b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.js index edd74ea92e4..1e231a172c3 100644 --- a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.js +++ b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.js @@ -14,11 +14,11 @@ x = y; // error //// [genericDerivedTypeWithSpecializedBase.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.js b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.js index 9fb286b1c40..2438206cbf2 100644 --- a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.js +++ b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.js @@ -14,11 +14,11 @@ x = y; // error //// [genericDerivedTypeWithSpecializedBase2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericInheritedDefaultConstructors.js b/tests/baselines/reference/genericInheritedDefaultConstructors.js index 7ed0c8179dd..6d4112fb666 100644 --- a/tests/baselines/reference/genericInheritedDefaultConstructors.js +++ b/tests/baselines/reference/genericInheritedDefaultConstructors.js @@ -12,11 +12,11 @@ var c:Constructor> = B; // shouldn't error here //// [genericInheritedDefaultConstructors.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericPrototypeProperty2.js b/tests/baselines/reference/genericPrototypeProperty2.js index 73a64a65763..dd494b1bdcd 100644 --- a/tests/baselines/reference/genericPrototypeProperty2.js +++ b/tests/baselines/reference/genericPrototypeProperty2.js @@ -17,11 +17,11 @@ class MyEventWrapper extends BaseEventWrapper { //// [genericPrototypeProperty2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericPrototypeProperty3.js b/tests/baselines/reference/genericPrototypeProperty3.js index 48e8b367486..45e39d173a1 100644 --- a/tests/baselines/reference/genericPrototypeProperty3.js +++ b/tests/baselines/reference/genericPrototypeProperty3.js @@ -16,11 +16,11 @@ class MyEventWrapper extends BaseEventWrapper { //// [genericPrototypeProperty3.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js index a9ea14337f4..558f6034b16 100644 --- a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js +++ b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js @@ -28,11 +28,11 @@ module TypeScript2 { //// [genericRecursiveImplicitConstructorErrors2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js index 60d214a1914..bea6d81dbaa 100644 --- a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js +++ b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js @@ -32,11 +32,11 @@ module TypeScript { //// [genericRecursiveImplicitConstructorErrors3.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericTypeAssertions2.js b/tests/baselines/reference/genericTypeAssertions2.js index 416317ea9f6..bcdaaa3958b 100644 --- a/tests/baselines/reference/genericTypeAssertions2.js +++ b/tests/baselines/reference/genericTypeAssertions2.js @@ -15,11 +15,11 @@ var r5: A = >[]; // error //// [genericTypeAssertions2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericTypeAssertions4.js b/tests/baselines/reference/genericTypeAssertions4.js index a857ae3ef8d..a2a7548bb63 100644 --- a/tests/baselines/reference/genericTypeAssertions4.js +++ b/tests/baselines/reference/genericTypeAssertions4.js @@ -27,11 +27,11 @@ function foo2(x: T) { //// [genericTypeAssertions4.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericTypeAssertions6.js b/tests/baselines/reference/genericTypeAssertions6.js index 8e69ccdbbc3..cdeb709fdfb 100644 --- a/tests/baselines/reference/genericTypeAssertions6.js +++ b/tests/baselines/reference/genericTypeAssertions6.js @@ -26,11 +26,11 @@ var c: A = >b; //// [genericTypeAssertions6.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericTypeConstraints.js b/tests/baselines/reference/genericTypeConstraints.js index 48baec0e6f6..cbb03b683a8 100644 --- a/tests/baselines/reference/genericTypeConstraints.js +++ b/tests/baselines/reference/genericTypeConstraints.js @@ -15,11 +15,11 @@ class BarExtended extends Bar { //// [genericTypeConstraints.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js index d123ce1bd2e..8704103d530 100644 --- a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js +++ b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js @@ -41,11 +41,11 @@ var k = null; // it is an error to use a generic type without type arguments // all of these are errors var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js index e03295d5086..75317fe0c81 100644 --- a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js +++ b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js @@ -41,11 +41,11 @@ var k = null; // it is an error to use a generic type without type arguments // all of these are errors var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js b/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js index 25f443c9bf4..f91d9b5d6cf 100644 --- a/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js +++ b/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js @@ -16,11 +16,11 @@ export class ListItem extends CollectionItem { //// [genericWithIndexerOfTypeParameterType2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/heterogeneousArrayLiterals.js b/tests/baselines/reference/heterogeneousArrayLiterals.js index 828a2894ed0..e15125ed70e 100644 --- a/tests/baselines/reference/heterogeneousArrayLiterals.js +++ b/tests/baselines/reference/heterogeneousArrayLiterals.js @@ -134,11 +134,11 @@ function foo4(t: T, u: U) { //// [heterogeneousArrayLiterals.js] // type of an array is the best common type of its elements (plus its contextual type if it exists) var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/ifDoWhileStatements.js b/tests/baselines/reference/ifDoWhileStatements.js index 527e241c35c..83e40177434 100644 --- a/tests/baselines/reference/ifDoWhileStatements.js +++ b/tests/baselines/reference/ifDoWhileStatements.js @@ -165,11 +165,11 @@ do { }while(fn) //// [ifDoWhileStatements.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/illegalSuperCallsInConstructor.js b/tests/baselines/reference/illegalSuperCallsInConstructor.js index 37fa76388f0..7e138dbf4a1 100644 --- a/tests/baselines/reference/illegalSuperCallsInConstructor.js +++ b/tests/baselines/reference/illegalSuperCallsInConstructor.js @@ -22,11 +22,11 @@ class Derived extends Base { //// [illegalSuperCallsInConstructor.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/implementClausePrecedingExtends.js b/tests/baselines/reference/implementClausePrecedingExtends.js index 916bbaebf7a..20a95fbcdc8 100644 --- a/tests/baselines/reference/implementClausePrecedingExtends.js +++ b/tests/baselines/reference/implementClausePrecedingExtends.js @@ -4,11 +4,11 @@ class D implements C extends C { } //// [implementClausePrecedingExtends.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.js b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.js index e6831db5f9c..07819ad752c 100644 --- a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.js +++ b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.js @@ -87,11 +87,11 @@ module M2 { //// [implementingAnInterfaceExtendingClassWithPrivates2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.js b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.js index 4e2dc2514d2..d79ae31ac25 100644 --- a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.js +++ b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithProtecteds.js @@ -43,11 +43,11 @@ class Bar8 extends Foo implements I { //// [implementingAnInterfaceExtendingClassWithProtecteds.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/importAsBaseClass.js b/tests/baselines/reference/importAsBaseClass.js index 9f2461ebd42..290e331b3f1 100644 --- a/tests/baselines/reference/importAsBaseClass.js +++ b/tests/baselines/reference/importAsBaseClass.js @@ -22,11 +22,11 @@ exports.Greeter = Greeter; //// [importAsBaseClass_1.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/importHelpers.js b/tests/baselines/reference/importHelpers.js index 7a28d808710..f5214bcceb8 100644 --- a/tests/baselines/reference/importHelpers.js +++ b/tests/baselines/reference/importHelpers.js @@ -69,11 +69,11 @@ C = tslib_1.__decorate([ ], C); //// [script.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/importHelpersNoHelpers.js b/tests/baselines/reference/importHelpersNoHelpers.js index 7fc3f22e1e2..0e87f20cb79 100644 --- a/tests/baselines/reference/importHelpersNoHelpers.js +++ b/tests/baselines/reference/importHelpersNoHelpers.js @@ -71,11 +71,11 @@ var y = tslib_1.__assign({}, o); var x = tslib_1.__rest(y, []); //// [script.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/importHelpersNoModule.js b/tests/baselines/reference/importHelpersNoModule.js index 820913a0f94..b7944b45867 100644 --- a/tests/baselines/reference/importHelpersNoModule.js +++ b/tests/baselines/reference/importHelpersNoModule.js @@ -61,11 +61,11 @@ C = tslib_1.__decorate([ ], C); //// [script.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/importShadowsGlobalName.js b/tests/baselines/reference/importShadowsGlobalName.js index 0c6a299ee5a..cb3f0378328 100644 --- a/tests/baselines/reference/importShadowsGlobalName.js +++ b/tests/baselines/reference/importShadowsGlobalName.js @@ -22,11 +22,11 @@ define(["require", "exports"], function (require, exports) { }); //// [Bar.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/importUsedInExtendsList1.js b/tests/baselines/reference/importUsedInExtendsList1.js index 25c82b8cb7b..c19e5be7e13 100644 --- a/tests/baselines/reference/importUsedInExtendsList1.js +++ b/tests/baselines/reference/importUsedInExtendsList1.js @@ -22,11 +22,11 @@ exports.Super = Super; //// [importUsedInExtendsList1_1.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/indexerConstraints2.js b/tests/baselines/reference/indexerConstraints2.js index 8a9b10c34c7..2dfc6d69e06 100644 --- a/tests/baselines/reference/indexerConstraints2.js +++ b/tests/baselines/reference/indexerConstraints2.js @@ -30,11 +30,11 @@ class K extends J { //// [indexerConstraints2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/indirectSelfReference.js b/tests/baselines/reference/indirectSelfReference.js index dbf484907e7..d912f07c145 100644 --- a/tests/baselines/reference/indirectSelfReference.js +++ b/tests/baselines/reference/indirectSelfReference.js @@ -4,11 +4,11 @@ class b extends a{ } //// [indirectSelfReference.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/indirectSelfReferenceGeneric.js b/tests/baselines/reference/indirectSelfReferenceGeneric.js index 6c73f2fa095..7c362a384aa 100644 --- a/tests/baselines/reference/indirectSelfReferenceGeneric.js +++ b/tests/baselines/reference/indirectSelfReferenceGeneric.js @@ -4,11 +4,11 @@ class b extends a { } //// [indirectSelfReferenceGeneric.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/infinitelyExpandingTypesNonGenericBase.js b/tests/baselines/reference/infinitelyExpandingTypesNonGenericBase.js index 7fb9d286791..4589d2d9671 100644 --- a/tests/baselines/reference/infinitelyExpandingTypesNonGenericBase.js +++ b/tests/baselines/reference/infinitelyExpandingTypesNonGenericBase.js @@ -26,11 +26,11 @@ o(A); //// [infinitelyExpandingTypesNonGenericBase.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritFromGenericTypeParameter.js b/tests/baselines/reference/inheritFromGenericTypeParameter.js index aadf2edb314..4e58f0b490d 100644 --- a/tests/baselines/reference/inheritFromGenericTypeParameter.js +++ b/tests/baselines/reference/inheritFromGenericTypeParameter.js @@ -4,11 +4,11 @@ interface I extends T { } //// [inheritFromGenericTypeParameter.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritSameNamePrivatePropertiesFromSameOrigin.js b/tests/baselines/reference/inheritSameNamePrivatePropertiesFromSameOrigin.js index 81717bfec05..15cdaba7d01 100644 --- a/tests/baselines/reference/inheritSameNamePrivatePropertiesFromSameOrigin.js +++ b/tests/baselines/reference/inheritSameNamePrivatePropertiesFromSameOrigin.js @@ -12,11 +12,11 @@ interface A extends C, C2 { // ok //// [inheritSameNamePrivatePropertiesFromSameOrigin.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritance.js b/tests/baselines/reference/inheritance.js index b6195423128..72fa6c80a81 100644 --- a/tests/baselines/reference/inheritance.js +++ b/tests/baselines/reference/inheritance.js @@ -36,11 +36,11 @@ class Baad extends Good { //// [inheritance.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritance1.js b/tests/baselines/reference/inheritance1.js index 6f1e76e8925..b3d87d0452f 100644 --- a/tests/baselines/reference/inheritance1.js +++ b/tests/baselines/reference/inheritance1.js @@ -63,11 +63,11 @@ l1 = c; //// [inheritance1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js index 3a79d28b51e..5c1568663dc 100644 --- a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js +++ b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js @@ -12,11 +12,11 @@ class C extends B { //// [inheritanceGrandParentPrivateMemberCollision.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js index 6b49c0fb9b5..f35305b2bcc 100644 --- a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js +++ b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js @@ -12,11 +12,11 @@ class C extends B { //// [inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js b/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js index f801c6cdd0d..8a6de50ee60 100644 --- a/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js +++ b/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js @@ -12,11 +12,11 @@ class C extends B { //// [inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js b/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js index b85a1f7d99e..be1cecd939d 100644 --- a/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.js @@ -19,11 +19,11 @@ class b extends a { //// [inheritanceMemberAccessorOverridingAccessor.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.js b/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.js index ac0b0376749..76829925c62 100644 --- a/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.js +++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.js @@ -16,11 +16,11 @@ class b extends a { //// [inheritanceMemberAccessorOverridingMethod.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js b/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js index eaae0a3c126..fff0dd7b832 100644 --- a/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js +++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.js @@ -14,11 +14,11 @@ class b extends a { //// [inheritanceMemberAccessorOverridingProperty.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js b/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js index 8ed9f07dbb6..085b3966541 100644 --- a/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.js @@ -16,11 +16,11 @@ class b extends a { //// [inheritanceMemberFuncOverridingAccessor.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.js b/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.js index a05acd4752f..fc405638f0f 100644 --- a/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.js +++ b/tests/baselines/reference/inheritanceMemberFuncOverridingMethod.js @@ -13,11 +13,11 @@ class b extends a { //// [inheritanceMemberFuncOverridingMethod.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.js b/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.js index 1b27447d3dc..94ea69a7fba 100644 --- a/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.js +++ b/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.js @@ -11,11 +11,11 @@ class b extends a { //// [inheritanceMemberFuncOverridingProperty.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js b/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js index c18e12d38cb..866323cd204 100644 --- a/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.js @@ -15,11 +15,11 @@ class b extends a { //// [inheritanceMemberPropertyOverridingAccessor.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.js b/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.js index e9b333ddee1..fe8c0457240 100644 --- a/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.js +++ b/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.js @@ -11,11 +11,11 @@ class b extends a { //// [inheritanceMemberPropertyOverridingMethod.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceMemberPropertyOverridingProperty.js b/tests/baselines/reference/inheritanceMemberPropertyOverridingProperty.js index 0ccfa544a7c..e431d295d01 100644 --- a/tests/baselines/reference/inheritanceMemberPropertyOverridingProperty.js +++ b/tests/baselines/reference/inheritanceMemberPropertyOverridingProperty.js @@ -9,11 +9,11 @@ class b extends a { //// [inheritanceMemberPropertyOverridingProperty.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js b/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js index c150ef6434d..1e1a7c69a08 100644 --- a/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js +++ b/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.js @@ -9,11 +9,11 @@ var b3 = new B(); // error, could not select overload for 'new' expression //// [inheritanceOfGenericConstructorMethod1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js b/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js index 8753fbe9b46..01370a3183c 100644 --- a/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js +++ b/tests/baselines/reference/inheritanceOfGenericConstructorMethod2.js @@ -16,11 +16,11 @@ var n3 = new N.D2(); // no error, D2 //// [inheritanceOfGenericConstructorMethod2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js b/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js index 3abc4b6d453..bff113f80e3 100644 --- a/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.js @@ -19,11 +19,11 @@ class b extends a { //// [inheritanceStaticAccessorOverridingAccessor.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js b/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js index 8215f4fdf0e..773f97c2bc9 100644 --- a/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js +++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.js @@ -16,11 +16,11 @@ class b extends a { //// [inheritanceStaticAccessorOverridingMethod.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js b/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js index 3375597f114..73eb1021d62 100644 --- a/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js +++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.js @@ -14,11 +14,11 @@ class b extends a { //// [inheritanceStaticAccessorOverridingProperty.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js index 7f27718a1fb..8d2aab0bbd1 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.js @@ -16,11 +16,11 @@ class b extends a { //// [inheritanceStaticFuncOverridingAccessor.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js index 03de6f62af4..c41281eecc4 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.js @@ -13,11 +13,11 @@ class b extends a { //// [inheritanceStaticFuncOverridingAccessorOfFuncType.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.js b/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.js index a1380343bee..cdbc3913a22 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingMethod.js @@ -13,11 +13,11 @@ class b extends a { //// [inheritanceStaticFuncOverridingMethod.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.js b/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.js index e28d0a026dd..77a8e21dc74 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.js @@ -11,11 +11,11 @@ class b extends a { //// [inheritanceStaticFuncOverridingProperty.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.js b/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.js index d8155525444..0f0eb43fdd6 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.js +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingPropertyOfFuncType.js @@ -11,11 +11,11 @@ class b extends a { //// [inheritanceStaticFuncOverridingPropertyOfFuncType.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticFunctionOverridingInstanceProperty.js b/tests/baselines/reference/inheritanceStaticFunctionOverridingInstanceProperty.js index 9b696526a44..fd92a887219 100644 --- a/tests/baselines/reference/inheritanceStaticFunctionOverridingInstanceProperty.js +++ b/tests/baselines/reference/inheritanceStaticFunctionOverridingInstanceProperty.js @@ -11,11 +11,11 @@ class b extends a { //// [inheritanceStaticFunctionOverridingInstanceProperty.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticMembersCompatible.js b/tests/baselines/reference/inheritanceStaticMembersCompatible.js index 59dc7e5fff1..7a74aea52d6 100644 --- a/tests/baselines/reference/inheritanceStaticMembersCompatible.js +++ b/tests/baselines/reference/inheritanceStaticMembersCompatible.js @@ -9,11 +9,11 @@ class b extends a { //// [inheritanceStaticMembersCompatible.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticMembersIncompatible.js b/tests/baselines/reference/inheritanceStaticMembersIncompatible.js index e6e2edf0d5b..f1805811345 100644 --- a/tests/baselines/reference/inheritanceStaticMembersIncompatible.js +++ b/tests/baselines/reference/inheritanceStaticMembersIncompatible.js @@ -9,11 +9,11 @@ class b extends a { //// [inheritanceStaticMembersIncompatible.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js b/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js index 7872f35ae90..435bf6d0a8d 100644 --- a/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js +++ b/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.js @@ -14,11 +14,11 @@ class b extends a { //// [inheritanceStaticPropertyOverridingAccessor.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.js b/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.js index 24a6135b30c..ee69b89dd4c 100644 --- a/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.js +++ b/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.js @@ -11,11 +11,11 @@ class b extends a { //// [inheritanceStaticPropertyOverridingMethod.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritanceStaticPropertyOverridingProperty.js b/tests/baselines/reference/inheritanceStaticPropertyOverridingProperty.js index 182fb27a970..7fd7cca98c4 100644 --- a/tests/baselines/reference/inheritanceStaticPropertyOverridingProperty.js +++ b/tests/baselines/reference/inheritanceStaticPropertyOverridingProperty.js @@ -9,11 +9,11 @@ class b extends a { //// [inheritanceStaticPropertyOverridingProperty.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritedConstructorWithRestParams.js b/tests/baselines/reference/inheritedConstructorWithRestParams.js index a2538cf999d..a11136ba6b7 100644 --- a/tests/baselines/reference/inheritedConstructorWithRestParams.js +++ b/tests/baselines/reference/inheritedConstructorWithRestParams.js @@ -16,11 +16,11 @@ new Derived(3); //// [inheritedConstructorWithRestParams.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritedConstructorWithRestParams2.js b/tests/baselines/reference/inheritedConstructorWithRestParams2.js index 17cca41912d..7d06886f562 100644 --- a/tests/baselines/reference/inheritedConstructorWithRestParams2.js +++ b/tests/baselines/reference/inheritedConstructorWithRestParams2.js @@ -36,11 +36,11 @@ new Derived("", 3, "", ""); //// [inheritedConstructorWithRestParams2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/inheritedModuleMembersForClodule.js b/tests/baselines/reference/inheritedModuleMembersForClodule.js index 5e7f49be559..3a20f4313b6 100644 --- a/tests/baselines/reference/inheritedModuleMembersForClodule.js +++ b/tests/baselines/reference/inheritedModuleMembersForClodule.js @@ -23,11 +23,11 @@ class E extends D { //// [inheritedModuleMembersForClodule.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/instanceOfAssignability.js b/tests/baselines/reference/instanceOfAssignability.js index c85caf07e53..a0b15b0e287 100644 --- a/tests/baselines/reference/instanceOfAssignability.js +++ b/tests/baselines/reference/instanceOfAssignability.js @@ -91,11 +91,11 @@ function fn8(x: Alpha|Beta|Gamma) { //// [instanceOfAssignability.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js b/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js index 8eb7e3321f9..b80c8f0ff13 100644 --- a/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js +++ b/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js @@ -44,11 +44,11 @@ module Generic { //// [instancePropertiesInheritedIntoClassType.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/instanceSubtypeCheck2.js b/tests/baselines/reference/instanceSubtypeCheck2.js index 58192144612..c42f071ddb9 100644 --- a/tests/baselines/reference/instanceSubtypeCheck2.js +++ b/tests/baselines/reference/instanceSubtypeCheck2.js @@ -9,11 +9,11 @@ class C2 extends C1 { //// [instanceSubtypeCheck2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/instanceofWithStructurallyIdenticalTypes.js b/tests/baselines/reference/instanceofWithStructurallyIdenticalTypes.js index 8eefac93223..32c15674984 100644 --- a/tests/baselines/reference/instanceofWithStructurallyIdenticalTypes.js +++ b/tests/baselines/reference/instanceofWithStructurallyIdenticalTypes.js @@ -73,11 +73,11 @@ function goo(x: A) { //// [instanceofWithStructurallyIdenticalTypes.js] // Repro from #7271 var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/instantiatedReturnTypeContravariance.js b/tests/baselines/reference/instantiatedReturnTypeContravariance.js index 01b8da419c4..7eed6d7f5fc 100644 --- a/tests/baselines/reference/instantiatedReturnTypeContravariance.js +++ b/tests/baselines/reference/instantiatedReturnTypeContravariance.js @@ -32,11 +32,11 @@ return null; //// [instantiatedReturnTypeContravariance.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/interfaceClassMerging.js b/tests/baselines/reference/interfaceClassMerging.js index 9b75b9e4d10..4cca8c1c8b9 100644 --- a/tests/baselines/reference/interfaceClassMerging.js +++ b/tests/baselines/reference/interfaceClassMerging.js @@ -42,11 +42,11 @@ obj = bar; //// [interfaceClassMerging.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/interfaceClassMerging2.js b/tests/baselines/reference/interfaceClassMerging2.js index 93c05759367..8d860ae95e7 100644 --- a/tests/baselines/reference/interfaceClassMerging2.js +++ b/tests/baselines/reference/interfaceClassMerging2.js @@ -38,11 +38,11 @@ foo = bar; //// [interfaceClassMerging2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/interfaceExtendsClass1.js b/tests/baselines/reference/interfaceExtendsClass1.js index 5e8d36136a8..fc5afcdddac 100644 --- a/tests/baselines/reference/interfaceExtendsClass1.js +++ b/tests/baselines/reference/interfaceExtendsClass1.js @@ -20,11 +20,11 @@ class Location { //// [interfaceExtendsClass1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js b/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js index d567d5661d9..334ac5cd292 100644 --- a/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js +++ b/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js @@ -29,11 +29,11 @@ d = c; // error //// [interfaceExtendsClassWithPrivate1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js b/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js index b7e2fe715cb..cc3e8163d18 100644 --- a/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js +++ b/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js @@ -25,11 +25,11 @@ class D2 extends C implements I { // error //// [interfaceExtendsClassWithPrivate2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/interfaceImplementation8.js b/tests/baselines/reference/interfaceImplementation8.js index f90d58edd4f..aa9bf7b4cf8 100644 --- a/tests/baselines/reference/interfaceImplementation8.js +++ b/tests/baselines/reference/interfaceImplementation8.js @@ -42,11 +42,11 @@ class C8 extends C7 implements i2{ //// [interfaceImplementation8.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.js b/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.js index 4b88d58fd18..897fa17c4e5 100644 --- a/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.js +++ b/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.js @@ -81,11 +81,11 @@ module YYY4 { //// [invalidModuleWithStatementsOfEveryKind.js] // All of these should be an error var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/invalidMultipleVariableDeclarations.js b/tests/baselines/reference/invalidMultipleVariableDeclarations.js index 4e473a95bf5..466d7eb9049 100644 --- a/tests/baselines/reference/invalidMultipleVariableDeclarations.js +++ b/tests/baselines/reference/invalidMultipleVariableDeclarations.js @@ -55,11 +55,11 @@ var m = M.A; //// [invalidMultipleVariableDeclarations.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/invalidReturnStatements.js b/tests/baselines/reference/invalidReturnStatements.js index 7dc01b18b5b..a61d036d9ed 100644 --- a/tests/baselines/reference/invalidReturnStatements.js +++ b/tests/baselines/reference/invalidReturnStatements.js @@ -22,11 +22,11 @@ function fn11(): D { return new C(); } //// [invalidReturnStatements.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/isolatedModulesImportExportElision.js b/tests/baselines/reference/isolatedModulesImportExportElision.js index e430e1eda1b..7c295a315f9 100644 --- a/tests/baselines/reference/isolatedModulesImportExportElision.js +++ b/tests/baselines/reference/isolatedModulesImportExportElision.js @@ -16,11 +16,11 @@ export var z = x; //// [file1.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/jsxViaImport.js b/tests/baselines/reference/jsxViaImport.js index 7955a6e65b9..92d8b063a44 100644 --- a/tests/baselines/reference/jsxViaImport.js +++ b/tests/baselines/reference/jsxViaImport.js @@ -26,11 +26,11 @@ class TestComponent extends React.Component { //// [consumer.jsx] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/keyofAndIndexedAccess.js b/tests/baselines/reference/keyofAndIndexedAccess.js index e9d76ee4d7f..173b5a47347 100644 --- a/tests/baselines/reference/keyofAndIndexedAccess.js +++ b/tests/baselines/reference/keyofAndIndexedAccess.js @@ -368,11 +368,11 @@ function f(p: K) { //// [keyofAndIndexedAccess.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/lambdaArgCrash.js b/tests/baselines/reference/lambdaArgCrash.js index cdc03b555ef..f138aa162bd 100644 --- a/tests/baselines/reference/lambdaArgCrash.js +++ b/tests/baselines/reference/lambdaArgCrash.js @@ -36,11 +36,11 @@ class ItemSetEvent extends Event { //// [lambdaArgCrash.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/lift.js b/tests/baselines/reference/lift.js index d2f2ed8dc0d..80eebe9cb00 100644 --- a/tests/baselines/reference/lift.js +++ b/tests/baselines/reference/lift.js @@ -19,11 +19,11 @@ class C extends B { //// [lift.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/localTypes1.js b/tests/baselines/reference/localTypes1.js index 27045613c81..b0aaed7906a 100644 --- a/tests/baselines/reference/localTypes1.js +++ b/tests/baselines/reference/localTypes1.js @@ -143,11 +143,11 @@ function f6() { //// [localTypes1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/m7Bugs.js b/tests/baselines/reference/m7Bugs.js index 86504bdf8f9..be611c2e5cd 100644 --- a/tests/baselines/reference/m7Bugs.js +++ b/tests/baselines/reference/m7Bugs.js @@ -28,11 +28,11 @@ var y3: C1 = {}; //// [m7Bugs.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/mergedDeclarations5.js b/tests/baselines/reference/mergedDeclarations5.js index 886afebe358..d393ec00e2c 100644 --- a/tests/baselines/reference/mergedDeclarations5.js +++ b/tests/baselines/reference/mergedDeclarations5.js @@ -20,11 +20,11 @@ var A = (function () { }()); //// [b.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/mergedDeclarations6.js b/tests/baselines/reference/mergedDeclarations6.js index 445fbac34b7..2b1f468c873 100644 --- a/tests/baselines/reference/mergedDeclarations6.js +++ b/tests/baselines/reference/mergedDeclarations6.js @@ -38,11 +38,11 @@ define(["require", "exports"], function (require, exports) { }); //// [b.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/mergedInheritedClassInterface.js b/tests/baselines/reference/mergedInheritedClassInterface.js index 1772d6139d8..29d140f3f68 100644 --- a/tests/baselines/reference/mergedInheritedClassInterface.js +++ b/tests/baselines/reference/mergedInheritedClassInterface.js @@ -48,11 +48,11 @@ grandchild.method2(); //// [mergedInheritedClassInterface.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.js b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.js index 65477941c0a..b705d58e1eb 100644 --- a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.js +++ b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.js @@ -33,11 +33,11 @@ var r2 = a.w; // error //// [mergedInterfacesWithInheritedPrivates2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.js b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.js index c3d2cc0ea57..c002a30a828 100644 --- a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.js +++ b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.js @@ -40,11 +40,11 @@ module M { //// [mergedInterfacesWithInheritedPrivates3.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/missingPropertiesOfClassExpression.js b/tests/baselines/reference/missingPropertiesOfClassExpression.js index a2d38f47c62..7f468d14def 100644 --- a/tests/baselines/reference/missingPropertiesOfClassExpression.js +++ b/tests/baselines/reference/missingPropertiesOfClassExpression.js @@ -8,11 +8,11 @@ class George extends class { reset() { return this.y; } } { //// [missingPropertiesOfClassExpression.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/moduleAsBaseType.js b/tests/baselines/reference/moduleAsBaseType.js index 99553e04108..24a04eff872 100644 --- a/tests/baselines/reference/moduleAsBaseType.js +++ b/tests/baselines/reference/moduleAsBaseType.js @@ -6,11 +6,11 @@ class C2 implements M { } //// [moduleAsBaseType.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/moduleImportedForTypeArgumentPosition.js b/tests/baselines/reference/moduleImportedForTypeArgumentPosition.js index 6471abaf13d..57087e49aa1 100644 --- a/tests/baselines/reference/moduleImportedForTypeArgumentPosition.js +++ b/tests/baselines/reference/moduleImportedForTypeArgumentPosition.js @@ -17,11 +17,11 @@ define(["require", "exports"], function (require, exports) { }); //// [moduleImportedForTypeArgumentPosition_1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/moduleWithStatementsOfEveryKind.js b/tests/baselines/reference/moduleWithStatementsOfEveryKind.js index f7532442020..cedfcd8b86c 100644 --- a/tests/baselines/reference/moduleWithStatementsOfEveryKind.js +++ b/tests/baselines/reference/moduleWithStatementsOfEveryKind.js @@ -60,11 +60,11 @@ module Y { //// [moduleWithStatementsOfEveryKind.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/multipleInheritance.js b/tests/baselines/reference/multipleInheritance.js index f0074664ad1..536f694ba17 100644 --- a/tests/baselines/reference/multipleInheritance.js +++ b/tests/baselines/reference/multipleInheritance.js @@ -40,11 +40,11 @@ class Baad extends Good { //// [multipleInheritance.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/mutuallyRecursiveGenericBaseTypes2.js b/tests/baselines/reference/mutuallyRecursiveGenericBaseTypes2.js index 90ffbf5148f..0e846877cb8 100644 --- a/tests/baselines/reference/mutuallyRecursiveGenericBaseTypes2.js +++ b/tests/baselines/reference/mutuallyRecursiveGenericBaseTypes2.js @@ -12,11 +12,11 @@ var test = new foo(); //// [mutuallyRecursiveGenericBaseTypes2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/noImplicitAnyMissingGetAccessor.js b/tests/baselines/reference/noImplicitAnyMissingGetAccessor.js index 25815641e95..12859100009 100644 --- a/tests/baselines/reference/noImplicitAnyMissingGetAccessor.js +++ b/tests/baselines/reference/noImplicitAnyMissingGetAccessor.js @@ -14,11 +14,11 @@ class Child extends Parent { //// [noImplicitAnyMissingGetAccessor.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/noImplicitAnyMissingSetAccessor.js b/tests/baselines/reference/noImplicitAnyMissingSetAccessor.js index cb37fafd9f9..bb6e1e53f0f 100644 --- a/tests/baselines/reference/noImplicitAnyMissingSetAccessor.js +++ b/tests/baselines/reference/noImplicitAnyMissingSetAccessor.js @@ -13,11 +13,11 @@ class Child extends Parent { //// [noImplicitAnyMissingSetAccessor.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/nonGenericClassExtendingGenericClassWithAny.js b/tests/baselines/reference/nonGenericClassExtendingGenericClassWithAny.js index 49a3a7e05eb..132145dbf3f 100644 --- a/tests/baselines/reference/nonGenericClassExtendingGenericClassWithAny.js +++ b/tests/baselines/reference/nonGenericClassExtendingGenericClassWithAny.js @@ -7,11 +7,11 @@ class Bar extends Foo { } // Valid //// [nonGenericClassExtendingGenericClassWithAny.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js index 9c44df83757..046414eba34 100644 --- a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js +++ b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js @@ -48,11 +48,11 @@ var b: { [x: number]: A } = { //// [numericIndexerConstrainsPropertyDeclarations2.js] // String indexer providing a constraint of a user defined type var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/numericIndexerConstraint3.js b/tests/baselines/reference/numericIndexerConstraint3.js index 4a8c3caf12b..ebe02d70f7d 100644 --- a/tests/baselines/reference/numericIndexerConstraint3.js +++ b/tests/baselines/reference/numericIndexerConstraint3.js @@ -14,11 +14,11 @@ class C { //// [numericIndexerConstraint3.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/numericIndexerConstraint4.js b/tests/baselines/reference/numericIndexerConstraint4.js index 4fe10b54ee4..fda23bce27c 100644 --- a/tests/baselines/reference/numericIndexerConstraint4.js +++ b/tests/baselines/reference/numericIndexerConstraint4.js @@ -14,11 +14,11 @@ var x: { //// [numericIndexerConstraint4.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/numericIndexerTyping2.js b/tests/baselines/reference/numericIndexerTyping2.js index e6fce38d818..f87198f32a7 100644 --- a/tests/baselines/reference/numericIndexerTyping2.js +++ b/tests/baselines/reference/numericIndexerTyping2.js @@ -14,11 +14,11 @@ var r2: string = i2[1]; // error: numeric indexer returns the type of the string //// [numericIndexerTyping2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectCreationOfElementAccessExpression.js b/tests/baselines/reference/objectCreationOfElementAccessExpression.js index 7d192f7ee9a..72645662e01 100644 --- a/tests/baselines/reference/objectCreationOfElementAccessExpression.js +++ b/tests/baselines/reference/objectCreationOfElementAccessExpression.js @@ -57,11 +57,11 @@ var foods2: MonsterFood[] = new PetFood[new IceCream('Mint chocolate chip') , Co //// [objectCreationOfElementAccessExpression.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js b/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js index 84caecad63a..ffe2ca6ab7e 100644 --- a/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js +++ b/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js @@ -56,11 +56,11 @@ var r4: void = b.valueOf(); //// [objectTypeHidingMembersOfExtendedObject.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js index a00f33b2a97..550ef48125d 100644 --- a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js +++ b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js @@ -125,11 +125,11 @@ function foo16(x: any) { } //// [objectTypesIdentityWithNumericIndexers1.js] // object types are identical structurally var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js index fa176f483d7..249c39be6d3 100644 --- a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js +++ b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js @@ -128,11 +128,11 @@ function foo16(x: any) { } //// [objectTypesIdentityWithNumericIndexers2.js] // object types are identical structurally var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js index a09e844b6c4..7f16c30799f 100644 --- a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js +++ b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js @@ -125,11 +125,11 @@ function foo16(x: any) { } //// [objectTypesIdentityWithNumericIndexers3.js] // object types are identical structurally var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypesIdentityWithPrivates.js b/tests/baselines/reference/objectTypesIdentityWithPrivates.js index a187c353056..b1902922277 100644 --- a/tests/baselines/reference/objectTypesIdentityWithPrivates.js +++ b/tests/baselines/reference/objectTypesIdentityWithPrivates.js @@ -123,11 +123,11 @@ function foo16(x: any) { } //// [objectTypesIdentityWithPrivates.js] // object types are identical structurally var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypesIdentityWithPrivates2.js b/tests/baselines/reference/objectTypesIdentityWithPrivates2.js index 5d130734c7b..8de254e15c1 100644 --- a/tests/baselines/reference/objectTypesIdentityWithPrivates2.js +++ b/tests/baselines/reference/objectTypesIdentityWithPrivates2.js @@ -41,11 +41,11 @@ function foo6(x: any): any { } //// [objectTypesIdentityWithPrivates2.js] // object types are identical structurally var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypesIdentityWithPrivates3.js b/tests/baselines/reference/objectTypesIdentityWithPrivates3.js index f28147ba50d..6970f06854b 100644 --- a/tests/baselines/reference/objectTypesIdentityWithPrivates3.js +++ b/tests/baselines/reference/objectTypesIdentityWithPrivates3.js @@ -27,11 +27,11 @@ var c3: C3; //// [objectTypesIdentityWithPrivates3.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js b/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js index a561df31753..3c45a453d88 100644 --- a/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js +++ b/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js @@ -125,11 +125,11 @@ function foo16(x: any) { } //// [objectTypesIdentityWithStringIndexers.js] // object types are identical structurally var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js b/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js index 282ec34ea5f..e9dce1d5366 100644 --- a/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js +++ b/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js @@ -128,11 +128,11 @@ function foo16(x: any) { } //// [objectTypesIdentityWithStringIndexers2.js] // object types are identical structurally var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/optionalConstructorArgInSuper.js b/tests/baselines/reference/optionalConstructorArgInSuper.js index 5033f9d1581..c18a38ec343 100644 --- a/tests/baselines/reference/optionalConstructorArgInSuper.js +++ b/tests/baselines/reference/optionalConstructorArgInSuper.js @@ -12,11 +12,11 @@ d2.foo(); //// [optionalConstructorArgInSuper.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/optionalMethods.js b/tests/baselines/reference/optionalMethods.js index 3af46d7e41a..e79c6f85fd3 100644 --- a/tests/baselines/reference/optionalMethods.js +++ b/tests/baselines/reference/optionalMethods.js @@ -59,11 +59,11 @@ class Derived extends Base { //// [optionalMethods.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/optionalParamArgsTest.js b/tests/baselines/reference/optionalParamArgsTest.js index 2bcfbd44da5..5c8503a9bef 100644 --- a/tests/baselines/reference/optionalParamArgsTest.js +++ b/tests/baselines/reference/optionalParamArgsTest.js @@ -126,11 +126,11 @@ fnOpt2(1, [2, 3], [1], true); //// [optionalParamArgsTest.js] // Optional parameter and default argument tests var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/optionalParamInOverride.js b/tests/baselines/reference/optionalParamInOverride.js index 52fa0a38517..03db09eac1a 100644 --- a/tests/baselines/reference/optionalParamInOverride.js +++ b/tests/baselines/reference/optionalParamInOverride.js @@ -9,11 +9,11 @@ class Y extends Z { //// [optionalParamInOverride.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/optionalParameterProperty.js b/tests/baselines/reference/optionalParameterProperty.js index ed1b910241d..fc288d09767 100644 --- a/tests/baselines/reference/optionalParameterProperty.js +++ b/tests/baselines/reference/optionalParameterProperty.js @@ -13,11 +13,11 @@ class D extends C { //// [optionalParameterProperty.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/outModuleConcatAmd.js b/tests/baselines/reference/outModuleConcatAmd.js index 398978793c1..810cd73b502 100644 --- a/tests/baselines/reference/outModuleConcatAmd.js +++ b/tests/baselines/reference/outModuleConcatAmd.js @@ -10,11 +10,11 @@ export class B extends A { } //// [all.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt b/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt index f220eb3e0ed..6e905832277 100644 --- a/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt +++ b/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt @@ -9,11 +9,11 @@ emittedFile:all.js sourceFile:tests/cases/compiler/ref/a.ts ------------------------------------------------------------------- >>>var __extends = (this && this.__extends) || (function () { ->>> var __extendStatics = Object.setPrototypeOf || +>>> var extendStatics = Object.setPrototypeOf || >>> ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || >>> function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; >>> return function (d, b) { ->>> __extendStatics(d, b); +>>> extendStatics(d, b); >>> function __() { this.constructor = d; } >>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); >>> }; diff --git a/tests/baselines/reference/outModuleConcatSystem.js b/tests/baselines/reference/outModuleConcatSystem.js index e5a1bd65cad..ff8f1f6fd0a 100644 --- a/tests/baselines/reference/outModuleConcatSystem.js +++ b/tests/baselines/reference/outModuleConcatSystem.js @@ -10,11 +10,11 @@ export class B extends A { } //// [all.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt b/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt index 72b6bf09dd1..1a25b6358fa 100644 --- a/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt +++ b/tests/baselines/reference/outModuleConcatSystem.sourcemap.txt @@ -9,11 +9,11 @@ emittedFile:all.js sourceFile:tests/cases/compiler/ref/a.ts ------------------------------------------------------------------- >>>var __extends = (this && this.__extends) || (function () { ->>> var __extendStatics = Object.setPrototypeOf || +>>> var extendStatics = Object.setPrototypeOf || >>> ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || >>> function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; >>> return function (d, b) { ->>> __extendStatics(d, b); +>>> extendStatics(d, b); >>> function __() { this.constructor = d; } >>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); >>> }; diff --git a/tests/baselines/reference/outModuleTripleSlashRefs.js b/tests/baselines/reference/outModuleTripleSlashRefs.js index 8308f58cc99..b144c6e74c8 100644 --- a/tests/baselines/reference/outModuleTripleSlashRefs.js +++ b/tests/baselines/reference/outModuleTripleSlashRefs.js @@ -32,11 +32,11 @@ export class B extends A { } //// [all.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt b/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt index 102664ea71a..0f20e86cd00 100644 --- a/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt +++ b/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt @@ -9,11 +9,11 @@ emittedFile:all.js sourceFile:tests/cases/compiler/ref/b.ts ------------------------------------------------------------------- >>>var __extends = (this && this.__extends) || (function () { ->>> var __extendStatics = Object.setPrototypeOf || +>>> var extendStatics = Object.setPrototypeOf || >>> ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || >>> function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; >>> return function (d, b) { ->>> __extendStatics(d, b); +>>> extendStatics(d, b); >>> function __() { this.constructor = d; } >>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); >>> }; diff --git a/tests/baselines/reference/overload1.js b/tests/baselines/reference/overload1.js index e73c84abb14..eddb4181ad6 100644 --- a/tests/baselines/reference/overload1.js +++ b/tests/baselines/reference/overload1.js @@ -41,11 +41,11 @@ var v=x.g; //// [overload1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks1.js b/tests/baselines/reference/overloadOnConstConstraintChecks1.js index 18d16ef9913..058a294833c 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks1.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks1.js @@ -24,11 +24,11 @@ class D implements MyDoc { //// [overloadOnConstConstraintChecks1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks2.js b/tests/baselines/reference/overloadOnConstConstraintChecks2.js index f78ed9a7d50..9cbbedfabb3 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks2.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks2.js @@ -13,11 +13,11 @@ function foo(name: any): A { //// [overloadOnConstConstraintChecks2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks3.js b/tests/baselines/reference/overloadOnConstConstraintChecks3.js index b26d1067f55..5f710f17837 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks3.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks3.js @@ -14,11 +14,11 @@ function foo(name: any): A { //// [overloadOnConstConstraintChecks3.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks4.js b/tests/baselines/reference/overloadOnConstConstraintChecks4.js index db2d6e9adba..afa8d83cb13 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks4.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks4.js @@ -15,11 +15,11 @@ function foo(name: any): Z { //// [overloadOnConstConstraintChecks4.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js b/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js index 438c41fa8bd..534a4f9dde8 100644 --- a/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js +++ b/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js @@ -13,11 +13,11 @@ foo("HI"); //// [overloadOnConstantsInvalidOverload1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadResolution.js b/tests/baselines/reference/overloadResolution.js index 24de1599796..b154ceff837 100644 --- a/tests/baselines/reference/overloadResolution.js +++ b/tests/baselines/reference/overloadResolution.js @@ -96,11 +96,11 @@ var s = fn5((n) => n.substr(0)); //// [overloadResolution.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadResolutionClassConstructors.js b/tests/baselines/reference/overloadResolutionClassConstructors.js index 5f81c47c9ff..45d07483f4f 100644 --- a/tests/baselines/reference/overloadResolutionClassConstructors.js +++ b/tests/baselines/reference/overloadResolutionClassConstructors.js @@ -103,11 +103,11 @@ new fn5((n) => n.blah); // Error //// [overloadResolutionClassConstructors.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadResolutionConstructors.js b/tests/baselines/reference/overloadResolutionConstructors.js index 02cc668c64d..4a64e8be917 100644 --- a/tests/baselines/reference/overloadResolutionConstructors.js +++ b/tests/baselines/reference/overloadResolutionConstructors.js @@ -104,11 +104,11 @@ var s = new fn5((n) => n.substr(0)); //// [overloadResolutionConstructors.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadingOnConstants1.js b/tests/baselines/reference/overloadingOnConstants1.js index 606d4aa674c..774436ba5ee 100644 --- a/tests/baselines/reference/overloadingOnConstants1.js +++ b/tests/baselines/reference/overloadingOnConstants1.js @@ -27,11 +27,11 @@ var htmlSpanElement2: Derived1 = d2.createElement("span"); //// [overloadingOnConstants1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overloadingOnConstants2.js b/tests/baselines/reference/overloadingOnConstants2.js index 7beb3662ff1..6cc20caa80e 100644 --- a/tests/baselines/reference/overloadingOnConstants2.js +++ b/tests/baselines/reference/overloadingOnConstants2.js @@ -29,11 +29,11 @@ var f: C = bar("um", []); // C //// [overloadingOnConstants2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/overridingPrivateStaticMembers.js b/tests/baselines/reference/overridingPrivateStaticMembers.js index b5bfa6ac627..f7fb709cda2 100644 --- a/tests/baselines/reference/overridingPrivateStaticMembers.js +++ b/tests/baselines/reference/overridingPrivateStaticMembers.js @@ -9,11 +9,11 @@ class Derived2 extends Base2 { //// [overridingPrivateStaticMembers.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parseErrorInHeritageClause1.js b/tests/baselines/reference/parseErrorInHeritageClause1.js index 293309025fe..647ddb733a7 100644 --- a/tests/baselines/reference/parseErrorInHeritageClause1.js +++ b/tests/baselines/reference/parseErrorInHeritageClause1.js @@ -4,11 +4,11 @@ class C extends A # { //// [parseErrorInHeritageClause1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parser509630.js b/tests/baselines/reference/parser509630.js index 482a078f3d1..6676b2499dd 100644 --- a/tests/baselines/reference/parser509630.js +++ b/tests/baselines/reference/parser509630.js @@ -8,11 +8,11 @@ class Any extends Type { //// [parser509630.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserAstSpans1.js b/tests/baselines/reference/parserAstSpans1.js index fd9c5822dd8..ae274f3dcbb 100644 --- a/tests/baselines/reference/parserAstSpans1.js +++ b/tests/baselines/reference/parserAstSpans1.js @@ -221,11 +221,11 @@ class c6 extends c5 { //// [parserAstSpans1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserClassDeclaration1.js b/tests/baselines/reference/parserClassDeclaration1.js index 5b8ea6c183a..11c087cf568 100644 --- a/tests/baselines/reference/parserClassDeclaration1.js +++ b/tests/baselines/reference/parserClassDeclaration1.js @@ -4,11 +4,11 @@ class C extends A extends B { //// [parserClassDeclaration1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserClassDeclaration3.js b/tests/baselines/reference/parserClassDeclaration3.js index a419598461f..886fce51892 100644 --- a/tests/baselines/reference/parserClassDeclaration3.js +++ b/tests/baselines/reference/parserClassDeclaration3.js @@ -4,11 +4,11 @@ class C implements A extends B { //// [parserClassDeclaration3.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserClassDeclaration4.js b/tests/baselines/reference/parserClassDeclaration4.js index 6ed902beed0..d9f1f1acbed 100644 --- a/tests/baselines/reference/parserClassDeclaration4.js +++ b/tests/baselines/reference/parserClassDeclaration4.js @@ -4,11 +4,11 @@ class C extends A implements B extends C { //// [parserClassDeclaration4.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserClassDeclaration5.js b/tests/baselines/reference/parserClassDeclaration5.js index a8e54191fee..38fa87e2ce1 100644 --- a/tests/baselines/reference/parserClassDeclaration5.js +++ b/tests/baselines/reference/parserClassDeclaration5.js @@ -4,11 +4,11 @@ class C extends A implements B implements C { //// [parserClassDeclaration5.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserClassDeclaration6.js b/tests/baselines/reference/parserClassDeclaration6.js index 648213d1516..a4720967984 100644 --- a/tests/baselines/reference/parserClassDeclaration6.js +++ b/tests/baselines/reference/parserClassDeclaration6.js @@ -4,11 +4,11 @@ class C extends A, B { //// [parserClassDeclaration6.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause2.js b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause2.js index 5cd993caf70..231b4fb3d06 100644 --- a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause2.js +++ b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause2.js @@ -4,11 +4,11 @@ class C extends A, { //// [parserErrorRecovery_ExtendsOrImplementsClause2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause4.js b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause4.js index 9d5b0393218..584088cd511 100644 --- a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause4.js +++ b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause4.js @@ -4,11 +4,11 @@ class C extends A implements { //// [parserErrorRecovery_ExtendsOrImplementsClause4.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause5.js b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause5.js index 010eace1920..97dd2af2925 100644 --- a/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause5.js +++ b/tests/baselines/reference/parserErrorRecovery_ExtendsOrImplementsClause5.js @@ -4,11 +4,11 @@ class C extends A, implements B, { //// [parserErrorRecovery_ExtendsOrImplementsClause5.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserGenericsInTypeContexts1.js b/tests/baselines/reference/parserGenericsInTypeContexts1.js index f85f5b6fd1a..a072e9c3565 100644 --- a/tests/baselines/reference/parserGenericsInTypeContexts1.js +++ b/tests/baselines/reference/parserGenericsInTypeContexts1.js @@ -19,11 +19,11 @@ function f2(): F { //// [parserGenericsInTypeContexts1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserGenericsInTypeContexts2.js b/tests/baselines/reference/parserGenericsInTypeContexts2.js index 1491fd37b5f..7e8694e9416 100644 --- a/tests/baselines/reference/parserGenericsInTypeContexts2.js +++ b/tests/baselines/reference/parserGenericsInTypeContexts2.js @@ -19,11 +19,11 @@ function f2(): F, Y>> { //// [parserGenericsInTypeContexts2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserRealSource10.js b/tests/baselines/reference/parserRealSource10.js index d2e8c5ff1f7..0d42dc5f47b 100644 --- a/tests/baselines/reference/parserRealSource10.js +++ b/tests/baselines/reference/parserRealSource10.js @@ -459,11 +459,11 @@ module TypeScript { // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. // See LICENSE.txt in the project root for complete license information. var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserRealSource11.js b/tests/baselines/reference/parserRealSource11.js index 0e39573238c..0d942cb1c68 100644 --- a/tests/baselines/reference/parserRealSource11.js +++ b/tests/baselines/reference/parserRealSource11.js @@ -2368,11 +2368,11 @@ module TypeScript { // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. // See LICENSE.txt in the project root for complete license information. var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/parserharness.js b/tests/baselines/reference/parserharness.js index f173052a112..5090c33bdc8 100644 --- a/tests/baselines/reference/parserharness.js +++ b/tests/baselines/reference/parserharness.js @@ -2097,11 +2097,11 @@ module Harness { // limitations under the License. // var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/partiallyAnnotatedFunctionInferenceError.js b/tests/baselines/reference/partiallyAnnotatedFunctionInferenceError.js index 0d1097b4773..e09713cfdfa 100644 --- a/tests/baselines/reference/partiallyAnnotatedFunctionInferenceError.js +++ b/tests/baselines/reference/partiallyAnnotatedFunctionInferenceError.js @@ -17,11 +17,11 @@ testError((t1, t2, t3: D) => {}) //// [partiallyAnnotatedFunctionInferenceError.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/partiallyAnnotatedFunctionInferenceWithTypeParameter.js b/tests/baselines/reference/partiallyAnnotatedFunctionInferenceWithTypeParameter.js index c55721cb647..2647bd4d8ee 100644 --- a/tests/baselines/reference/partiallyAnnotatedFunctionInferenceWithTypeParameter.js +++ b/tests/baselines/reference/partiallyAnnotatedFunctionInferenceWithTypeParameter.js @@ -36,11 +36,11 @@ testRest((t2, ...t3: D[]) => {}) //// [partiallyAnnotatedFunctionInferenceWithTypeParameter.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/primitiveMembers.js b/tests/baselines/reference/primitiveMembers.js index 6ef048203ae..d378e5abee0 100644 --- a/tests/baselines/reference/primitiveMembers.js +++ b/tests/baselines/reference/primitiveMembers.js @@ -33,11 +33,11 @@ class foo extends baz { public bar(){ return undefined}; } //// [primitiveMembers.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/privacyClass.js b/tests/baselines/reference/privacyClass.js index 07ea7691ac2..154e4ad453d 100644 --- a/tests/baselines/reference/privacyClass.js +++ b/tests/baselines/reference/privacyClass.js @@ -130,11 +130,11 @@ export class glo_C12_public extends glo_c_private implements glo_i_private, glo //// [privacyClass.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js b/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js index c1b219a3eaf..04f18d61340 100644 --- a/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js +++ b/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js @@ -100,11 +100,11 @@ class publicClassExtendingPublicClassInGlobal extends publicClassInGlobal { //// [privacyClassExtendsClauseDeclFile_externalModule.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -291,11 +291,11 @@ var publicClassExtendingFromPrivateModuleClass = (function (_super) { exports.publicClassExtendingFromPrivateModuleClass = publicClassExtendingFromPrivateModuleClass; //// [privacyClassExtendsClauseDeclFile_GlobalFile.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/privacyGloClass.js b/tests/baselines/reference/privacyGloClass.js index 9698b1a0977..017bd375b54 100644 --- a/tests/baselines/reference/privacyGloClass.js +++ b/tests/baselines/reference/privacyGloClass.js @@ -62,11 +62,11 @@ class glo_C11_public extends glo_c_public implements glo_i_public { //// [privacyGloClass.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/privateAccessInSubclass1.js b/tests/baselines/reference/privateAccessInSubclass1.js index 0f02de4ad4d..cf1a6cb1d44 100644 --- a/tests/baselines/reference/privateAccessInSubclass1.js +++ b/tests/baselines/reference/privateAccessInSubclass1.js @@ -11,11 +11,11 @@ class D extends Base { //// [privateAccessInSubclass1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/privateInstanceMemberAccessibility.js b/tests/baselines/reference/privateInstanceMemberAccessibility.js index 5f9a857269e..72f1ea01f0d 100644 --- a/tests/baselines/reference/privateInstanceMemberAccessibility.js +++ b/tests/baselines/reference/privateInstanceMemberAccessibility.js @@ -15,11 +15,11 @@ class Derived extends Base { //// [privateInstanceMemberAccessibility.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/privateProtectedMembersAreNotAccessibleDestructuring.js b/tests/baselines/reference/privateProtectedMembersAreNotAccessibleDestructuring.js index f9d4fe56c39..96808c3daeb 100644 --- a/tests/baselines/reference/privateProtectedMembersAreNotAccessibleDestructuring.js +++ b/tests/baselines/reference/privateProtectedMembersAreNotAccessibleDestructuring.js @@ -23,11 +23,11 @@ let { priv: a, prot: b, privateMethod: f } = k; // error //// [privateProtectedMembersAreNotAccessibleDestructuring.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/privateStaticMemberAccessibility.js b/tests/baselines/reference/privateStaticMemberAccessibility.js index 548b08b9b92..19da5064fbb 100644 --- a/tests/baselines/reference/privateStaticMemberAccessibility.js +++ b/tests/baselines/reference/privateStaticMemberAccessibility.js @@ -10,11 +10,11 @@ class Derived extends Base { //// [privateStaticMemberAccessibility.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/privateStaticNotAccessibleInClodule2.js b/tests/baselines/reference/privateStaticNotAccessibleInClodule2.js index a4171441430..eceda383092 100644 --- a/tests/baselines/reference/privateStaticNotAccessibleInClodule2.js +++ b/tests/baselines/reference/privateStaticNotAccessibleInClodule2.js @@ -17,11 +17,11 @@ module D { //// [privateStaticNotAccessibleInClodule2.js] // Any attempt to access a private property member outside the class body that contains its declaration results in a compile-time error. var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/amd/testGlo.js b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/amd/testGlo.js index 26700d01d59..bf8401f6b4d 100644 --- a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/amd/testGlo.js +++ b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/amd/testGlo.js @@ -1,9 +1,9 @@ var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/node/testGlo.js b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/node/testGlo.js index 26700d01d59..bf8401f6b4d 100644 --- a/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/node/testGlo.js +++ b/tests/baselines/reference/project/privacyCheckOnImportedModuleDeclarationsInsideModule/node/testGlo.js @@ -1,9 +1,9 @@ var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/project/prologueEmit/amd/out.js b/tests/baselines/reference/project/prologueEmit/amd/out.js index 5d13ff191f0..5fdfd475186 100644 --- a/tests/baselines/reference/project/prologueEmit/amd/out.js +++ b/tests/baselines/reference/project/prologueEmit/amd/out.js @@ -1,9 +1,9 @@ var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/project/prologueEmit/node/out.js b/tests/baselines/reference/project/prologueEmit/node/out.js index 5d13ff191f0..5fdfd475186 100644 --- a/tests/baselines/reference/project/prologueEmit/node/out.js +++ b/tests/baselines/reference/project/prologueEmit/node/out.js @@ -1,9 +1,9 @@ var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/project/quotesInFileAndDirectoryNames/amd/m'ain.js b/tests/baselines/reference/project/quotesInFileAndDirectoryNames/amd/m'ain.js index 859117be880..2fe4870822f 100644 --- a/tests/baselines/reference/project/quotesInFileAndDirectoryNames/amd/m'ain.js +++ b/tests/baselines/reference/project/quotesInFileAndDirectoryNames/amd/m'ain.js @@ -1,10 +1,10 @@ /// var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/project/quotesInFileAndDirectoryNames/node/m'ain.js b/tests/baselines/reference/project/quotesInFileAndDirectoryNames/node/m'ain.js index 859117be880..2fe4870822f 100644 --- a/tests/baselines/reference/project/quotesInFileAndDirectoryNames/node/m'ain.js +++ b/tests/baselines/reference/project/quotesInFileAndDirectoryNames/node/m'ain.js @@ -1,10 +1,10 @@ /// var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/propertiesAndIndexers.js b/tests/baselines/reference/propertiesAndIndexers.js index 9ea39c60dfb..899390cc913 100644 --- a/tests/baselines/reference/propertiesAndIndexers.js +++ b/tests/baselines/reference/propertiesAndIndexers.js @@ -53,11 +53,11 @@ var c: { //// [propertiesAndIndexers.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/propertyAccess.js b/tests/baselines/reference/propertyAccess.js index 4a3910e8594..f9b92420a70 100644 --- a/tests/baselines/reference/propertyAccess.js +++ b/tests/baselines/reference/propertyAccess.js @@ -152,11 +152,11 @@ var x3: A; //// [propertyAccess.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js index 665550081b3..b3464d30f9c 100644 --- a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js @@ -84,11 +84,11 @@ var r4 = b.foo(aB, aB); // no inferences for T so constraint isn't satisfied, er //// [propertyAccessOnTypeParameterWithConstraints2.js] // generic types should behave as if they have properties of their constraint type var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js index a79ba9ed75c..a43b44c4b2b 100644 --- a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js @@ -59,11 +59,11 @@ var r4 = b.foo(new B()); // valid call to an invalid function //// [propertyAccessOnTypeParameterWithConstraints3.js] // generic types should behave as if they have properties of their constraint type var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js index 41de2d8c0e0..604131ef7b7 100644 --- a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js @@ -46,11 +46,11 @@ var r4 = b.foo(new B()); // error after constraints above made illegal, doesn't //// [propertyAccessOnTypeParameterWithConstraints5.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass.js index a94af12901d..0756ef8ca9b 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass.js @@ -40,11 +40,11 @@ class E extends C { //// [protectedClassPropertyAccessibleWithinNestedSubclass.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass1.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass1.js index d26f70b75bd..6d0c068039f 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass1.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinNestedSubclass1.js @@ -116,11 +116,11 @@ d4.x; // Error, neither within their declaring class nor class //// [protectedClassPropertyAccessibleWithinNestedSubclass1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js index 330f73bca19..c2f072b213b 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js @@ -22,11 +22,11 @@ class C extends B { //// [protectedClassPropertyAccessibleWithinSubclass.js] // no errors var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass2.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass2.js index cbde651add9..b7421c6161c 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass2.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass2.js @@ -96,11 +96,11 @@ d4.x; // Error, neither within their declaring class nor class //// [protectedClassPropertyAccessibleWithinSubclass2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass3.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass3.js index a2cb66b2997..72cf5039e6c 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass3.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass3.js @@ -15,11 +15,11 @@ class Derived extends Base { //// [protectedClassPropertyAccessibleWithinSubclass3.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedInstanceMemberAccessibility.js b/tests/baselines/reference/protectedInstanceMemberAccessibility.js index abe608b1ed4..dc74f3ed190 100644 --- a/tests/baselines/reference/protectedInstanceMemberAccessibility.js +++ b/tests/baselines/reference/protectedInstanceMemberAccessibility.js @@ -46,11 +46,11 @@ class C extends A { //// [protectedInstanceMemberAccessibility.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedMembers.js b/tests/baselines/reference/protectedMembers.js index 689d11be3c3..fddbdf80bcc 100644 --- a/tests/baselines/reference/protectedMembers.js +++ b/tests/baselines/reference/protectedMembers.js @@ -117,11 +117,11 @@ class B3 extends A3 { //// [protectedMembers.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass.js b/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass.js index f681073d629..9564b6e35b9 100644 --- a/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass.js +++ b/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass.js @@ -45,11 +45,11 @@ Derived3.x; // Error, neither within their declaring class nor classes deriv //// [protectedStaticClassPropertyAccessibleWithinSubclass.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass2.js b/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass2.js index 3096ea6aa3c..ca6af2bc4ed 100644 --- a/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass2.js +++ b/tests/baselines/reference/protectedStaticClassPropertyAccessibleWithinSubclass2.js @@ -23,11 +23,11 @@ class Derived2 extends Derived1 { //// [protectedStaticClassPropertyAccessibleWithinSubclass2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/qualifiedName_entity-name-resolution-does-not-affect-class-heritage.js b/tests/baselines/reference/qualifiedName_entity-name-resolution-does-not-affect-class-heritage.js index 96df9d1d85b..ff51753f683 100644 --- a/tests/baselines/reference/qualifiedName_entity-name-resolution-does-not-affect-class-heritage.js +++ b/tests/baselines/reference/qualifiedName_entity-name-resolution-does-not-affect-class-heritage.js @@ -8,11 +8,11 @@ class Beta extends Alpha.x { //// [qualifiedName_entity-name-resolution-does-not-affect-class-heritage.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/readonlyConstructorAssignment.js b/tests/baselines/reference/readonlyConstructorAssignment.js index 42f88abcf54..bb4ddec93a8 100644 --- a/tests/baselines/reference/readonlyConstructorAssignment.js +++ b/tests/baselines/reference/readonlyConstructorAssignment.js @@ -42,11 +42,11 @@ class E extends D { //// [readonlyConstructorAssignment.js] // Tests that readonly parameter properties behave like regular readonly properties var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/recursiveBaseCheck3.js b/tests/baselines/reference/recursiveBaseCheck3.js index 3e2cbcee520..84b40e2f035 100644 --- a/tests/baselines/reference/recursiveBaseCheck3.js +++ b/tests/baselines/reference/recursiveBaseCheck3.js @@ -6,11 +6,11 @@ class C extends A { } //// [recursiveBaseCheck3.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/recursiveBaseCheck4.js b/tests/baselines/reference/recursiveBaseCheck4.js index 5bcf5bb63a7..5db14dcf42d 100644 --- a/tests/baselines/reference/recursiveBaseCheck4.js +++ b/tests/baselines/reference/recursiveBaseCheck4.js @@ -4,11 +4,11 @@ class M extends M { } //// [recursiveBaseCheck4.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/recursiveBaseCheck6.js b/tests/baselines/reference/recursiveBaseCheck6.js index 7c5134c397c..e1ac79b3a63 100644 --- a/tests/baselines/reference/recursiveBaseCheck6.js +++ b/tests/baselines/reference/recursiveBaseCheck6.js @@ -4,11 +4,11 @@ class S18
extends S18<{ S19: A; }>{ } //// [recursiveBaseCheck6.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/recursiveBaseConstructorCreation1.js b/tests/baselines/reference/recursiveBaseConstructorCreation1.js index 0caeb0b3b67..32a6a6c4de1 100644 --- a/tests/baselines/reference/recursiveBaseConstructorCreation1.js +++ b/tests/baselines/reference/recursiveBaseConstructorCreation1.js @@ -8,11 +8,11 @@ var x = new C2(); // Valid //// [recursiveBaseConstructorCreation1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/recursiveClassInstantiationsWithDefaultConstructors.js b/tests/baselines/reference/recursiveClassInstantiationsWithDefaultConstructors.js index 2b0c30072dc..1c33cf9f2c7 100644 --- a/tests/baselines/reference/recursiveClassInstantiationsWithDefaultConstructors.js +++ b/tests/baselines/reference/recursiveClassInstantiationsWithDefaultConstructors.js @@ -11,11 +11,11 @@ export class MemberNameArray extends MemberName { //// [recursiveClassInstantiationsWithDefaultConstructors.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/recursiveClassReferenceTest.js b/tests/baselines/reference/recursiveClassReferenceTest.js index 8469935d13b..bb711d95ce7 100644 --- a/tests/baselines/reference/recursiveClassReferenceTest.js +++ b/tests/baselines/reference/recursiveClassReferenceTest.js @@ -106,11 +106,11 @@ module Sample.Thing.Languages.PlainText { // Scenario 1: Test reqursive function call with "this" parameter // Scenario 2: Test recursive function call with cast and "this" parameter var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt b/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt index c1c48650241..10d04ca9719 100644 --- a/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt +++ b/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt @@ -27,11 +27,11 @@ sourceFile:recursiveClassReferenceTest.ts 2 >Emitted(2, 75) Source(2, 75) + SourceIndex(0) --- >>>var __extends = (this && this.__extends) || (function () { ->>> var __extendStatics = Object.setPrototypeOf || +>>> var extendStatics = Object.setPrototypeOf || >>> ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || >>> function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; >>> return function (d, b) { ->>> __extendStatics(d, b); +>>> extendStatics(d, b); >>> function __() { this.constructor = d; } >>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); >>> }; diff --git a/tests/baselines/reference/recursiveComplicatedClasses.js b/tests/baselines/reference/recursiveComplicatedClasses.js index f1f34e272f1..c81d10ed99b 100644 --- a/tests/baselines/reference/recursiveComplicatedClasses.js +++ b/tests/baselines/reference/recursiveComplicatedClasses.js @@ -26,11 +26,11 @@ class TypeSymbol extends InferenceSymbol { //// [recursiveComplicatedClasses.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/recursivelySpecializedConstructorDeclaration.js b/tests/baselines/reference/recursivelySpecializedConstructorDeclaration.js index e2a2e8dccff..e75661c2ea9 100644 --- a/tests/baselines/reference/recursivelySpecializedConstructorDeclaration.js +++ b/tests/baselines/reference/recursivelySpecializedConstructorDeclaration.js @@ -31,11 +31,11 @@ declare module MsPortal.Controls.Base.ItemList { //// [recursivelySpecializedConstructorDeclaration.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/reexportClassDefinition.js b/tests/baselines/reference/reexportClassDefinition.js index bbaf78a0283..5566d296883 100644 --- a/tests/baselines/reference/reexportClassDefinition.js +++ b/tests/baselines/reference/reexportClassDefinition.js @@ -34,11 +34,11 @@ module.exports = { //// [foo3.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js b/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js index cf9592ab4b2..6145c8927e0 100644 --- a/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js +++ b/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js @@ -1021,11 +1021,11 @@ module caurinus { //// [resolvingClassDeclarationWhenInBaseTypeResolution.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/returnInConstructor1.js b/tests/baselines/reference/returnInConstructor1.js index 0a71ab129a8..6bdcc0cb6a2 100644 --- a/tests/baselines/reference/returnInConstructor1.js +++ b/tests/baselines/reference/returnInConstructor1.js @@ -68,11 +68,11 @@ class I extends G { //// [returnInConstructor1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/returnStatements.js b/tests/baselines/reference/returnStatements.js index 999d12f15f8..d3ebb904355 100644 --- a/tests/baselines/reference/returnStatements.js +++ b/tests/baselines/reference/returnStatements.js @@ -26,11 +26,11 @@ function fn13(): C { return null; } //// [returnStatements.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.js b/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.js index 33723f36d6a..81f97455a1f 100644 --- a/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.js +++ b/tests/baselines/reference/scopeCheckExtendedClassInsidePublicMethod2.js @@ -10,11 +10,11 @@ class D extends C { //// [scopeCheckExtendedClassInsidePublicMethod2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.js b/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.js index bac44a57ac0..5532c363050 100644 --- a/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.js +++ b/tests/baselines/reference/scopeCheckExtendedClassInsideStaticMethod1.js @@ -10,11 +10,11 @@ class D extends C { //// [scopeCheckExtendedClassInsideStaticMethod1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/scopeTests.js b/tests/baselines/reference/scopeTests.js index 0086a0b08ce..b60242c0714 100644 --- a/tests/baselines/reference/scopeTests.js +++ b/tests/baselines/reference/scopeTests.js @@ -13,11 +13,11 @@ class D extends C { //// [scopeTests.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/shadowPrivateMembers.js b/tests/baselines/reference/shadowPrivateMembers.js index 2c56c8ddada..20be8a60287 100644 --- a/tests/baselines/reference/shadowPrivateMembers.js +++ b/tests/baselines/reference/shadowPrivateMembers.js @@ -5,11 +5,11 @@ class derived extends base { private n() {} } //// [shadowPrivateMembers.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js index b07cc2e8d8e..177c96a551a 100644 --- a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js +++ b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js @@ -9,11 +9,11 @@ class Greeter extends AbstractGreeter { //// [sourceMapValidationClassWithDefaultConstructorAndExtendsClause.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt index 00e15a91e19..94fa02e8e6b 100644 --- a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndExtendsClause.sourcemap.txt @@ -9,11 +9,11 @@ emittedFile:tests/cases/compiler/sourceMapValidationClassWithDefaultConstructorA sourceFile:sourceMapValidationClassWithDefaultConstructorAndExtendsClause.ts ------------------------------------------------------------------- >>>var __extends = (this && this.__extends) || (function () { ->>> var __extendStatics = Object.setPrototypeOf || +>>> var extendStatics = Object.setPrototypeOf || >>> ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || >>> function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; >>> return function (d, b) { ->>> __extendStatics(d, b); +>>> extendStatics(d, b); >>> function __() { this.constructor = d; } >>> d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); >>> }; diff --git a/tests/baselines/reference/specializedInheritedConstructors1.js b/tests/baselines/reference/specializedInheritedConstructors1.js index 3904422842f..1a9b07b4ca1 100644 --- a/tests/baselines/reference/specializedInheritedConstructors1.js +++ b/tests/baselines/reference/specializedInheritedConstructors1.js @@ -19,11 +19,11 @@ var myView = new MyView(m); // was error //// [specializedInheritedConstructors1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/specializedOverloadWithRestParameters.js b/tests/baselines/reference/specializedOverloadWithRestParameters.js index a40be7711c1..245fe1d40a9 100644 --- a/tests/baselines/reference/specializedOverloadWithRestParameters.js +++ b/tests/baselines/reference/specializedOverloadWithRestParameters.js @@ -14,11 +14,11 @@ function g(tagName: any): Base { //// [specializedOverloadWithRestParameters.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/staticFactory1.js b/tests/baselines/reference/staticFactory1.js index 77ce4a3d8bc..9e0d218ca50 100644 --- a/tests/baselines/reference/staticFactory1.js +++ b/tests/baselines/reference/staticFactory1.js @@ -15,11 +15,11 @@ d.foo(); //// [staticFactory1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/staticInheritance.js b/tests/baselines/reference/staticInheritance.js index a603fc607b9..6e76a0b3155 100644 --- a/tests/baselines/reference/staticInheritance.js +++ b/tests/baselines/reference/staticInheritance.js @@ -13,11 +13,11 @@ doThing(B); //OK //// [staticInheritance.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/staticMemberAccessOffDerivedType1.js b/tests/baselines/reference/staticMemberAccessOffDerivedType1.js index f07c4e9ae0f..ae6e906c635 100644 --- a/tests/baselines/reference/staticMemberAccessOffDerivedType1.js +++ b/tests/baselines/reference/staticMemberAccessOffDerivedType1.js @@ -11,11 +11,11 @@ class P extends SomeBase { //// [staticMemberAccessOffDerivedType1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/staticPropSuper.js b/tests/baselines/reference/staticPropSuper.js index dd36b0928f0..ba54ed851c1 100644 --- a/tests/baselines/reference/staticPropSuper.js +++ b/tests/baselines/reference/staticPropSuper.js @@ -37,11 +37,11 @@ class E extends A { //// [staticPropSuper.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/strictModeInConstructor.js b/tests/baselines/reference/strictModeInConstructor.js index 9c289a209b5..83ddc4bcf4e 100644 --- a/tests/baselines/reference/strictModeInConstructor.js +++ b/tests/baselines/reference/strictModeInConstructor.js @@ -62,11 +62,11 @@ class Ds extends A { //// [strictModeInConstructor.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/strictModeReservedWord.js b/tests/baselines/reference/strictModeReservedWord.js index 614f20eafd6..ed33097cb83 100644 --- a/tests/baselines/reference/strictModeReservedWord.js +++ b/tests/baselines/reference/strictModeReservedWord.js @@ -29,11 +29,11 @@ function foo() { //// [strictModeReservedWord.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/strictModeReservedWordInClassDeclaration.js b/tests/baselines/reference/strictModeReservedWordInClassDeclaration.js index 344f4edb83d..d40175b6d77 100644 --- a/tests/baselines/reference/strictModeReservedWordInClassDeclaration.js +++ b/tests/baselines/reference/strictModeReservedWordInClassDeclaration.js @@ -30,11 +30,11 @@ class H extends package.A { } //// [strictModeReservedWordInClassDeclaration.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js b/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js index 5fdc2444791..376574cc3dd 100644 --- a/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js +++ b/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js @@ -42,11 +42,11 @@ var b: { [x: string]: A } = { //// [stringIndexerConstrainsPropertyDeclarations2.js] // String indexer providing a constraint of a user defined type var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypesOfTypeParameter.js b/tests/baselines/reference/subtypesOfTypeParameter.js index d5d790c4d4f..469288cc968 100644 --- a/tests/baselines/reference/subtypesOfTypeParameter.js +++ b/tests/baselines/reference/subtypesOfTypeParameter.js @@ -108,11 +108,11 @@ function f2(x: T, y: U) { //// [subtypesOfTypeParameter.js] // checking whether other types are subtypes of type parameters var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints.js b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints.js index 20685aaf52c..90f362d9bc6 100644 --- a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints.js +++ b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints.js @@ -170,11 +170,11 @@ class D29 extends C3 { //// [subtypesOfTypeParameterWithConstraints.js] // checking whether other types are subtypes of type parameters with constraints var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints4.js b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints4.js index dbcdd47ba6d..3239afebe41 100644 --- a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints4.js +++ b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints4.js @@ -81,11 +81,11 @@ class D9 extends B1 { //// [subtypesOfTypeParameterWithConstraints4.js] // checking whether other types are subtypes of type parameters with constraints var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypesOfTypeParameterWithRecursiveConstraints.js b/tests/baselines/reference/subtypesOfTypeParameterWithRecursiveConstraints.js index 7b1a7738d99..d55bffe2c80 100644 --- a/tests/baselines/reference/subtypesOfTypeParameterWithRecursiveConstraints.js +++ b/tests/baselines/reference/subtypesOfTypeParameterWithRecursiveConstraints.js @@ -160,11 +160,11 @@ module M2 { //// [subtypesOfTypeParameterWithRecursiveConstraints.js] // checking whether other types are subtypes of type parameters with constraints var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingTransitivity.js b/tests/baselines/reference/subtypingTransitivity.js index 82a814c9c41..9292d1fb878 100644 --- a/tests/baselines/reference/subtypingTransitivity.js +++ b/tests/baselines/reference/subtypingTransitivity.js @@ -21,11 +21,11 @@ b.x = 1; // assigned number to string //// [subtypingTransitivity.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithCallSignatures2.js b/tests/baselines/reference/subtypingWithCallSignatures2.js index 9e080909067..aa919f2e737 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures2.js +++ b/tests/baselines/reference/subtypingWithCallSignatures2.js @@ -175,11 +175,11 @@ var r18 = foo18(r18arg1); //// [subtypingWithCallSignatures2.js] // checking subtype relations for function types as it relates to contextual signature instantiation var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithCallSignatures3.js b/tests/baselines/reference/subtypingWithCallSignatures3.js index 64b182872f6..c597a841828 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures3.js +++ b/tests/baselines/reference/subtypingWithCallSignatures3.js @@ -122,11 +122,11 @@ module WithGenericSignaturesInBaseType { // checking subtype relations for function types as it relates to contextual signature instantiation // error cases, so function calls will all result in 'any' var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithCallSignatures4.js b/tests/baselines/reference/subtypingWithCallSignatures4.js index e5770b58dfc..9b6939167ef 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures4.js +++ b/tests/baselines/reference/subtypingWithCallSignatures4.js @@ -114,11 +114,11 @@ var r18 = foo18(r18arg); //// [subtypingWithCallSignatures4.js] // checking subtype relations for function types as it relates to contextual signature instantiation var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithConstructSignatures2.js b/tests/baselines/reference/subtypingWithConstructSignatures2.js index 5961a930dca..e2653d77593 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures2.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures2.js @@ -175,11 +175,11 @@ var r18 = foo18(r18arg1); //// [subtypingWithConstructSignatures2.js] // checking subtype relations for function types as it relates to contextual signature instantiation var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithConstructSignatures3.js b/tests/baselines/reference/subtypingWithConstructSignatures3.js index 62c46d8add9..820d2221638 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures3.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures3.js @@ -124,11 +124,11 @@ module WithGenericSignaturesInBaseType { // checking subtype relations for function types as it relates to contextual signature instantiation // error cases, so function calls will all result in 'any' var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithConstructSignatures4.js b/tests/baselines/reference/subtypingWithConstructSignatures4.js index 93415f6d2e6..604604a59cf 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures4.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures4.js @@ -114,11 +114,11 @@ var r18 = foo18(r18arg); //// [subtypingWithConstructSignatures4.js] // checking subtype relations for function types as it relates to contextual signature instantiation var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithConstructSignatures5.js b/tests/baselines/reference/subtypingWithConstructSignatures5.js index 64e9965cb85..6473bbeafd8 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures5.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures5.js @@ -52,11 +52,11 @@ interface I extends B { // checking subtype relations for function types as it relates to contextual signature instantiation // same as subtypingWithConstructSignatures2 just with an extra level of indirection in the inheritance chain var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithConstructSignatures6.js b/tests/baselines/reference/subtypingWithConstructSignatures6.js index 247fcbbd1bc..dba21a9a3e2 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures6.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures6.js @@ -55,11 +55,11 @@ interface I9 extends A { // same as subtypingWithConstructSignatures4 but using class type parameters instead of generic signatures // all are errors var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithNumericIndexer.js b/tests/baselines/reference/subtypingWithNumericIndexer.js index 835f82c72b9..ceae3b0f84e 100644 --- a/tests/baselines/reference/subtypingWithNumericIndexer.js +++ b/tests/baselines/reference/subtypingWithNumericIndexer.js @@ -42,11 +42,11 @@ module Generics { //// [subtypingWithNumericIndexer.js] // Derived type indexer must be subtype of base type indexer var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithNumericIndexer3.js b/tests/baselines/reference/subtypingWithNumericIndexer3.js index 761739f547f..6f77e8a5d13 100644 --- a/tests/baselines/reference/subtypingWithNumericIndexer3.js +++ b/tests/baselines/reference/subtypingWithNumericIndexer3.js @@ -46,11 +46,11 @@ module Generics { //// [subtypingWithNumericIndexer3.js] // Derived type indexer must be subtype of base type indexer var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithNumericIndexer4.js b/tests/baselines/reference/subtypingWithNumericIndexer4.js index 3d8bac24a79..c25e7abb329 100644 --- a/tests/baselines/reference/subtypingWithNumericIndexer4.js +++ b/tests/baselines/reference/subtypingWithNumericIndexer4.js @@ -30,11 +30,11 @@ module Generics { //// [subtypingWithNumericIndexer4.js] // Derived type indexer must be subtype of base type indexer var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithObjectMembers.js b/tests/baselines/reference/subtypingWithObjectMembers.js index 7526548f24e..c7a2c5a938e 100644 --- a/tests/baselines/reference/subtypingWithObjectMembers.js +++ b/tests/baselines/reference/subtypingWithObjectMembers.js @@ -69,11 +69,11 @@ module TwoLevels { //// [subtypingWithObjectMembers.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithObjectMembers4.js b/tests/baselines/reference/subtypingWithObjectMembers4.js index ae620141587..4952a1e25ff 100644 --- a/tests/baselines/reference/subtypingWithObjectMembers4.js +++ b/tests/baselines/reference/subtypingWithObjectMembers4.js @@ -36,11 +36,11 @@ class B3 extends A3 { //// [subtypingWithObjectMembers4.js] // subtyping when property names do not match var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithObjectMembersAccessibility.js b/tests/baselines/reference/subtypingWithObjectMembersAccessibility.js index 54995020573..3b7b643b35e 100644 --- a/tests/baselines/reference/subtypingWithObjectMembersAccessibility.js +++ b/tests/baselines/reference/subtypingWithObjectMembersAccessibility.js @@ -36,11 +36,11 @@ class B3 extends A3 { //// [subtypingWithObjectMembersAccessibility.js] // Derived member is private, base member is not causes errors var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.js b/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.js index a2aca0d13bd..40910f393f7 100644 --- a/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.js +++ b/tests/baselines/reference/subtypingWithObjectMembersAccessibility2.js @@ -64,11 +64,11 @@ module ImplicitPublic { //// [subtypingWithObjectMembersAccessibility2.js] // Derived member is private, base member is not causes errors var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithStringIndexer.js b/tests/baselines/reference/subtypingWithStringIndexer.js index 7418e3dcb40..bfdb583ac8d 100644 --- a/tests/baselines/reference/subtypingWithStringIndexer.js +++ b/tests/baselines/reference/subtypingWithStringIndexer.js @@ -43,11 +43,11 @@ module Generics { //// [subtypingWithStringIndexer.js] // Derived type indexer must be subtype of base type indexer var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithStringIndexer3.js b/tests/baselines/reference/subtypingWithStringIndexer3.js index 081219774e5..3385ea5a792 100644 --- a/tests/baselines/reference/subtypingWithStringIndexer3.js +++ b/tests/baselines/reference/subtypingWithStringIndexer3.js @@ -46,11 +46,11 @@ module Generics { //// [subtypingWithStringIndexer3.js] // Derived type indexer must be subtype of base type indexer var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/subtypingWithStringIndexer4.js b/tests/baselines/reference/subtypingWithStringIndexer4.js index b0c55cf6398..04075c906f4 100644 --- a/tests/baselines/reference/subtypingWithStringIndexer4.js +++ b/tests/baselines/reference/subtypingWithStringIndexer4.js @@ -30,11 +30,11 @@ module Generics { //// [subtypingWithStringIndexer4.js] // Derived type indexer must be subtype of base type indexer var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/super.js b/tests/baselines/reference/super.js index 8984c5860ea..98c38569c37 100644 --- a/tests/baselines/reference/super.js +++ b/tests/baselines/reference/super.js @@ -39,11 +39,11 @@ s.foo() + ss.foo(); //// [super.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/super1.js b/tests/baselines/reference/super1.js index 49a057a7f49..7d695c2aeca 100644 --- a/tests/baselines/reference/super1.js +++ b/tests/baselines/reference/super1.js @@ -68,11 +68,11 @@ module Base4 { //// [super1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/super2.js b/tests/baselines/reference/super2.js index 451c569c907..80bfbe0d8be 100644 --- a/tests/baselines/reference/super2.js +++ b/tests/baselines/reference/super2.js @@ -52,11 +52,11 @@ results1.x() + results1.y() + results2.y(); //// [super2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superAccess.js b/tests/baselines/reference/superAccess.js index a218ba0968a..a1303185739 100644 --- a/tests/baselines/reference/superAccess.js +++ b/tests/baselines/reference/superAccess.js @@ -15,11 +15,11 @@ class MyDerived extends MyBase { //// [superAccess.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superAccess2.js b/tests/baselines/reference/superAccess2.js index d678ff22480..b4766c67bdd 100644 --- a/tests/baselines/reference/superAccess2.js +++ b/tests/baselines/reference/superAccess2.js @@ -26,11 +26,11 @@ class Q extends P { //// [superAccess2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superAccessInFatArrow1.js b/tests/baselines/reference/superAccessInFatArrow1.js index a58b119c67f..b4e81c65da5 100644 --- a/tests/baselines/reference/superAccessInFatArrow1.js +++ b/tests/baselines/reference/superAccessInFatArrow1.js @@ -17,11 +17,11 @@ module test { //// [superAccessInFatArrow1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallArgsMustMatch.js b/tests/baselines/reference/superCallArgsMustMatch.js index d488506e019..113fbd69625 100644 --- a/tests/baselines/reference/superCallArgsMustMatch.js +++ b/tests/baselines/reference/superCallArgsMustMatch.js @@ -27,11 +27,11 @@ class T6 extends T5{ //// [superCallArgsMustMatch.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallAssignResult.js b/tests/baselines/reference/superCallAssignResult.js index 50e1c20b6bc..ef0493d3b2b 100644 --- a/tests/baselines/reference/superCallAssignResult.js +++ b/tests/baselines/reference/superCallAssignResult.js @@ -12,11 +12,11 @@ class H extends E { //// [superCallAssignResult.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing1.js b/tests/baselines/reference/superCallBeforeThisAccessing1.js index 71c9e05e7cb..3045968da16 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing1.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing1.js @@ -18,11 +18,11 @@ class D extends Base { //// [superCallBeforeThisAccessing1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing2.js b/tests/baselines/reference/superCallBeforeThisAccessing2.js index a18505f8203..da634558f12 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing2.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing2.js @@ -12,11 +12,11 @@ class D extends Base { //// [superCallBeforeThisAccessing2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing3.js b/tests/baselines/reference/superCallBeforeThisAccessing3.js index 61ed4fe5c4c..99feb79042c 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing3.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing3.js @@ -15,11 +15,11 @@ class D extends Base { //// [superCallBeforeThisAccessing3.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing4.js b/tests/baselines/reference/superCallBeforeThisAccessing4.js index cf5e9e89eba..0ee568c527e 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing4.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing4.js @@ -17,11 +17,11 @@ class E extends null { //// [superCallBeforeThisAccessing4.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing5.js b/tests/baselines/reference/superCallBeforeThisAccessing5.js index 31087b70094..8cd5cda0520 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing5.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing5.js @@ -9,11 +9,11 @@ class D extends null { //// [superCallBeforeThisAccessing5.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing6.js b/tests/baselines/reference/superCallBeforeThisAccessing6.js index 0c3d20c102f..d5c6fd9c684 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing6.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing6.js @@ -12,11 +12,11 @@ class D extends Base { //// [superCallBeforeThisAccessing6.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing7.js b/tests/baselines/reference/superCallBeforeThisAccessing7.js index ba79e0b65ae..af649aa4c30 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing7.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing7.js @@ -15,11 +15,11 @@ class D extends Base { //// [superCallBeforeThisAccessing7.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing8.js b/tests/baselines/reference/superCallBeforeThisAccessing8.js index 4f6a383aadf..ae115d0ffbd 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing8.js +++ b/tests/baselines/reference/superCallBeforeThisAccessing8.js @@ -15,11 +15,11 @@ class D extends Base { //// [superCallBeforeThisAccessing8.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType1.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType1.js index e24d0b53c1f..4ee302020ef 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType1.js @@ -13,11 +13,11 @@ class D extends B { //// [superCallFromClassThatDerivesFromGenericType1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType2.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType2.js index 3413bc18467..3d9c8ff717e 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType2.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericType2.js @@ -12,11 +12,11 @@ class D extends B { //// [superCallFromClassThatDerivesFromGenericType2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js index f31fd399b36..18038207125 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js @@ -12,11 +12,11 @@ class B extends A { //// [superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js index 4c99415f643..77b0f4af212 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js @@ -12,11 +12,11 @@ class B extends A { //// [superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js b/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js index bbea46b2783..861bd9b470c 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js @@ -12,11 +12,11 @@ class B extends A { //// [superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallInNonStaticMethod.js b/tests/baselines/reference/superCallInNonStaticMethod.js index 54c77157590..056dda2bf33 100644 --- a/tests/baselines/reference/superCallInNonStaticMethod.js +++ b/tests/baselines/reference/superCallInNonStaticMethod.js @@ -52,11 +52,11 @@ class Other extends Doing { //// [superCallInNonStaticMethod.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallInStaticMethod.js b/tests/baselines/reference/superCallInStaticMethod.js index 15d46bc1577..4e2610414b7 100644 --- a/tests/baselines/reference/superCallInStaticMethod.js +++ b/tests/baselines/reference/superCallInStaticMethod.js @@ -48,11 +48,11 @@ class Other extends Doing { //// [superCallInStaticMethod.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallInsideClassDeclaration.js b/tests/baselines/reference/superCallInsideClassDeclaration.js index 7f5913549cc..1533df5f305 100644 --- a/tests/baselines/reference/superCallInsideClassDeclaration.js +++ b/tests/baselines/reference/superCallInsideClassDeclaration.js @@ -18,11 +18,11 @@ class B extends A { //// [superCallInsideClassDeclaration.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallInsideClassExpression.js b/tests/baselines/reference/superCallInsideClassExpression.js index 0f1fa8dc549..1f3242c8b1e 100644 --- a/tests/baselines/reference/superCallInsideClassExpression.js +++ b/tests/baselines/reference/superCallInsideClassExpression.js @@ -18,11 +18,11 @@ class B extends A { //// [superCallInsideClassExpression.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallInsideObjectLiteralExpression.js b/tests/baselines/reference/superCallInsideObjectLiteralExpression.js index 0130a6c2b48..eb7df511e05 100644 --- a/tests/baselines/reference/superCallInsideObjectLiteralExpression.js +++ b/tests/baselines/reference/superCallInsideObjectLiteralExpression.js @@ -14,11 +14,11 @@ class B extends A { //// [superCallInsideObjectLiteralExpression.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallOutsideConstructor.js b/tests/baselines/reference/superCallOutsideConstructor.js index 0251b19231e..60e9411d414 100644 --- a/tests/baselines/reference/superCallOutsideConstructor.js +++ b/tests/baselines/reference/superCallOutsideConstructor.js @@ -24,11 +24,11 @@ var d = new D(); //// [superCallOutsideConstructor.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallParameterContextualTyping1.js b/tests/baselines/reference/superCallParameterContextualTyping1.js index a3d5303efaa..cfb0efa9d3d 100644 --- a/tests/baselines/reference/superCallParameterContextualTyping1.js +++ b/tests/baselines/reference/superCallParameterContextualTyping1.js @@ -14,11 +14,11 @@ class B extends A { //// [superCallParameterContextualTyping1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallParameterContextualTyping2.js b/tests/baselines/reference/superCallParameterContextualTyping2.js index e90755ffee8..f1180347142 100644 --- a/tests/baselines/reference/superCallParameterContextualTyping2.js +++ b/tests/baselines/reference/superCallParameterContextualTyping2.js @@ -13,11 +13,11 @@ class C extends A { //// [superCallParameterContextualTyping2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallParameterContextualTyping3.js b/tests/baselines/reference/superCallParameterContextualTyping3.js index fe68db83a04..c955f210779 100644 --- a/tests/baselines/reference/superCallParameterContextualTyping3.js +++ b/tests/baselines/reference/superCallParameterContextualTyping3.js @@ -33,11 +33,11 @@ class C extends CBase { //// [superCallParameterContextualTyping3.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallWithCommentEmit01.js b/tests/baselines/reference/superCallWithCommentEmit01.js index 3a2981b8466..993776f0057 100644 --- a/tests/baselines/reference/superCallWithCommentEmit01.js +++ b/tests/baselines/reference/superCallWithCommentEmit01.js @@ -12,11 +12,11 @@ class B extends A { //// [superCallWithCommentEmit01.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallWithMissingBaseClass.js b/tests/baselines/reference/superCallWithMissingBaseClass.js index 7ae8d5b3099..a10281c4d3c 100644 --- a/tests/baselines/reference/superCallWithMissingBaseClass.js +++ b/tests/baselines/reference/superCallWithMissingBaseClass.js @@ -11,11 +11,11 @@ class Foo extends Bar { //// [superCallWithMissingBaseClass.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCalls.js b/tests/baselines/reference/superCalls.js index ac9b0878083..e5c014a4e16 100644 --- a/tests/baselines/reference/superCalls.js +++ b/tests/baselines/reference/superCalls.js @@ -32,11 +32,11 @@ class OtherDerived extends OtherBase { //// [superCalls.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superCallsInConstructor.js b/tests/baselines/reference/superCallsInConstructor.js index d44ae6c11ec..2290ff746cd 100644 --- a/tests/baselines/reference/superCallsInConstructor.js +++ b/tests/baselines/reference/superCallsInConstructor.js @@ -22,11 +22,11 @@ class Derived extends Base { //// [superCallsInConstructor.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superErrors.js b/tests/baselines/reference/superErrors.js index d7078f39c16..cf7edc83a63 100644 --- a/tests/baselines/reference/superErrors.js +++ b/tests/baselines/reference/superErrors.js @@ -53,11 +53,11 @@ class RegisteredUser extends User { //// [superErrors.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superInCatchBlock1.js b/tests/baselines/reference/superInCatchBlock1.js index b9d7c910977..31015ee9cfc 100644 --- a/tests/baselines/reference/superInCatchBlock1.js +++ b/tests/baselines/reference/superInCatchBlock1.js @@ -15,11 +15,11 @@ class B extends A { //// [superInCatchBlock1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superInConstructorParam1.js b/tests/baselines/reference/superInConstructorParam1.js index 0f6ec4e386f..940559c6828 100644 --- a/tests/baselines/reference/superInConstructorParam1.js +++ b/tests/baselines/reference/superInConstructorParam1.js @@ -12,11 +12,11 @@ class C extends B { //// [superInConstructorParam1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superInLambdas.js b/tests/baselines/reference/superInLambdas.js index 9eeeaa0723c..83dad0b3251 100644 --- a/tests/baselines/reference/superInLambdas.js +++ b/tests/baselines/reference/superInLambdas.js @@ -69,11 +69,11 @@ class RegisteredUser4 extends User { //// [superInLambdas.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superInObjectLiterals_ES5.js b/tests/baselines/reference/superInObjectLiterals_ES5.js index cfcd7a4de2a..f86052cb923 100644 --- a/tests/baselines/reference/superInObjectLiterals_ES5.js +++ b/tests/baselines/reference/superInObjectLiterals_ES5.js @@ -61,11 +61,11 @@ class B extends A { //// [superInObjectLiterals_ES5.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superNewCall1.js b/tests/baselines/reference/superNewCall1.js index 5a5a91cd8f7..311f3bb6acc 100644 --- a/tests/baselines/reference/superNewCall1.js +++ b/tests/baselines/reference/superNewCall1.js @@ -14,11 +14,11 @@ class B extends A { //// [superNewCall1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superPropertyAccess.js b/tests/baselines/reference/superPropertyAccess.js index f6c09ab9092..0c01882e6ad 100644 --- a/tests/baselines/reference/superPropertyAccess.js +++ b/tests/baselines/reference/superPropertyAccess.js @@ -38,11 +38,11 @@ class MyDerived extends MyBase { //// [superPropertyAccess.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superPropertyAccess1.js b/tests/baselines/reference/superPropertyAccess1.js index 3eef279e454..8779dd7069b 100644 --- a/tests/baselines/reference/superPropertyAccess1.js +++ b/tests/baselines/reference/superPropertyAccess1.js @@ -29,11 +29,11 @@ class D extends C { //// [superPropertyAccess1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superPropertyAccess2.js b/tests/baselines/reference/superPropertyAccess2.js index 767b08dc2b9..a6fb7c95b0c 100644 --- a/tests/baselines/reference/superPropertyAccess2.js +++ b/tests/baselines/reference/superPropertyAccess2.js @@ -29,11 +29,11 @@ class D extends C { //// [superPropertyAccess2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superPropertyAccessInComputedPropertiesOfNestedType_ES5.js b/tests/baselines/reference/superPropertyAccessInComputedPropertiesOfNestedType_ES5.js index 014110485e6..1b906baa3bb 100644 --- a/tests/baselines/reference/superPropertyAccessInComputedPropertiesOfNestedType_ES5.js +++ b/tests/baselines/reference/superPropertyAccessInComputedPropertiesOfNestedType_ES5.js @@ -16,11 +16,11 @@ class B extends A { //// [superPropertyAccessInComputedPropertiesOfNestedType_ES5.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superPropertyAccessNoError.js b/tests/baselines/reference/superPropertyAccessNoError.js index 10e64d97a92..d2e3d7aad41 100644 --- a/tests/baselines/reference/superPropertyAccessNoError.js +++ b/tests/baselines/reference/superPropertyAccessNoError.js @@ -78,11 +78,11 @@ instance.returnThis().fn(); //super.publicStaticMemberFunction in static member function of derived class //super.publicStaticMemberFunction in static member accessor(get and set) of derived class var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superPropertyAccess_ES5.js b/tests/baselines/reference/superPropertyAccess_ES5.js index 2a48bfbdba7..6d10e60f1c0 100644 --- a/tests/baselines/reference/superPropertyAccess_ES5.js +++ b/tests/baselines/reference/superPropertyAccess_ES5.js @@ -31,11 +31,11 @@ class B extends A { //// [superPropertyAccess_ES5.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superPropertyInConstructorBeforeSuperCall.js b/tests/baselines/reference/superPropertyInConstructorBeforeSuperCall.js index 3188e79bd7e..6e87bfc97c5 100644 --- a/tests/baselines/reference/superPropertyInConstructorBeforeSuperCall.js +++ b/tests/baselines/reference/superPropertyInConstructorBeforeSuperCall.js @@ -17,11 +17,11 @@ class C2 extends B { //// [superPropertyInConstructorBeforeSuperCall.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superSymbolIndexedAccess5.js b/tests/baselines/reference/superSymbolIndexedAccess5.js index ec26d7dd67f..715c6568a2f 100644 --- a/tests/baselines/reference/superSymbolIndexedAccess5.js +++ b/tests/baselines/reference/superSymbolIndexedAccess5.js @@ -15,11 +15,11 @@ class Bar extends Foo { //// [superSymbolIndexedAccess5.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superSymbolIndexedAccess6.js b/tests/baselines/reference/superSymbolIndexedAccess6.js index 09bef412516..c92ecda44c1 100644 --- a/tests/baselines/reference/superSymbolIndexedAccess6.js +++ b/tests/baselines/reference/superSymbolIndexedAccess6.js @@ -15,11 +15,11 @@ class Bar extends Foo { //// [superSymbolIndexedAccess6.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superWithGenericSpecialization.js b/tests/baselines/reference/superWithGenericSpecialization.js index afd049ed8a2..6f3cee935ef 100644 --- a/tests/baselines/reference/superWithGenericSpecialization.js +++ b/tests/baselines/reference/superWithGenericSpecialization.js @@ -16,11 +16,11 @@ var r2: number = d.y; //// [superWithGenericSpecialization.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superWithGenerics.js b/tests/baselines/reference/superWithGenerics.js index 148fac45a70..a66656832f4 100644 --- a/tests/baselines/reference/superWithGenerics.js +++ b/tests/baselines/reference/superWithGenerics.js @@ -13,11 +13,11 @@ class D extends B { //// [superWithGenerics.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superWithTypeArgument.js b/tests/baselines/reference/superWithTypeArgument.js index 22b802ec2df..158799cc93d 100644 --- a/tests/baselines/reference/superWithTypeArgument.js +++ b/tests/baselines/reference/superWithTypeArgument.js @@ -11,11 +11,11 @@ class D extends C { //// [superWithTypeArgument.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superWithTypeArgument2.js b/tests/baselines/reference/superWithTypeArgument2.js index ace1355c374..349589625fb 100644 --- a/tests/baselines/reference/superWithTypeArgument2.js +++ b/tests/baselines/reference/superWithTypeArgument2.js @@ -11,11 +11,11 @@ class D extends C { //// [superWithTypeArgument2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/superWithTypeArgument3.js b/tests/baselines/reference/superWithTypeArgument3.js index 318b45a9981..a8325a5a594 100644 --- a/tests/baselines/reference/superWithTypeArgument3.js +++ b/tests/baselines/reference/superWithTypeArgument3.js @@ -15,11 +15,11 @@ class D extends C { //// [superWithTypeArgument3.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/super_inside-object-literal-getters-and-setters.js b/tests/baselines/reference/super_inside-object-literal-getters-and-setters.js index 2fca7ec7fe4..0547650c7d8 100644 --- a/tests/baselines/reference/super_inside-object-literal-getters-and-setters.js +++ b/tests/baselines/reference/super_inside-object-literal-getters-and-setters.js @@ -29,11 +29,11 @@ class SuperObjectTest extends F { //// [super_inside-object-literal-getters-and-setters.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/switchStatements.js b/tests/baselines/reference/switchStatements.js index 5af42176dfc..7d8c2477b68 100644 --- a/tests/baselines/reference/switchStatements.js +++ b/tests/baselines/reference/switchStatements.js @@ -57,11 +57,11 @@ switch (((x: T) => '')(1)) { } //// [switchStatements.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/systemModuleWithSuperClass.js b/tests/baselines/reference/systemModuleWithSuperClass.js index c9adf13f48c..76c4648daa1 100644 --- a/tests/baselines/reference/systemModuleWithSuperClass.js +++ b/tests/baselines/reference/systemModuleWithSuperClass.js @@ -33,11 +33,11 @@ System.register([], function (exports_1, context_1) { System.register(["./foo"], function (exports_1, context_1) { "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/targetTypeBaseCalls.js b/tests/baselines/reference/targetTypeBaseCalls.js index 92ad5afba94..70e14fd521f 100644 --- a/tests/baselines/reference/targetTypeBaseCalls.js +++ b/tests/baselines/reference/targetTypeBaseCalls.js @@ -20,11 +20,11 @@ class Bar extends Foo { constructor() { super(function(s) { s = 5 }) } } // err //// [targetTypeBaseCalls.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/thisInInvalidContexts.js b/tests/baselines/reference/thisInInvalidContexts.js index a2237177f84..59530b8903e 100644 --- a/tests/baselines/reference/thisInInvalidContexts.js +++ b/tests/baselines/reference/thisInInvalidContexts.js @@ -50,11 +50,11 @@ enum SomeEnum { //// [thisInInvalidContexts.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/thisInInvalidContextsExternalModule.js b/tests/baselines/reference/thisInInvalidContextsExternalModule.js index ccb2a71080f..37a1fb596d4 100644 --- a/tests/baselines/reference/thisInInvalidContextsExternalModule.js +++ b/tests/baselines/reference/thisInInvalidContextsExternalModule.js @@ -51,11 +51,11 @@ export = this; // Should be an error //// [thisInInvalidContextsExternalModule.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/thisInSuperCall.js b/tests/baselines/reference/thisInSuperCall.js index b537231f74b..58eadaf874f 100644 --- a/tests/baselines/reference/thisInSuperCall.js +++ b/tests/baselines/reference/thisInSuperCall.js @@ -24,11 +24,11 @@ class Foo3 extends Base { //// [thisInSuperCall.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/thisInSuperCall1.js b/tests/baselines/reference/thisInSuperCall1.js index 9f40814cc5f..c975c10927e 100644 --- a/tests/baselines/reference/thisInSuperCall1.js +++ b/tests/baselines/reference/thisInSuperCall1.js @@ -12,11 +12,11 @@ class Foo extends Base { //// [thisInSuperCall1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/thisInSuperCall2.js b/tests/baselines/reference/thisInSuperCall2.js index ebbb974f23f..be9b2bbb9f3 100644 --- a/tests/baselines/reference/thisInSuperCall2.js +++ b/tests/baselines/reference/thisInSuperCall2.js @@ -21,11 +21,11 @@ class Foo2 extends Base { //// [thisInSuperCall2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/thisInSuperCall3.js b/tests/baselines/reference/thisInSuperCall3.js index 5c9405534f4..2e07d294843 100644 --- a/tests/baselines/reference/thisInSuperCall3.js +++ b/tests/baselines/reference/thisInSuperCall3.js @@ -14,11 +14,11 @@ class Foo extends Base { //// [thisInSuperCall3.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/thisTypeInFunctions.js b/tests/baselines/reference/thisTypeInFunctions.js index 21714308cb1..8a09f18b3f1 100644 --- a/tests/baselines/reference/thisTypeInFunctions.js +++ b/tests/baselines/reference/thisTypeInFunctions.js @@ -196,11 +196,11 @@ function missingTypeIsImplicitAny(this, a: number) { return this.anything + a; } //// [thisTypeInFunctions.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/thisTypeInFunctionsNegative.js b/tests/baselines/reference/thisTypeInFunctionsNegative.js index 27bc47b84d2..c68aa2ee0a0 100644 --- a/tests/baselines/reference/thisTypeInFunctionsNegative.js +++ b/tests/baselines/reference/thisTypeInFunctionsNegative.js @@ -178,11 +178,11 @@ c.explicitProperty = (this, m) => m + this.n; //// [thisTypeInFunctionsNegative.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/tsxCorrectlyParseLessThanComparison1.js b/tests/baselines/reference/tsxCorrectlyParseLessThanComparison1.js index 55d3ba54221..b092b4c96d5 100644 --- a/tests/baselines/reference/tsxCorrectlyParseLessThanComparison1.js +++ b/tests/baselines/reference/tsxCorrectlyParseLessThanComparison1.js @@ -22,11 +22,11 @@ export class ShortDetails extends React.Component<{ id: number }, {}> { //// [tsxCorrectlyParseLessThanComparison1.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/tsxDynamicTagName5.js b/tests/baselines/reference/tsxDynamicTagName5.js index 2b055cd5a5a..d40e84c9078 100644 --- a/tests/baselines/reference/tsxDynamicTagName5.js +++ b/tests/baselines/reference/tsxDynamicTagName5.js @@ -22,11 +22,11 @@ export class Text extends React.Component<{}, {}> { //// [app.jsx] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/tsxDynamicTagName7.js b/tests/baselines/reference/tsxDynamicTagName7.js index 3108566db85..8e051ec9012 100644 --- a/tests/baselines/reference/tsxDynamicTagName7.js +++ b/tests/baselines/reference/tsxDynamicTagName7.js @@ -22,11 +22,11 @@ export class Text extends React.Component<{}, {}> { //// [app.jsx] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/tsxDynamicTagName8.js b/tests/baselines/reference/tsxDynamicTagName8.js index 8859061b463..6f247113055 100644 --- a/tests/baselines/reference/tsxDynamicTagName8.js +++ b/tests/baselines/reference/tsxDynamicTagName8.js @@ -22,11 +22,11 @@ export class Text extends React.Component<{}, {}> { //// [app.jsx] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/tsxDynamicTagName9.js b/tests/baselines/reference/tsxDynamicTagName9.js index 818e384fdf6..652d6334216 100644 --- a/tests/baselines/reference/tsxDynamicTagName9.js +++ b/tests/baselines/reference/tsxDynamicTagName9.js @@ -22,11 +22,11 @@ export class Text extends React.Component<{}, {}> { //// [app.jsx] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/tsxExternalModuleEmit1.js b/tests/baselines/reference/tsxExternalModuleEmit1.js index 559306b800b..b030df4f253 100644 --- a/tests/baselines/reference/tsxExternalModuleEmit1.js +++ b/tests/baselines/reference/tsxExternalModuleEmit1.js @@ -34,11 +34,11 @@ export class Button extends React.Component { //// [button.jsx] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; @@ -58,11 +58,11 @@ exports.Button = Button; //// [app.jsx] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/tsxStatelessFunctionComponents2.js b/tests/baselines/reference/tsxStatelessFunctionComponents2.js index 12c2f1f9ab3..e0165faa36a 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponents2.js +++ b/tests/baselines/reference/tsxStatelessFunctionComponents2.js @@ -41,11 +41,11 @@ let i =
x.propertyNotOnHtmlDivElement} />; //// [file.jsx] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/tsxUnionTypeComponent1.js b/tests/baselines/reference/tsxUnionTypeComponent1.js index 2b1634555ef..601be253e50 100644 --- a/tests/baselines/reference/tsxUnionTypeComponent1.js +++ b/tests/baselines/reference/tsxUnionTypeComponent1.js @@ -27,11 +27,11 @@ class MyButtonComponent extends React.Component<{},{}> { //// [file.js] "use strict"; var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeAssertions.js b/tests/baselines/reference/typeAssertions.js index 3107a196f2a..84101c7db2d 100644 --- a/tests/baselines/reference/typeAssertions.js +++ b/tests/baselines/reference/typeAssertions.js @@ -53,11 +53,11 @@ if((numOrStr === undefined) as numOrStr is string) { // Error //// [typeAssertions.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardFunction.js b/tests/baselines/reference/typeGuardFunction.js index 0eb332af60e..8ce969eaa80 100644 --- a/tests/baselines/reference/typeGuardFunction.js +++ b/tests/baselines/reference/typeGuardFunction.js @@ -85,11 +85,11 @@ let union3: boolean | B = isA(union2) || union2; //// [typeGuardFunction.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardFunctionErrors.js b/tests/baselines/reference/typeGuardFunctionErrors.js index 21d9dfeebf1..1471a235b89 100644 --- a/tests/baselines/reference/typeGuardFunctionErrors.js +++ b/tests/baselines/reference/typeGuardFunctionErrors.js @@ -147,11 +147,11 @@ if (hasMissingParameter()) { //// [typeGuardFunctionErrors.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardFunctionGenerics.js b/tests/baselines/reference/typeGuardFunctionGenerics.js index 0344e168c53..9fec88b1959 100644 --- a/tests/baselines/reference/typeGuardFunctionGenerics.js +++ b/tests/baselines/reference/typeGuardFunctionGenerics.js @@ -35,11 +35,11 @@ let test3: B = funE(isB, 1); //// [typeGuardFunctionGenerics.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardFunctionOfFormThis.js b/tests/baselines/reference/typeGuardFunctionOfFormThis.js index 54110ba24d8..58b9c9027fa 100644 --- a/tests/baselines/reference/typeGuardFunctionOfFormThis.js +++ b/tests/baselines/reference/typeGuardFunctionOfFormThis.js @@ -143,11 +143,11 @@ interface MimicGuardInterface { //// [typeGuardFunctionOfFormThis.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.js b/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.js index a79efd94c8f..b53f3ca511a 100644 --- a/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.js +++ b/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.js @@ -61,11 +61,11 @@ else { //// [typeGuardFunctionOfFormThisErrors.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardOfFormInstanceOf.js b/tests/baselines/reference/typeGuardOfFormInstanceOf.js index fa99dbd87cf..23a1770d564 100644 --- a/tests/baselines/reference/typeGuardOfFormInstanceOf.js +++ b/tests/baselines/reference/typeGuardOfFormInstanceOf.js @@ -74,11 +74,11 @@ else { // it is a subtype of the type of x, or // - when false, has no effect on the type of x. var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardOfFormIsType.js b/tests/baselines/reference/typeGuardOfFormIsType.js index f1a94c5167a..3ea3839651e 100644 --- a/tests/baselines/reference/typeGuardOfFormIsType.js +++ b/tests/baselines/reference/typeGuardOfFormIsType.js @@ -39,11 +39,11 @@ var r2: C2 | D1 = isC1(c2Ord1) && c2Ord1; // C2 | D1 //// [typeGuardOfFormIsType.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardOfFormThisMember.js b/tests/baselines/reference/typeGuardOfFormThisMember.js index b7d442711d7..6540c298766 100644 --- a/tests/baselines/reference/typeGuardOfFormThisMember.js +++ b/tests/baselines/reference/typeGuardOfFormThisMember.js @@ -84,11 +84,11 @@ namespace Test { //// [typeGuardOfFormThisMember.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js b/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js index e2b8b8ec168..9e4fd71e1ec 100644 --- a/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js +++ b/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js @@ -34,11 +34,11 @@ namespace Test { //// [typeGuardOfFormThisMemberErrors.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeMatch2.js b/tests/baselines/reference/typeMatch2.js index 84ff8f72c5c..b051cdf506f 100644 --- a/tests/baselines/reference/typeMatch2.js +++ b/tests/baselines/reference/typeMatch2.js @@ -46,11 +46,11 @@ function f4() { //// [typeMatch2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeOfSuperCall.js b/tests/baselines/reference/typeOfSuperCall.js index eca6ad1bc0a..48f57c4c9f7 100644 --- a/tests/baselines/reference/typeOfSuperCall.js +++ b/tests/baselines/reference/typeOfSuperCall.js @@ -10,11 +10,11 @@ class D extends C { //// [typeOfSuperCall.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeParameterAsBaseClass.js b/tests/baselines/reference/typeParameterAsBaseClass.js index dc579b7b62f..444e44c3687 100644 --- a/tests/baselines/reference/typeParameterAsBaseClass.js +++ b/tests/baselines/reference/typeParameterAsBaseClass.js @@ -4,11 +4,11 @@ class C2 implements T {} //// [typeParameterAsBaseClass.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeParameterAsBaseType.js b/tests/baselines/reference/typeParameterAsBaseType.js index 80317823731..00d8781efca 100644 --- a/tests/baselines/reference/typeParameterAsBaseType.js +++ b/tests/baselines/reference/typeParameterAsBaseType.js @@ -14,11 +14,11 @@ interface I2 extends U { } // type parameters cannot be used as base types // these are all errors var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeParameterExtendingUnion1.js b/tests/baselines/reference/typeParameterExtendingUnion1.js index 80fd91c64b8..7b456983f2e 100644 --- a/tests/baselines/reference/typeParameterExtendingUnion1.js +++ b/tests/baselines/reference/typeParameterExtendingUnion1.js @@ -14,11 +14,11 @@ function f(a: T) { //// [typeParameterExtendingUnion1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeParameterExtendingUnion2.js b/tests/baselines/reference/typeParameterExtendingUnion2.js index 8dc8db48ed8..508eb8e0616 100644 --- a/tests/baselines/reference/typeParameterExtendingUnion2.js +++ b/tests/baselines/reference/typeParameterExtendingUnion2.js @@ -14,11 +14,11 @@ function f(a: T) { //// [typeParameterExtendingUnion2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeRelationships.js b/tests/baselines/reference/typeRelationships.js index 42ff32f9ab1..93d920a6c8c 100644 --- a/tests/baselines/reference/typeRelationships.js +++ b/tests/baselines/reference/typeRelationships.js @@ -42,11 +42,11 @@ class D extends C { //// [typeRelationships.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeValueConflict1.js b/tests/baselines/reference/typeValueConflict1.js index a84939d2e10..065c2968a12 100644 --- a/tests/baselines/reference/typeValueConflict1.js +++ b/tests/baselines/reference/typeValueConflict1.js @@ -13,11 +13,11 @@ module M2 { //// [typeValueConflict1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeValueConflict2.js b/tests/baselines/reference/typeValueConflict2.js index 40bdb364218..6cbcc708a0d 100644 --- a/tests/baselines/reference/typeValueConflict2.js +++ b/tests/baselines/reference/typeValueConflict2.js @@ -20,11 +20,11 @@ module M3 { //// [typeValueConflict2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typeofClass2.js b/tests/baselines/reference/typeofClass2.js index d7e92bd6a8f..e829411ed32 100644 --- a/tests/baselines/reference/typeofClass2.js +++ b/tests/baselines/reference/typeofClass2.js @@ -23,11 +23,11 @@ var r2: typeof d; //// [typeofClass2.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typesWithSpecializedCallSignatures.js b/tests/baselines/reference/typesWithSpecializedCallSignatures.js index 24ea5d0ed64..282a3f72f15 100644 --- a/tests/baselines/reference/typesWithSpecializedCallSignatures.js +++ b/tests/baselines/reference/typesWithSpecializedCallSignatures.js @@ -44,11 +44,11 @@ var r3: Base = c.foo('hm'); //// [typesWithSpecializedCallSignatures.js] // basic uses of specialized signatures without errors var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/typesWithSpecializedConstructSignatures.js b/tests/baselines/reference/typesWithSpecializedConstructSignatures.js index 396f24805eb..b27eaf2725c 100644 --- a/tests/baselines/reference/typesWithSpecializedConstructSignatures.js +++ b/tests/baselines/reference/typesWithSpecializedConstructSignatures.js @@ -42,11 +42,11 @@ var r3: Base = new a('hm'); //// [typesWithSpecializedConstructSignatures.js] // basic uses of specialized signatures without errors var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/undeclaredBase.js b/tests/baselines/reference/undeclaredBase.js index a280e90e75c..ed2f2d66d93 100644 --- a/tests/baselines/reference/undeclaredBase.js +++ b/tests/baselines/reference/undeclaredBase.js @@ -5,11 +5,11 @@ module M { export class C extends M.I { } } //// [undeclaredBase.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/undefinedIsSubtypeOfEverything.js b/tests/baselines/reference/undefinedIsSubtypeOfEverything.js index 56ae1ae2447..c00281f2b8c 100644 --- a/tests/baselines/reference/undefinedIsSubtypeOfEverything.js +++ b/tests/baselines/reference/undefinedIsSubtypeOfEverything.js @@ -124,11 +124,11 @@ class D17 extends Base { //// [undefinedIsSubtypeOfEverything.js] // undefined is a subtype of every other types, no errors expected below var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/underscoreMapFirst.js b/tests/baselines/reference/underscoreMapFirst.js index dea8545ce6f..c0b6cf1b6da 100644 --- a/tests/baselines/reference/underscoreMapFirst.js +++ b/tests/baselines/reference/underscoreMapFirst.js @@ -50,11 +50,11 @@ class MyView extends View { //// [underscoreMapFirst.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/underscoreThisInDerivedClass01.js b/tests/baselines/reference/underscoreThisInDerivedClass01.js index 0528b292208..410503dc6fc 100644 --- a/tests/baselines/reference/underscoreThisInDerivedClass01.js +++ b/tests/baselines/reference/underscoreThisInDerivedClass01.js @@ -26,11 +26,11 @@ class D extends C { //// [underscoreThisInDerivedClass01.js] // @target es5 var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/underscoreThisInDerivedClass02.js b/tests/baselines/reference/underscoreThisInDerivedClass02.js index 5901d6e2a7c..365ba64a2c6 100644 --- a/tests/baselines/reference/underscoreThisInDerivedClass02.js +++ b/tests/baselines/reference/underscoreThisInDerivedClass02.js @@ -20,11 +20,11 @@ class D extends C { //// [underscoreThisInDerivedClass02.js] // @target es5 var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/unionTypeEquivalence.js b/tests/baselines/reference/unionTypeEquivalence.js index 28401c6db6b..a11476152f9 100644 --- a/tests/baselines/reference/unionTypeEquivalence.js +++ b/tests/baselines/reference/unionTypeEquivalence.js @@ -21,11 +21,11 @@ var z1: string | typeof BC; //// [unionTypeEquivalence.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/unionTypeFromArrayLiteral.js b/tests/baselines/reference/unionTypeFromArrayLiteral.js index bf882f163eb..9b42b1b7532 100644 --- a/tests/baselines/reference/unionTypeFromArrayLiteral.js +++ b/tests/baselines/reference/unionTypeFromArrayLiteral.js @@ -29,11 +29,11 @@ var arr9 = [e, f]; // (E|F)[] // Otherwise, if the array literal is contextually typed by a type that has a property with the numeric name ‘0’, the resulting type is a tuple type constructed from the types of the element expressions. // Otherwise, the resulting type is an array type with an element type that is the union of the types of the element expressions. var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/unionTypesAssignability.js b/tests/baselines/reference/unionTypesAssignability.js index 837116d719d..87be4dbb4fd 100644 --- a/tests/baselines/reference/unionTypesAssignability.js +++ b/tests/baselines/reference/unionTypesAssignability.js @@ -75,11 +75,11 @@ function foo(t: T, u: U) { //// [unionTypesAssignability.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/unknownSymbols1.js b/tests/baselines/reference/unknownSymbols1.js index 540d8058331..7ec636f672a 100644 --- a/tests/baselines/reference/unknownSymbols1.js +++ b/tests/baselines/reference/unknownSymbols1.js @@ -34,11 +34,11 @@ class C5 { //// [unknownSymbols1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/unspecializedConstraints.js b/tests/baselines/reference/unspecializedConstraints.js index 2094404dd0a..53b4fcf2f22 100644 --- a/tests/baselines/reference/unspecializedConstraints.js +++ b/tests/baselines/reference/unspecializedConstraints.js @@ -155,11 +155,11 @@ module ts { //// [unspecializedConstraints.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js b/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js index 12dd53ebea9..2adb8dae89f 100644 --- a/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js +++ b/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js @@ -45,11 +45,11 @@ c5(1); // error //// [untypedFunctionCallsWithTypeParameters1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/unusedClassesinNamespace4.js b/tests/baselines/reference/unusedClassesinNamespace4.js index 7b97612fa61..85c5cc6aae7 100644 --- a/tests/baselines/reference/unusedClassesinNamespace4.js +++ b/tests/baselines/reference/unusedClassesinNamespace4.js @@ -16,11 +16,11 @@ namespace Validation { //// [unusedClassesinNamespace4.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/unusedIdentifiersConsolidated1.js b/tests/baselines/reference/unusedIdentifiersConsolidated1.js index 2d89558f83d..6615c45cf29 100644 --- a/tests/baselines/reference/unusedIdentifiersConsolidated1.js +++ b/tests/baselines/reference/unusedIdentifiersConsolidated1.js @@ -104,11 +104,11 @@ namespace Greeter { //// [unusedIdentifiersConsolidated1.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/validUseOfThisInSuper.js b/tests/baselines/reference/validUseOfThisInSuper.js index ad56ae8cdd3..869e848ad62 100644 --- a/tests/baselines/reference/validUseOfThisInSuper.js +++ b/tests/baselines/reference/validUseOfThisInSuper.js @@ -11,11 +11,11 @@ class Super extends Base { //// [validUseOfThisInSuper.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; diff --git a/tests/baselines/reference/varArgsOnConstructorTypes.js b/tests/baselines/reference/varArgsOnConstructorTypes.js index 0577bdb645a..c859b4f8260 100644 --- a/tests/baselines/reference/varArgsOnConstructorTypes.js +++ b/tests/baselines/reference/varArgsOnConstructorTypes.js @@ -26,11 +26,11 @@ reg.register(B); //// [varArgsOnConstructorTypes.js] var __extends = (this && this.__extends) || (function () { - var __extendStatics = Object.setPrototypeOf || + var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { - __extendStatics(d, b); + extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; From 4affef2f2abecda2d65bda02cdf2bedbb1204661 Mon Sep 17 00:00:00 2001 From: vvakame Date: Sat, 31 Dec 2016 22:31:48 +0900 Subject: [PATCH 11/15] update baselines --- .../captureSuperPropertyAccessInSuperCall01.js | 15 ++++++++++----- .../reference/decoratorOnClassConstructor4.js | 15 ++++++++++----- tests/baselines/reference/jsxInExtendsClause.js | 15 ++++++++++----- tests/baselines/reference/jsxViaImport.2.js | 15 ++++++++++----- tests/baselines/reference/newTarget.es5.js | 15 ++++++++++----- .../subSubClassCanAccessProtectedConstructor.js | 15 ++++++++++----- .../reference/superPropertyAccessInSuperCall01.js | 15 ++++++++++----- 7 files changed, 70 insertions(+), 35 deletions(-) diff --git a/tests/baselines/reference/captureSuperPropertyAccessInSuperCall01.js b/tests/baselines/reference/captureSuperPropertyAccessInSuperCall01.js index 4f350c1a3a3..98ca7cb47d7 100644 --- a/tests/baselines/reference/captureSuperPropertyAccessInSuperCall01.js +++ b/tests/baselines/reference/captureSuperPropertyAccessInSuperCall01.js @@ -12,11 +12,16 @@ class B extends A { } //// [captureSuperPropertyAccessInSuperCall01.js] -var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A(f) { } diff --git a/tests/baselines/reference/decoratorOnClassConstructor4.js b/tests/baselines/reference/decoratorOnClassConstructor4.js index 22414e89e43..a9b30440f6b 100644 --- a/tests/baselines/reference/decoratorOnClassConstructor4.js +++ b/tests/baselines/reference/decoratorOnClassConstructor4.js @@ -15,11 +15,16 @@ class C extends A { } //// [decoratorOnClassConstructor4.js] -var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); diff --git a/tests/baselines/reference/jsxInExtendsClause.js b/tests/baselines/reference/jsxInExtendsClause.js index 8204067cb04..aa1c611783a 100644 --- a/tests/baselines/reference/jsxInExtendsClause.js +++ b/tests/baselines/reference/jsxInExtendsClause.js @@ -12,11 +12,16 @@ class Foo extends createComponentClass(() => class extends React.Component<{}, { }) {} //// [jsxInExtendsClause.js] -var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Foo = (function (_super) { __extends(Foo, _super); function Foo() { diff --git a/tests/baselines/reference/jsxViaImport.2.js b/tests/baselines/reference/jsxViaImport.2.js index 19432238e0b..635754599b1 100644 --- a/tests/baselines/reference/jsxViaImport.2.js +++ b/tests/baselines/reference/jsxViaImport.2.js @@ -25,11 +25,16 @@ class TestComponent extends React.Component { //// [consumer.jsx] "use strict"; -var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); /// var BaseComponent_1 = require("BaseComponent"); var TestComponent = (function (_super) { diff --git a/tests/baselines/reference/newTarget.es5.js b/tests/baselines/reference/newTarget.es5.js index 0de967d5477..2ebe4bfcadc 100644 --- a/tests/baselines/reference/newTarget.es5.js +++ b/tests/baselines/reference/newTarget.es5.js @@ -33,11 +33,16 @@ const O = { //// [newTarget.es5.js] -var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A() { var _newTarget = this.constructor; diff --git a/tests/baselines/reference/subSubClassCanAccessProtectedConstructor.js b/tests/baselines/reference/subSubClassCanAccessProtectedConstructor.js index 15d6fc70da5..f3e5175c4a3 100644 --- a/tests/baselines/reference/subSubClassCanAccessProtectedConstructor.js +++ b/tests/baselines/reference/subSubClassCanAccessProtectedConstructor.js @@ -17,11 +17,16 @@ class SubclassOfSubclass extends Subclass { //// [subSubClassCanAccessProtectedConstructor.js] -var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var Base = (function () { function Base() { this.instance1 = new Base(); // allowed diff --git a/tests/baselines/reference/superPropertyAccessInSuperCall01.js b/tests/baselines/reference/superPropertyAccessInSuperCall01.js index de96b2bbc5e..d5800323de2 100644 --- a/tests/baselines/reference/superPropertyAccessInSuperCall01.js +++ b/tests/baselines/reference/superPropertyAccessInSuperCall01.js @@ -12,11 +12,16 @@ class B extends A { } //// [superPropertyAccessInSuperCall01.js] -var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var A = (function () { function A(f) { } From d5d9b1bb5e4b6c4ef94dcaa01924657c01c6f2a3 Mon Sep 17 00:00:00 2001 From: Klaus Meinhardt Date: Sun, 1 Jan 2017 22:59:14 +0100 Subject: [PATCH 12/15] Add DefaultClause to BlockLike union --- src/compiler/types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 6eebb0b99d7..008cbe3dfb4 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -1550,7 +1550,7 @@ namespace ts { name?: Identifier; } - export type BlockLike = SourceFile | Block | ModuleBlock | CaseClause; + export type BlockLike = SourceFile | Block | ModuleBlock | CaseOrDefaultClause; export interface Block extends Statement { kind: SyntaxKind.Block; From 54ceb51d85712a38cb86d37d3d10189532f13f41 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Tue, 3 Jan 2017 10:59:31 -0800 Subject: [PATCH 13/15] Fix the emit when jsx attribute expression is empty Fixes #12994 --- src/compiler/transformers/jsx.ts | 3 ++ ...AttributeWithoutExpressionReact.errors.txt | 33 +++++++++++++++++++ .../jsxAttributeWithoutExpressionReact.js | 14 ++++++++ .../jsxAttributeWithoutExpressionReact.tsx | 9 +++++ 4 files changed, 59 insertions(+) create mode 100644 tests/baselines/reference/jsxAttributeWithoutExpressionReact.errors.txt create mode 100644 tests/baselines/reference/jsxAttributeWithoutExpressionReact.js create mode 100644 tests/cases/compiler/jsxAttributeWithoutExpressionReact.tsx diff --git a/src/compiler/transformers/jsx.ts b/src/compiler/transformers/jsx.ts index ecb5dd053e0..c0179a10e88 100644 --- a/src/compiler/transformers/jsx.ts +++ b/src/compiler/transformers/jsx.ts @@ -150,6 +150,9 @@ namespace ts { return decoded ? createLiteral(decoded, /*location*/ node) : node; } else if (node.kind === SyntaxKind.JsxExpression) { + if (node.expression === undefined) { + return createLiteral(true); + } return visitJsxExpression(node); } else { diff --git a/tests/baselines/reference/jsxAttributeWithoutExpressionReact.errors.txt b/tests/baselines/reference/jsxAttributeWithoutExpressionReact.errors.txt new file mode 100644 index 00000000000..3801562709a --- /dev/null +++ b/tests/baselines/reference/jsxAttributeWithoutExpressionReact.errors.txt @@ -0,0 +1,33 @@ +tests/cases/compiler/jsxAttributeWithoutExpressionReact.tsx(3,2): error TS2304: Cannot find name 'View'. +tests/cases/compiler/jsxAttributeWithoutExpressionReact.tsx(4,6): error TS2304: Cannot find name 'ListView'. +tests/cases/compiler/jsxAttributeWithoutExpressionReact.tsx(5,10): error TS2304: Cannot find name 'RefreshControl'. +tests/cases/compiler/jsxAttributeWithoutExpressionReact.tsx(5,35): error TS17000: JSX attributes must only be assigned a non-empty 'expression'. +tests/cases/compiler/jsxAttributeWithoutExpressionReact.tsx(6,44): error TS17000: JSX attributes must only be assigned a non-empty 'expression'. +tests/cases/compiler/jsxAttributeWithoutExpressionReact.tsx(7,7): error TS2304: Cannot find name 'ListView'. +tests/cases/compiler/jsxAttributeWithoutExpressionReact.tsx(8,3): error TS2304: Cannot find name 'View'. + + +==== tests/cases/compiler/jsxAttributeWithoutExpressionReact.tsx (7 errors) ==== + + declare var React: any; + + ~~~~ +!!! error TS2304: Cannot find name 'View'. + + ~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'RefreshControl'. + ~~ +!!! error TS17000: JSX attributes must only be assigned a non-empty 'expression'. + } dataSource={this.state.ds} renderRow={}> + ~~ +!!! error TS17000: JSX attributes must only be assigned a non-empty 'expression'. + + ~~~~~~~~ +!!! error TS2304: Cannot find name 'ListView'. + + ~~~~ +!!! error TS2304: Cannot find name 'View'. + \ No newline at end of file diff --git a/tests/baselines/reference/jsxAttributeWithoutExpressionReact.js b/tests/baselines/reference/jsxAttributeWithoutExpressionReact.js new file mode 100644 index 00000000000..f07cbabd7f8 --- /dev/null +++ b/tests/baselines/reference/jsxAttributeWithoutExpressionReact.js @@ -0,0 +1,14 @@ +//// [jsxAttributeWithoutExpressionReact.tsx] + +declare var React: any; + + + } dataSource={this.state.ds} renderRow={}> + + + + +//// [jsxAttributeWithoutExpressionReact.js] +React.createElement(View, null, + React.createElement(ListView, { refreshControl: React.createElement(RefreshControl, { onRefresh: true, refreshing: true }), dataSource: this.state.ds, renderRow: true })); diff --git a/tests/cases/compiler/jsxAttributeWithoutExpressionReact.tsx b/tests/cases/compiler/jsxAttributeWithoutExpressionReact.tsx new file mode 100644 index 00000000000..a108a405f97 --- /dev/null +++ b/tests/cases/compiler/jsxAttributeWithoutExpressionReact.tsx @@ -0,0 +1,9 @@ +//@jsx: react + +declare var React: any; + + + } dataSource={this.state.ds} renderRow={}> + + From c67d1a444588a41cf4c70b93949d73c8b004c883 Mon Sep 17 00:00:00 2001 From: Zhengbo Li Date: Wed, 4 Jan 2017 12:59:05 -0800 Subject: [PATCH 14/15] Let fourslash tests support extended tsconfig --- src/harness/fourslash.ts | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index 3dd6b504615..3de0dba4fdf 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -262,23 +262,12 @@ namespace FourSlash { // Initialize the language service with all the scripts let startResolveFileRef: FourSlashFile; + let configFileName: string; ts.forEach(testData.files, file => { // Create map between fileName and its content for easily looking up when resolveReference flag is specified this.inputFiles[file.fileName] = file.content; - if (ts.getBaseFileName(file.fileName).toLowerCase() === "tsconfig.json") { - const configJson = ts.parseConfigFileTextToJson(file.fileName, file.content); - assert.isTrue(configJson.config !== undefined); - - // Extend our existing compiler options so that we can also support tsconfig only options - if (configJson.config.compilerOptions) { - const baseDirectory = ts.normalizePath(ts.getDirectoryPath(file.fileName)); - const tsConfig = ts.convertCompilerOptionsFromJson(configJson.config.compilerOptions, baseDirectory, file.fileName); - - if (!tsConfig.errors || !tsConfig.errors.length) { - compilationOptions = ts.extend(compilationOptions, tsConfig.options); - } - } + configFileName = file.fileName; } if (!startResolveFileRef && file.fileOptions[metadataOptionNames.resolveReference] === "true") { @@ -290,6 +279,21 @@ namespace FourSlash { } }); + if (configFileName) { + const baseDir = ts.normalizePath(ts.getDirectoryPath(configFileName)); + const host = new Utils.MockParseConfigHost(baseDir, /*ignoreCase*/ false, this.inputFiles); + + const configJsonObj = ts.parseConfigFileTextToJson(configFileName, this.inputFiles[configFileName]); + assert.isTrue(configJsonObj.config !== undefined); + + const { options, errors } = ts.parseJsonConfigFileContent(configJsonObj.config, host, baseDir); + + // Extend our existing compiler options so that we can also support tsconfig only options + if (!errors || errors.length === 0) { + compilationOptions = ts.extend(compilationOptions, options); + } + } + if (compilationOptions.typeRoots) { compilationOptions.typeRoots = compilationOptions.typeRoots.map(p => ts.getNormalizedAbsolutePath(p, this.basePath)); From b19a949ce49abc55c9ee5194dbb56b496d70434a Mon Sep 17 00:00:00 2001 From: Zhengbo Li Date: Wed, 4 Jan 2017 13:35:42 -0800 Subject: [PATCH 15/15] Support path that specified index --- src/services/codefixes/importFixes.ts | 3 +- .../importNameCodeFixNewImportPaths2.ts | 28 +++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 tests/cases/fourslash/importNameCodeFixNewImportPaths2.ts diff --git a/src/services/codefixes/importFixes.ts b/src/services/codefixes/importFixes.ts index 3dc33e39897..3627d60492d 100644 --- a/src/services/codefixes/importFixes.ts +++ b/src/services/codefixes/importFixes.ts @@ -443,6 +443,7 @@ namespace ts.codefix { return undefined; } + const relativeNameWithIndex = removeFileExtension(relativeName); relativeName = removeExtensionAndIndexPostFix(relativeName); if (options.paths) { @@ -462,7 +463,7 @@ namespace ts.codefix { return key.replace("\*", matchedStar); } } - else if (pattern === relativeName) { + else if (pattern === relativeName || pattern === relativeNameWithIndex) { return key; } } diff --git a/tests/cases/fourslash/importNameCodeFixNewImportPaths2.ts b/tests/cases/fourslash/importNameCodeFixNewImportPaths2.ts new file mode 100644 index 00000000000..b455538de08 --- /dev/null +++ b/tests/cases/fourslash/importNameCodeFixNewImportPaths2.ts @@ -0,0 +1,28 @@ +/// + +//// [|foo/*0*/();|] + +// @Filename: folder_b/index.ts +//// export function foo() {}; + +// @Filename: tsconfig.path.json +//// { +//// "compilerOptions": { +//// "baseUrl": ".", +//// "paths": { +//// "b": [ "folder_b/index" ] +//// } +//// } +//// } + +// @Filename: tsconfig.json +//// { +//// "extends": "./tsconfig.path", +//// "compilerOptions": { } +//// } + +verify.importFixAtPosition([ +`import { foo } from "b"; + +foo();` +]); \ No newline at end of file