From 7ea37342408df46b9005560235fbcb7eac8bcdd9 Mon Sep 17 00:00:00 2001 From: vvakame Date: Fri, 25 Nov 2016 13:45:37 +0900 Subject: [PATCH] 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 __()); };